Subject: [xsl] XSL Previous Node From: c p <bugs75il@xxxxxxxxx> Date: Wed, 16 Mar 2005 09:14:50 -0800 (PST) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] About Michael Kay's XSLT , Midsummer Sun | Thread | Re: [xsl] XSL Previous Node, David Carlisle |
RE: [xsl] Namespace declarations in, Cynthia DeLaria | Date | Re: [xsl] XSL Previous Node, David Carlisle |
Month |