Re: does RDF require understanding all 82 URI schemes?

>>>David Megginson said:
> Dave Beckett writes:
> 
>  > I feel it might be needed for serialisation of the RDF graph to
>  > RDF/XML, but I haven't implemented that yet.
> 
> Unfortunately, the serialization of an RDF graph is impossible in the
> general case: the XML Namespaces spec describes two-part names, but
> RDF treats them as single part names, and the act of combining the two
> is lossy. ...

I appreciated this, which is why in Redland I'll probably start
recording namespace URIs/prefixes in the RDF model just for
re-serialisation purposes something like

  [model URI] -> [redland:hasXMLnsPrefix] -> "xmlns:foo=http://foo.com/ns"]

yuk.  Where redland: is an internal namespace that ensures the above
triples are not shown in the general triple database.  Double yuk.
Or maybe they are, I haven't decided yet.  What [model URI] means is
another long discussion; maybe link this with tracking statement
sources, transactions etc.


> ...  Consider:
> 
>   <rdf:Description rdf:about="urn:xxx:001" xmlns:foo="http://www.foo.com/ns">
>    <foo:name>David</foo:name>
>   </rdf:Description>
> 
> The RDF data model sees the triple
> 
>   http://www.foo.com/nsname
>   urn:xxx:001
>   "David"
> 
> How can you serialize that back to XML?  This isn't an abstract
> problem; the Namespace for the XML Schema datatyping is
> 
>   http://www.w3.org/1999/XMLSchema-datatypes
> 
> and the Namespace for the magic "xml" prefix is
> 
>   http://www.w3.org/XML/1998/namespace
> 
> That means that the data type for a decimal number in RDF's view is
> 
>   http://www.w3.org/1999/XMLSchema-datatypesdecimal
> 
> and xml:lang in RDF's view is
> 
>   http://www.w3.org/XML/1998/namespacelang
> 
> Ouch!  Fortunately, neither of these is likely to be used as a
> property name, but other similar ones likely will be.  We can
> hard-code some into RDF processors, but in the general case, we have a
> very bad mess on our hands.

Although this is a wierd use of URIs, it does work and RDF systems
can automate that so that no user code need care. In
   http://lists.w3.org/Archives/Public/www-rdf-interest/2001Jan/0227.html
I went into this further and others commented in the "Formation of RDF terms"
thread.

However there are downsides to this of making the RDF URIs different
from what people might expect or have been declared as Johnathan
Borden pointed out in
  http://lists.w3.org/Archives/Public/www-rdf-interest/2001Jan/0228.html
where the XML Schema concept of unsignedInt would have a URI 
assigned by the XML Schema spec of
  http://www.w3.org/2000/10/XMLSchema#unsignedInt
and
  http://www.w3.org/2000/10/XMLSchemaunsignedInt
using the simple concatenation.  This is a problem.

There probably should be some recommendation on how RDF approaches
this; adding/removing extra chars to XML namespaces to make them more
friendly - the appending of '#', '/' or maybe '?'.  I think N3
considers this.  Maybe a note on which RDF namespaces to use, where
not already defined would be useful e.g. use
http://www.w3.org/2000/10/XMLSchema# for XML Schemas.

Dave

Received on Friday, 9 February 2001 07:34:47 UTC