[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xalan node-set not working

Subject: xalan node-set not working
From: Paul Tremblay <phthenry@xxxxxxxxxxxxx>
Date: Sat, 28 Feb 2004 19:53:01 -0500
xalan node set
If I use xalan to process a stylesheet with a node-set, I get this

(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:


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.


PS I've searced the web for quite some time now. According to Xalan's
own website, I should be doing everything correct.



    <xsl:template match = "/">
        <xsl:variable name = "phase1output">
            <xsl:apply-templates select = "." mode = "phase1"/>
        <xsl:variable name = "phase2output">
            <xsl:apply-templates select = "exsl:node-set($phase1output)" mode = "phase2"/>
        <xsl:copy-of select = "$phase2output"/>

    <!--templates for first run-->
    <xsl:template match = "doc" mode = "phase1">
        <xsl:element name = "first">
            <xsl:apply-templates mode = "phase1"/>

    <xsl:template match = "element" mode = "phase1">
        <xsl:element name = "first-element">
            <xsl:apply-templates mode = "phase1"/>

    <!--templates for second run-->
    <xsl:template match = "first" mode = "phase2">
        <xsl:element name = "second">
            <xsl:apply-templates mode = "phase2"/>

    <xsl:template match = "first-element" mode = "phase2">
        <xsl:element name = "second-element">
            <xsl:apply-templates mode = "phase2"/>


*Paul Tremblay         *

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.