Um, forgive me for operating out of context and not rummaging through all of the applicable W3C specs, but are you saying that the splitting rule is basically creating parts for a CURIE ? That's not exactly how XML Namespace works so is there a clash with RDF/XML or does RDF/XML not adhere to [xml-names]?
Hmm, put another way, there is no assurance that a given URI can be abstracted into a CURIE NS part (whether "really" a namespace identifier or not) and L part, because of the requirement that L be an NCName. (I think I am catching on here.) This is especially the case with fragments (shuddering to mention queries too), which don't *have* to be NCNames except in the case where they are supposed to be (potential) xml:id attribute values (or anchored HTML id/name values, ..). So rather than fail explicitly, GetNameSpace ends up sucking as much into the URI as necessary and sufficient for any residual L to be either empty or a valid NCName. Of course, there is no assurance that NS is an actual declared namespace in scope, and so there is this interesting semantic/syntactic/lexical confusion about what it means to "get a namespace." So, will getNameSpace on "http://example.none/funnybone#03Lo2" deliver "http://example.none/funnybone#03" ? - Dennis -----Original Message----- From: Chris Dollin [mailto:[email protected]] Sent: Wednesday, November 09, 2011 00:50 To: [email protected] Subject: Re: incorrect namespace prefix resolution? [ ... ] getNameSpace works *just* on the URI of the resource in a context- independant way. It does not know how the URI was constructed, so prefixes, base URIs, and all that are irrelevant to its operation. The splitting rule that Jena used is based on the requirements of the RDF/XML serialisation: it cuts the URI into two parts, NS and L, such that NS + L = the URI and L is the longest legal NCName that will fit. This means, for example, that a URI like http://example.com/numberic/1066 will not split the way many people expect, since the NS = the whole URI and the local name = "", because NCNames can't start with digits. Tell us how/why you're using getNameSpace and we may be able to help further. Chris -- "It is seldom good news." ~Crystal Ball~, /The Tough Guide to Fantasyland/ Epimorphics Ltd, http://www.epimorphics.com Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Epimorphics Ltd. is a limited company registered in England (number 7016688)
smime.p7s
Description: S/MIME cryptographic signature
