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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Invalid attribute names

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: Re: [xml-dev] Invalid attribute names
  • From: David Tolpin <dvd@davidashen.net>
  • Date: Thu, 1 Jan 2004 20:10:57 +0400 (AMT)
  • In-reply-to: <3FF427BE.3000308@attglobal.net>

> >>>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/




 

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

Copyright 2001 XML.org. This site is hosted by OASIS