Groups > Design > Microsoft xsl > Re: XSL - editing returned values




XSL - editing returned values

XSL - editing returned values
Wed, 9 Apr 2008 08:43:36 -0700
Hi,

I have an XSL file that returns various string values.

However the values that are been returned now have a number followed
by a # sign at the start of the string i.e. 342#requiredFiles.

I want to remove everything before the # sign and the # sign
itself...to only leave the string.

However i have no experience of XSL and am hoping for some guidance or
tutorials...

This is the XSL that returns the values -
 <xsl:value-of select="@FileLeafRef" />

Post Reply
Re: XSL - editing returned values
Wed, 09 Apr 2008 18:53:47 +020
kieran5405 wrote:

> However the values that are been returned now have a number followed
> by a # sign at the start of the string i.e. 342#requiredFiles.
> 
> I want to remove everything before the # sign and the # sign
> itself...to only leave the string.
> 
> However i have no experience of XSL and am hoping for some guidance or
> tutorials...
> 
> This is the XSL that returns the values -
>  <xsl:value-of select="@FileLeafRef" />

The string functions of XSLT and XPath 1.0 are defined here: 
<URL:http://www.w3.org/TR/xpath#section-String-Functions>
You want
   <xsl:value-of select="substring-after(@FileLeafRef, '#')"/>


-- 

	Martin Honnen --- MVP XML
Post Reply
about | contact