|
Subject: [xsl] Select attribute using a variable From: strawks <strawks@xxxxxxxx> Date: Wed, 23 Jan 2008 10:59:32 +0100 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I have a variable named property and I want to select an attribute using
this variable.
Basically :
<xsl:value-of
select="/document/styles/style[@name=$style_name]/attribute::$property"/>
xsltproc says the following error :
XPath error : Invalid expression
/document/styles/style[@name=$style_name]/attribute::$property
^
compilation error: file sample1.xsl line 114 element value-of
xsl:value-of : could not compile select expression
'/document/styles/style[@name=$style_name]/attribute::$property'
If I replace $property by a fixed name, it works fine.
Is it possible to use a variable in this case?
Any help would be appreciated.
regards,
strawks
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHlxAE+2TXLlA5m78RAvxJAKCNYCa4o9LPWUEeG4UzevMTlZvCKACgo8bc
eTqwbwVyHRLlMWbATindozw=
=o3hf
-----END PGP SIGNATURE-----
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] RE: xsl-list Digest 23 Jan 20, Laura Porter | Thread | Re: [xsl] Select attribute using a , Abel Braaksma |
| Re: [xsl] Return value from a templ, David Carlisle | Date | Re: [xsl] Select attribute using a , Abel Braaksma |
| Month |