root/todo/tags/0.1.20/contrib/todo2html-2.xslt

Revision 290, 0.8 kB (checked in by athomas, 4 years ago)

Initial import.

Line 
1 <?xml version="1.0"?>
2
3 <!--
4         XSLT example courtesy of Daniel Patterson, posted to the devtodo forums
5         at http://sourceforge.net/forum/forum.php?thread_id=114904&forum_id=69460
6
7         This example, AFAIK, generates HTML from the devtodo XML database.
8 -->
9
10 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
11         <xsl:output xsl:method="html" xsl:indent="no"/>
12
13         <xsl:template xsl:match="todo">
14                 <xsl:call-template xsl:name="note-list"/>
15         </xsl:template>
16
17         <xsl:template xsl:name="note-list">
18                 <ul>
19                         <xsl:apply-templates xsl:select="note"/>
20                 </ul>
21         </xsl:template>
22
23         <xsl:template xsl:match="note">
24                 <li><xsl:value-of xsl:select="."/>
25                 <xsl:if xsl:test="count(note) > 0">
26                         <xsl:call-template xsl:name="note-list"/>
27                 </xsl:if>
28                 </li>
29         </xsl:template>
30 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.