[XML4Lib] XSLT call name of variable dynamically?
Erik Hetzner
erik.hetzner at ucop.edu
Thu Feb 5 17:49:43 EST 2009
At Thu, 5 Feb 2009 12:58:01 -0800,
Walker, David wrote:
>
> Hopefully this makes sense:
>
> […]
>
> But I've had some problems with this approach. Need to figure it out,
> unless there is some better way I'm not thinking of?
Hi David -
Just re-read this message & realized that my previous message didn’t
cover your exact use case.
If you really want to do it like this, look at exslt:eval(...) [1].
Another way would be the basic method I outlined in the last message,
but with per-stylesheet variables:
<xsl:variable name="labels">
<labels>
<label name="text_breadcrumb_databases_categories" value="..."/>
</labels>
</xsl:variable>
then use select="exslt:node-set($labels)//label[@name=$var]/@value"
(or something like that).
I’m still not sure why you need per-page overrides for label text, but
it could be done like this.
best,
Erik Hetzner
1. http://www.exslt.org/dyn/functions/evaluate/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.webjunction.org/wjlists/xml4lib/attachments/20090205/d6140001/attachment.bin
More information about the XML4Lib
mailing list