Thanks for the suggestion. Unfortunately, a call like:
...
<xsl:param name="what"/>
<xsl:value-of select="translate($what, "abc", "ABC)"/>
...
fails with an "illegal argument type" error.
I am just getting into the source, but it appears that the EXFF_TRANSLATE
handler checks to see if each of the arguments is an EX_STRING. The
parameter argument is of type EX_NODESET, so sablot won't accept it.
Does sablot support passing template parameters to XPath functions?
Adam
----- Original Message -----
From: "Kaiserovi" <[EMAIL PROTECTED]>
To: "Sablotron Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 22, 2000 1:12 AM
Subject: Re: [Sab] external functions?
> Adam:
>
> if you don't care about supporting a lot of charsets, you could probably
> just use the XPath function translate(), see section 4.2 of the XPath
> spec. Like in the following fragment:
>
> ...
> <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
> <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
>
> <!-- outputs the parameter converted to uppercase: -->
> <xsl:template name="toupper">
> <xsl:param name="what"/>
> <xsl:value-of select="translate($what, $lower, $upper)"/>
> </xsl:template>
> ...
>
> Of course, using a special extension function might be more elegant but
> none is currently available in Sablotron.
>
> Tom