You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/09/19 17:42:25 UTC
DO NOT REPLY [Bug 3723] New: -
Default namespace declaration repeated by XMLSerializer
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3723>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3723
Default namespace declaration repeated by XMLSerializer
Summary: Default namespace declaration repeated by XMLSerializer
Product: Xerces-J
Version: 1.4.3
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: etienne.pelletier@pegs.com
The XMLSerializer is repeating the default namespace declaration when
descendents of an element are part of the same namespace. For example:
<a xmlns="MyNS">
<b xmlns="MyNS">
<c xmlns="MyNS"/>
</b>
</a>
is equivalent to
<a xmlns="MyNS">
<b>
<c/>
</b>
</a>
Therefore, an "xmlns" attribute containing the default namespace URI should not
be printed out by the XMLSerializer if it is the same and previously defined by
an ancester of this element.
The bug happens in startElement. The default namespace could probably be added
to the ElementState class to fix the problem.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org