[
https://issues.apache.org/jira/browse/XMLBEANS-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896486#action_12896486
]
Peter Žagar commented on XMLBEANS-22:
-------------------------------------
I'm experiencing this same problem and I need this to be fixed for the case
where there is whitespace preserve defined on the type used by the element.
I have this type
<xs:simpleType name="tVezaj">
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:length value="1"/>
<xs:enumeration value=" "/>
<xs:enumeration value="-"/>
</xs:restriction>
</xs:simpleType>
Best regards, Peter
> xmlText trims whitespace within elements if prettyprint is on
> -------------------------------------------------------------
>
> Key: XMLBEANS-22
> URL: https://issues.apache.org/jira/browse/XMLBEANS-22
> Project: XMLBeans
> Issue Type: Bug
> Affects Versions: Version 1
> Environment: Java 1.4.2_03, Win 2K
> Reporter: Aaron Dunlop
> Fix For: TBD
>
> Attachments: whitespace-patch
>
>
> When called with XmlOptions.SAVE_PRETTY_PRINT, xmlText trims whitespace
> within an element - e.g., ' a ' is converted to 'a'.
> Unless I'm completely missing something, the formatter shouldn't ever change
> the contents of an element.
> The following test snippet reveals the problem:
> XmlObject xdoc = XmlObject.Factory.parse("<test> </test>");
> Assert.assertEquals("<test> </test>", xdoc.xmlText());
> Assert.assertEquals("<test> </test>" + newLine, xdoc.toString());
> The current build from CVS returns <test/>[newline] instead of <test>
> <test>[newline].
> Complete testcase and patch to follow.
--
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: [email protected]
For additional commands, e-mail: [email protected]