Hello, I have some difficulties using FILTER conditions with xsd constants. Some samples:
1) The SPARQL query from MarkLogic Semantics Developer's Guide page 92 behaves differently in ML 8.0-3.2 and ML 8.0-4 (both in Query Console, with dbPedia ttl data imported as described): PREFIX onto: <http://dbpedia.org/ontology/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns> SELECT ?s WHERE {?s rdf:type foaf:Person . ?s onto:birthDate ?bd . FILTER (?bd > "1999-01-01"^^xsd:date) } This query is in the older 8.0-3.2 version of the guide on page 91, but unchanged. ML 8.0-3.2 your query returned an empty sequence ML 8.0-4: [1.0-ml] XDMP-SPQLNOINEQ: amped-qconsole:qconsole-sparql($query, (), (), (), ()) -- Inequality operations are not supported on values of unknown type, unsupport type, or schema invalid values: "1999-01-01"^^<http://www.w3.org/2001/XMLSchema/date> Stack Trace At line 4 column 15: In xdmp:eval("import module namespace amped-qconsole = "http://marklogic....", (fn:QName("","query"), "# Semantics Guide page 92 PREFIX onto: <http://dbpedia...."), <options xmlns="xdmp:eval"><database>17903852568952700635</database><modules>25934252216363...</options>) 2. 3. PREFIX onto: <http://dbpedia.org/ontology/> 4. PREFIX foaf: <http://xmlns.com/foaf/0.1/> ... 2) The following query variant returns birthDates of type xs:gMonthDay (???) in both ML versions: PREFIX onto: <http://dbpedia.org/ontology/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns> SELECT * WHERE { ?s onto:birthDate ?bd . FILTER (?bd != "1999-01-01"^^xsd:date) } LIMIT 100 <http://dbpedia.org/resource/A._E._J._Collins> "--08-18"^^xs:gMonthDay <http://dbpedia.org/resource/A._F._M._Ahsanuddin_Chowdhury> "--07-01"^^xs:gMonthDay ... but without the FILTER line the birthDate is okay, but the order of results is changed: <http://dbpedia.org/resource/%22Dr._Death%22_Steve_Williams> "1960-05-14"^^xs:date <http://dbpedia.org/resource/%22Irish%22_Teddy_Mann> "1951-09-05"^^xs:date ... 3) The same problems occur when comparing e.g. integers: although they are correctly tagged: (a simple query returns e.g. "30"^^<xsd:integer>), a FILTER (?d > "3"^^xsd:integer) in 8.0.4 again returns the error from 1): Inequality operations are not supported on values of unknown type Best regards and seasons greatings, Norbert
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
