You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Martin Heitz (JIRA)" <xm...@xml.apache.org> on 2010/06/18 16:01:22 UTC

[jira] Issue Comment Edited: (XMLBEANS-22) xmlText trims whitespace within elements if prettyprint is on

    [ https://issues.apache.org/jira/browse/XMLBEANS-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879710#action_12879710 ] 

Martin Heitz edited comment on XMLBEANS-22 at 6/18/10 9:59 AM:
---------------------------------------------------------------

Hi,

I experienced the same problem with xmlbeans 2.4.0. the patch doesn't fit the current code any more. Is it true that this issue is still unfixed?

Best regards, Mattin

P.S. Note that this is a severe issue. Switching off pretty print is not an option for me because a 3rd party system that reads the generated XML has a limit of 4096 characters per line!

      was (Author: mattin):
    Hi,

I experienced the same problem with xmlbeans 2.4.0. the patch doesn't fit the current code any more. Is it true that this issue is still unfixed?

Best regards, Mattin
  
> 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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org