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

RE: Issue with child:: element

Subject: RE: Issue with child:: element
From: "wrew ewrwe" <meenananju@xxxxxxxxxxx>
Date: Tue, 21 Nov 2006 11:26:11 -0500
RE:  Issue with child:: element
Thank you for your response Michael.

But what is happening is that since in the "note" template itself, Iam testing if the "parent" elements are level1 ...level6, then I say dont do anything, otherwise display Note.

And now again, under "level1" template when I say if the first child is a note then display tht. So untilately it is checking only for first child note. If there is another note element inside "level1" it does not display it.

That is the issue I am facing. Can you please suggest something?


From: "Michael Kay" <mike@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE:  Issue with child:: element
Date: Mon, 20 Nov 2006 23:20:31 -0000

> 			<xsl:if test="child::*[1][self::note]">
> 				<xsl:apply-templates
> select="note" mode="level1"/>
> 			</xsl:if>
>

That says "if the first child is a note then display all the child notes."

I suspect you wanted to say "if the first child is a note then display it".

That's simply:

<xsl:apply-templates select="child::*[1][self::note]" mode="level1"/>

(which does nothing if the first child is not a note).

Michael Kay
http://www.saxonica.com/


_________________________________________________________________
Talk now to your Hotmail contacts with Windows Live Messenger. http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview


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.