On 07/05/14 19:36, Tim Harsch wrote:
Why does this query:

PREFIX afn:<http://jena.hpl.hp.com/ARQ/function#>
SELECT ?s2
WHERE
{
    BIND(<http://example.org/book/book2/sadfju/62eja> AS ?uri)
    BIND( afn:localname(?uri) AS ?s2 )
}

give this answer:

---------
| s2    |
=========
| "eja" |
---------

shouldn't it be:  "62eja" ?

Yes. No. History. :-)

afn:localname returns the longest valid local name for any use.

In XML, the local part of a qname can't start with a digit so the longest valid localname is "eja" for use in RDF/XML.

        Andy


The docs only say this about afn:localname "The local name of ?x if a
IRI. Based on splitting the IRI, not on any prefixes in the query or
dataset."


Thanks,

Tim


Reply via email to