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

Re: how to test previous node name

Subject: Re: how to test previous node name
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Sun, 11 Feb 2007 23:38:40 +0100
Re:  how to test previous node name
Andrew Welch wrote:
On 2/11/07, xslt. new <xslt.new@xxxxxxxxx> wrote:
Hi all:

I have an XML input:


How do I check if the previous node name for <item> is test1 or text?

select="preceding::*[1][self::item1 or self::text]"

I think (s)he meant (guessing):

select="preceding::*[1][self::text] | parent::test1/*[1][generate-id(.) eq generate-id(current())]"

but the OP is pretty unclear about what he wants (can text node be named test1, can test1 be something else then a parent etc? What is the context node?) and fails to include his own tryouts.

-- Abel

Current Thread


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.
First Name
Last Name
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.