DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8520>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8520 property output opton indent is ignored [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From [EMAIL PROTECTED] 2002-05-02 17:57 ------- Here is the program I used to test this and had no problem with the indent. I.E. I could turn it on or off by setting the output INDENT property import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.Transformer; import javax.xml.transform.Templates; import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.OutputKeys; import java.util.Properties; public class TrAXDriver { public static void main(String[] args){ TrAXDriver app = new TrAXDriver(); app.run(args); } public void run(String[] args){ if (args.length != 2) { usage(); } String inputFilename = args[0]; String stylesheet = args[1]; Transformer transformer; TransformerFactory factory = TransformerFactory.newInstance(); try { transformer = factory.newTransformer(new StreamSource(stylesheet)); // transformer.setParameter("states", "NH"); Properties lo_Props = transformer.getOutputProperties(); lo_Props.setProperty(OutputKeys.METHOD,"html"); lo_Props.setProperty(OutputKeys.INDENT,"no"); transformer.setOutputProperties(lo_Props); transformer.transform(new StreamSource(inputFilename), new StreamResult(System.out)); } catch (Exception e) { System.err.println("ERROR: " + e); } System.exit(0); } public void usage() { System.err.println( "Usage: run <xml_file> <xsl_file>"); System.exit(1); } }
