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

Re: Same TAG name ?

Subject: Re: Same TAG name ?
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Thu, 23 May 2002 18:04:53 +0200
xsl if tagname
longjohn wrote:
Hi to all!
I' ve got a DOM like the follow one:
<root>
        <BOOK>
             <TITLE>
                        .....
             </TITLE>
             <CLICCABLE>
                        ....
             </CLICCABLE>
             <AUTHOR>
                    <NAME>....</NAME>
                    <CLICCABLE>...</CLICCABLE>
             </AUTHOR>
      </BOOK>
      .....
      .....
</root>

The problem is that when I apply the 'AUTHOR template' in my XSL , and I want to consider CLICCABLE , the process takes the first one , instead I need the second one (inside AUTHOR) !


..... <xsl:apply-templates select="BOOK"/> .....

<xsl:template match="BOOK">
     <xsl:apply-templates select="AUTHOR"/>
...........
</xsl:template>

<xsl:template match="AUTHOR">
<xsl:if test="CLICCABLE=1"> <!-- value token from the first one!!!! -->

Nonabbreviated form is <xsl:if test="child::CLICCABLE=1">, so you are considering CLICCABLE element child of the context node (AUTHOR element).
I can see no way you can get first CLICCABLE element (child of BOOK) this way.


--
Oleg Tkachenko
Multiconn International, Israel


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread
  • Same TAG name ?
    • longjohn - Thu, 23 May 2002 10:52:27 -0400 (EDT)
      • Oleg Tkachenko - Thu, 23 May 2002 11:14:19 -0400 (EDT) <=
        • longjohn - Thu, 23 May 2002 11:23:20 -0400 (EDT)
      • <Possible follow-ups>
      • Aparna Konduri - Thu, 23 May 2002 11:10:18 -0400 (EDT)

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.