[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

syntax for passing variable into XPath statement

Subject: syntax for passing variable into XPath statement
From: Esther_Strom@xxxxxxxx
Date: Fri, 6 Aug 2004 12:21:01 -0500
xsl syntax
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.