JSTL XML Transforms not working with nested XSL includes
Posted
by timxyz
on Stack Overflow
See other posts from Stack Overflow
or by timxyz
Published on 2010-06-06T10:24:54Z
Indexed on
2010/06/06
10:32 UTC
Read the original article
Hit count: 236
I have a bit of JSP that does this:
<c:import url="/xsl/Transformer.xsl" var="xslt" />
<x:transform doc="${actionBean.dom}" xslt="${xslt}" xsltSystemId="/xsl/">
This transforms the XML exactly as expected so long as Transformer.xsl contains no <xsl:include>
tags or so long as any documents it does include do not include anything.
However, if I use an XSL which includes a document which in turn includes another document, I get the following error:
ERROR: 'Invalid URI 'NestedInclude.xsl Could not resolve entity reference: "NestedInclude.xsl"'.'
Note that the JSP is contained in the directory below the xsl documents. If all my XSLs and JSPs are in the same directory (and I remove the xsltSystemId attribute) then everything would work fine, but I don't really want to do this.
Can anyone see anything I'm doing wrong, as it's a bit of a killer at the moment and the JSTL documentation is next to useless.
© Stack Overflow or respective owner