Re: [xsl] Extracting part of a string

Subject: Re: [xsl] Extracting part of a string
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Wed, 15 Apr 2009 14:51:07 +0200
Fatbob wrote:
Hi everyone!

Given the following XML node

<Field value="1956-01-12 (53 y)" name="age" />

or

<Field value="2008-07-14 (1 y)" name="age" />

Is there an XSL function that will extract only with is in between the
brackets?

The user just wants to see 53 y, not the birth date.

<xsl:template match="Field"> <xsl:value-of select="substring-before(substring-after(@value, '('), ')')"/> </xsl:template> --

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread