Author: echatellier Date: 2011-02-07 17:57:43 +0100 (Mon, 07 Feb 2011) New Revision: 521 Url: http://nuiton.org/repositories/revision/jrst/521 Log: #563 : All the titles are generated as level 2 in html output Modified: trunk/jrst/src/main/resources/xsl/rst2xdoc.xsl Modified: trunk/jrst/src/main/resources/xsl/rst2xdoc.xsl =================================================================== --- trunk/jrst/src/main/resources/xsl/rst2xdoc.xsl 2011-02-07 16:29:57 UTC (rev 520) +++ trunk/jrst/src/main/resources/xsl/rst2xdoc.xsl 2011-02-07 16:57:43 UTC (rev 521) @@ -37,10 +37,7 @@ <title><xsl:value-of select="title"/></title> </properties> <body> - <section> - <xsl:attribute name="name"><xsl:value-of select="title"/></xsl:attribute> - <xsl:apply-templates /> - </section> + <xsl:apply-templates /> </body> </document> </xsl:template> @@ -48,9 +45,17 @@ <xsl:template match="title"> <xsl:choose> <xsl:when test="count(ancestor::section) = 0"> + <section> + <xsl:attribute name="name"><xsl:value-of select="."/></xsl:attribute> + </section> </xsl:when> + <xsl:when test="count(ancestor::section) = 1"> + <subsection> + <xsl:attribute name="name"><xsl:value-of select="."/></xsl:attribute> + </subsection> + </xsl:when> <xsl:otherwise> - <xsl:element name="h{count(ancestor::section) + 1}"> + <xsl:element name="h{count(ancestor::section) + 2}"> <xsl:apply-templates/> </xsl:element> </xsl:otherwise>