|
Subject: Re: [xsl] To display the output depending upon condition From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Sat, 20 Oct 2001 15:14:37 +0100 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] To display the output dep, Jörg Heinicke | Thread | [xsl] java-based processor - could , Jakub . Valenta |
| [xsl] Re: strange behaviour in Xala, Dimitre Novatchev | Date | Re: [xsl] search and replace multip, Jeni Tennison |
| Month |