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 bu...@apache.org on 2003/07/08 20:53:43 UTC
DO NOT REPLY [Bug 21415] New: -
bug in XercesDOMParser treatment of whitespace and empty elements
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=21415>.
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=21415
bug in XercesDOMParser treatment of whitespace and empty elements
Summary: bug in XercesDOMParser treatment of whitespace and empty
elements
Product: Xerces-C++
Version: 2.2.0
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Non-Validating Parser
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: david.c.huang@medtronic.com
I found that using the XercesDOMParser to parse the following string into a
document:
"<outer> <a></a><b>\n</b> </outer>"
Then, using DOMWriter to serialize the resulting document, you see that the
document is being parsed into the following DOM structure:
<outer>
<a/>
<b></b>
</outer>
If you then parse *that* into a document, you get:
<outer>
<a/>
<b/>
</outer>
The same thing occurs if a space is used instead of the newline in the original
string.
Calling SetIncludeIgnorableWhitespace(false) on the parser before using it
to parse does not appear to affect this behavior. Also, it seems that
regardless of whether or not the parser is supposed to treat the whitespace as
significant, that it should be consistent... If it *is* supposed to treat the
whitespace as significant, then, for the first example, we should get:
<outer>
<a/>
<b>
</b>
</outer>
(note the newline between the <b> and the </b>)
And if it *isn�t* supposed to treat the whitespace as significant, then, for
the same example, we should�ve gotten the following after the first parse:
<outer>
<a/>
<b/>
</outer>
I was not able to find anything about this in the documentation or Bugzilla; is
anybody aware of this issue?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org