This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
path-predicate question
- To: xsl-list at mulberrytech dot com
- Subject: path-predicate question
- From: Perry Roland <pdr4h at unix dot mail dot virginia dot edu>
- Date: Thu, 10 Aug 2000 09:56:58 -0400
- Reply-To: xsl-list at mulberrytech dot com
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