Subject: [xsl] <xsl:output doctype-public="?"> From: Edierley Messias <edierley@xxxxxxxxxxx> Date: Mon, 29 Jan 2001 18:10:20 -0200 (EDT) |
Hi people, I apologize if this a little off-topic, but I think that is XSL email, is about the Xalan processor. - - - - - - - There is a error when I apply the transformation to a XSL that have a <xsl:output doctype-public="?"> declaration in a Servlet program. My final document must have the <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> And XALAN/Xerces changes the the <!DOCTYPE> to the comment version of the respective DTD in http://www.wapforum.org/DTD/wml_1.1.xml Then I wrote the XSL with <xsl:output method="xml" indent="yes" omit-xml-declaration="no" doctype-public="-//WAPFORUM//DTD WML 1.1//EN" doctype-system="http://www.wapforum.com/DTD/wml_1.1.xml" /> My Servlet is OK, when I apply the WML page to a xsl without the <xsl:output method="?"> the transformation works, but the page cannot be appear in the mobile-browser withou the <!DOCTYPE> declaration. The page look like: <?xml version="1.0"?> <!--DTD commented--> <wml> wml-stuff </wml> When I run the Servlet with the <xsl:output> file, the server gives me "500 Internal Server Error". I looked at jserv.log file and a found this (WapServlet is my servlet): [29/01/2001 17:39:30:146 GMT-02:00] java.lang.NullPointerException at org.apache.xalan.xslt.StylesheetRoot.makeSAXSerializer(StylesheetRoot.java:518) at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:380) at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:679) at WapServlet.doGetHTTP(WapServlet.java:72) at WapServlet.service(WapServlet.java:46) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314) at org.apache.jserv.JServConnection.run(JServConnection.java:188) at java.lang.Thread.run(Thread.java:484) What is the problem? There is a bug in StylesheetRoot or XSLTEngineImpl? The program below works fine with the <xsl:output> file. public class SimpleWML{ public static void main() ...{ XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); processor.process(new XSLTInputSource("i.wml"), new XSLTInputSource("text7.xsl"), new XSLTResultTarget(System.out)); } } And also the command line: "java org.apache.xalan.xslt.Process -in i.wml -xsl text7.xsl" Please, do you know what is going on? Edierley Messias. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] output formatting, Michael Beddow | Thread | Re: [xsl] <xsl:output doctype-publi, Michael Beddow |
RE: [xsl] Complex HTML Table, Edmund Mitchell | Date | RE: [xsl] output formatting, Michael Kay |
Month |