[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Accessing Variable within a Variable
Subject: Re: [xsl] Accessing Variable within a Variable From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 7 Apr 2003 12:59:50 +0100 |
<xsl:variable name="merger"> <xsl:value-of select="$X1"/> <xsl:value-of select="$X2"/> </xsl:variable> <xsl:for-each select="$merger/item"> This is a syntax error, you can not query into a result tree fragment variable in XSLT 1. This should be <xsl:for-each select="xx:node-set($merger)/item"> where xx:node-set is your systems node-set extension. If your system is not reporting an error here it has a bug. However even if you use node-set then <xsl:variable name="merger"> <xsl:value-of select="$X1"/> <xsl:value-of select="$X2"/> </xsl:variable> value-of gives the string value of its argument so $merger will be a result tree fragment corresponding to a root node with just text child, no elements, and in particular no elements called item, so I do not know what you intend by <xsl:for-each select="$merger/item"> perhaps you want copy-of not value-of when you build merger, but it's hard to guess. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Accessing Variable within a V, Leena Kulkarni | Thread | Re: [xsl] Accessing Variable within, Leena Kulkarni |
[xsl] Fw: xsl parse, David Pacheco | Date | Re: [xsl] How to test if a named at, "Braumüller, Hans" |
Month |
Keywords