xsl-list
[Top] [All Lists]

Re: XSLT - help

2005-11-14 22:27:40





Hi,
   Please check this stylesheet.

<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:od="urn:schemas-microsoft-com:officedata">

 <xsl:output method="xml"/>

 <xsl:template match="/dataroot">

<Tasktree>
<xsl:apply-templates select="TT_Reference_Tree[1]"/>
</Tasktree>

 </xsl:template>

 <xsl:template match="TT_Reference_Tree">

<xsl:choose>
<xsl:when test="itemtype = 1">

<Folder>
<xsl:attribute name="name">
<xsl:value-of select="treedata"/>
</xsl:attribute>
<xsl:apply-templates
select="following-sibling::TT_Reference_Tree[1][parentidx=current()/levelidx]"/>
</Folder>

</xsl:when>
<xsl:otherwise>
<Task>
<xsl:value-of select="shortname"/>
</Task>
<xsl:for-each
select="following-sibling::TT_Reference_Tree[parentidx=current()/parentidx]">
<Task>
<xsl:value-of select="shortname"/>
</Task>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>


 </xsl:template>


 </xsl:stylesheet>

Regards,
prakash


This e-Mail may contain proprietary and confidential information and is sent 
for the intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to 
you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its 
attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>