Subject: Re: [xsl] XSLT - help From: omprakash.v@xxxxxxxxxxxxx Date: Tue, 15 Nov 2005 10:57:40 +0530 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] preserving apos with iden, James Fuller | Thread | [xsl] Question: Pairing sibling nod, Ahsan Ali |
[xsl] XSLT - help, Chandrasekhar A | Date | [xsl] preserving apos with identity, Charles Ohana |
Month |