Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] function-available returns false

From: "Manfred Staudinger" <manfred.staudinger@--------->
To:
Date: 5/2/2008 10:44:00 AM
2008/5/2 Michael Kay <mike@xxxxxxxxxxxx>:
> 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.
function-available() returns true for the extension functions
implemented in 6.5.5, is it that what you mean here?

>  In practice, of course, function-available() is almost always called with a
>  string literal as its argument.
The use case here is to get a quick reference which elements or
functions are not (jet) implemented and which extensions are available
in a certain version of an XSLT 1.0 processor (in a particular
browser).

@Andrew:
> If you'd tried to produce cut down examples, rather posting > your entire transform you would probably would have
> spotted that....
It _is_ a cut down version (not enough I agree), but there is nothing wrong:
>   <dr:functions show="false">
>   <xsl:with-param name="show" select="@show='true'"/>
$show is set to boolean false(),
>   <xsl:if test="function-available(string(.))=$show">
so the test returns true() when function-available() returns false()

Regards,

Manfred

>  > -----Original Message-----
>  > From: Manfred Staudinger [mailto:manfred.staudinger@xxxxxxxxx]
>  > Sent: 01 May 2008 18:26
>  > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>  > Subject: Re: [xsl] function-available returns false
>  >
>  > 2008/5/1 Andrew Welch <andrew.j.welch@xxxxxxxxx>:
>  > > On 01/05/2008, Manfred Staudinger
>  > <manfred.staudinger@xxxxxxxxx> 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent