Menu

Turning .todo into HTML

2001-06-25
2001-06-26
  • Daniel Patterson

    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>

     
    • Alec Thomas

      Alec Thomas - 2001-06-26

      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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.