This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: xsl - variable - array problem



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]