• Corrected generation of value attributes for enumerated <li> elements in (X)HTML.
1 parent 7e7c6af commit d3bd61e0f2c4dddbc6ea6f40991f0ab7731ebcb7
Nigel Stanger authored on 6 Jul 2014
Showing 1 changed file
View
8
modules/lists.xml
<!--
Check whether there are actual paragraphs or things that should be treated like paragraphs inside the item (there are rather a lot of these!). If so, let them worry about inserting the <p> tags.
-->
<xsl:when test="count(paragraph|para|p|question|answer|code-block|itemised-list|itemize|unordered-list|bulleted-list|bullet-list|bullet-points|UL|ul|enumerated-list|enumerate|ordered-list|numbered-list|question-list|OL|ol|definition-list|description-list|DL|dl) != 0">
<li>
<xsl:attribute name="value" select="@value" />
<li value="{@value}">
<xsl:apply-templates />
</li>
</xsl:when>
<!--
Otherwise, insert <p> tags surrounding the item content
so that the item spacing looks OK.
-->
<xsl:otherwise>
<li>
<xsl:attribute name="value" select="@value" />
<li value="{@value}">
<p><xsl:apply-templates /></p>
</li>
</xsl:otherwise>
</xsl:choose>