This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl - variable - array problem
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] xsl - variable - array problem
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 20 Mar 2001 11:24:25 GMT
- References: <200103201159370979.00D25275@mailhost.rz.uni-karlsruhe.de>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I want to do something like an array:
we know, you asked the same question a few minutes ago.
xsl:variable if used with element content produces a result tree
fragment. You can _not_ query into these using XSLT 1.0 this is a FAQ.
<xsl:value-of selec="$array/*[local-name()='word3']"/>
Your processor may have a node-set() extension function to turn the
result tree fragment into a node set, or it may implement the XSLT 1.1
draft which would make your original idea valid.
Alternatively you can use
<xsl:value-of
select="document('')/xsl:stylesheet/xsl:variable[@name='array']/
/*[local-name()='word3']"/>
why are you using
/*[local-name()='word3']
rather than the simpler
/word3 ?
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list