On 24/03/16 06:58, Tobias Hammerschmidt wrote:
Hi all,

as stated in
http://stackoverflow.com/questions/29263937/jenas-getlocalname-doesnt-return-numeric-localname-with-turtle
jena performs splitting of node uris based on NCName. Now if the uri
fragment is not a valid NCName only the
longest valid NCName starting at the end of the fragment will be used as
the local name. In the worst case no local name
can be determined at all for instance if the fragment consists only of
digits because the NCName can't start with a digit.
Is there any important usage of a nodes local name and namespace within
jena which mandates usage of valid NCNames as
fragments only or is it safe to use uri fragments which are not valid
NCNames? I would interpret the stackoverflow
explanation this way: there could be issues with serialization in certain
formats (rdf/xml) when the fragment is not a valid
NCName. However I would like to know whether there might be other code
locations in jena which are likekly to break
for instance in case the local name is null (due to invalid NCName). Think
this is not answered on stackoverflow.

Best regards,
Tobias


Diese E-Mail wurde von einem virenfreien Gerät gesendet, geschützt von
Avast.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


The splitting code is in 'SplitIRI'

There are 3 cases : split for RDF/XML, split for Turtle, which includes Turtle's encoding mechanism, and a general split, which is Turtle without the use of \.

For historical reasons, Resource.getLocalName, is the RDF/XML split.

I'm fairly sure the split is not used internally except for output to RDF/XML or to Turtle. Prefix names are just about appearance,

        Andy

Reply via email to