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]
RE: [xml-dev] My report on experiments with unused namespaces

Pete Cordell wrote:

> Namespaces in XML (3rd Ed) says:
>    An XML namespace is identified by a URI reference [RFC3986].

I tested 5 XML Schema validators and they didn't care about the format of XML namespaces. In one experiment I used the text in the XML REC (128,000 bytes) as the namespace. None of the XML Schema validators objected.

The recent discussion on this list about xs:anyURI values being any string seems to also apply to namespaces, i.e., namespaces can be any string of any length.


-----Original Message-----
From: Pete Cordell [mailto:petexmldev@codalogic.com] 
Sent: Wednesday, September 22, 2010 8:14 AM
To: xml-dev@lists.xml.org
Subject: Re: [xml-dev] My report on experiments with unused namespaces

Original Message From: "Amelia A Lewis"
> On Tue, 21 Sep 2010 19:49:01 -0700, Ramkumar Menon wrote:
>> for e.g. [
>> <orderInfo xmlns:poid="1234" xmlns:description="sampleOrder"
>> xmlns:numberOfItems="3"/>
>> How Lovely!
>> ]
> <snicker />
> Beautiful!  Not only abuse of namespace declarations (but perfectly
> legal, of course), but also abuse of the laxity of definition of URI
> within W3C.

Digging deeper I would say that the above is NOT a legal XML document.

XML 1st Ed (http://www.w3.org/TR/1998/REC-xml-19980210) says:

    Names beginning with the string "xml", or any string which would
    match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization 
    this or future versions of this specification.

So if the XML example is not namespace aware then it is iilegal because it 
uses an attribute that begins with "xml".

If it is namespace aware, then Namespaces in XML (3rd Ed) says:

    An XML namespace is identified by a URI reference [RFC3986].

and further says:

    The attribute's [the one defining the prefix/namespace mapping]
    normalized value MUST be either a URI reference - the
    namespace name identifying the namespace - or an empty string.

RFC3986 says:

    URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

So xmlns:numberOfItems="3" is not legal.

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info


XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[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