Hi Norbert, It turns out there is a typo in the documentation. The xsd PREFIX is incorrect, it should be:
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> E.g. the ending slash should have been a hash sign. Docs will be fixed, thanks for reporting! Kind regards, Geert From: <[email protected]<mailto:[email protected]>> on behalf of "Weissenberg, Norbert" <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Thursday, January 7, 2016 at 11:09 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] WG: FILTER conditions with xsd constants Hello, there is no comment yet on my posting concerning “FILTER conditions with xsd constants”, which can be found at http://developer.marklogic.com/pipermail/general/2015-December/018414.html It e.g. deals with problems executing a simple query sample from the Semantics Developer’s Guide using ML 8.0-4. What’s wrong? Best regards, Norbert Von: Weissenberg, Norbert Gesendet: Montag, 21. Dezember 2015 11:39 An: '[email protected]<mailto:'[email protected]>' Betreff: FILTER conditions with xsd constants 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 returns: your query returned an empty sequence ML 8.0-4 returns: [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"<http://dbpedia....%22),%20%3coptions%20xmlns=%22xdmp:eval%22>><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
