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

Re: Invalid attribute names

  • To: xml-dev@l...
  • Subject: Re: Invalid attribute names
  • From: David Tolpin <dvd@d...>
  • Date: Thu, 1 Jan 2004 20:10:57 +0400 (AMT)
  • In-reply-to: <3FF427BE.3000308@a...>

invalid attribute syntax
> >>>Furthermore, a name starting with
> >>>a colon isn't a legal "name" token in XML, so they syntax doesn't
> >>>allow that either.
> >>
> >>In fact it is: colon is a NameStart character.
> > 
> > And in a namespace-aware XML parser, Name is not used for elements or attributes,
> > QName is (from XML Namespaces). Isn't it a mess?
> 
> It's a mess in theory but not in practice: whether they actually use 
> Namespaces or not, everyone follows the rules of XML+Namespaces rather than 
> just XML.  I have yet to see one serious XML-related specification or 
> application that uses colons in a way not allowed by the Namespaces spec, 
> and it's unlikely that anyone would ever write one now, or that anyone else 
> would accept such an application or specification.

Mess has no probability, even it happens once, it can crash everything. If an
application which checks for well-formedness in terms of XML 1.0 is followed by an
application that relies on well-formedness in terms of XML+namespaces, then
failure happens at the most unexpected instance (As the original post indicated,
by the way -- one tool in the tool chain was in its own right to accept attribute
names matching 'Name' production, another was in its own right to reject it because
it used another notion of acceptability -- imagine a person who decided to develop
an application that maps Common Lisp structures to an XML grammar, and decided to
map field names with leading colons to attributes or elements). 

What I am saying is not news at all, namely, that XML Namespaces is one big bug. 
No doubt, it was a well-intended design bug, but it does not change the fact that it is
a fault. Having multiple levels of well-formedness does a very bad job, namely,
that instead of relying on the fact that a document is well-formed and thus should
be accepted by a conforming XML parser, one has to check that a document is well-formed
in the same sense that particular parser understands it. 

Moreover, identically named basic productions (NOTATION, for example) are not the same
in XML and XML+Namespaces, thus adding even more confusion.

Is a parser that assesses well-formedness according to the XML Namespaces specification
still a conforming XML 1.0 parser?

David Tolpin
http://davidashen.net/

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.