Drupal: text/plain – víceúrovňové číslované seznamy.
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue Oct 18 19:45:13 2011 +0200 (2011-10-18)
changeset 9562b9b2533902
parent 94 8c5867ac69df
child 96 a0a93e49d055
Drupal: text/plain – víceúrovňové číslované seznamy.
helpers/mimeTextPart.xsl
     1.1 --- a/helpers/mimeTextPart.xsl	Tue Oct 18 19:10:29 2011 +0200
     1.2 +++ b/helpers/mimeTextPart.xsl	Tue Oct 18 19:45:13 2011 +0200
     1.3 @@ -192,8 +192,19 @@
     1.4  	
     1.5  	
     1.6  	<xsl:template match="h:ol">
     1.7 +		<xsl:variable name="úroveň" select="count(ancestor::h:li)"/>
     1.8 +		<xsl:variable name="odsazení">
     1.9 +			<xsl:for-each select="1 to $úroveň+1">
    1.10 +				<xsl:value-of select="'  '"/>
    1.11 +			</xsl:for-each>
    1.12 +		</xsl:variable>
    1.13 +		
    1.14 +		<xsl:if test="$úroveň gt 0">
    1.15 +			<xsl:text>&#10;</xsl:text>
    1.16 +		</xsl:if>
    1.17 +		
    1.18  		<xsl:for-each select="h:li">
    1.19 -			<xsl:value-of select="concat(' ', position(), ') ')"/>
    1.20 +			<xsl:value-of select="concat($odsazení, position(), ') ')"/>
    1.21  			<xsl:apply-templates/>
    1.22  			<xsl:text>&#10;</xsl:text>
    1.23  		</xsl:for-each>