Re: [xsl] Hello and quick question

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

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