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

possible xalan error using function-available() and e

Subject: possible xalan error using function-available() and element-available()
From: "James Fuller" <james.fuller.2007@xxxxxxxxx>
Date: Wed, 3 Oct 2007 15:59:01 +0200
 possible xalan error using function-available() and  e
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>&#160;<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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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-2011 All Rights Reserved.