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

path-predicate question

Subject: path-predicate question
From: Perry Roland <pdr4h@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Aug 2000 09:56:58 -0400
predicate question
Hello, XSLT Wizards,

I thought I understood position() in predicates, but my self-
confidence has been shaken by the following --

<xsl:when
test="preceding-sibling::*[starts-with(name(),'div')][position()=1]">

The question is: Is this statement true only when the immediately
preceding sibling is a div or is it also true when there are any div
preceding siblings?  If the latter, then how do I select the first div
preceding sibling, skipping any non-div siblings?  Does

<xsl:value-of
select="preceding-sibling::*[starts-with(name(),'div')][position()=1]"/>

do the trick?  If so, then the [position()=1] part of the predicate
behaves differently when used with 'test' than with 'select', no?

I'm soooo confused.

--
perry


 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-2011 All Rights Reserved.