Skip to content

Commit

Permalink
Merge pull request #395 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 1, 2024
2 parents 65b4c7c + ca561f6 commit 611357c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
23 changes: 20 additions & 3 deletions lib/isodoc/ieee/ieee.amendment.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5672,19 +5672,27 @@
<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:for-each>
</xsl:element>

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

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

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

<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
<xsl:for-each select="/*/*[local-name()='annex']">
<xsl:sort select="@displayorder" data-type="number"/>
<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:for-each>

</xsl:template>
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertBibliographyInSeparatePageSequences">
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
<xsl:sort select="@displayorder" data-type="number"/>
Expand All @@ -5694,7 +5702,16 @@
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
</xsl:template>
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertIndexInSeparatePageSequences">
<xsl:for-each select="/*/*[local-name()='indexsect']">
<xsl:sort select="@displayorder" data-type="number"/>
<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:for-each>
</xsl:template>

<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="processAllSectionsDefault_items">
<xsl:variable name="updated_xml_step_move_pagebreak">
Expand Down
23 changes: 20 additions & 3 deletions lib/isodoc/ieee/ieee.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5672,19 +5672,27 @@
<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:for-each>
</xsl:element>

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

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

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

<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
<xsl:for-each select="/*/*[local-name()='annex']">
<xsl:sort select="@displayorder" data-type="number"/>
<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:for-each>

</xsl:template>
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertBibliographyInSeparatePageSequences">
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
<xsl:sort select="@displayorder" data-type="number"/>
Expand All @@ -5694,7 +5702,16 @@
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
</xsl:template>
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertIndexInSeparatePageSequences">
<xsl:for-each select="/*/*[local-name()='indexsect']">
<xsl:sort select="@displayorder" data-type="number"/>
<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:for-each>
</xsl:template>

<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="processAllSectionsDefault_items">
<xsl:variable name="updated_xml_step_move_pagebreak">
Expand Down

0 comments on commit 611357c

Please sign in to comment.