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

Henry Zongaro updated XALANJ-1065:
----------------------------------

    Priority: Major  (was: Blocker)

> Serializing a XML document via TRAX changes "\r\n" to "\r\r\n"
> --------------------------------------------------------------
>
>          Key: XALANJ-1065
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-1065
>      Project: XalanJ2
>         Type: Bug
>   Components: Serialization
>     Versions: 2.3
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: J�rgen Mo�graber
>     Assignee: Morris Kwan

>
> Serializing a XML document via TRAX changes "\r\n" to "\r\r\n" 
> in a CDATA section.
> Serializing with the Xalan XMLSerializer works fine.
> Example:
> import javax.xml.transform.stream.*;
> import javax.xml.transform.dom.*;
> import javax.xml.transform.*;
> import javax.xml.parsers.*;
> import org.apache.xml.serialize.*;
> import org.w3c.dom.*;
> import java.io.*;
> public class Test
> {
>   public static void main (String [] args)
>   {
>       try
>       {
>                       Document doc = DocumentBuilderFactory.newInstance 
> ().newDocumentBuilder ().newDocument ();
>                       Node root = doc.createElement ("Top");
>                       doc.appendChild (root);
>                       root.appendChild (doc.createCDATASection 
> ("One\r\nTwo"));
>                       // Try Xalan serialize (works fine)
>                       XMLSerializer serializer = new XMLSerializer (new 
> FileOutputStream ("D:\\One.xml"), null);
>                       serializer.serialize (doc);
>                       // Try TRAX
>                       Transformer transformer = 
> TransformerFactory.newInstance ().newTransformer ();
>                       transformer.transform (new DOMSource (doc), new 
> StreamResult (new FileOutputStream ("D:\\Two.xml")));
>               }
>               catch (Exception ex)
>               {
>                       ex.printStackTrace ();
>               }
>   }
> }

-- 
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