[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to substitute a portion of the text value of an element


Subject: Re: [xsl] How to substitute a portion of the text value of an element
From: Paul <pflists@xxxxxxxxx>
Date: Wed, 8 Oct 2008 11:23:04 -0400

Thanks to Michael and Syd!

On Tue, Oct 7, 2008 at 5:08 PM, Syd Bauman <Syd_Bauman@xxxxxxxxx> wrote:
> Sorry, wasn't paying attention to the whole problem, just the
> specific question.
>
> Will the following do what you want?
>
>   <xsl:copy>
>     <xsl:variable name="regularizedMe" select="translate( ., '/', '\')"/>
>     <xsl:variable name="regularizedOld" select="translate( $old, '/', '\')"/>
>     <xsl:value-of select="substring-before( $regularizedMe, $regularizedOld )"/>
>     <xsl:value-of select="$new"/>
>     <xsl:value-of select="substring-after( $regularizedMe, $regularizedOld )"/>
>   </xsl:copy>


Current Thread