You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Oxley, David" <Da...@workplace-systems.plc.uk> on 2003/01/23 16:57:36 UTC
Output XML with stylesheet from DOM
I have a DOM Document representing an xml file and I want to save it to a
file with an embedded xml-stylesheet link:
<?xml-stylesheet href="/?????.xsl" type="text/xsl"?>
Here is my code so far. How do I add the stylesheet link? I don't want xalan
to process the stylesheet.
DOMSource xml_source = new DOMSource(document);
StreamResult result = new StreamResult(out);
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
transformer.transform(xml_source, result);
Please reply directly to me as I'm not subscribed to the list.
Thanks.
Dave.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________