[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Get preceding sibling name issue
Hi all I am trying to get the last preceding sibiling name for the <atext> element using the following xsl code The example in senario 1 works but that of senario 2 dosent work. Anyway I can fix this ? I need to get the preceding name of the <atext> element in senario 2 (which should be spara1) Cheers senario 1 ----------------------------- <xsl:variable name="precedeName" select ="(name(./preceding-sibling::apara1 [last()]))" /> Value: <xsl:value-of select="$precedeName" /> <docg> <apara1>xxx<apara1> <apara1>xxx<apara1> <apara1>xxx<apara1> <atext>hello</atext> </docg> senario 2 ----------------------------- <xsl:variable name="precedeName2" select ="(name(./preceding-sibling::spara1 [last()]))" /> Value: <xsl:value-of select="$precedeName2" /> <docg> <apara1> <spara1>xxx</spara1> <spara1>xxx</spara1> <spara1>xxx</spara1> <spara1>xxx</spara1> <atext>hello</atext> <apara1> </docg> ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
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
|