apos output problems

Subject: apos output problems
From: "Steve Brown" <prospect@xxxxxxxxxxx>
Date: Tue, 16 May 2000 10:06:06 +1000
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 &apos; 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


Current Thread