<orderedlist type="manual">
<item num="8. (1)">
<para id="t2_HKWB-S2-1.1_pgfId-135">What is your present estimate of the length of trial?</para>
</item>
<item num="(2)">
<para id="t2_HKWB-S2-1.1_pgfId-136">What is the earliest date that you believe you can be ready for trial?</para>
</item>
</orderedlist>
这是一个很棘手的问题,首先是数字8(1)应该拆分。 8应该在一个有序列表中,然后1和2应该在同一个有序列表(嵌套)中,在主要的有序列表下,请让我知道如何实现这一点。
我已经尝试使用xsl了,它如下所示。
<xsl:template name="orderedlist" match="orderedlist">
<ol class="eng-orderedlist orderedlist">
<xsl:apply-templates/>
</ol>
</xsl:template>
<xsl:template name="orderitem" match="item">
<li class="item">
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template name="orderitempara" match="item/para">
<div class="para">
<xsl:choose>
<xsl:when test="position()=1">
<span class="item-num">
<xsl:if test="position()=1">
<xsl:value-of select="parent::item[1]/@num"/>
</xsl:if>
</span>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
但我得到的输出如下:
8. (1)What is your present estimate of the length of trial?
(2)What is the earliest date that you believe you can be ready for trial?
看起来应该是这样的。
8 (1)What is your present estimate of the length of trial?
(2)What is the earliest date that you believe you can be ready for trial?
由于