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

Re: To display the output depending upon condition

Subject: Re: To display the output depending upon condition
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sat, 20 Oct 2001 15:14:37 +0100
display the output
Hi Srini,

> 2.   At this point I need to check whether that
>      particular parentId !=0 and if yes I need to 
>      display that message as a particular left not a 
>      part of tree.

You can tell which messages are being left out by finding those
messages where the parentId is (a) not equal to 0 and (b) not the
value of the dbMessageId of any of the other Message elements.
Presumably you want these messages to be treated like top-level
messages that have a parentId of 0. Since there's no Message with an
Id of 0 anyway, you can do this in one test - find all Message
elements for which there are no Messages with an Id equal to its
parentId:

  Message[not(@parentId = ../Message/@dbMessageId)]

I'd change the template for Messages to select these instead of just
those with a parentId of 0:

<xsl:template match="Messages">
  <xsl:apply-templates
    select="Message[not(@parentId = ../Message/@dbMessageId)]" />
</xsl:template>

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


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.