Re: [xsl] Building RTF variable

Subject: Re: [xsl] Building RTF variable
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Fri, 25 Oct 2002 00:13:41 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 24 October 2002 23:53, Ragulf Pickaxe wrote:
> <xsl:variable name="Test">
>   <node>Number1</node>
>   <node>Number2</node>
>   <node>Number3</node>
> </xsl:variable>
>
> But I don't have very much success.
>
> I would like to be able to do, say:
> <xsl:value-of select="$Test[1]"/>

First, remember that all of the <node> elements are children of $Test, so you 
will need something like "$Test/node[1]" to select the first node.  If it 
works like that, then you're set.

Probably you have a bigger problem, which is that your XSLT processor might 
not support automatic conversion from a Result Tree Fragment to a Nodeset.  
The XSLT 1.0 spec doesn't allow it.  You'll need to see your processor's 
documentation and look for an xxx:node-set() function or something similar.  
Once you find how to use it, you can do something like 
"xxx:node-set($Test)/node[1]".

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9uO8nhDAgUT1yirARAt8TAJ97ZRVpix3b5LMfNawLKLWa21X2qgCfbHgb
QSmjEFKy3rNWQaiuLI7ciAA=
=PzYn
-----END PGP SIGNATURE-----


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread