You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by ji...@apache.org on 2004/02/12 01:16:52 UTC
[jira] Updated: (XMLBEANS-22) xmlText trims whitespace within elements if prettyprint is on
The following issue has been updated:
Updater: Aaron Dunlop (mailto:aaron.dunlop@transcore.com)
Date: Wed, 11 Feb 2004 4:14 PM
Comment:
Test method to expose this problem and a patch to fix it. I put the test case in AssortedTests.java
Note - I'm not very familiar with the innards of Saver.java, so perhaps someone who is should take a look at the patch. It fixes the test case included, and all the drt tests run, as does our own project regression suite (which exercises a lot of XmlBeans functionality).
Changes:
Attachment changed to whitespace-patch
---------------------------------------------------------------------
For a full history of the issue, see:
http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=XMLBEANS-22&page=history
---------------------------------------------------------------------
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: Unassigned
Priority: Major
Project: XMLBeans
Versions:
Version 1
Assignee:
Reporter: Aaron Dunlop
Created: Wed, 11 Feb 2004 4:11 PM
Updated: Wed, 11 Feb 2004 4:14 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/