Re: XML namespaces and RDF

Max Voelkel wrote:
> Hi,
> 
>   so I understand now that RDF people hijacked the XML namespace idea.

I'm afraid you're mistaken; we were amongst its first customers. This is 
documented  even from the days before XML itself was finalised (although 
I've just failed to find the relevant links). There was in fact a big 
fuss about this about ten years ago, within W3C: XML didn't get frozen 
before it was clear that the basics were in place to build a namespaces 
mechanism (the full spec for which came later), for specs such as RDF to 
build upon.

>   There is currently no defined way to arrive from
> 
> <x xmlns:edi='http://ecommerce.example.org/schema'>
>   <!-- the "edi" prefix is bound to http://ecommerce.example.org/schema
>        for the "x" element and contents -->
> </x>
> 
>   to a URI for "x". Options are:
> 
> - The RDF/XML community default (just appendd)
>   http://ecommerce.example.org/schemax
>   
> -  The  RDF/XML  community default for namespaces that have no "#" or "/" at end
>    http://ecommerce.example.org/schema#x
> 
> - The third option
>    http://ecommerce.example.org/schema/x
> 
> - There are of course further options..
> 
> 
> Can  we  make  the  semantic  web  a  better  place  by  releasing  a small note
> (preferably from W3C) that says:
> 
> "To  get  a URI from an XML qname within an XML namespace, the last character of
> the  namespace  URI  is  relevant. 

All characters are relevant, surely? Why would people expect otherwise? 
(ok that's over pedantic of me! I get what you mean...)

> If it ends with a "#" or "/", the full URI is
> namespace + qname. If not, the full URI is namespace + "#" + qname."

That would have been one possible design, but I suspect it is too late 
now to impose something retrospectively. Many different XML languages 
have been built on top of XML Namespaces and they may have made their 
own choices here.

> Something like this would ensure that all semantic web people use the same URIs,
> e.g. for XML datatypes. And all other kind of XML data.

I've seen aspects of this problem discussed on the TAG list. Eg. around 
namespace document formats, and in 
http://www.w3.org/2001/tag/doc/nsDocuments/#div.fragid

The Webarch doc has this to say,
[[
http://www.w3.org/TR/webarch/#xml-namespaces
...
XML namespaces reduce the risk of name collisions by taking advantage of 
existing systems for allocating globally scoped names: the URI system 
(see also the section on URI allocation (§2.2.2)). When using XML 
namespaces, each local name in an XML vocabulary is paired with a URI 
(called the namespace URI) to distinguish the local name from local 
names in other vocabularies.

The use of URIs confers additional benefits. First, each URI/local name 
pair can be mapped to another URI, grounding the terms of the vocabulary 
in the Web. These terms may be important resources and thus it is 
appropriate to be able to associate URIs with them.

[RDFXML] uses simple concatenation of the namespace URI and the local 
name to create a URI for the identified term. Other mappings are likely 
to be more suitable for hierarchical namespaces; see the related TAG 
issue abstractComponentRefs-37.
]]

If you want to pursue this, I'd suggest taking this thread across to 
www-tag, and investigating this aspect about hierarchical namespaces, 
since that's the primary cited objection to a flat RDF-ish mapping.

There is also the larger issue of QName to URI mappings, beyond XML 
namespaces. This is covered in http://www.w3.org/TR/webarch/#xml-qnames

Webarch links to 
http://www.w3.org/2001/tag/issues.html#abstractComponentRefs-37 which 
cites http://www.w3.org/2001/tag/issues.html#rdfmsQnameUriMapping-6
...
"It seems to me that the RDFCore and XMLSchema WGs (at the very least) 
ought to develop a common, reasonably acceptable convention as to the 
mapping between QNames and URIs. Perhaps this is an issue that the TAG 
ought to consider (because it is a really basic architectural issue)."


This (WG-specifics aside) seems to be more or less what you're saying 
here. The subsequent conclusion, see
http://lists.w3.org/Archives/Public/www-tag/2003Dec/0192
http://lists.w3.org/Archives/Public/www-tag/2003Dec/0037
"The use of Qnames as identifiers without providing a mapping to URIs is 
inconsistent with Web Architecture. See the TAG finding Using Qualified 
Names (QNames) as Identifiers in Content [3]."

The finding link currently points to this XML, 
http://www.w3.org/2001/tag/doc/qnameids but searching gets us to 
http://www.w3.org/2001/tag/doc/qnameids.html  which notes

"Where there is a compelling reason to use QNames instead of URIs for 
identification, it is imperative that specifications provide a mapping 
between QNames and URIs, if such a mapping is possible."


So from my quick look, 
http://www.w3.org/2001/tag/issues.html#rdfmsQnameUriMapping-6 and 
http://www.w3.org/2001/tag/issues.html#abstractComponentRefs-37 seem the 
right starting points. And the main objection being the phrase quoted 
above, "other mappings are likely to be more suitable for hierarchical 
namespaces". I'd be interested to see some concrete examples of these, 
including their mapping to URIs.

As I read all these, it seems the burden for expressing the mapping to 
URIs is on each namespace, currently at least.And the exis Hmm I wonder 
whether a GRDDL-like mechanism could be used, for decorating namespace 
documents with information about their QName-to-URI mapping policy.

cheers,

Dan

Received on Thursday, 20 December 2007 11:24:56 UTC