Re: how to test previous node name
I am under the (vague) impression that he wants to test the first 'tag' that precedes the current 'tag', not being a closing 'tag'. In terms of nodes, that means, I think, the parent node if the current node is its first child, and the preceding sibling, if the current node is not the first child of its parent.
<test1> <test2> <item /> ....
should return false.
<test1> <test2> <test1 /> <text /> <item /> ...
should return true (text is its immediate preceding sibling).
<testX> <test1> <item /> <test1 /> <text /> <item /> <item />
should return true for the first and second item node, but false for the third.
Of course, it would be nice to have corrected and cleaned input from 'xslt.new' aka 'ms' aka 'mina' (see http://www.biglist.com/lists/xsl-list/archives/200701/msg00581.html and http://www.biglist.com/lists/xsl-list/archives/200701/msg00580.html). There have been four solutions so far, which each slightly different semantics; could the OP shed some light on what (s)he precisely wants?
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format