# HG changeset patch # User František Kučera <franta-hg@frantovo.cz> # Date 1318959913 -7200 # Node ID 62b9b2533902d7a0782b03da27d40044139a0ba6 # Parent 8c5867ac69df20877831857f1b5506fdd1f81f62 Drupal: text/plain – víceúrovňové číslované seznamy. diff -r 8c5867ac69df -r 62b9b2533902 helpers/mimeTextPart.xsl --- a/helpers/mimeTextPart.xsl Tue Oct 18 19:10:29 2011 +0200 +++ b/helpers/mimeTextPart.xsl Tue Oct 18 19:45:13 2011 +0200 @@ -192,8 +192,19 @@ <xsl:template match="h:ol"> + <xsl:variable name="úroveň" select="count(ancestor::h:li)"/> + <xsl:variable name="odsazení"> + <xsl:for-each select="1 to $úroveň+1"> + <xsl:value-of select="' '"/> + </xsl:for-each> + </xsl:variable> + + <xsl:if test="$úroveň gt 0"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:for-each select="h:li"> - <xsl:value-of select="concat(' ', position(), ') ')"/> + <xsl:value-of select="concat($odsazení, position(), ') ')"/> <xsl:apply-templates/> <xsl:text> </xsl:text> </xsl:for-each>