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 "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2009/11/03 10:45:59 UTC
[jira] Closed: (XERCESC-944) bug in XercesDOMParser treatment of
whitespace and empty elements
[ https://issues.apache.org/jira/browse/XERCESC-944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-944.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.0.1
Assignee: (was: Xerces-C Developers Mailing List)
Assuming fixed in 3.0.1. If not, please reopen and provide a test case.
> bug in XercesDOMParser treatment of whitespace and empty elements
> -----------------------------------------------------------------
>
> Key: XERCESC-944
> URL: https://issues.apache.org/jira/browse/XERCESC-944
> Project: Xerces-C++
> Issue Type: Bug
> Components: Non-Validating Parser
> Affects Versions: 2.2.0
> Environment: Operating System: All
> Platform: All
> Reporter: David Huang
> Fix For: 3.0.1
>
>
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org