Change your xmlns:xalan namespace definition to

  xmlns:xalan="http://xml.apache.org/xalan";

as shown at http://xml.apache.org/xalan-j/extensionslib.html#xalanns

Gary

> -----Original Message-----
> From: Michel GOOSSENS [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 14, 2002 12:04 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: question about nodeset extension
> 
> 
> I am trying to use the nodeset extension with xalan 2.2, but 
> although I 
> (think I) have included all possible jar files in my 
> CLASSPATH, I always 
> get the message
> 
> (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.nodeset([ExpressionContext,] ).
> 
> Hence my question, in which of the jar files is the nodeset extension 
> defined.
> 
> My XSL code to trnasform an RTF into a node-set uses the following:
> 
> <xsl:stylesheet
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>   xmlns:xalan="http://xml.apache.org/xslt";
>   extension-element-prefixes="xalan"
>   version="1.0"
>  >
> 
> .....
> 
> <xsl:template name="getchars-xalan">
> 
> <!-- First pass over the data: store chars in chars-rtf -->
>   <xsl:variable name="chars-rtf">
>    <xsl:element name="fontlist">
>     <xsl:apply-templates select="g[@style]" mode="getchars"/>
>    </xsl:element>
>   </xsl:variable>
> 
>   <xsl:text> +++ begin chars-rtf &#xA;</xsl:text>
>     <xsl:for-each select="xalan:nodeset($chars-rtf)//char">
>       <xsl:value-of select="name(.)"/>
>   <xsl:text> </xsl:text>
>       <xsl:value-of select="name(attribute::*[1])"/>
>   <xsl:text>&#xA;</xsl:text>
>     </xsl:for-each>
>   <xsl:text> +++ end chars-rtf &#xA;</xsl:text>
> 
> ...
> 
> Thanks for your help. mg
> 
> PS:
> 
> Here is the contents of my CLASSPATH variable     
> (/afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/ is where 
> all jar files reside), I have edited the list by inlcuding 
> linefeeds to 
> make it more readable
> 
>  CLASSPATH =
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/xerces.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/xalan.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/xal
> ansamples.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/xal
> anservlet.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/bsf.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/xsltc.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/BCEL.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/jav
> a_cup.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/xml
> -apis.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/JLex.jar:
> /afs/cern.ch/sw/XML/cdrom/xml.apache.org/xalan-j_2_2_0/bin/run
> time.jar:
> 

Reply via email to