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

Get preceding sibling name issue

Subject: Get preceding sibling name issue
From: Don Don <progwihz@xxxxxxxxx>
Date: Mon, 14 Apr 2008 07:44:51 -0700 (PDT)
 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:&#160;<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:&#160;<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

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.