[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Exsl str:replace template problems

Subject: Re: Exsl str:replace template problems
From: Kenneth Stephen <marvin.the.cynical.robot@xxxxxxxxx>
Date: Wed, 10 Aug 2005 08:28:05 -0500
str replace
Jim,

    Saxon 6.5.4. I get the same results with Xalan 2.6.3 too (caveat :
Xalan has a bug where the "function-available" function doesnt
correctly detect the exsl:node-set function; one has to change that
code to "function-available(exsl:nodeSet)" for Xalan to work with
Jeni's code. There is a Xalan bug (1522) filed on this matter).

Thanks,
Kenneth

On 8/10/05, James Fuller <jim.fuller@xxxxxxxxxxxxxx> wrote:
> 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 "&#x0A;">
> >       <!ENTITY TAB "&#x09;">
> >]>
> >
> >    From my debugging, it appears that any instance of &#x0A; is being
> >converted to a &#x20 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.