startPrefixMapping with redundant namespace declarations

"Rob Lugt" <[email protected]>
Newsgroups gmane.text.xml.sax.devel
Message-ID <062101c25f01$2d5b4f40$0400a8c0@scott>
Hi all

What do you all think should be the correct behaviour with respect to
startPrefixMapping/endPrefixMapping when an XML document contains redundant
namespace declarations?

For example:

<a:doc xmlns:a="http://www.elcel.com/ns">
 <a:element xmlns:a="http://www.elcel.com/ns"/>
</a:doc>

In this case, we (ElCel) decided that the second (redundant) namespace
declaration was NOT starting a new prefix mapping, and therefore
startPrefixMapping should be called only once (prior to the startElement
event for the <a:doc> element).

In many cases this is a mute point because it has little effect on the
application.  However, when writing a canonical xml processor which requires
redundant namespace declarations to be removed, the ElCel behaviour is
particularly useful.  We have a customer who says that he cannot rely on the
ElCel SAX behaviour because Xerces C++ reports the redundant mappings (and
when building against Xerces he must therefore filter them out in his code).

Which behaviour is correct?  Can the API docs be updated to reflect this?

Regards
~Rob

--
Rob Lugt
ElCel Technology
http://www.elcel.com/





-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
List: sax-devel, [email protected]
See:  http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.