This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Same TAG name ?
- From: Oleg Tkachenko <olegt at multiconn dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 23 May 2002 18:04:53 +0200
- Subject: Re: [xsl] Same TAG name ?
- Organization: Multiconn International
- References: <3CED016D.10403@katamail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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