metanorma-csa 2.6.4 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +171 -25
- data/lib/metanorma/csa/isodoc.rng +16 -1
- data/lib/metanorma/csa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9018e571ae69537b8829b18b4983c964124c223060140af5f9d11af8964e148
|
4
|
+
data.tar.gz: 2893184c3f06c2460ae5d84af876dc6e12b591b98f83144a06ba9fe9fb8c3863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b740be51fc436d4dfdae663929ba58472212e99bc821ece7749d7589a64dc64701decb024f8b8de984d4c782b327e263c9a810db354a29b48e74d4d28f354d5f
|
7
|
+
data.tar.gz: 9dac6cfb0fdd9c1710c1df45d22ac50b881f19fee2ec15af36dd661d7e16e8deabbe0ba6eafab19cbae1411831b482dedf4f2c6d51d25ebfeb1503188c943fc0
|
@@ -2946,8 +2946,14 @@
|
|
2946
2946
|
</xsl:choose>
|
2947
2947
|
</xsl:variable>
|
2948
2948
|
|
2949
|
+
<xsl:call-template name="setNamedDestination"/>
|
2950
|
+
|
2949
2951
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
2950
2952
|
|
2953
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
2954
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
2955
|
+
</xsl:for-each>
|
2956
|
+
|
2951
2957
|
<xsl:call-template name="refine_table-container-style">
|
2952
2958
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
2953
2959
|
</xsl:call-template>
|
@@ -3152,6 +3158,7 @@
|
|
3152
3158
|
<!-- table/name-->
|
3153
3159
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3154
3160
|
<xsl:param name="continued"/>
|
3161
|
+
<xsl:param name="cols-count"/>
|
3155
3162
|
<xsl:if test="normalize-space() != ''">
|
3156
3163
|
|
3157
3164
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3173,9 +3180,30 @@
|
|
3173
3180
|
|
3174
3181
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3175
3182
|
<xsl:if test="$continued = 'true'">
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3183
|
+
|
3184
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
3185
|
+
|
3186
|
+
<xsl:choose>
|
3187
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
3188
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
3189
|
+
<fo:table-body role="SKIP">
|
3190
|
+
<fo:table-row>
|
3191
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
3192
|
+
<fo:block text-align="right" role="SKIP">
|
3193
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3194
|
+
</fo:block>
|
3195
|
+
</fo:table-cell>
|
3196
|
+
</fo:table-row>
|
3197
|
+
</fo:table-body>
|
3198
|
+
</fo:table>
|
3199
|
+
</xsl:when>
|
3200
|
+
<xsl:otherwise>
|
3201
|
+
<fo:block text-align="right">
|
3202
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3203
|
+
</fo:block>
|
3204
|
+
</xsl:otherwise>
|
3205
|
+
</xsl:choose>
|
3206
|
+
|
3179
3207
|
</xsl:if>
|
3180
3208
|
<!-- </xsl:if> -->
|
3181
3209
|
|
@@ -3568,6 +3596,7 @@
|
|
3568
3596
|
|
3569
3597
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
3570
3598
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3599
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3571
3600
|
</xsl:apply-templates>
|
3572
3601
|
|
3573
3602
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -3949,8 +3978,8 @@
|
|
3949
3978
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
3950
3979
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
3951
3980
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
3952
|
-
<xsl:if test="$key = 'color' or
|
3953
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3981
|
+
<xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
3982
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
3954
3983
|
</xsl:if>
|
3955
3984
|
</xsl:for-each>
|
3956
3985
|
</xsl:variable>
|
@@ -4014,6 +4043,7 @@
|
|
4014
4043
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
4015
4044
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
|
4016
4045
|
|
4046
|
+
<xsl:call-template name="setNamedDestination"/>
|
4017
4047
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4018
4048
|
<xsl:copy-of select="@id"/>
|
4019
4049
|
|
@@ -4539,7 +4569,7 @@
|
|
4539
4569
|
<xsl:variable name="target" select="@target"/>
|
4540
4570
|
<xsl:choose>
|
4541
4571
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
4542
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
4572
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body'][@id = $target]) and $footnotes/*[local-name() = 'fmt-fn-body'][@id = $target]">
|
4543
4573
|
<xsl:call-template name="fn">
|
4544
4574
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
4545
4575
|
</xsl:call-template>
|
@@ -4635,6 +4665,10 @@
|
|
4635
4665
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
4636
4666
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
4637
4667
|
|
4668
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
4669
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
4670
|
+
</xsl:if>
|
4671
|
+
|
4638
4672
|
<xsl:call-template name="setBlockSpanAll"/>
|
4639
4673
|
|
4640
4674
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4928,7 +4962,7 @@
|
|
4928
4962
|
|
4929
4963
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4930
4964
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4931
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4965
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
4932
4966
|
<xsl:call-template name="refine_figure_key_style"/>
|
4933
4967
|
<xsl:apply-templates/>
|
4934
4968
|
</fo:block>
|
@@ -5179,6 +5213,7 @@
|
|
5179
5213
|
|
5180
5214
|
<xsl:call-template name="refine_dt-cell-style"/>
|
5181
5215
|
|
5216
|
+
<xsl:call-template name="setNamedDestination"/>
|
5182
5217
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
5183
5218
|
|
5184
5219
|
<xsl:choose>
|
@@ -5615,7 +5650,7 @@
|
|
5615
5650
|
<!-- ================= -->
|
5616
5651
|
|
5617
5652
|
<!-- highlight text -->
|
5618
|
-
<xsl:template match="*[local-name()='hi']">
|
5653
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
5619
5654
|
<fo:inline background-color="yellow">
|
5620
5655
|
<xsl:apply-templates/>
|
5621
5656
|
</fo:inline>
|
@@ -7210,6 +7245,7 @@
|
|
7210
7245
|
<!-- Appendix processing -->
|
7211
7246
|
<!-- ======================== -->
|
7212
7247
|
<xsl:template match="*[local-name()='appendix']">
|
7248
|
+
<xsl:call-template name="setNamedDestination"/>
|
7213
7249
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
7214
7250
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
7215
7251
|
</fo:block>
|
@@ -7220,13 +7256,14 @@
|
|
7220
7256
|
<xsl:variable name="level">
|
7221
7257
|
<xsl:call-template name="getLevel"/>
|
7222
7258
|
</xsl:variable>
|
7223
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
7259
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
7224
7260
|
</xsl:template>
|
7225
7261
|
<!-- ======================== -->
|
7226
7262
|
<!-- END Appendix processing -->
|
7227
7263
|
<!-- ======================== -->
|
7228
7264
|
|
7229
7265
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
7266
|
+
<xsl:call-template name="setNamedDestination"/>
|
7230
7267
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
7231
7268
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
7232
7269
|
</fo:block>
|
@@ -7256,6 +7293,7 @@
|
|
7256
7293
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
7257
7294
|
<xsl:param name="callout"/>
|
7258
7295
|
<fo:inline id="{@id}">
|
7296
|
+
<xsl:call-template name="setNamedDestination"/>
|
7259
7297
|
<!-- for first p in annotation, put <x> -->
|
7260
7298
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
7261
7299
|
<xsl:apply-templates/>
|
@@ -7302,6 +7340,7 @@
|
|
7302
7340
|
|
7303
7341
|
</xsl:if>
|
7304
7342
|
<fo:block-container margin-left="0mm" role="SKIP">
|
7343
|
+
<xsl:call-template name="setNamedDestination"/>
|
7305
7344
|
<fo:block id="{@id}">
|
7306
7345
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
7307
7346
|
</fo:block>
|
@@ -7347,8 +7386,13 @@
|
|
7347
7386
|
</fo:block>
|
7348
7387
|
</fo:table-cell>
|
7349
7388
|
<fo:table-cell display-align="center">
|
7389
|
+
|
7350
7390
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
7351
7391
|
|
7392
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
7393
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
7394
|
+
</xsl:for-each>
|
7395
|
+
|
7352
7396
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
7353
7397
|
|
7354
7398
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -7383,6 +7427,8 @@
|
|
7383
7427
|
|
7384
7428
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
7385
7429
|
|
7430
|
+
<xsl:call-template name="setNamedDestination"/>
|
7431
|
+
|
7386
7432
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
7387
7433
|
|
7388
7434
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -7451,6 +7497,7 @@
|
|
7451
7497
|
</xsl:template>
|
7452
7498
|
|
7453
7499
|
<xsl:template match="*[local-name() = 'termnote']">
|
7500
|
+
<xsl:call-template name="setNamedDestination"/>
|
7454
7501
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
7455
7502
|
|
7456
7503
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -7557,12 +7604,14 @@
|
|
7557
7604
|
|
7558
7605
|
<xsl:template match="*[local-name() = 'terms']">
|
7559
7606
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
7607
|
+
<xsl:call-template name="setNamedDestination"/>
|
7560
7608
|
<fo:block id="{@id}">
|
7561
7609
|
<xsl:apply-templates/>
|
7562
7610
|
</fo:block>
|
7563
7611
|
</xsl:template>
|
7564
7612
|
|
7565
7613
|
<xsl:template match="*[local-name() = 'term']">
|
7614
|
+
<xsl:call-template name="setNamedDestination"/>
|
7566
7615
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
7567
7616
|
|
7568
7617
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -7594,6 +7643,7 @@
|
|
7594
7643
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
7595
7644
|
<xsl:variable name="isAdded" select="@added"/>
|
7596
7645
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7646
|
+
<xsl:call-template name="setNamedDestination"/>
|
7597
7647
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7598
7648
|
<xsl:call-template name="refine_figure-block-style"/>
|
7599
7649
|
|
@@ -7610,6 +7660,11 @@
|
|
7610
7660
|
</xsl:variable>
|
7611
7661
|
|
7612
7662
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
7663
|
+
|
7664
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
7665
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
7666
|
+
</xsl:for-each>
|
7667
|
+
|
7613
7668
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
7614
7669
|
</fo:block>
|
7615
7670
|
|
@@ -7642,6 +7697,7 @@
|
|
7642
7697
|
</xsl:template>
|
7643
7698
|
|
7644
7699
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
7700
|
+
<xsl:call-template name="setNamedDestination"/>
|
7645
7701
|
<fo:block id="{@id}">
|
7646
7702
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7647
7703
|
</fo:block>
|
@@ -7655,6 +7711,7 @@
|
|
7655
7711
|
</xsl:template>
|
7656
7712
|
|
7657
7713
|
<!-- SOURCE: ... -->
|
7714
|
+
<!-- figure/source -->
|
7658
7715
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
7659
7716
|
|
7660
7717
|
<xsl:call-template name="termsource"/>
|
@@ -8887,6 +8944,7 @@
|
|
8887
8944
|
<xsl:template match="title" mode="bookmark"/>
|
8888
8945
|
<xsl:template match="text()" mode="bookmark"/>
|
8889
8946
|
|
8947
|
+
<!-- figure/name -->
|
8890
8948
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
8891
8949
|
<xsl:if test="normalize-space() != ''">
|
8892
8950
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -9603,6 +9661,7 @@
|
|
9603
9661
|
<!-- permission -->
|
9604
9662
|
<!-- ========== -->
|
9605
9663
|
<xsl:template match="*[local-name() = 'permission']">
|
9664
|
+
<xsl:call-template name="setNamedDestination"/>
|
9606
9665
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
9607
9666
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9608
9667
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -9611,10 +9670,12 @@
|
|
9611
9670
|
|
9612
9671
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
9613
9672
|
<xsl:if test="normalize-space() != ''">
|
9614
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
9615
|
-
<xsl:apply-templates/>
|
9616
9673
|
|
9617
|
-
|
9674
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
9675
|
+
<xsl:apply-templates/>
|
9676
|
+
|
9677
|
+
</fo:block>
|
9678
|
+
|
9618
9679
|
</xsl:if>
|
9619
9680
|
</xsl:template>
|
9620
9681
|
|
@@ -9630,6 +9691,7 @@
|
|
9630
9691
|
<!-- requirement -->
|
9631
9692
|
<!-- ========== -->
|
9632
9693
|
<xsl:template match="*[local-name() = 'requirement']">
|
9694
|
+
<xsl:call-template name="setNamedDestination"/>
|
9633
9695
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
9634
9696
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9635
9697
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -9641,11 +9703,13 @@
|
|
9641
9703
|
|
9642
9704
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
9643
9705
|
<xsl:if test="normalize-space() != ''">
|
9644
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
9645
9706
|
|
9646
|
-
|
9707
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
9708
|
+
|
9709
|
+
<xsl:apply-templates/>
|
9710
|
+
|
9711
|
+
</fo:block>
|
9647
9712
|
|
9648
|
-
</fo:block>
|
9649
9713
|
</xsl:if>
|
9650
9714
|
</xsl:template>
|
9651
9715
|
|
@@ -9674,6 +9738,7 @@
|
|
9674
9738
|
<!-- recommendation -->
|
9675
9739
|
<!-- ========== -->
|
9676
9740
|
<xsl:template match="*[local-name() = 'recommendation']">
|
9741
|
+
<xsl:call-template name="setNamedDestination"/>
|
9677
9742
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
9678
9743
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9679
9744
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -9682,10 +9747,12 @@
|
|
9682
9747
|
|
9683
9748
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
9684
9749
|
<xsl:if test="normalize-space() != ''">
|
9685
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
9686
|
-
<xsl:apply-templates/>
|
9687
9750
|
|
9688
|
-
|
9751
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
9752
|
+
<xsl:apply-templates/>
|
9753
|
+
|
9754
|
+
</fo:block>
|
9755
|
+
|
9689
9756
|
</xsl:if>
|
9690
9757
|
</xsl:template>
|
9691
9758
|
|
@@ -9764,6 +9831,7 @@
|
|
9764
9831
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
9765
9832
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
9766
9833
|
</xsl:if>
|
9834
|
+
<xsl:call-template name="setNamedDestination"/>
|
9767
9835
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9768
9836
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
9769
9837
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -9873,6 +9941,7 @@
|
|
9873
9941
|
<!-- termexample -->
|
9874
9942
|
<!-- ====== -->
|
9875
9943
|
<xsl:template match="*[local-name() = 'termexample']">
|
9944
|
+
<xsl:call-template name="setNamedDestination"/>
|
9876
9945
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
9877
9946
|
<xsl:call-template name="refine_termexample-style"/>
|
9878
9947
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9927,6 +9996,7 @@
|
|
9927
9996
|
-->
|
9928
9997
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
9929
9998
|
|
9999
|
+
<xsl:call-template name="setNamedDestination"/>
|
9930
10000
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
9931
10001
|
|
9932
10002
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10445,8 +10515,13 @@
|
|
10445
10515
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
10446
10516
|
|
10447
10517
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
10518
|
+
|
10448
10519
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
10449
10520
|
|
10521
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
10522
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
10523
|
+
</xsl:for-each>
|
10524
|
+
|
10450
10525
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
10451
10526
|
</fo:block>
|
10452
10527
|
</xsl:if>
|
@@ -10566,6 +10641,7 @@
|
|
10566
10641
|
<!-- main sections -->
|
10567
10642
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
10568
10643
|
|
10644
|
+
<xsl:call-template name="setNamedDestination"/>
|
10569
10645
|
<fo:block>
|
10570
10646
|
<xsl:call-template name="setId"/>
|
10571
10647
|
|
@@ -10611,6 +10687,7 @@
|
|
10611
10687
|
|
10612
10688
|
<fo:block break-after="page"/>
|
10613
10689
|
|
10690
|
+
<xsl:call-template name="setNamedDestination"/>
|
10614
10691
|
<fo:block>
|
10615
10692
|
<xsl:call-template name="setId"/>
|
10616
10693
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -10639,6 +10716,7 @@
|
|
10639
10716
|
</xsl:template>
|
10640
10717
|
|
10641
10718
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
10719
|
+
<xsl:call-template name="setNamedDestination"/>
|
10642
10720
|
<fo:block>
|
10643
10721
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
10644
10722
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -10661,6 +10739,7 @@
|
|
10661
10739
|
</xsl:template> <!-- refine_clause_style -->
|
10662
10740
|
|
10663
10741
|
<xsl:template match="*[local-name() = 'definitions']">
|
10742
|
+
<xsl:call-template name="setNamedDestination"/>
|
10664
10743
|
<fo:block id="{@id}">
|
10665
10744
|
<xsl:apply-templates/>
|
10666
10745
|
</fo:block>
|
@@ -10676,6 +10755,8 @@
|
|
10676
10755
|
<xsl:otherwise>
|
10677
10756
|
|
10678
10757
|
<fo:block break-after="page"/>
|
10758
|
+
<xsl:call-template name="setNamedDestination"/>
|
10759
|
+
|
10679
10760
|
<fo:block id="{@id}">
|
10680
10761
|
|
10681
10762
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10747,6 +10828,7 @@
|
|
10747
10828
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
10748
10829
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
10749
10830
|
<!-- <fo:block id="{$source}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$source}" fox:alt-text="Annot___{$source}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> -->
|
10831
|
+
<xsl:call-template name="setNamedDestination"/>
|
10750
10832
|
<fo:block id="{@id}" font-size="1pt" role="SKIP" keep-with-next="always" line-height="0.1"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
10751
10833
|
<!-- </xsl:if> -->
|
10752
10834
|
</xsl:if>
|
@@ -11464,6 +11546,7 @@
|
|
11464
11546
|
<!-- Normative references -->
|
11465
11547
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
11466
11548
|
|
11549
|
+
<xsl:call-template name="setNamedDestination"/>
|
11467
11550
|
<fo:block id="{@id}">
|
11468
11551
|
<xsl:apply-templates/>
|
11469
11552
|
|
@@ -11484,6 +11567,7 @@
|
|
11484
11567
|
</xsl:if>
|
11485
11568
|
</xsl:if> -->
|
11486
11569
|
|
11570
|
+
<xsl:call-template name="setNamedDestination"/>
|
11487
11571
|
<fo:block id="{@id}"/>
|
11488
11572
|
|
11489
11573
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -11503,6 +11587,7 @@
|
|
11503
11587
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
11504
11588
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11505
11589
|
|
11590
|
+
<xsl:call-template name="setNamedDestination"/>
|
11506
11591
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
11507
11592
|
|
11508
11593
|
<xsl:call-template name="processBibitem"/>
|
@@ -11515,6 +11600,7 @@
|
|
11515
11600
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11516
11601
|
|
11517
11602
|
<!-- start CSA bibitem processing -->
|
11603
|
+
<xsl:call-template name="setNamedDestination"/>
|
11518
11604
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
11519
11605
|
<xsl:apply-templates select="*[local-name() = 'biblio-tag']"/>
|
11520
11606
|
<xsl:apply-templates select="csa:formattedref"/>
|
@@ -11527,6 +11613,7 @@
|
|
11527
11613
|
<xsl:choose>
|
11528
11614
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
11529
11615
|
<xsl:otherwise>
|
11616
|
+
<xsl:call-template name="setNamedDestination"/>
|
11530
11617
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
11531
11618
|
|
11532
11619
|
<fo:list-item-label end-indent="label-end()">
|
@@ -11921,6 +12008,7 @@
|
|
11921
12008
|
<xsl:template match="*[local-name() = 'admonition']">
|
11922
12009
|
|
11923
12010
|
<!-- text in the box -->
|
12011
|
+
<xsl:call-template name="setNamedDestination"/>
|
11924
12012
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
11925
12013
|
|
11926
12014
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12173,7 +12261,7 @@
|
|
12173
12261
|
</xsl:template>
|
12174
12262
|
|
12175
12263
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
12176
|
-
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
12264
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'fmt-hi' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
12177
12265
|
<xsl:copy>
|
12178
12266
|
<xsl:copy-of select="@*"/>
|
12179
12267
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -12205,28 +12293,56 @@
|
|
12205
12293
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
12206
12294
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
12207
12295
|
|
12208
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
12296
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
12209
12297
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
12210
12298
|
<xsl:copy-of select="@*"/>
|
12211
12299
|
<xsl:choose>
|
12212
12300
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12213
|
-
<xsl:
|
12301
|
+
<xsl:choose>
|
12302
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12303
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12304
|
+
</xsl:when>
|
12305
|
+
<xsl:otherwise>
|
12306
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
12307
|
+
</xsl:otherwise>
|
12308
|
+
</xsl:choose>
|
12214
12309
|
</xsl:when>
|
12215
12310
|
<xsl:otherwise>
|
12216
|
-
<xsl:
|
12311
|
+
<xsl:choose>
|
12312
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12313
|
+
<xsl:copy-of select="node()"/>
|
12314
|
+
</xsl:when>
|
12315
|
+
<xsl:otherwise>
|
12316
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
12317
|
+
</xsl:otherwise>
|
12318
|
+
</xsl:choose>
|
12217
12319
|
</xsl:otherwise>
|
12218
12320
|
</xsl:choose>
|
12219
12321
|
</xsl:element>
|
12220
12322
|
</xsl:template>
|
12221
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
12323
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
12222
12324
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
12223
12325
|
<xsl:copy-of select="@*"/>
|
12224
12326
|
<xsl:choose>
|
12225
12327
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12226
|
-
<xsl:
|
12328
|
+
<xsl:choose>
|
12329
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12330
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12331
|
+
</xsl:when>
|
12332
|
+
<xsl:otherwise>
|
12333
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
12334
|
+
</xsl:otherwise>
|
12335
|
+
</xsl:choose>
|
12227
12336
|
</xsl:when>
|
12228
12337
|
<xsl:otherwise>
|
12229
|
-
<xsl:
|
12338
|
+
<xsl:choose>
|
12339
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12340
|
+
<xsl:copy-of select="node()"/>
|
12341
|
+
</xsl:when>
|
12342
|
+
<xsl:otherwise>
|
12343
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
12344
|
+
</xsl:otherwise>
|
12345
|
+
</xsl:choose>
|
12230
12346
|
</xsl:otherwise>
|
12231
12347
|
</xsl:choose>
|
12232
12348
|
</xsl:element>
|
@@ -12455,16 +12571,24 @@
|
|
12455
12571
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
12456
12572
|
<xsl:element name="title" namespace="{$namespace_full}">
|
12457
12573
|
<xsl:copy-of select="@*"/>
|
12574
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12575
|
+
|
12458
12576
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12459
12577
|
</xsl:element>
|
12460
12578
|
</xsl:template>
|
12461
12579
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
12462
12580
|
<xsl:element name="title" namespace="{$namespace_full}">
|
12463
12581
|
<xsl:copy-of select="@*"/>
|
12582
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12583
|
+
|
12464
12584
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12465
12585
|
</xsl:element>
|
12466
12586
|
</xsl:template>
|
12467
12587
|
|
12588
|
+
<xsl:template name="addNamedDestinationAttribute">
|
12589
|
+
|
12590
|
+
</xsl:template>
|
12591
|
+
|
12468
12592
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
12469
12593
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
12470
12594
|
<xsl:choose>
|
@@ -12474,6 +12598,8 @@
|
|
12474
12598
|
<xsl:otherwise>
|
12475
12599
|
<xsl:element name="name" namespace="{$namespace_full}">
|
12476
12600
|
<xsl:copy-of select="@*"/>
|
12601
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12602
|
+
|
12477
12603
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12478
12604
|
</xsl:element>
|
12479
12605
|
</xsl:otherwise>
|
@@ -12487,6 +12613,8 @@
|
|
12487
12613
|
<xsl:otherwise>
|
12488
12614
|
<xsl:element name="name" namespace="{$namespace_full}">
|
12489
12615
|
<xsl:copy-of select="@*"/>
|
12616
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12617
|
+
|
12490
12618
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12491
12619
|
</xsl:element>
|
12492
12620
|
</xsl:otherwise>
|
@@ -13944,6 +14072,24 @@
|
|
13944
14072
|
</xsl:attribute>
|
13945
14073
|
</xsl:template>
|
13946
14074
|
|
14075
|
+
<xsl:template name="setIDforNamedDestination">
|
14076
|
+
<xsl:if test="@named_dest">
|
14077
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
14078
|
+
</xsl:if>
|
14079
|
+
</xsl:template>
|
14080
|
+
|
14081
|
+
<xsl:template name="setNamedDestination">
|
14082
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14083
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
14084
|
+
<fox:destination internal-destination="{@id}"/>
|
14085
|
+
</xsl:if>
|
14086
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
14087
|
+
<xsl:if test="@named_dest">
|
14088
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14089
|
+
</xsl:if>
|
14090
|
+
</xsl:for-each>
|
14091
|
+
</xsl:template>
|
14092
|
+
|
13947
14093
|
<xsl:template name="add-letter-spacing">
|
13948
14094
|
<xsl:param name="text"/>
|
13949
14095
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.0.
|
3
|
+
<!-- VERSION v2.0.4 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -1328,6 +1328,7 @@ numbers</a:documentation>
|
|
1328
1328
|
<ref name="foreword"/>
|
1329
1329
|
<ref name="introduction"/>
|
1330
1330
|
<ref name="acknowledgements"/>
|
1331
|
+
<ref name="executivesummary"/>
|
1331
1332
|
</choice>
|
1332
1333
|
</oneOrMore>
|
1333
1334
|
</element>
|
@@ -1351,6 +1352,11 @@ numbers</a:documentation>
|
|
1351
1352
|
<ref name="Content-Section"/>
|
1352
1353
|
</element>
|
1353
1354
|
</define>
|
1355
|
+
<define name="executivesummary">
|
1356
|
+
<element name="executivesummary">
|
1357
|
+
<ref name="Content-Section"/>
|
1358
|
+
</element>
|
1359
|
+
</define>
|
1354
1360
|
<define name="indexsect">
|
1355
1361
|
<element name="indexsect">
|
1356
1362
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1582,15 @@ used in document amendments</a:documentation>
|
|
1576
1582
|
<define name="annex">
|
1577
1583
|
<element name="annex">
|
1578
1584
|
<ref name="Annex-Section"/>
|
1585
|
+
<zeroOrMore>
|
1586
|
+
<ref name="annex-appendix"/>
|
1587
|
+
</zeroOrMore>
|
1588
|
+
</element>
|
1589
|
+
</define>
|
1590
|
+
<define name="annex-appendix">
|
1591
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1592
|
+
<element name="appendix">
|
1593
|
+
<ref name="Clause-Section"/>
|
1579
1594
|
</element>
|
1580
1595
|
</define>
|
1581
1596
|
<define name="terms">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|