More progress, will need a sed pass to expand some non-space char concated for indents.

This commit is contained in:
Thomas Gideon 2010-10-05 19:33:25 -04:00
parent 5ee0826d38
commit a7d7c32b1a
1 changed files with 24 additions and 2 deletions

View File

@ -3,14 +3,36 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="outline/root/item">
<xsl:call-template name="item"/>
<xsl:call-template name="item">
<xsl:with-param name="indent"
select="1"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="item">
<xsl:param name="indent"/>
<xsl:value-of select="$indent"/>
<xsl:choose>
<xsl:when test="$indent = 1">
<xsl:text>==</xsl:text>
</xsl:when>
<xsl:otherwise>
<!-- TODO generate spaces -->
<xsl:text> - </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="values/*[2]/p/run/lit"/>
<xsl:choose>
<xsl:when test="$indent = 1">
<xsl:text>==</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:text>
</xsl:text>
<xsl:for-each select="children/item">
<xsl:call-template name="item">
<xsl:with-param name="indent"
select="$indent + 1"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>