Right; actually Sablot shouldn't require you to convert the argument by
string() like this. (The new version won't.) By the way, the quotes in
your XSLT code aren't quite correct but that's probably a typo.

Tom 

Adam Doppelt wrote:
> 
> Ah. I figured out the problem. It should read:
> 
> >    <xsl:param name="what"/>
> >    <xsl:value-of select="translate(string($what), "abc", "ABC)"/>
> 
> Thanks again,
> 
> Adam
> 
> ----- Original Message -----
> From: "Adam Doppelt" <[EMAIL PROTECTED]>
> To: "Sablotron Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 22, 2000 12:46 PM
> Subject: Re: [Sab] external functions?
> 
> > 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
> >
> >

Reply via email to