I'm trying to use Jena to write RDF/XML. The graph I'm writing contains a
triple with an IRI node used in predicate position:
"urn:uuid:29ec95c1-034b-4d8a-ba48-c50f0f9dd269".

Jena throws an exception when trying to write this graph to RDF/XML. Upon
debugging, the cause is that ModelCom.listNameSpaces is trying to parse out
the namespace of all the predicates in the graph using
org.apache.jena.util.SplitIRI.splitXML method.

This method is splitting the URI at index 11, yielding an invalid URI
`urn:uuid:29` which later fails validation and throws an exception. This is
because the UUID starts with numeric characters which are not valid initial
characters for a NCName.

I feel like I'm missing something. Is there some aspect of the
specification that normally prohibits using UUID URNs in predicate
position? Or am I doing something else wrong? Or is this an actual edge
case bug that I should file a bug report for?

Any insight would be much appreciated. Thank you!

- Luke

Reply via email to