1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

Add support for section5 in stylesheet (used in XEP-0060 and XEP-0327)

This commit is contained in:
Marvin W 2020-03-08 11:55:06 +01:00
parent b1480a6203
commit 5434fda9a9
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A

27
xep.xsl
View File

@ -889,6 +889,33 @@ content: "XEP-<xsl:value-of select='/xep/header/number'/>";
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match='section5'>
<xsl:variable name='oid'>
<xsl:call-template name='object.id'/>
</xsl:variable>
<xsl:variable name='anch'>
<xsl:value-of select='@anchor'/>
</xsl:variable>
<div class='indent'>
<h6>
<xsl:attribute name='id'>
<xsl:choose>
<xsl:when test='$anch != ""'>
<xsl:value-of select='@anchor'/>
</xsl:when>
<xsl:otherwise>
<xsl:text>sect-</xsl:text><xsl:value-of select='$oid'/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:number level='single' count='section1'/>.<xsl:number level='single' count='section2'/>.<xsl:number level='single' count='section3'/>.<xsl:number level='single' count='section4'/>.<xsl:number level='single' count='section5'/>
<xsl:text> </xsl:text>
<xsl:value-of select='@topic' />
</h6>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match='remark'> <xsl:template match='remark'>
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:template> </xsl:template>