[opencms-dev] Problem getting DocBook XML to transform with XSL

R Landfill opencmsdev440 at lewenberg.com
Sat Apr 22 18:34:00 CEST 2006


I am trying to write a JSP script in OpenCMS to convert an XML file into 
HTML using an XSL transform. My JSP script looks something like

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<html>
<body>
<c:import url="http://myserver.vom/downloads/file.xml" var="xmldocument"/>
<c:import url="http://myserver.vom/downloads/file.xsl" var="xslt"/>
<x:transform xml="${xmldocument}" xslt="${xslt}"/>
</body>
</html>


I tried this with a very simple xml and xsl file and it seemed to work.

However, what I _really_ want to do is convert DocBook XML files into 
HTML using the DocBook XSL files as distributed by the DocBook 
SourceForge site. But when I try to do that, I get this error message 
(just the first few lines shown):

java.lang.NullPointerException
	at 
org.apache.taglibs.standard.tag.common.xml.TransformSupport.doEndTag(TransformSupport.java:195)
at 
org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.tester1.templates.xslt_005ftest_jsp._jspx_meth_x_transform_0(xslt_005ftest_jsp.java:160)
	at 
org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.tester1.templates.xslt_005ftest_jsp._jspService(xslt_005ftest_jsp.java:76)


To test whether the XML file was OK, I put it in Oxygen and transformed 
it there with no problem.

Has anyone had luck converting DocBook files into HTML inside OpenCMS? 
If so, how?

(The test XML file I am working with is the one at 
http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/docbooksys/segmentedhtml/ch08s03.html)





More information about the opencms-dev mailing list