I have this XML file
<test> 
 <</test>
and i am tranforming it with the java code below, the xslt file just makes a copy of the xml
public class XMLTransform {
public static void main(String[] args) {
try {
StreamSource source = new StreamSource(new File("file.xml"));
StreamSource stylesource = new StreamSource(new File("trans.xsl"));
SAXTransformerFactory transformFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
Transformer transformer = transformFactory.newTransformer(stylesource);
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
StreamResult result = new StreamResult(System.out);
transformer.transform(source,result);
}
catch (Exception e) {
e.printStackTrace();
}
}
}
my problem is that java replaces the canonical carriage return 
 with the 
 which is the ascii character.
Any help on how to preserve the canonical name for the carriage return?
I found that SAXON transformer does not make this modification. thanks for your answers.