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

Getting first child node postion with condition

Subject: Getting first child node postion with condition
From: Julien Flotté <julien_flotte3@xxxxxxxxxxx>
Date: Fri, 08 Jun 2007 09:08:33 +0000
 Getting first child node postion with condition
Hi,
I'm a french student in training course.
I make development in xslt and I encounter the following problem :

My xml file :

<?xml version="1.0" encoding="UTF-8"?>

<tree>
<leaf attrib = 'false'>Leaf1</leaf>
<leaf attrib = 'true'>Leaf2</leaf>
<leaf attrib = 'true'>Leaf3</leaf>
</tree>

When I'm in the "tree" template, I want to get the position of the first child node with the attribute "attrib" equals "true" but I don't succeed.

I attempt to use the postion function but it doesn't work :
leaf[@attrib = 'true'][postion()] returns the value of the first child (Leaf2) but not its position.


Is there a way to to that correctly ?
Cordially,
Julien Flotti.

_________________________________________________________________
Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/

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.