[XML4Lib] XSLT call name of variable dynamically?
Roy Tennant
tennantr at oclc.org
Thu Feb 5 15:16:37 EST 2009
I'm not sure if this is what you want to do or not, but in one of my
stylesheets I have:
<xsl:variable name="abstract" select="print/cite/abstract"/>
Then later I test for it's existence:
<xsl:if test="$abstract"> - <xsl:apply-templates select="abstract"/>
....
So I _think_ if you first have a statement that declares the variable and
loads it up, then your statement might work. But then, what do I know?
Roy
On 2/5/09 2/5/09 12:00 PM, "Walker, David" <dwalker at calstate.edu> wrote:
> Hi all,
>
> Is it possible in XSLT 1.0 to call an <xsl:variable> dynamically at run-time
> without using an <xsl:choose> block? That is, something like this:
>
> <xsl:value-of select="${$foo}" />
>
> That doesn't work. But is there some other way to accomplish the same? If
> need be, I can write some background on this question, but hoping someone
> might be able to tell me straight-up.
>
> --Dave
>
> ==================
> David Walker
> Library Web Services Manager
> California State University
> http://xerxes.calstate.edu
>
> _______________________________________________
> XML4Lib mailing list
> XML4Lib at webjunction.org
> http://lists.webjunction.org/mailman/listinfo/xml4lib
>
--
More information about the XML4Lib
mailing list