[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Need Help in Creating folder tree(html) from xtm d
Hi. > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > velmurugan mariappan > Sent: Thursday, August 07, 2003 7:42 PM > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: Need Help in Creating folder tree(html) from > xtm document using xslt > > > HI everyone, > I need help in creating a folder tree from an xtm > document using xslt. > Try this: <xsl:output method="html"/> <xsl:key match="xtm:topic" name="topics" use="xtm:instanceOf/xtm:topicRef/@xlink:href"/> <xsl:key match="xtm:topic" name="first" use="not(xtm:instanceOf)"/> <xsl:template match="xtm:topicMap"> <style> LI { LIST-STYLE-TYPE: none; } </style> <ul> <xsl:apply-templates mode="first" select="xtm:topic[xtm:subjectIdentity/xtm:subjectIndicatorRef/@xlink:href=co ncat('#',current()/@id)]"/> </ul> </xsl:template> <xsl:template match="xtm:topic" mode="first"> <li> <xsl:apply-templates select="xtm:baseName"/> <ul> <xsl:apply-templates select="key('first',true())[not(generate-id()=generate-id(current()))]"/> </ul> </li> </xsl:template> <xsl:template match="xtm:topic"> <li> <xsl:apply-templates select="xtm:baseName"/> <xsl:if test="key('topics',concat('#',@id))"> <ul> <xsl:apply-templates select="key('topics',concat('#',@id))"/> </ul> </xsl:if> </li> </xsl:template> (...) Hope this helps. Regards, Americo Albuquerque 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
|