[ http://nagoya.apache.org/jira/browse/XERCESC-944?page=history ]

Alberto Massari updated XERCESC-944:
------------------------------------

    Priority: Major

> bug in XercesDOMParser treatment of whitespace and empty elements
> -----------------------------------------------------------------
>
>          Key: XERCESC-944
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-944
>      Project: Xerces-C++
>         Type: Bug
>   Components: Non-Validating Parser
>     Versions: 2.2.0
>  Environment: Operating System: All
> Platform: All
>     Reporter: David Huang
>     Assignee: Xerces-C Developers Mailing List

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to