Hello: I could not find xalan user mailing list so posting it here - sorry about that.
I am struggling with nodeset() extention in xalan. Following are the templates. I have included xalan.jar, xerces.jar, bsf.jar in the classpath - rather in lib directory of tomcat. I am getting following error msg - "Call to extension function failed: http://xml.apache.org/xalan". I would really appreciate your help to solve this problem. Also, is it possible to pass a path of XML element to nodeset(). XML file could like this. <start> <option value="alf">A</option> <option value="bar">B</option> <option value="cat">C</option> <option value="dog">D</option> <option value="elf">E</option> <option value="foo">F</option> </start> Best Regards, Kiran ----------------------------------------------------------------- Application.xsl --------- <xsl:template name="wms_pointcode-extra"> <xsl:call-template name="generic-select"> <xsl:with-param name="label">My List </xsl:with-param> <xsl:with-param name="name">listName</xsl:with-param> <xsl:with-param name="options"> <start> <option value="alf">A</option> <option value="bar">B</option> <option value="cat">C</option> <option value="dog">D</option> <option value="elf">E</option> <option value="foo">F</option> </start> </xsl:with-param> </xsl:call-template> </xsl:template> ------------------------------------------------------------------- Generic.xsl -------- </xsl:stylesheet><?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan"> <xsl:output method="html"/> <xsl:template name="generic-select"> <xsl:param name="label"/> <xsl:param name="options"/> <xsl:param name="name"/> <tr align="center"> <td width="50%"><xsl:value-of select="$label"/></td> <td width="50%" align="left"> <select> <xsl:attribute name="name"> <xsl:value-of select="$name"/> </xsl:attribute> <xsl:for-each select="xalan:nodeset($options)/start//*"> <option> <xsl:attribute name="value"> <xsl:value-of select="./@value"/> </xsl:attribute> <xsl:value-of select="."/> </option> </xsl:for-each> </select> </td> </tr> </xsl:template> </xsl:stylesheet> --------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
