|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: To display the output depending upon condition
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








