You're creating a separate ol
for every listitem/para
in the document. Create the ol
at the orderedlist
level and then create the li
at each para
.
Example:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="orderedlist">
<ol>
<xsl:apply-templates/>
</ol>
</xsl:template>
<xsl:template match="listitem/para">
<li><xsl:apply-templates/></li>
</xsl:template>
</xsl:stylesheet>