[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT2, select nodes inside a tokenize()'d variable
On 12/20/06, James Cummings <cummings.james@xxxxxxxxx> wrote:
Hiya, I'm sure I'm just looking at this upside down, but here goes:
<xsl:template name="makeSegLabel"> <xsl:variable name="ana" select="tokenize(@ana, '(\s+)')"/> <xsl:variable name="this" select="."/> <xsl:for-each select="$ana"> <xsl:value-of select="$this"/> Also, you really ought to be using a key instead of: <xsl:value-of select="//category[@id = .]/catDesc"/> eg: <xsl:key name="cat-by-id" match="category" use="@id"/> Ultimately it could all be rewritten as: <xsl:variable name="ana" select="tokenize(@ana, '(\s+)')"/> <xsl:value-of select="for $x in $ana return string-join(concat($x,':', key('cat-by-id', $x)/catDesc), ', ')"/>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|