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

Re: Hello and quick question

Subject: Re: Hello and quick question
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Mon, 6 Jan 2003 19:19:11 -0500
corey snow

On Monday, January 6, 2003, at 06:53 PM, Corey Snow wrote:


I can do something like:
/ROOT/Client/Contacts/Contact[IsReferrer='0']/ContactFirstName but that
returns a node-set, not a single node. I assume I need to do something
with the position() function, but I'm not sure how to go about it.

I think this would work: /ROOT/Client/Contacts/Contact[1][IsReferrer='0']/ContactFirstName

(the [1] picks the first of whatever you're looking for, along the axis you specified in this case I guess that's the default axis, children.

I think that position()=1 would be equivalent. but xpath has nice syntactic sugar :)

simon

---
www.simonwoodside.com


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.