[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: My report on experiments with unused namespaces

  • From: "Pete Cordell" <petexmldev@codalogic.com>
  • To: <xml-dev@lists.xml.org>
  • Date: Wed, 22 Sep 2010 13:13:37 +0100

Re:  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 
in
    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





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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.