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] Wellformed?

[ Lists Home | Date Index | Thread Index ]


----- Original Message ----- 
From: "Bob Foster" <bob@objfac.com>
To: "Karl Waclawek" <karl@waclawek.net>
Cc: "Jeff Rafter" <lists@jeffrafter.com>; <xml-dev@lists.xml.org>
Sent: Tuesday, May 25, 2004 2:37 AM
> >>But the following is not:
> >>================
> >><!DOCTYPE doc [
> >>  <!ENTITY e "<foo bar1:att='att' bar2:att='att'>test</foo>">
> >>]>
> >><doc xmlns:bar1="http://www.example.org";
> >>     xmlns:bar2="http://www.example.org";>
> >>  <child>&e;</child>
> >></doc>
> > 
> > Duplicate attribute - not OK.
> 
> This is well-formed WRT XML 1.0 (two different attributes, bar1:att and 
> bar2:att). A parser that is not "namespace-aware" certainly shouldn't 
> complain about it.

True.
 
> If a parser is "namespace-aware", i.e., checks conformance to Namespaces 
> In XML, then the document is in error, as it violates the constraint 
> that no tag may have two attributes with "qualified names with the same 
> local part and with prefixes which have been bound to namespace names 
> that are identical." But this is not a well-formed error. The first 
> version of the namespaces recommendation does not use the term 
> "well-formed" at all, and while the 1.1 version does, it is not used in 
> this context.

I guess this is true, formally speaking.
However, the main  point of a well-formedness violation is that it
represents a fatal error. This also applies to a violation of namespace
constraints. I don't see a practical difference there, unless your
processing context does not require or use namespaces.


Karl




 

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

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