QName Problem Isn't One

Many feel that the fact that "xsd:positiveInteger" in:

    <xsd:restriction base="xsd:positiveInteger">
    (in XML Schema)

    and

    <xsd:positiveInteger  rdf:value="5" />
    (in RDF)

resolve to different URIs when xsd is bound to the same URI is a serious
problem. I suggest differently.

XML Schema clearly defines its namespace for use in XML Schema documents,
and in that context defines a system for converting the Qname to a URI. RDF
uses a different system, and thus requires a different namespace. Not only
is this not a problem, it also provides an added benefit:

The use of the XSD namespace in an XML document signals to an XSD processor
that the content of the document is an XML Schema. This is not true in an
RDF document, thus the XML Schema namespace should not be used in such a
situation.

Therefore, if one wants to refer to XSD types in RDF they must use the
following namespace:

http://www.w3.org/2001/XMLSchema#   (notice the extra # sign)

An XSD processor will not recognize this as an XML Schema document (good --
it isn't) and will not process it. An RDF processor will simply concatenate
the localname (positiveInteger, int, etc.) onto the end of the URI and
result in the correct URI, such as:

http://www.w3.org/2001/XMLSchema#int

The main point -- that the same URI is used for the same concept -- is
resolved. The secondary point -- that a different namespace is used in each
document -- is done correctly, since to use the same namespace would
needlessly confuse processors. Since the XML Namespaces spec assigns no
semantics to namespaces, there is no misuse or abuse of the XML Schema
namespace. In the end, everything works beautifully.

For some reason, others insist that there is a serious problem here.
However, they have not been able to explain to my satisfaction what it is. I
believe that it is based on some sort of misconception about namespaces.

If any of the above is confusing, please let me know and I'll try to
elaborate.

-- 
[ Aaron Swartz | me@aaronsw.com | http://www.aaronsw.com ]

Received on Friday, 4 May 2001 20:01:53 UTC