xsl-list
[Top] [All Lists]

RE: [xsl] function-available returns false

2008-05-01 18:05:41
You're right, there's a bug here, previously unreported as far as I can
tell. A call to function-available() supplying a run-time string is working
in 6.5.5 only if the string has been interned.

In practice, of course, function-available() is almost always called with a
string literal as its argument.

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: Manfred Staudinger 
[mailto:manfred(_dot_)staudinger(_at_)gmail(_dot_)com] 
Sent: 01 May 2008 18:26
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] function-available returns false

2008/5/1 Andrew Welch <andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com>:
On 01/05/2008, Manfred Staudinger 
<manfred(_dot_)staudinger(_at_)gmail(_dot_)com> wrote:
 > With the stylesheet below Saxon 6.5.5 returns false for  >  
function-available for all xslt and xpath functions.

 >  Any idea?

 Um... yes:

 >             <dr:functions show="false">

 and:


 >             <xsl:with-param name="show" select="@show='true'"/>

 If you'd tried to produce cut down examples, rather posting your  
entire transform you would probably would have spotted that....

 (plus if you were questioning whether function-available() works in
 6.5.5 there are easier ways of finding out!)

Sorry for that ...
XML:
<e>number</e>

XSLT:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/"><xsl:apply-templates/></xsl:template>
<xsl:template match="e">
        <xsl:copy>
                <xsl:value-of select="function-available(.)"/>
        </xsl:copy>
</xsl:template>
</xsl:stylesheet>

Manfred

--~------------------------------------------------------------------
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>
--~--