Skip to content

Commit

Permalink
Merge pull request #345 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 18, 2024
2 parents 217faf3 + 33d4528 commit c0d7ba8
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
36 changes: 35 additions & 1 deletion lib/isodoc/ieee/ieee.amendment.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4327,6 +4327,10 @@

</xsl:attribute-set>

<xsl:template name="refine_termexample-style">

</xsl:template>

<xsl:attribute-set name="example-style">

<xsl:attribute name="margin-top">8pt</xsl:attribute>
Expand Down Expand Up @@ -5496,6 +5500,36 @@
</xsl:for-each>
</xsl:template>

<xsl:template name="processMainSectionsDefault_flatxml">
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:variable name="flatxml">
<xsl:apply-templates select="." mode="flatxml"/>
</xsl:variable>
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>

</xsl:for-each>

<xsl:for-each select="/*/*[local-name()='annex']">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:variable name="flatxml">
<xsl:apply-templates select="." mode="flatxml"/>
</xsl:variable>
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
</xsl:for-each>

<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"/>
<xsl:variable name="flatxml">
<xsl:apply-templates select="." mode="flatxml"/>
</xsl:variable>
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
</xsl:for-each>
</xsl:template>

<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
Expand Down Expand Up @@ -11728,7 +11762,7 @@
<!-- ====== -->
<xsl:template match="*[local-name() = 'termexample']">
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">

<xsl:call-template name="refine_termexample-style"/>
<xsl:call-template name="setBlockSpanAll"/>

<xsl:apply-templates select="*[local-name()='name']"/>
Expand Down
36 changes: 35 additions & 1 deletion lib/isodoc/ieee/ieee.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4327,6 +4327,10 @@

</xsl:attribute-set>

<xsl:template name="refine_termexample-style">

</xsl:template>

<xsl:attribute-set name="example-style">

<xsl:attribute name="margin-top">8pt</xsl:attribute>
Expand Down Expand Up @@ -5496,6 +5500,36 @@
</xsl:for-each>
</xsl:template>

<xsl:template name="processMainSectionsDefault_flatxml">
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:variable name="flatxml">
<xsl:apply-templates select="." mode="flatxml"/>
</xsl:variable>
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>

</xsl:for-each>

<xsl:for-each select="/*/*[local-name()='annex']">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:variable name="flatxml">
<xsl:apply-templates select="." mode="flatxml"/>
</xsl:variable>
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
</xsl:for-each>

<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"/>
<xsl:variable name="flatxml">
<xsl:apply-templates select="." mode="flatxml"/>
</xsl:variable>
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
</xsl:for-each>
</xsl:template>

<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
Expand Down Expand Up @@ -11728,7 +11762,7 @@
<!-- ====== -->
<xsl:template match="*[local-name() = 'termexample']">
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">

<xsl:call-template name="refine_termexample-style"/>
<xsl:call-template name="setBlockSpanAll"/>

<xsl:apply-templates select="*[local-name()='name']"/>
Expand Down

0 comments on commit c0d7ba8

Please sign in to comment.