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

xpath satisfying two conditions where one is position

Subject: xpath satisfying two conditions where one is position()=last()
From: "Christoph Klocker" <klocker@xxxxxxxxxxxxx>
Date: Fri, 29 Oct 2004 15:59:05 +0200
xpath conditions
Hi,

I have this xml
<Result>
<Monthly>
<MonthUltimo month="8" year="2001" date="2001" index="900" quote="1002" />
<MonthUltimo month="9" year="2001" date="2001" index="988" quote="1287" />
<MonthUltimo month="10" year="2001" date="2001" index="1355" quote="1355" />
<MonthUltimo month="11" year="2001" date="2001" index="1154" quote="1157"/>
<MonthUltimo month="12" year="2001" date="2001" index="1104" quote="1101" />
<MonthUltimo month="1" year="2002" date="2002" index="1114" quote="1112"/>
<MonthUltimo month="2" year="2002" date="2002" index="1082" quote="1082"/>
<MonthUltimo month="3" year="2002" date="2002" index="1023" quote="1023"/>
<MonthUltimo month="4" year="2002" date="2002" index="1017" quote="1017"/>
</Monthly>
</Result>

Now I need to get the index of the last MonthUltimo of 2001. How can I do
this? Can I do this with one query?
I need this for a later loop, where I need the result for a if "index <
1000"
I tried this, but didn't work.
<xsl:value-of select="/Result/Monthly/MonthUltimo[@year=2000 and position()=
last()]/@index"/>

/christoph

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.