PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3159 *** shadow/3159 Sun Aug 19 20:39:36 2001 --- shadow/3159.tmp.27266 Mon Aug 20 23:20:06 2001 *************** *** 32,35 **** all have those problems. I use SUN jdk. ------- Additional Comments From [EMAIL PROTECTED] 2001-08-19 20:39 ------- ! Okay, thanks, I'm looking into it. --- 32,145 ---- all have those problems. I use SUN jdk. ------- Additional Comments From [EMAIL PROTECTED] 2001-08-19 20:39 ------- ! Okay, thanks, I'm looking into it. ! ! ------- Additional Comments From [EMAIL PROTECTED] 2001-08-20 23:20 ------- ! Additional information from submitter: ! ! I've attachted some sourcecode + sample files that give the error. ! If you run ! java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.out -HTML ! it works fine, ! but if you run Test, which does exactly the same, you get: ! ! [forge@fire]> java Test ! Exception in thread "main" org.apache.xml.utils.WrappedRuntimeException: The ! resource [file:////home/forge/work/neonics/HTMLEntities.res] could not ! load: java.io.FileNotFoundException: /home/forge/work/neonics/HTMLEntities.res ! (No such file or directory) ! file:////home/forge/work/neonics/HTMLEntities.res ! java.io.FileNotFoundException: /home/forge/work/neonics/HTMLEntities.res ! (No such file or directory) ! at ! org.apache.xalan.serialize.SerializerFactory.getSerializer ! (SerializerFactory.java, Compiled Code) ! at Test.main(Test.java, Compiled Code) ! ! ! Hope this helps.. ! ! BTW: ! ! also tried to replace the line in html_output.properties to ! ! {http\u003a//xml.apache.org/xslt} ! entities=jar:file:xalan.jar!/org/apache/xalan/serialize/HTMLEntities.res ! ! but then I get a ZIPException: cannot open file.. ! ! ------------------------------ foo.xml ----------------------------------- ! <?xml version="1.0"?> ! <test/> ! ! ------------------------------ foo.xsl ----------------------------------- ! <?xml version="1.0" encoding="UTF-8"?> ! ! <xsl:stylesheet version="1.0" ! xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> ! ! <xsl:template match="test"> ! <html> ! <body> ! <p>This is a little test</p> ! </body> ! </html> ! </xsl:template> ! ! </xsl:stylesheet> ! ! ----------------------------- Test.java ----------------------------------- ! /* ! * Copyright (c) 2001 Neonics [Kenney Westerhof <[EMAIL PROTECTED]>] ! * ! * All rights reserved. ! * ! * $Id: Test.java,v 1.1 2001/07/04 02:21:41 forge Exp $ ! */ ! ! import java.io.*; ! ! // apache serializer ! import org.apache.xalan.serialize.Serializer; ! import org.apache.xalan.serialize.SerializerFactory; ! import org.apache.xalan.templates.OutputProperties; ! ! import org.apache.xerces.parsers.SAXParser; ! import javax.xml.transform.*; ! import javax.xml.transform.sax.*; ! import javax.xml.transform.stream.*; ! ! ! /** ! * ... ! * ! * @author <a href="mailto:[EMAIL PROTECTED]">K. Westerhof</a> ! * @version $Id: Test.java,v 1.1 2001/07/04 02:21:41 forge Exp $ ! */ ! ! ! public class Test ! { ! public static void main(String [] args) throws Exception { ! ! Serializer serializer=SerializerFactory.getSerializer( ! OutputProperties.getDefaultMethodProperties("html") ! ); ! serializer.setOutputStream(new FileOutputStream("foo.out")); ! ! ! SAXParser reader=new org.apache.xerces.parsers.SAXParser(); ! ! SAXTransformerFactory tf=(SAXTransformerFactory) ! new org.apache.xalan.processor.TransformerFactoryImpl(); ! ! TransformerHandler th=tf.newTransformerHandler(new StreamSource ! (new FileInputStream("foo.xsl"))); ! ! reader.setContentHandler(th); ! th.setResult(new SAXResult(serializer.asContentHandler())); ! ! ! reader.parse("foo.xml"); ! } ! }
