[exslt] Any -complete- examples for the replace function?
Sebastien Boisvert
sebastienboisvert at yahoo.com
Fri May 9 07:08:28 MDT 2008
----- Original Message ----
From: James Fuller <james.fuller.2007 at gmail.com>
>u need to first ensure that the function is loaded properly
>
>a) are u using a processor that supports EXSLT
Yes. http://xmlsoft.org/XSLT/
>
>or
>
>b) are you importing in XSLT implementation (just that single stylesheet )
>
Yes; in the example you provide below it's more appropriate to import str.replace.function.xsl given that you're calling it as a function instead of the template version.
> once u are past that, just make sure namespaces are declared
>
>here is an example which u import the single XSLT implementation (note
>that the package level imports do not work in EXSLT).
Yes did all that. The issue is that this function/template does not work with node-sets as documented - please see my example files from my previous mail.
><xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:str="http://exslt.org/strings"
> extension-element-prefixes="str">
>
><xsl:import href="str.replace.template.xsl"/>
>
><xsl:template match="/">
>REPLACE COMMA WITH DASH
><xsl:copy-of select="str:replace('a, simple, list', ', ', '-')"/>
>
></xsl:template>
>
></xsl:stylesheet>
>
>hth, Jim Fuller
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
More information about the exslt
mailing list