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

Re: XSL Previous Node

Subject: Re: XSL Previous Node
From: c p <bugs75il@xxxxxxxxx>
Date: Wed, 16 Mar 2005 09:28:31 -0800 (PST)
xslt previous node
Is previous axes part of XSLT/XPath 2.0?   What if I
am stuck with XSLT/XPath 1.0 for now?

Thanks,
C


--- David Carlisle <davidc@xxxxxxxxx> wrote:
>   I have an xml file that could look something like
>   below.  Say I have a node called "servertype" that
>   could occur at any level.  In my XSLT, when I am
> on a
>   certain "servertype", I want to get find out
> exactly
>    where in the xml was the previous and next
> instance of
>   "servertype" node.  Key point is that "servertype"
>   could occur at any level with the XML structure so
> I
>   do not think preceding-sibling asex would work. 
> If I
>   use ancestor axes then it ignores any previous
>   instance of the "servertype" node at the same
> level.
> 
> If you want the previous use the previous:: axis
> rather than teh two you
> mentioned, ancestor:: or previous-sibling::
> Actually, depending on how you define previous, you
> may want to use
> 
> (previous::servertype|ancestor::servertype)[last()]
> 
> rather than
> 
> previous::servertype[1]
> 
> XPath doesn't consider ancestors to be previous
> nodes.
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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.