xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Resolved: (XMLBEANS-22) xmlText trims whitespace within elements if prettyprint is on
Date Sat, 06 Mar 2004 05:48:31 GMT
Message:

   The following issue has been resolved as WON'T FIX.

   Resolver: Eric Vasilik
       Date: Fri, 5 Mar 2004 9:47 PM

Pretty printing is optional and is not intended to preserve whitespace.  It removes and generates
whitespace as needed to render a document easy to read.  If you need an accurate rendering
of a document, don't use this option.  You can, effectively, perform your own pretty printing
by walking an XmlCursor over your document, formatting it as you like.
---------------------------------------------------------------------
View the issue:
  http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=XMLBEANS-22

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-22
    Summary: xmlText trims whitespace within elements if prettyprint is on
       Type: Bug

     Status: Resolved
   Priority: Major
 Resolution: WON'T FIX

    Project: XMLBeans
   Versions:
             Version 1

   Assignee: 
   Reporter: Aaron Dunlop

    Created: Wed, 11 Feb 2004 4:11 PM
    Updated: Fri, 5 Mar 2004 9:47 PM
Environment: Java 1.4.2_03, Win 2K

Description:
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.


---------------------------------------------------------------------
JIRA INFORMATION:
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:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message