This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
apos output problems
- To: <xsl-list at mulberrytech dot com>
- Subject: apos output problems
- From: "Steve Brown" <prospect at flex dot com dot au>
- Date: Tue, 16 May 2000 10:06:06 +1000
- Reply-To: xsl-list at mulberrytech dot com
hi,
Having a little trouble outputing a apostophes file created using Xalan
translator in java.
when I call:
processor.process(dataSource, styleSource, resultTarget);
with the resultTarget being a printStream I get the ' char (which I want)
however, when the result target is a Document (xerces.dom.DocumentImpl())
and then print that out, I get ' instead. (which I dont want)
I use the following code to print the Document:
OutputFormat _outputFormat = new OutputFormat();
_outputFormat.setOmitXMLDeclaration( true );
_outputFormat.setIndenting( false );
_outputFormat.setLineSeparator( "" );
ByteArrayOutputStream baos = new ByteArrayOutputStream();
org.apache.xml.serialize.XMLSerializer serializer = new XMLSerializer( baos,
_outputFormat);
serializer.serialize( element );
System.out.println(baos.toString());
I've been looking into encoding (which doesnt seem to be the way to fix it)
and output-escaping (but I dont know how to apply that correctly).
I think I have to set up some parameter or something in OutputFormat so that
it outputs correctly for me.
Any ideas?
Thanks
Steve.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list