That's a straightforward workaround, as is using a completely different
IRI. I can certainly get my app working.

I'm more concerned that either I'm missing some aspect of the RDF/XML spec,
or that there might be a bug in Jena.





On Thu, Sep 26, 2024 at 10:02 AM Holger Knublauch <[email protected]>
wrote:

> Just prepend a letter?
>
> Sent from my iPhone
>
> > On 26.09.2024, at 15:37, Luke VanderHart <[email protected]> wrote:
> >
> > 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