You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by da...@us.ibm.com on 2003/06/06 00:16:21 UTC

well-formed or not?




Hi all,

I have question regarding a document which I believe is not well-formed,
but when parsing, Xerces reports no error.  Here's what the document looks
like:

   <?xml version="1.0"?>
   <root xmlns:foo="http://foo.com/hr" xmlns:bar="http://foo.com/hr">
     <a foo:bar="Yes" bar:bar="No"/>
   </root>

Notice the attribute qnames are different, but with namespaces processing
enabled, they have the same expanded name.  Xerces 2.3.0 does not complain
about this file.  This seems wrong, given this section of the namespaces
recommendation:

   http://www.w3.org/TR/REC-xml-names/#uniqAttrs

Opinions?  Should I file a Bugzilla report?  Interestingly enough, the
version of MSXML I have on my machine (3.0) also does not report an error.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: well-formed or not?

Posted by Michael Rafael Glavassevich <mr...@engmail.uwaterloo.ca>.
Hi David,

If the XML processor is namespace aware (i.e. is processing namespaces),
that document isn't well formed, as per that section you referenced from
the Namespace rec. Xerces-J checks for this when the namespace feature is
turned on, and will report an error if recieves a document like the one in
your e-mail.

-----------------------------------------
Michael Glavassevich
mrglavas@engmail.uwaterloo.ca
Candidate for Bachelor of Applied Science
Computer Engineering
University of Waterloo

On Thu, 5 Jun 2003 david_n_bertoni@us.ibm.com wrote:

>
>
>
>
> Hi all,
>
> I have question regarding a document which I believe is not well-formed,
> but when parsing, Xerces reports no error.  Here's what the document looks
> like:
>
>    <?xml version="1.0"?>
>    <root xmlns:foo="http://foo.com/hr" xmlns:bar="http://foo.com/hr">
>      <a foo:bar="Yes" bar:bar="No"/>
>    </root>
>
> Notice the attribute qnames are different, but with namespaces processing
> enabled, they have the same expanded name.  Xerces 2.3.0 does not complain
> about this file.  This seems wrong, given this section of the namespaces
> recommendation:
>
>    http://www.w3.org/TR/REC-xml-names/#uniqAttrs
>
> Opinions?  Should I file a Bugzilla report?  Interestingly enough, the
> version of MSXML I have on my machine (3.0) also does not report an error.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org