Two questions:
1) I'm using xalan-j_2_5_D1 on Win2K
I am trying to use the EXSLT functions - the str XSL functions in particular. I am not having much luck with XALAN
recognizing any of the "exsl:xyz" or "str:xyz" references
After reading the doc on Extensions and Extension Libraray, I have in my CLASSPATH: xalan.jar; xml-apis.jar; xercesImpl.jar, bsf.jar (where is js.jar, btw?). Do I need anything else in the my classpath? or anything in some config area?
I wrote the xsl test script below.. The ONLY function that reports its available is "xalan:nodeset". None of the other functions below are found.
This is probably something really silly I'm overlooking. Any help would be appreciated.
2) Also, assuming I get past the above problem.. Reading through the xalan EXSLT support docs, it appears that str:replace in particular is not yet supported natively in xalan. I am planning on copying over str.replace.template.xsl from the EXSLT str.zip to the dir containing my other XSL scripts and importing it as follows.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings"
extension-element-prefixes="str">
<xsl:import href="" />
<<< Use the str:replace function here >>>
Is this the right way? Or is there a better approach? Thx.
Ashok
==============================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings"
xmlns:math="http://exslt.org/math"
xmlns:exsl="http://exslt.org/common"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan"
extension-element-prefixes="str exsl">
<xsl:template match="/">
<xsl:if test="function-available('exsl:node-set')">
<xsl:message>
Function Available ('exsl:node-set')
</xsl:message>
</xsl:if>
<xsl:if test="function-available('xalan:nodeset')">
<xsl:message>
Function Available ('xalan:nodeset')
</xsl:message>
</xsl:if>
<xsl:if test="function-available('math:min')">
<xsl:message>
Function Available ('math:min')
</xsl:message>
</xsl:if>
<xsl:if test="function-available('str:split')">
<xsl:message>
Function Available ('str:split')
</xsl:message>
</xsl:if>
<xsl:if test="function-available('xalan:split')">
<xsl:message>
Function Available ('str:replace')
</xsl:message>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
