metanorma-csa 2.6.4 → 2.6.6
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 +197 -28
- data/lib/metanorma/csa/basicdoc.rng +9 -5
- data/lib/metanorma/csa/converter.rb +1 -2
- data/lib/metanorma/csa/isodoc.rng +147 -5
- 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: 80f6db36a9a13559ed70b55d3c35ce6ed3994a911f8b6fcc8318b6dbd5f4b4e0
|
4
|
+
data.tar.gz: e6b64f985c1afc87964bf649b20b4ada6b2f4767cc24651f76e1d2bac78bfa10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50a1ec0deaab0aabea30a580728c07c2875ab29d1b7b727e2343558ee27d6aafb6bf33633ce4f8057e6e76e17a38bddc5656e968464328964ebb2748923c541d
|
7
|
+
data.tar.gz: 6bae1fa8a251b1da1916172737e5fe0ce8432582cebcdafc4dfd026af056482caa3b4b73a593ca68eef534e70401d4cc578e0825481c77c2ed44796f208703e4
|
@@ -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">
|
@@ -8899,11 +8957,11 @@
|
|
8899
8957
|
</xsl:template>
|
8900
8958
|
|
8901
8959
|
<!-- figure/fn -->
|
8902
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
8960
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
8903
8961
|
<!-- figure/note -->
|
8904
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
8962
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
8905
8963
|
<!-- figure/example -->
|
8906
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
8964
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
8907
8965
|
|
8908
8966
|
<!-- figure/note[@type = 'units'] -->
|
8909
8967
|
<!-- image/note[@type = 'units'] -->
|
@@ -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>
|
@@ -12321,6 +12437,9 @@
|
|
12321
12437
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
12322
12438
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
12323
12439
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
12440
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
12441
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
12442
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
12324
12443
|
|
12325
12444
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12326
12445
|
<xsl:copy>
|
@@ -12455,16 +12574,24 @@
|
|
12455
12574
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
12456
12575
|
<xsl:element name="title" namespace="{$namespace_full}">
|
12457
12576
|
<xsl:copy-of select="@*"/>
|
12577
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12578
|
+
|
12458
12579
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12459
12580
|
</xsl:element>
|
12460
12581
|
</xsl:template>
|
12461
12582
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
12462
12583
|
<xsl:element name="title" namespace="{$namespace_full}">
|
12463
12584
|
<xsl:copy-of select="@*"/>
|
12585
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12586
|
+
|
12464
12587
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12465
12588
|
</xsl:element>
|
12466
12589
|
</xsl:template>
|
12467
12590
|
|
12591
|
+
<xsl:template name="addNamedDestinationAttribute">
|
12592
|
+
|
12593
|
+
</xsl:template>
|
12594
|
+
|
12468
12595
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
12469
12596
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
12470
12597
|
<xsl:choose>
|
@@ -12474,6 +12601,8 @@
|
|
12474
12601
|
<xsl:otherwise>
|
12475
12602
|
<xsl:element name="name" namespace="{$namespace_full}">
|
12476
12603
|
<xsl:copy-of select="@*"/>
|
12604
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12605
|
+
|
12477
12606
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12478
12607
|
</xsl:element>
|
12479
12608
|
</xsl:otherwise>
|
@@ -12487,6 +12616,8 @@
|
|
12487
12616
|
<xsl:otherwise>
|
12488
12617
|
<xsl:element name="name" namespace="{$namespace_full}">
|
12489
12618
|
<xsl:copy-of select="@*"/>
|
12619
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12620
|
+
|
12490
12621
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12491
12622
|
</xsl:element>
|
12492
12623
|
</xsl:otherwise>
|
@@ -12591,6 +12722,20 @@
|
|
12591
12722
|
</xsl:element>
|
12592
12723
|
</xsl:template>
|
12593
12724
|
|
12725
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
12726
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
12727
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
12728
|
+
<xsl:copy-of select="@*"/>
|
12729
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12730
|
+
</xsl:element>
|
12731
|
+
</xsl:template>
|
12732
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
12733
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
12734
|
+
<xsl:copy-of select="@*"/>
|
12735
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12736
|
+
</xsl:element>
|
12737
|
+
</xsl:template>
|
12738
|
+
|
12594
12739
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
12595
12740
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12596
12741
|
</xsl:template>
|
@@ -13944,6 +14089,30 @@
|
|
13944
14089
|
</xsl:attribute>
|
13945
14090
|
</xsl:template>
|
13946
14091
|
|
14092
|
+
<xsl:template name="setIDforNamedDestination">
|
14093
|
+
<xsl:if test="@named_dest">
|
14094
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
14095
|
+
</xsl:if>
|
14096
|
+
</xsl:template>
|
14097
|
+
|
14098
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
14099
|
+
<xsl:if test="@named_dest">
|
14100
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
14101
|
+
</xsl:if>
|
14102
|
+
</xsl:template>
|
14103
|
+
|
14104
|
+
<xsl:template name="setNamedDestination">
|
14105
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14106
|
+
<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'">
|
14107
|
+
<fox:destination internal-destination="{@id}"/>
|
14108
|
+
</xsl:if>
|
14109
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
14110
|
+
<xsl:if test="@named_dest">
|
14111
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14112
|
+
</xsl:if>
|
14113
|
+
</xsl:for-each>
|
14114
|
+
</xsl:template>
|
14115
|
+
|
13947
14116
|
<xsl:template name="add-letter-spacing">
|
13948
14117
|
<xsl:param name="text"/>
|
13949
14118
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
267
267
|
<value>justified</value>
|
268
268
|
</choice>
|
269
269
|
</define>
|
270
|
+
<define name="IdRefType">
|
271
|
+
<a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
|
272
|
+
<data type="IDREF"/>
|
273
|
+
</define>
|
270
274
|
<define name="RequiredId">
|
271
275
|
<a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
|
272
276
|
<attribute name="id">
|
@@ -409,13 +413,13 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
409
413
|
<attribute name="from">
|
410
414
|
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
415
|
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
-
<
|
416
|
+
<ref name="IdRefType"/>
|
413
417
|
</attribute>
|
414
418
|
</optional>
|
415
419
|
<optional>
|
416
420
|
<attribute name="to">
|
417
421
|
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
-
<
|
422
|
+
<ref name="IdRefType"/>
|
419
423
|
</attribute>
|
420
424
|
</optional>
|
421
425
|
</define>
|
@@ -1504,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1504
1508
|
<attribute name="to">
|
1505
1509
|
<a:documentation>A reference to an anchor element (typically a bookmark),
|
1506
1510
|
to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
|
1507
|
-
<
|
1511
|
+
<ref name="IdRefType"/>
|
1508
1512
|
</attribute>
|
1509
1513
|
</optional>
|
1510
1514
|
<ref name="index-primary">
|
@@ -1662,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1662
1666
|
<define name="XrefAttributes">
|
1663
1667
|
<attribute name="target">
|
1664
1668
|
<a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
|
1665
|
-
<
|
1669
|
+
<ref name="IdRefType"/>
|
1666
1670
|
</attribute>
|
1667
1671
|
<optional>
|
1668
1672
|
<attribute name="type">
|
@@ -1723,7 +1727,7 @@ The target of a footnote is the location it is embedded in within the text</a:do
|
|
1723
1727
|
<attribute name="target">
|
1724
1728
|
<a:documentation>The target of the callout is understood to be the location of the callout within the source code;
|
1725
1729
|
the extent of the target is not expressed overtly</a:documentation>
|
1726
|
-
<
|
1730
|
+
<ref name="IdRefType"/>
|
1727
1731
|
</attribute>
|
1728
1732
|
<text>
|
1729
1733
|
<a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
|
@@ -29,8 +29,7 @@ module Metanorma
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def metadata_committee(node, xml)
|
32
|
-
|
33
|
-
|
32
|
+
node.attr("technical-committee") or return
|
34
33
|
xml.editorialgroup do |a|
|
35
34
|
a.committee node.attr("technical-committee"),
|
36
35
|
**attr_code(type: node.attr("technical-committee-type"))
|
@@ -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.5 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -36,6 +36,12 @@
|
|
36
36
|
</zeroOrMore>
|
37
37
|
</element>
|
38
38
|
</define>
|
39
|
+
<define name="IdRefType">
|
40
|
+
<a:documentation>Cross-references are not normalised to xsd:IDREF in Semantic XML: that is deferred to Presentation XML.
|
41
|
+
All IdRefType instances point not to `@id` in Semantic XML, which is the Content GUID for an element,
|
42
|
+
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
|
+
<text/>
|
44
|
+
</define>
|
39
45
|
<define name="index-primary">
|
40
46
|
<element name="primary">
|
41
47
|
<oneOrMore>
|
@@ -238,7 +244,7 @@
|
|
238
244
|
<a:documentation>Notes specific to this block</a:documentation>
|
239
245
|
</ref>
|
240
246
|
</zeroOrMore>
|
241
|
-
<ref name="
|
247
|
+
<ref name="BlockSource">
|
242
248
|
<a:documentation>A source for the table</a:documentation>
|
243
249
|
</ref>
|
244
250
|
</define>
|
@@ -262,10 +268,112 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
262
268
|
<a:documentation>Notes whose scope is the current block</a:documentation>
|
263
269
|
</ref>
|
264
270
|
</zeroOrMore>
|
265
|
-
<ref name="
|
271
|
+
<ref name="BlockSource">
|
272
|
+
<a:documentation>A source for the block</a:documentation>
|
273
|
+
</ref>
|
274
|
+
</define>
|
275
|
+
<define name="FigureBody">
|
276
|
+
<optional>
|
277
|
+
<ref name="tname">
|
278
|
+
<a:documentation>The caption of the block</a:documentation>
|
279
|
+
</ref>
|
280
|
+
</optional>
|
281
|
+
<choice>
|
282
|
+
<a:documentation>Content of the figure</a:documentation>
|
283
|
+
<ref name="image"/>
|
284
|
+
<ref name="video"/>
|
285
|
+
<ref name="audio"/>
|
286
|
+
<ref name="pre"/>
|
287
|
+
<oneOrMore>
|
288
|
+
<ref name="paragraph-with-footnote"/>
|
289
|
+
</oneOrMore>
|
290
|
+
<zeroOrMore>
|
291
|
+
<ref name="figure"/>
|
292
|
+
</zeroOrMore>
|
293
|
+
</choice>
|
294
|
+
<zeroOrMore>
|
295
|
+
<ref name="fn">
|
296
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
297
|
+
</ref>
|
298
|
+
</zeroOrMore>
|
299
|
+
<optional>
|
300
|
+
<ref name="dl">
|
301
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
302
|
+
</ref>
|
303
|
+
</optional>
|
304
|
+
<zeroOrMore>
|
305
|
+
<ref name="note">
|
306
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
307
|
+
</ref>
|
308
|
+
</zeroOrMore>
|
309
|
+
<ref name="BlockSource">
|
266
310
|
<a:documentation>A source for the block</a:documentation>
|
267
311
|
</ref>
|
268
312
|
</define>
|
313
|
+
<define name="FigureNoIdBody">
|
314
|
+
<optional>
|
315
|
+
<ref name="source">
|
316
|
+
<a:documentation>A URI or other reference intended to link to an externally hosted image (or equivalent)</a:documentation>
|
317
|
+
</ref>
|
318
|
+
</optional>
|
319
|
+
<optional>
|
320
|
+
<ref name="tname">
|
321
|
+
<a:documentation>The caption of the block</a:documentation>
|
322
|
+
</ref>
|
323
|
+
</optional>
|
324
|
+
<choice>
|
325
|
+
<a:documentation>Content of the figure</a:documentation>
|
326
|
+
<ref name="image-no-id"/>
|
327
|
+
<ref name="video-no-id"/>
|
328
|
+
<ref name="audio-no-id"/>
|
329
|
+
<ref name="pre-no-id"/>
|
330
|
+
<oneOrMore>
|
331
|
+
<ref name="paragraph-with-footnote-no-id"/>
|
332
|
+
</oneOrMore>
|
333
|
+
<zeroOrMore>
|
334
|
+
<ref name="figure-no-id"/>
|
335
|
+
</zeroOrMore>
|
336
|
+
</choice>
|
337
|
+
<zeroOrMore>
|
338
|
+
<ref name="fn">
|
339
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
340
|
+
</ref>
|
341
|
+
</zeroOrMore>
|
342
|
+
<optional>
|
343
|
+
<ref name="dl-no-id">
|
344
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
345
|
+
</ref>
|
346
|
+
</optional>
|
347
|
+
<zeroOrMore>
|
348
|
+
<ref name="note-no-id">
|
349
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
350
|
+
</ref>
|
351
|
+
</zeroOrMore>
|
352
|
+
<ref name="BlockSource">
|
353
|
+
<a:documentation>A source for the block</a:documentation>
|
354
|
+
</ref>
|
355
|
+
</define>
|
356
|
+
<define name="source">
|
357
|
+
<element name="source">
|
358
|
+
<attribute name="status">
|
359
|
+
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
360
|
+
<ref name="SourceStatusType"/>
|
361
|
+
</attribute>
|
362
|
+
<attribute name="type">
|
363
|
+
<a:documentation>The type of the managed term in the present context</a:documentation>
|
364
|
+
<ref name="SourceTypeType"/>
|
365
|
+
</attribute>
|
366
|
+
<ref name="origin">
|
367
|
+
<a:documentation>The original document and location where the term definition has been obtained from</a:documentation>
|
368
|
+
</ref>
|
369
|
+
<optional>
|
370
|
+
<ref name="modification">
|
371
|
+
<a:documentation>Any changes that the definition of the term has undergone relative to the original document,
|
372
|
+
in order to be applicable in this standardisation document</a:documentation>
|
373
|
+
</ref>
|
374
|
+
</optional>
|
375
|
+
</element>
|
376
|
+
</define>
|
269
377
|
<define name="sourcecodebody">
|
270
378
|
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
271
379
|
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
@@ -687,6 +795,20 @@ titlecase, or lowercase</a:documentation>
|
|
687
795
|
</attribute>
|
688
796
|
</optional>
|
689
797
|
</define>
|
798
|
+
<define name="RequiredId" combine="interleave">
|
799
|
+
<optional>
|
800
|
+
<attribute name="anchor">
|
801
|
+
<a:documentation>User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
802
|
+
</attribute>
|
803
|
+
</optional>
|
804
|
+
</define>
|
805
|
+
<define name="OptionalId" combine="interleave">
|
806
|
+
<optional>
|
807
|
+
<attribute name="anchor">
|
808
|
+
<a:documentation> User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
809
|
+
</attribute>
|
810
|
+
</optional>
|
811
|
+
</define>
|
690
812
|
<define name="ObligationType">
|
691
813
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
692
814
|
<choice>
|
@@ -1081,7 +1203,7 @@ That concept may be defined as a term within the current document, or it may be
|
|
1081
1203
|
<element name="label">
|
1082
1204
|
<!-- Identifier of form input element that this element is a label of -->
|
1083
1205
|
<attribute name="for">
|
1084
|
-
<
|
1206
|
+
<ref name="IdRefType"/>
|
1085
1207
|
</attribute>
|
1086
1208
|
<zeroOrMore>
|
1087
1209
|
<ref name="PureTextElement"/>
|
@@ -1328,6 +1450,7 @@ numbers</a:documentation>
|
|
1328
1450
|
<ref name="foreword"/>
|
1329
1451
|
<ref name="introduction"/>
|
1330
1452
|
<ref name="acknowledgements"/>
|
1453
|
+
<ref name="executivesummary"/>
|
1331
1454
|
</choice>
|
1332
1455
|
</oneOrMore>
|
1333
1456
|
</element>
|
@@ -1351,6 +1474,11 @@ numbers</a:documentation>
|
|
1351
1474
|
<ref name="Content-Section"/>
|
1352
1475
|
</element>
|
1353
1476
|
</define>
|
1477
|
+
<define name="executivesummary">
|
1478
|
+
<element name="executivesummary">
|
1479
|
+
<ref name="Content-Section"/>
|
1480
|
+
</element>
|
1481
|
+
</define>
|
1354
1482
|
<define name="indexsect">
|
1355
1483
|
<element name="indexsect">
|
1356
1484
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1704,15 @@ used in document amendments</a:documentation>
|
|
1576
1704
|
<define name="annex">
|
1577
1705
|
<element name="annex">
|
1578
1706
|
<ref name="Annex-Section"/>
|
1707
|
+
<zeroOrMore>
|
1708
|
+
<ref name="annex-appendix"/>
|
1709
|
+
</zeroOrMore>
|
1710
|
+
</element>
|
1711
|
+
</define>
|
1712
|
+
<define name="annex-appendix">
|
1713
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1714
|
+
<element name="appendix">
|
1715
|
+
<ref name="Clause-Section"/>
|
1579
1716
|
</element>
|
1580
1717
|
</define>
|
1581
1718
|
<define name="terms">
|
@@ -2106,7 +2243,7 @@ used in document amendments</a:documentation>
|
|
2106
2243
|
</define>
|
2107
2244
|
<define name="termsource">
|
2108
2245
|
<a:documentation>The bibliographic source where a term is defined in the sense applicable in this standardisation document</a:documentation>
|
2109
|
-
<element name="
|
2246
|
+
<element name="source">
|
2110
2247
|
<attribute name="status">
|
2111
2248
|
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
2112
2249
|
<ref name="SourceStatusType"/>
|
@@ -2488,6 +2625,11 @@ Normative References contents contain normative references, but as a clause in t
|
|
2488
2625
|
<ref name="termsource"/>
|
2489
2626
|
</zeroOrMore>
|
2490
2627
|
</define>
|
2628
|
+
<define name="BlockSource">
|
2629
|
+
<zeroOrMore>
|
2630
|
+
<ref name="source"/>
|
2631
|
+
</zeroOrMore>
|
2632
|
+
</define>
|
2491
2633
|
<start>
|
2492
2634
|
<ref name="standard-document"/>
|
2493
2635
|
</start>
|
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.6
|
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-
|
11
|
+
date: 2025-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|