[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT - help
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
|
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
|