OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Same namespace for XSD and RDF

Hi all,

I have the following issue/question on use of namespaces in XML and RDF.

Our (standardisation) group has defined a schema, and wants a
representation of it in both XML and RDF. For ease of use, we like to
use the same namespace identifier, even at the drawback that we can't
publish both the XSD and OWL description at that same URL. Both XML and
RDF allow a schema name ending in a word (http://example.org/myschema),
or add a slash or hash "#" at the end.

In particular, what are the EXACT rules for adding or removing a hash
(#) at the end of a namespace?

Let me highlight two more or less authoritative examples.

First is the "http://www.w3.org/2001/XMLSchema"; namespace as defined in

During the header, this is defined without trailing slash:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
targetNamespace="http://www.w3.org/2001/XMLSchema"; xml:lang="EN">

On the other hand, consider the first example at

Here the header is:


Note that here the namespace "http://www.w3.org/2001/XMLSchema#"; is
used, thus with trailing hash. Also, observe the distinction between
(with hash) and <owl:Ontology
(without hash).

So there seem to be some conversion (adding or removing hashes)
necessary here, even though section 2.3 of
http://www.w3.org/TR/REC-xml-names/#NSNameComparison indicates that
"http://www.w3.org/2001/XMLSchema"; and
"http://www.w3.org/2001/XMLSchema#"; are really two distinctly different

I'm interested in the exact rules and best practices for adding/removing
and including/excluding a trailing hash.

To make things more confusion, http://www.w3.org/TR/REC-xml-names/ never
explains how such element name can be combined with the namespace URI to
get a globally unique identifier for the element. It only talks about
things like "the element at a namespace", e.g. the 'int' element at the
"http://www.w3.org/2001/XMLSchema"; namespace. Never about e.g.
"http://www.w3.org/2001/XMLSchema#int";. On the other hand, this very URI
is mentioned in the comments of http://www.w3.org/2001/XMLSchema.xsd.
From this, it seems that one can just add a hash to combine the
namespace URI and the element. On the other hand, that makes it
illogical that some namespaces (such as
http://www.w3.org/2001/04/xmlenc#) already include the hash.

Any pointers where to find authoritative information is highly appreciated.

I'm asking the XML list first, because RDF already has a best practice
document on this issue, but XML does not. Also, I suspect that some
insight in the how/why of "http://www.w3.org/2001/XMLSchema#int"; helps
me understand XML namespaces better.

Freek Dijkstra

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS