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

xpath expression

Subject: xpath expression
From: Alex Black <enigma@xxxxxxxxxxxxxxxx>
Date: Thu, 17 May 2001 17:01:19 -0700
input position xpath
"if I'm not last, and the next input/type isn't select"

i.e.

<input>
    <type>whatever</type>
</input>

<input>
    <type>text</type> <-- I'm here
</input>

<input>
    <type>select</type> <-- I need to know what the value of this element is
</input>

<input>
    <type>something</type>
</input>


------

xsl:

        <xsl:if test="not(position()=last()) and
not(input[position()+1]/type = 'select')">
            <br />
        </xsl:if>

I _think_ the above expression doesn't work because the 'pointer' is at

<input>
    <type>text</type> <-- here
</input>

but I can't figure out a way to "go up" on level. there has to be a way :)

I tried this:

        <xsl:if test="not(position()=last()) and
not(parent[position()+1]/type = 'select')">

with the exact same result as the above.

but I'm getting there!

_alex



 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.