Subject: Re: [xsl] Exsl str:replace template problems From: James Fuller <jim.fuller@xxxxxxxxxxxxxx> Date: Wed, 10 Aug 2005 10:56:03 +0200 |
Kenneth Stephen wrote: >Hi, > > I'm attempting to work with the EXSL extension template for string >replacement provided at >http://www.exslt.org/str/functions/replace/str.replace.template.xsl . >Here is my code : > > <xsl:template match="text()" priority="2"> > <xsl:text /><xsl:value-of select="concat('Original = ',.,':::')" >/><xsl:text /> > <xsl:call-template name="exsl-str:replace"> > <xsl:with-param name="string" select="." /> > <xsl:with-param name="search" select="'&EOL;'" /> > <xsl:with-param name="replace" select="'&EOL;&TAB;'" /> > </xsl:call-template> > </xsl:template> > >...where the entities are defined as > ><!DOCTYPE xsl:stylesheet [ > <!ENTITY EOL "
"> > <!ENTITY TAB "	"> >]> > > From my debugging, it appears that any instance of 
 is being >converted to a   within the replace template. I suspect, the >following copy-of from that code is the guillty party... > > <!-- this converts the search and replace arguments to node sets > if they are one of the other XPath types --> > <xsl:variable name="search-nodes-rtf"> > <xsl:copy-of select="$search" /> > </xsl:variable> > >....but I dont understand the reasons why and how to work around this >problem. Any ideas? > > to be precise, what XSLT processor are you using. Jim Fuller
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Exsl str:replace template pro, Kenneth Stephen | Thread | Re: [xsl] Exsl str:replace template, Kenneth Stephen |
Re: [xsl] User defined SAX ContentH, Mukul Gandhi | Date | Re: [xsl] defining nodes to apply t, ADAM PATRICK |
Month |