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

Can't use variable as temporary tree in XSLT 2.0

Subject: Can't use variable as temporary tree in XSLT 2.0
From: cknell@xxxxxxxxxx
Date: Tue, 17 Oct 2006 13:14:53 -0400
use a temp variable xslt
This is something I must have done a hundred times, but today I keep butting my head against the wall.

I'm using XLST 2.0 (Saxon 8.7.3j).

I've stripped it down to the simplest example I could imagine and tried with that, but I still don't get what I expect.

In my stylesheet, in a template, I have this variable defined:

<xsl:variable name="months">
  <months>
    <month>JAN</month>
    <month>FEB</month>
  </months>
</xsl:variable>

Immediately after that I have this:

<tr><td><xsl:value-of select="$months/months/month[position()=1]" /></td></tr>

In my result document I expect to see:

<tr><td>JAN</td></tr>

What I get is:

<tr><td></td></tr>

Please someone tell me what I don't see.

Thanks.

-- 
Charles Knell
cknell@xxxxxxxxxx - email

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.