|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: To display the output depending upon condition
I don't know really what you want, my only presumption is that the
output-tree of your transformation is missing. Your transformation is
correct I think, you only need the tree. Therefore you must copy the given
tags.
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding="iso-8859-1"/>
<xsl:strip-space elements="*"/>
<xsl:template match="Sections">
<xsl:copy>
<xsl:apply-templates select="Messages" />
</xsl:copy>
</xsl:template>
<xsl:template match="Messages">
<xsl:copy>
<xsl:apply-templates select="Message[@parentId=0]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Message">
<xsl:copy>
<xsl:apply-templates
select="../Message[@parentId=current()/@dbMessageId]"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
If this is not what you want, you must explain the problem more explicitly.
Joerg
> But What I need is:
>
> 1. Now the grouping starts with parentId=0 and then
> grouping all the child with them.
>
> 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.
>
> 3. The reason for this query was if I do a search
> via my web interface I might get some data whose
> parentId !=0, since this XSL starts with
> parentId=0, I AM NOT GETTING THAT TREE AT ALL.
>
> Please help me to solve this problem.
>
> Many Thanks
> Srini
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








