Thanks, formatting improvements applied and published Rob
On 04/02/2015 07:15, "Jeff Benton" <anonym...@apache.org> wrote: >Clone URL (Committers only): >https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://jena. >apache.org/documentation%2Fquery%2Fextension.mdtext > >Jeff Benton > >Index: trunk/content/documentation/query/extension.mdtext >=================================================================== >--- trunk/content/documentation/query/extension.mdtext (revision 1655891) >+++ trunk/content/documentation/query/extension.mdtext (working copy) >@@ -52,7 +52,12 @@ > The ARQ function library uses this mechanism. The namespace of the > ARQ function library is <`http://jena.hpl.hp.com/ARQ/function#>`. > >- PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>PREFIX dc: ><http://purl.org/dc/elements/1.1/>SELECT ?v{ ?x dc:date ?date . FILTER >(?date < afn:now() )} >+ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> >+ PREFIX dc: <http://purl.org/dc/elements/1.1/> >+ SELECT ?v { >+ ?x dc:date ?date . >+ FILTER (?date < afn:now() ) >+ } > > The afn:now returns the time the query started. > >@@ -80,15 +85,26 @@ > One common case is for access to collections (RDF lists) or > containers (rdf:Bag, rdf:Seq, rdf:Alt). > >- PREFIX list: <http://jena.hpl.hp.com/ARQ/list#>SELECT ?member{ ?x :p >?list . # Some way to find the list ?list list:member ?member .} >+ PREFIX list: <http://jena.hpl.hp.com/ARQ/list#> >+ SELECT ?member { >+ ?x :p ?list . # Some way to find the list >+ ?list list:member ?member . >+ } > > which can also be written: > >- PREFIX list: <http://jena.hpl.hp.com/ARQ/list#>SELECT ?member{ ?x :p >[ list:member ?member ] } >+ PREFIX list: <http://jena.hpl.hp.com/ARQ/list#> >+ SELECT ?member { >+ ?x :p [ list:member ?member ] >+ } > > Likewise, RDF containers: > >- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>SELECT ?member{ >?x :p ?bag . # Some way to find the bag ?bag rdfs:member ?member .} >+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> >+ SELECT ?member { >+ ?x :p ?bag . # Some way to find the bag >+ ?bag rdfs:member ?member . >+ } > > Property functions can also take lists in the subject or object > slot. >@@ -99,7 +115,10 @@ > bound, not constants are used, `splitIRI` will check the values). > > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> >- PREFIX apf: <java:com.hp.hpl.jena.query.pfunction.library.>SELECT >?namespace ?localname{ xsd:string apf:splitIRI (?namespace ?localname) } >+ PREFIX apf: <java:com.hp.hpl.jena.query.pfunction.library.> >+ SELECT ?namespace ?localname { >+ xsd:string apf:splitIRI (?namespace ?localname) >+ } > > Property functions might conflict with inference rules and it can > be turned off by the Java code: >