[xsl] syntax for passing variable into XPath statement

Subject: [xsl] syntax for passing variable into XPath statement
From: Esther_Strom@xxxxxxxx
Date: Fri, 6 Aug 2004 12:21:01 -0500
I'm pretty new at this, and haven't been able to find a sample of what I'm
trying to do. I have a variable set up, and it is getting set correctly -
I've got an fo:inline printing out the value of the variable at each point
in the code. But I need to pass that variable into an XPath statement as a
predicate (the variable is a number), and although it isn't causing any
errors the way it is now, I don't think it's getting set. Could someone
take a look and see if I'm doing something wrong?

* I know the variable navNum is set correctly because of the value-of
statement inside the inline *
<xsl:apply-templates select="Zone2"/>z2 is at navNum<fo:inline
font-weight="bold"><xsl:value-of select="$navNum"/></fo:inline>

* now I need to pass that variable number into here to get the correct
NavigationDivision element. If I hard-code a number in, the statement
provides the correct output *
<xsl:value-of
select="//MLPublication/NavigationDivision[$navNum]/Activity/Title[1]"/>

I know in cases where you're passing a variable into a parameter you
enclose it in curly braces, but doing that causes my parser to throw an
error.
|------------------------------|
| E S T H E R  S T R O M, CLPP |
| Notes Application Development|
| McDougal Littell             |
| 909 Davis Street             |
| Evanston, IL 60201 USA       |
| w: 847.424.3209              |
| e: esther_strom@xxxxxxxx     |
|------------------------------|

Current Thread