Skip to content

Commit

Permalink
Merge pull request #335 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 12, 2024
2 parents 53bb321 + be02519 commit c73c591
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions lib/isodoc/iec/iec.international-standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4039,13 +4039,35 @@
</xsl:for-each>
</xsl:element>

<xsl:call-template name="insertAnnexInSeparatePageSequences"/>
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>

<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->

<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->

<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:choose>
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
<xsl:element name="page_sequence" namespace="{$namespace_full}">
<xsl:attribute name="main_page_sequence"/>
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
</xsl:element>
</xsl:when>
<xsl:otherwise> <!-- bibliography -->
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
<xsl:element name="page_sequence" namespace="{$namespace_full}">
<xsl:attribute name="main_page_sequence"/>
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
</xsl:element>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>

<xsl:template name="insertAnnexInSeparatePageSequences">
<xsl:for-each select="/*/*[local-name()='annex']">
<xsl:sort select="@displayorder" data-type="number"/>
Expand Down

0 comments on commit c73c591

Please sign in to comment.