Bug 1886 - No way to set Liaison for XSLTProcessor created by <xsl:apply>
Summary: No way to set Liaison for XSLTProcessor created by <xsl:apply>
Status: CLOSED WONTFIX
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Unknown Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P1 normal with 1 vote (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-24 07:36 UTC by Carmine F. Greco
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
example output of xsl:apply,shows a different exception which might stem from the same bug (3.03 KB, text/html)
2001-06-27 04:13 UTC, Yishay Mor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carmine F. Greco 2001-05-24 07:36:13 UTC
If a servlet creates a DOM and puts in in the servlet context as an attribute, 
then forwards the request on to JSP that uses <xsl:apply> the following error:

XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a 
org.apache.xalan.xpath.xdom.XercesLiaison instead!
XSL Error: SAX Exception


The comments in the reference xsl.tld say that the nameXML attribute of 
<xsl:apply> can be a org.w3c.dom.Node object that represents a DOM tree.

Servlet code looks something like this:

Document doc = new org.apache.xerces.dom.DocumentImpl();
// Create XML...
getServletConfig().getServletContext().setAttribute("xmlDoc", doc);
getServletConfig().getServletContext().getRequestDispatcher
("/transform.jsp").forward(req, res);


JSP looks something like this:

<%@taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0" prefix="xsl" %>
<html>
<body>
<xsl:apply nameXml="xmlDoc" xsl="transform.xsl"/>
</body>
</html>


xsl.jar dated 02/25/2001,
xalan.jar version 1.2,
xerces.jar version 1.1.3
Comment 1 Yishay Mor 2001-06-27 04:13:08 UTC
Created attachment 261 [details]
example output of xsl:apply,shows a different exception which might stem from the same bug
Comment 2 Glenn Nielsen 2002-04-06 16:08:37 UTC
The XSL taglib is based on Xalan1 and is not compatible with Xalan 2.
There are two alternatives for XSL which have more features, XTAGS and
Standard taglibs.