Hi Jim,
Google is your friend here, it gave me the following bug-report, which I
believe, answers your question:
http://issues.apache.org/jira/browse/XALANJ-2223
The bug is not yet resolved. It seems as if when you mingle the function
names a bit you might receive a true result for implemented exslt
functions (i.e., try exsl:nodeSet instead of exsl:node-set).
HTH,
Cheers,
Abel Braaksma
PS: this is the (ridiculously long) Google search string I used:
"site:mail-archives.apache.org function-available Unknown error in XPath
xalan xslt bug"
James Fuller wrote:
simple xslt revealed a possible bug with Xalan (latest java version)
a long time ago, I had a set of EXSLT (www.exslt.org) coverage XSLT,
which outputted a simple report ... with Firefox 3.0 including a few
EXSLT functions ... I dusted them off;
http://www.ruminate.co.uk/2007/09/testing-exslt-support.html
explains the process ... its, in a nutshell, a single XSLT sheet is
run by an XSLT Processor and reports back what EXSLT functions is
supported by said XSLT Processor.
There seems to be an error thrown by Xalan when processing either
function-available() or element-available() when the function or
element name is supplied as an xsl:variable
<xsl:template match="exslt:function">
<xsl:variable name="prefix" select="../../../exslt:module/@prefix"/>
<xsl:variable name="funcname"><xsl:value-of
select="concat($prefix,':',@name)"/></xsl:variable>
<tr>
<td> <xsl:value-of select="$funcname"/></td>
<td>
<xsl:choose>
<xsl:when test="function-available(string($funcname))">
<div class="good">Available</div>
</xsl:when>
<xsl:otherwise>
<div class="bad">Not Available</div>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
the operative term is
function-available(string($funcname))
Works fine on some XSLT Procesors
Saxon
http://www.webcomposite.com/result/saxon8-result.html
XSLT Proc
http://www.webcomposite.com/result/xsltproc-result.html
and a very early version of xalan ...
http://www.webcomposite.com/result/xalan-result.html
however, latest Xalan doesn't like $funcname, nor does it like
string($funcname) in function-available().
throws an error related to XPath
Line #86; Column #72; XSLT Error
(javax.xml.transform.TransformerException): Unknown error in XPath.
is this an issue with spec interpretation, a bug ... or something else ?
tia, Jim Fuller
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--