For anyone who wants a start at turning the .todo XML into a HTML page:
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="no"/>
<xsl:template match="todo"> <xsl:call-template name="note-list"/> </xsl:template>
<xsl:template name="note-list"> <ul> <xsl:apply-templates select="note"/> </ul> </xsl:template>
<xsl:template match="note"> <li><xsl:value-of select="."/> <xsl:if test="count(note) > 0"> <xsl:call-template name="note-list"/> </xsl:if> </li> </xsl:template> </xsl:stylesheet>
Hi,
Thanks for the sample Daniel, I'm going to include this as a contribution in the next version of devtodo if that's okay with you.
I really have to learn XSLT, it looks like it could be very handy.
Regards, Alec
Log in to post a comment.
For anyone who wants a start at turning the .todo XML into
a HTML page:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="no"/>
<xsl:template match="todo">
<xsl:call-template name="note-list"/>
</xsl:template>
<xsl:template name="note-list">
<ul>
<xsl:apply-templates select="note"/>
</ul>
</xsl:template>
<xsl:template match="note">
<li><xsl:value-of select="."/>
<xsl:if test="count(note) > 0">
<xsl:call-template name="note-list"/>
</xsl:if>
</li>
</xsl:template>
</xsl:stylesheet>
Hi,
Thanks for the sample Daniel, I'm going to include this as a contribution in the next version of devtodo if that's okay with you.
I really have to learn XSLT, it looks like it could be very handy.
Regards,
Alec