Re: last word on RDF serialization and QNames?

On Sunday 12 October 2003 22:02, Graham Klyne wrote:
> At 13:34 12/10/03 -0700, Garret Wilson wrote:
> >I guess that sums it up. My current implementation keeps the original
> >namespace and local names around in the resource classes in case they are
> >needed later, but that's starting to become annoying and goes beyond RDF.
>
> Mine too.  RDF doesn't require this, but neither does it forbid it.

The current approach we take in Jena is that the Model object [1] (rather than
the Resource object [2]) remembers the namespaces it saw in RDF/XML
that has been read into it [3]) and those namespaces will be used when the
Model is written out. You can construct examples where some URI will be
written out using a namespace different from the one it was read in with,
when one namespace is a prefix of another, but those didn't seem to be
the cases we were getting queries about ...

[1] Technically, the PrefixMapping object owned by the Graph underlying
the Model, so different Models may share the same PrefixMapping if they
share the Graph.

[2] Except for a left-over bug that will be excised Real Soon Now.

[3] Or set by the user, or by any other reader that wants to.

-- 
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgroup/comp/comp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html

Received on Monday, 13 October 2003 03:10:00 UTC