This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

apos output problems


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]