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

XSL Previous Node

Subject: XSL Previous Node
From: c p <bugs75il@xxxxxxxxx>
Date: Wed, 16 Mar 2005 09:14:50 -0800 (PST)
xsl previous
Hello,

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.

How do I fix this?

Below is the XML.  Given that my content node is
"servertype" (with id="2222"), I want to output
something like this:

Previous servertype id is: 1111
Next servertype id is: 3333
------------------------------------------------------
<root>
  <servertype id="1111"/>
  <somenode>
    <othernode>
        <servertype id="2222"/>
    </othernode>
  </somenode>
  <yetanothernode>
      <servertype id="3333"/>
  </yetanothernode>
</root>



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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.