<https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#this>
        a                          <https://kgdev.net/ns#Definition> , <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h3 id=\"this\">Filter Evaluation</h3>\n\n<p>SPARQL provides a subset of the functions and operators defined by XQuery <a href=\"http://www.w3.org/TR/xquery/#mapping\" shape=\"rect\">Operator Mapping</a>. XQuery 1.0 section <a href=\"http://www.w3.org/TR/xquery/#id-expression-processing\" shape=\"rect\">2.2.3 Expression Processing</a> describes the invocation of XPath functions. The following rules accommodate the differences in the data and execution models between XQuery and SPARQL:</p>\n<ul>\n<li>Unlike XPath/XQuery, SPARQL functions do not process node sequences. When interpreting the semantics of XPath functions, assume that each argument is a sequence of a single node.</li>\n<li>Functions invoked with an argument of the wrong type will produce a <a href=\"http://www.w3.org/TR/xquery/#dt-type-error\" shape=\"rect\">type error</a>. Effective boolean value arguments (labeled \"xsd:boolean (EBV)\" in the operator mapping table below), are coerced to <code>xsd:boolean</code> using the <a href=\"#ebv\" shape=\"rect\">EBV rules</a> in section 17.2.2.</li>\n<li>Apart from <a href=\"../SparqlOps/func-forms/#func-bound\" shape=\"rect\">BOUND</a>, <a href=\"../SparqlOps/func-forms/#func-coalesce\" shape=\"rect\">COALESCE</a>, <a href=\"../SparqlOps/func-forms/#func-filter-exists\" shape=\"rect\">NOT EXISTS</a> and <a href=\"../SparqlOps/func-forms/#func-filter-exists\" shape=\"rect\">EXISTS</a>, all functions and operators operate on RDF Terms and will produce a type error if any arguments are unbound.</li>\n<li>Any expression other than <a href=\"../SparqlOps/func-forms/#func-logical-or\" shape=\"rect\">logical-or</a> (<code>||</code>) or <a href=\"../SparqlOps/func-forms/#func-logical-and\" shape=\"rect\">logical-and</a> (<code>&amp;&amp;</code>) that encounters an error will produce that error.</li>\n<li>A <a href=\"../SparqlOps/func-forms/#func-logical-or\" shape=\"rect\">logical-or</a> that encounters an error on only one branch will return TRUE if the other branch is TRUE and an error if the other branch is FALSE.</li>\n<li>A <a href=\"../SparqlOps/func-forms/#func-logical-and\" shape=\"rect\">logical-and</a> that encounters an error on only one branch will return an error if the other branch is TRUE and FALSE if the other branch is FALSE.</li>\n<li>A <a href=\"../SparqlOps/func-forms/#func-logical-or\" shape=\"rect\">logical-or</a> or <a href=\"../SparqlOps/func-forms/#func-logical-and\" shape=\"rect\">logical-and</a> that encounters errors on both branches will produce <em>either</em> of the errors.</li>\n</ul>\n<p>The logical-and and logical-or truth table for true ( T ), false ( F ), and error ( E ) is as follows:</p>\n<table class=\"truthTable table table-striped\">\n   <thead>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">A</th>\n         <th colspan=\"1\" rowspan=\"1\">B</th>\n         <th colspan=\"1\" rowspan=\"1\">A || B</th>\n         <th colspan=\"1\" rowspan=\"1\">A &amp;&amp; B</th>\n      </tr>\n   </thead>\n   <tbody>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">T</th>\n         <th colspan=\"1\" rowspan=\"1\">T</th>\n         <td colspan=\"1\" rowspan=\"1\">T</td>\n         <td colspan=\"1\" rowspan=\"1\">T</td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">T</th>\n         <th colspan=\"1\" rowspan=\"1\">F</th>\n         <td colspan=\"1\" rowspan=\"1\">T</td>\n         <td colspan=\"1\" rowspan=\"1\">F</td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">F</th>\n         <th colspan=\"1\" rowspan=\"1\">T</th>\n         <td colspan=\"1\" rowspan=\"1\">T</td>\n         <td colspan=\"1\" rowspan=\"1\">F</td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">F</th>\n         <th colspan=\"1\" rowspan=\"1\">F</th>\n         <td colspan=\"1\" rowspan=\"1\">F</td>\n         <td colspan=\"1\" rowspan=\"1\">F</td>\n      </tr>\n   </tbody>\n   <tbody>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">T</th>\n         <th colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </th>\n         <td colspan=\"1\" rowspan=\"1\">T</td>\n         <td colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </th>\n         <th colspan=\"1\" rowspan=\"1\">T</th>\n         <td colspan=\"1\" rowspan=\"1\">T</td>\n         <td colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">F</th>\n         <th colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </th>\n         <td colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </td>\n         <td colspan=\"1\" rowspan=\"1\">F</td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </th>\n         <th colspan=\"1\" rowspan=\"1\">F</th>\n         <td colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </td>\n         <td colspan=\"1\" rowspan=\"1\">F</td>\n      </tr>\n      <tr>\n         <th colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </th>\n         <th colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </th>\n         <td colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </td>\n         <td colspan=\"1\" rowspan=\"1\">\n            <span class=\"error\">E</span>\n         </td>\n      </tr>\n   </tbody>\n</table></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#evaluation> ;
        <https://schema.org/name>  "Filter Evaluation" .

<https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#invocation>
        a       <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h4 id=\"invocation\">Invocation</h4>\n\n<p>SPARQL defines a syntax for invoking functions on a list of arguments. Unless otherwise noted, these are invoked as follows:</p>\n<ul>\n<li>Argument expressions are evaluated, producing argument values. The order of argument evaluation is not defined.</li>\n<li>Numeric arguments are promoted as necessary to fit the expected types for that function or operator.</li>\n<li>The function or operator is invoked on the argument values.</li>\n</ul>\n<p>If any of these steps fails, the invocation generates an error. The effects of errors are defined in <a href=\"#this\" shape=\"rect\">Filter Evaluation</a>.</p>\n<p>There are also \"<a href=\"../SparqlOps/func-forms/#this\" shape=\"rect\">functional forms</a>\" which have different evaluation rules to functions as specified by each such form.</p></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/2000/01/rdf-schema#seeAlso>
                <https://kgdev.net/specifications/sparql11-query/expressions/SparqlOps/func-forms/#this> , <https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#this> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#invocation> .

<https://kgdev.net/specifications/sparql11-query/expressions/evaluation/>
        a       <https://www.w3.org/ns/ldt/document-hierarchy#Item> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#this> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2>
                <https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#invocation> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3>
                <https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#ebv> ;
        <http://purl.org/dc/terms/modified>
                "2023-07-10T15:36:01.881Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <http://purl.org/dc/terms/title>
                "Filter Evaluation" ;
        <http://rdfs.org/sioc/ns#has_container>
                <https://kgdev.net/specifications/sparql11-query/expressions/> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#evaluation> ;
        <http://xmlns.com/foaf/0.1/primaryTopic>
                <https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#this> .

<https://kgdev.net/specifications/sparql11-query/expressions/evaluation/#ebv>
        a       <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h4 id=\"ebv\">Effective Boolean Value (EBV)</h4>\n\n<p>Effective boolean value is used to calculate the arguments to the logical functions <a href=\"../SparqlOps/func-forms/#func-logical-and\" shape=\"rect\">logical-and</a>, <a href=\"../SparqlOps/func-forms/#func-logical-or\" shape=\"rect\">logical-or</a>, and <a href=\"http://www.w3.org/TR/xpath-functions/#func-not\" shape=\"rect\">fn:not</a>, as well as evaluate the result of a <code>FILTER</code> expression.</p>\n<p>The XQuery <a href=\"http://www.w3.org/TR/xquery/#id-ebv\" shape=\"rect\">Effective Boolean Value</a> rules rely on the definition of XPath's <a href=\"http://www.w3.org/TR/xpath-functions/#func-boolean\" shape=\"rect\">fn:boolean</a>. The following rules reflect the rules for <code>fn:boolean</code> applied to the argument types present in SPARQL queries:</p>\n<ul>\n<li>The EBV of any literal whose type is <code>xsd:boolean</code> or  numeric  is false if the lexical form is not valid for that datatype (e.g. \"abc\"^^xsd:integer).</li>\n<li>If the argument is a  typed literal  with a  datatype  of <code>xsd:boolean</code>, and it has a valid lexical form, the EBV is the value of that argument.</li>\n<li>If the argument is a  plain literal  or a  typed literal  with a  datatype  of <code>xsd:string</code>, the EBV is false if the operand value has zero length; otherwise the EBV is true.</li>\n<li>If the argument is a  numeric  type or a  typed literal  with a datatype derived from a  numeric  type, and it has a valid lexical form, the EBV is false if the operand value is NaN or is numerically equal to zero; otherwise the EBV is true.</li>\n<li>All other arguments, including unbound arguments, produce a type error.</li>\n</ul>\n<p>An EBV of <code>true</code> is represented as a  typed literal  with a datatype of <code>xsd:boolean</code> and a lexical value of \"true\"; an EBV of false is represented as a  typed literal  with a datatype of <code>xsd:boolean</code> and a lexical value of \"false\".</p></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/2000/01/rdf-schema#seeAlso>
                <http://www.w3.org/TR/xpath-functions/#func-not> , <http://www.w3.org/TR/xquery/#id-ebv> , <http://www.w3.org/TR/xpath-functions/#func-boolean> , <https://kgdev.net/specifications/sparql11-query/expressions/SparqlOps/func-forms/#func-logical-and> , <https://kgdev.net/specifications/sparql11-query/expressions/SparqlOps/func-forms/#func-logical-or> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#ebv> .
