Subject: [xsl] xalan node-set not working From: Paul Tremblay <phthenry@xxxxxxxxxxxxx> Date: Sat, 28 Feb 2004 19:53:01 -0500 |
If I use xalan to process a stylesheet with a node-set, I get this error: (Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xml.dtm.ref.DTMNodeIterator.node-set([ExpressionContext,] ) If I process the same stylesheet with saxon, xsltproc, or 4suite, I get no errors. If I use the xalan function: xmlns:xalan="http://xml.apache.org/xalan" ... xsl:apply-templates select = "xalan:nodeset($phase1output)" mode = "phase2"/> I also get no error. If I write a script that tries to import the needed class: import org.apache.xml.dtm.ref.DTMNodeIterator; I get no import error. So the class is in my path and the stylesheet seems to be set up correctly. I can't imagine this could really be a bug in xalan, since it would have been caught by now. Here is the full source of the code. Thanks PS I've searced the web for quite some time now. According to Xalan's own website, I should be doing everything correct. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan" version="1.1"> <xsl:template match = "/"> <xsl:variable name = "phase1output"> <xsl:apply-templates select = "." mode = "phase1"/> </xsl:variable> <xsl:variable name = "phase2output"> <xsl:apply-templates select = "exsl:node-set($phase1output)" mode = "phase2"/> </xsl:variable> <xsl:copy-of select = "$phase2output"/> </xsl:template> <!--templates for first run--> <xsl:template match = "doc" mode = "phase1"> <xsl:element name = "first"> <xsl:apply-templates mode = "phase1"/> </xsl:element> </xsl:template> <xsl:template match = "element" mode = "phase1"> <xsl:element name = "first-element"> <xsl:apply-templates mode = "phase1"/> </xsl:element> </xsl:template> <!--templates for second run--> <xsl:template match = "first" mode = "phase2"> <xsl:element name = "second"> <xsl:apply-templates mode = "phase2"/> </xsl:element> </xsl:template> <xsl:template match = "first-element" mode = "phase2"> <xsl:element name = "second-element"> <xsl:apply-templates mode = "phase2"/> </xsl:element> </xsl:template> </xsl:stylesheet> -- ************************ *Paul Tremblay * *phthenry@xxxxxxxxxxxxx* ************************ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Schema-aware processors -, Michael Kay | Thread | Re: [xsl] xalan node-set not workin, Paul Tremblay |
RE: [xsl] Schema-aware processors -, David Carlisle | Date | Re: [xsl] xalan node-set not workin, Paul Tremblay |
Month |