metanorma-cc 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/cc/cc.standard.xsl +196 -28
- data/lib/metanorma/cc/basicdoc.rng +9 -5
- data/lib/metanorma/cc/isodoc.rng +147 -5
- data/lib/metanorma/cc/processor.rb +11 -7
- data/lib/metanorma/cc/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: ccd59d280a54179866ee784241bfb8b5e5c81cd79559511f06df43a2b1e875d9
|
4
|
+
data.tar.gz: 38da06098f7f5ae15b123e76504444d20951a0c8b57ab6433004b34f01b086cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aab4e6c0a74a29581baf734887aa4be6c9ce3a6726f234f8cc08383f768a6e239e87c68f1a3005a6e335734fe9e87642d89a6f137cf6bc94ab2d39a823ead9f2
|
7
|
+
data.tar.gz: 4cc6db292421d2f70775fce27c593bf61ecc08bea4c5cd089651b8596bb83ee6526947c8b2354202dcae4d7e9a8b95a5f639e851729904bcdfc79659dff4fb7d
|
@@ -2940,8 +2940,14 @@
|
|
2940
2940
|
</xsl:choose>
|
2941
2941
|
</xsl:variable>
|
2942
2942
|
|
2943
|
+
<xsl:call-template name="setNamedDestination"/>
|
2944
|
+
|
2943
2945
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
2944
2946
|
|
2947
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
2948
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
2949
|
+
</xsl:for-each>
|
2950
|
+
|
2945
2951
|
<xsl:call-template name="refine_table-container-style">
|
2946
2952
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
2947
2953
|
</xsl:call-template>
|
@@ -3146,6 +3152,7 @@
|
|
3146
3152
|
<!-- table/name-->
|
3147
3153
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3148
3154
|
<xsl:param name="continued"/>
|
3155
|
+
<xsl:param name="cols-count"/>
|
3149
3156
|
<xsl:if test="normalize-space() != ''">
|
3150
3157
|
|
3151
3158
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3167,9 +3174,30 @@
|
|
3167
3174
|
|
3168
3175
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3169
3176
|
<xsl:if test="$continued = 'true'">
|
3170
|
-
|
3171
|
-
|
3172
|
-
|
3177
|
+
|
3178
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
3179
|
+
|
3180
|
+
<xsl:choose>
|
3181
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
3182
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
3183
|
+
<fo:table-body role="SKIP">
|
3184
|
+
<fo:table-row>
|
3185
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
3186
|
+
<fo:block text-align="right" role="SKIP">
|
3187
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3188
|
+
</fo:block>
|
3189
|
+
</fo:table-cell>
|
3190
|
+
</fo:table-row>
|
3191
|
+
</fo:table-body>
|
3192
|
+
</fo:table>
|
3193
|
+
</xsl:when>
|
3194
|
+
<xsl:otherwise>
|
3195
|
+
<fo:block text-align="right">
|
3196
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3197
|
+
</fo:block>
|
3198
|
+
</xsl:otherwise>
|
3199
|
+
</xsl:choose>
|
3200
|
+
|
3173
3201
|
</xsl:if>
|
3174
3202
|
<!-- </xsl:if> -->
|
3175
3203
|
|
@@ -3562,6 +3590,7 @@
|
|
3562
3590
|
|
3563
3591
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
3564
3592
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3593
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3565
3594
|
</xsl:apply-templates>
|
3566
3595
|
|
3567
3596
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -3943,8 +3972,8 @@
|
|
3943
3972
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
3944
3973
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
3945
3974
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
3946
|
-
<xsl:if test="$key = 'color' or
|
3947
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3975
|
+
<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'">
|
3976
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
3948
3977
|
</xsl:if>
|
3949
3978
|
</xsl:for-each>
|
3950
3979
|
</xsl:variable>
|
@@ -4008,6 +4037,7 @@
|
|
4008
4037
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
4009
4038
|
<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">
|
4010
4039
|
|
4040
|
+
<xsl:call-template name="setNamedDestination"/>
|
4011
4041
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4012
4042
|
<xsl:copy-of select="@id"/>
|
4013
4043
|
|
@@ -4533,7 +4563,7 @@
|
|
4533
4563
|
<xsl:variable name="target" select="@target"/>
|
4534
4564
|
<xsl:choose>
|
4535
4565
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
4536
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
4566
|
+
<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]">
|
4537
4567
|
<xsl:call-template name="fn">
|
4538
4568
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
4539
4569
|
</xsl:call-template>
|
@@ -4629,6 +4659,10 @@
|
|
4629
4659
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
4630
4660
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
4631
4661
|
|
4662
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
4663
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
4664
|
+
</xsl:if>
|
4665
|
+
|
4632
4666
|
<xsl:call-template name="setBlockSpanAll"/>
|
4633
4667
|
|
4634
4668
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4922,7 +4956,7 @@
|
|
4922
4956
|
|
4923
4957
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4924
4958
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4925
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4959
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
4926
4960
|
<xsl:call-template name="refine_figure_key_style"/>
|
4927
4961
|
<xsl:apply-templates/>
|
4928
4962
|
</fo:block>
|
@@ -5173,6 +5207,7 @@
|
|
5173
5207
|
|
5174
5208
|
<xsl:call-template name="refine_dt-cell-style"/>
|
5175
5209
|
|
5210
|
+
<xsl:call-template name="setNamedDestination"/>
|
5176
5211
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
5177
5212
|
|
5178
5213
|
<xsl:choose>
|
@@ -5610,7 +5645,7 @@
|
|
5610
5645
|
<!-- ================= -->
|
5611
5646
|
|
5612
5647
|
<!-- highlight text -->
|
5613
|
-
<xsl:template match="*[local-name()='hi']">
|
5648
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
5614
5649
|
<fo:inline background-color="yellow">
|
5615
5650
|
<xsl:apply-templates/>
|
5616
5651
|
</fo:inline>
|
@@ -7205,6 +7240,7 @@
|
|
7205
7240
|
<!-- Appendix processing -->
|
7206
7241
|
<!-- ======================== -->
|
7207
7242
|
<xsl:template match="*[local-name()='appendix']">
|
7243
|
+
<xsl:call-template name="setNamedDestination"/>
|
7208
7244
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
7209
7245
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
7210
7246
|
</fo:block>
|
@@ -7215,13 +7251,14 @@
|
|
7215
7251
|
<xsl:variable name="level">
|
7216
7252
|
<xsl:call-template name="getLevel"/>
|
7217
7253
|
</xsl:variable>
|
7218
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
7254
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
7219
7255
|
</xsl:template>
|
7220
7256
|
<!-- ======================== -->
|
7221
7257
|
<!-- END Appendix processing -->
|
7222
7258
|
<!-- ======================== -->
|
7223
7259
|
|
7224
7260
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
7261
|
+
<xsl:call-template name="setNamedDestination"/>
|
7225
7262
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
7226
7263
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
7227
7264
|
</fo:block>
|
@@ -7251,6 +7288,7 @@
|
|
7251
7288
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
7252
7289
|
<xsl:param name="callout"/>
|
7253
7290
|
<fo:inline id="{@id}">
|
7291
|
+
<xsl:call-template name="setNamedDestination"/>
|
7254
7292
|
<!-- for first p in annotation, put <x> -->
|
7255
7293
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
7256
7294
|
<xsl:apply-templates/>
|
@@ -7297,6 +7335,7 @@
|
|
7297
7335
|
|
7298
7336
|
</xsl:if>
|
7299
7337
|
<fo:block-container margin-left="0mm" role="SKIP">
|
7338
|
+
<xsl:call-template name="setNamedDestination"/>
|
7300
7339
|
<fo:block id="{@id}">
|
7301
7340
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
7302
7341
|
</fo:block>
|
@@ -7342,8 +7381,13 @@
|
|
7342
7381
|
</fo:block>
|
7343
7382
|
</fo:table-cell>
|
7344
7383
|
<fo:table-cell display-align="center">
|
7384
|
+
|
7345
7385
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
7346
7386
|
|
7387
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
7388
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
7389
|
+
</xsl:for-each>
|
7390
|
+
|
7347
7391
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
7348
7392
|
|
7349
7393
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -7378,6 +7422,8 @@
|
|
7378
7422
|
|
7379
7423
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
7380
7424
|
|
7425
|
+
<xsl:call-template name="setNamedDestination"/>
|
7426
|
+
|
7381
7427
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
7382
7428
|
|
7383
7429
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -7442,6 +7488,7 @@
|
|
7442
7488
|
</xsl:template>
|
7443
7489
|
|
7444
7490
|
<xsl:template match="*[local-name() = 'termnote']">
|
7491
|
+
<xsl:call-template name="setNamedDestination"/>
|
7445
7492
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
7446
7493
|
|
7447
7494
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -7548,12 +7595,14 @@
|
|
7548
7595
|
|
7549
7596
|
<xsl:template match="*[local-name() = 'terms']">
|
7550
7597
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
7598
|
+
<xsl:call-template name="setNamedDestination"/>
|
7551
7599
|
<fo:block id="{@id}">
|
7552
7600
|
<xsl:apply-templates/>
|
7553
7601
|
</fo:block>
|
7554
7602
|
</xsl:template>
|
7555
7603
|
|
7556
7604
|
<xsl:template match="*[local-name() = 'term']">
|
7605
|
+
<xsl:call-template name="setNamedDestination"/>
|
7557
7606
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
7558
7607
|
|
7559
7608
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -7585,6 +7634,7 @@
|
|
7585
7634
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
7586
7635
|
<xsl:variable name="isAdded" select="@added"/>
|
7587
7636
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7637
|
+
<xsl:call-template name="setNamedDestination"/>
|
7588
7638
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7589
7639
|
<xsl:call-template name="refine_figure-block-style"/>
|
7590
7640
|
|
@@ -7601,6 +7651,11 @@
|
|
7601
7651
|
</xsl:variable>
|
7602
7652
|
|
7603
7653
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
7654
|
+
|
7655
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
7656
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
7657
|
+
</xsl:for-each>
|
7658
|
+
|
7604
7659
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
7605
7660
|
</fo:block>
|
7606
7661
|
|
@@ -7633,6 +7688,7 @@
|
|
7633
7688
|
</xsl:template>
|
7634
7689
|
|
7635
7690
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
7691
|
+
<xsl:call-template name="setNamedDestination"/>
|
7636
7692
|
<fo:block id="{@id}">
|
7637
7693
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7638
7694
|
</fo:block>
|
@@ -7646,6 +7702,7 @@
|
|
7646
7702
|
</xsl:template>
|
7647
7703
|
|
7648
7704
|
<!-- SOURCE: ... -->
|
7705
|
+
<!-- figure/source -->
|
7649
7706
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
7650
7707
|
|
7651
7708
|
<xsl:call-template name="termsource"/>
|
@@ -8878,6 +8935,7 @@
|
|
8878
8935
|
<xsl:template match="title" mode="bookmark"/>
|
8879
8936
|
<xsl:template match="text()" mode="bookmark"/>
|
8880
8937
|
|
8938
|
+
<!-- figure/name -->
|
8881
8939
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
8882
8940
|
<xsl:if test="normalize-space() != ''">
|
8883
8941
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -8890,11 +8948,11 @@
|
|
8890
8948
|
</xsl:template>
|
8891
8949
|
|
8892
8950
|
<!-- figure/fn -->
|
8893
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
8951
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
8894
8952
|
<!-- figure/note -->
|
8895
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
8953
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
8896
8954
|
<!-- figure/example -->
|
8897
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
8955
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
8898
8956
|
|
8899
8957
|
<!-- figure/note[@type = 'units'] -->
|
8900
8958
|
<!-- image/note[@type = 'units'] -->
|
@@ -9595,6 +9653,7 @@
|
|
9595
9653
|
<!-- permission -->
|
9596
9654
|
<!-- ========== -->
|
9597
9655
|
<xsl:template match="*[local-name() = 'permission']">
|
9656
|
+
<xsl:call-template name="setNamedDestination"/>
|
9598
9657
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
9599
9658
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9600
9659
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -9603,10 +9662,12 @@
|
|
9603
9662
|
|
9604
9663
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
9605
9664
|
<xsl:if test="normalize-space() != ''">
|
9606
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
9607
|
-
<xsl:apply-templates/>
|
9608
9665
|
|
9609
|
-
|
9666
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
9667
|
+
<xsl:apply-templates/>
|
9668
|
+
|
9669
|
+
</fo:block>
|
9670
|
+
|
9610
9671
|
</xsl:if>
|
9611
9672
|
</xsl:template>
|
9612
9673
|
|
@@ -9622,6 +9683,7 @@
|
|
9622
9683
|
<!-- requirement -->
|
9623
9684
|
<!-- ========== -->
|
9624
9685
|
<xsl:template match="*[local-name() = 'requirement']">
|
9686
|
+
<xsl:call-template name="setNamedDestination"/>
|
9625
9687
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
9626
9688
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9627
9689
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -9633,11 +9695,13 @@
|
|
9633
9695
|
|
9634
9696
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
9635
9697
|
<xsl:if test="normalize-space() != ''">
|
9636
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
9637
9698
|
|
9638
|
-
|
9699
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
9700
|
+
|
9701
|
+
<xsl:apply-templates/>
|
9702
|
+
|
9703
|
+
</fo:block>
|
9639
9704
|
|
9640
|
-
</fo:block>
|
9641
9705
|
</xsl:if>
|
9642
9706
|
</xsl:template>
|
9643
9707
|
|
@@ -9666,6 +9730,7 @@
|
|
9666
9730
|
<!-- recommendation -->
|
9667
9731
|
<!-- ========== -->
|
9668
9732
|
<xsl:template match="*[local-name() = 'recommendation']">
|
9733
|
+
<xsl:call-template name="setNamedDestination"/>
|
9669
9734
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
9670
9735
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9671
9736
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -9674,10 +9739,12 @@
|
|
9674
9739
|
|
9675
9740
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
9676
9741
|
<xsl:if test="normalize-space() != ''">
|
9677
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
9678
|
-
<xsl:apply-templates/>
|
9679
9742
|
|
9680
|
-
|
9743
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
9744
|
+
<xsl:apply-templates/>
|
9745
|
+
|
9746
|
+
</fo:block>
|
9747
|
+
|
9681
9748
|
</xsl:if>
|
9682
9749
|
</xsl:template>
|
9683
9750
|
|
@@ -9756,6 +9823,7 @@
|
|
9756
9823
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
9757
9824
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
9758
9825
|
</xsl:if>
|
9826
|
+
<xsl:call-template name="setNamedDestination"/>
|
9759
9827
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9760
9828
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
9761
9829
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -9865,6 +9933,7 @@
|
|
9865
9933
|
<!-- termexample -->
|
9866
9934
|
<!-- ====== -->
|
9867
9935
|
<xsl:template match="*[local-name() = 'termexample']">
|
9936
|
+
<xsl:call-template name="setNamedDestination"/>
|
9868
9937
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
9869
9938
|
<xsl:call-template name="refine_termexample-style"/>
|
9870
9939
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9919,6 +9988,7 @@
|
|
9919
9988
|
-->
|
9920
9989
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
9921
9990
|
|
9991
|
+
<xsl:call-template name="setNamedDestination"/>
|
9922
9992
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
9923
9993
|
|
9924
9994
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10444,8 +10514,13 @@
|
|
10444
10514
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
10445
10515
|
|
10446
10516
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
10517
|
+
|
10447
10518
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
10448
10519
|
|
10520
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
10521
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
10522
|
+
</xsl:for-each>
|
10523
|
+
|
10449
10524
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
10450
10525
|
</fo:block>
|
10451
10526
|
</xsl:if>
|
@@ -10565,6 +10640,7 @@
|
|
10565
10640
|
<!-- main sections -->
|
10566
10641
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
10567
10642
|
|
10643
|
+
<xsl:call-template name="setNamedDestination"/>
|
10568
10644
|
<fo:block>
|
10569
10645
|
<xsl:call-template name="setId"/>
|
10570
10646
|
|
@@ -10610,6 +10686,7 @@
|
|
10610
10686
|
|
10611
10687
|
<fo:block break-after="page"/>
|
10612
10688
|
|
10689
|
+
<xsl:call-template name="setNamedDestination"/>
|
10613
10690
|
<fo:block>
|
10614
10691
|
<xsl:call-template name="setId"/>
|
10615
10692
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -10638,6 +10715,7 @@
|
|
10638
10715
|
</xsl:template>
|
10639
10716
|
|
10640
10717
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
10718
|
+
<xsl:call-template name="setNamedDestination"/>
|
10641
10719
|
<fo:block>
|
10642
10720
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
10643
10721
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -10660,6 +10738,7 @@
|
|
10660
10738
|
</xsl:template> <!-- refine_clause_style -->
|
10661
10739
|
|
10662
10740
|
<xsl:template match="*[local-name() = 'definitions']">
|
10741
|
+
<xsl:call-template name="setNamedDestination"/>
|
10663
10742
|
<fo:block id="{@id}">
|
10664
10743
|
<xsl:apply-templates/>
|
10665
10744
|
</fo:block>
|
@@ -10675,6 +10754,8 @@
|
|
10675
10754
|
<xsl:otherwise>
|
10676
10755
|
|
10677
10756
|
<fo:block break-after="page"/>
|
10757
|
+
<xsl:call-template name="setNamedDestination"/>
|
10758
|
+
|
10678
10759
|
<fo:block id="{@id}">
|
10679
10760
|
|
10680
10761
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10746,6 +10827,7 @@
|
|
10746
10827
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
10747
10828
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
10748
10829
|
<!-- <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> -->
|
10830
|
+
<xsl:call-template name="setNamedDestination"/>
|
10749
10831
|
<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>
|
10750
10832
|
<!-- </xsl:if> -->
|
10751
10833
|
</xsl:if>
|
@@ -11461,6 +11543,7 @@
|
|
11461
11543
|
<!-- Normative references -->
|
11462
11544
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
11463
11545
|
|
11546
|
+
<xsl:call-template name="setNamedDestination"/>
|
11464
11547
|
<fo:block id="{@id}">
|
11465
11548
|
<xsl:apply-templates/>
|
11466
11549
|
|
@@ -11481,6 +11564,7 @@
|
|
11481
11564
|
</xsl:if>
|
11482
11565
|
</xsl:if> -->
|
11483
11566
|
|
11567
|
+
<xsl:call-template name="setNamedDestination"/>
|
11484
11568
|
<fo:block id="{@id}"/>
|
11485
11569
|
|
11486
11570
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -11500,6 +11584,7 @@
|
|
11500
11584
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
11501
11585
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11502
11586
|
|
11587
|
+
<xsl:call-template name="setNamedDestination"/>
|
11503
11588
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
11504
11589
|
|
11505
11590
|
<xsl:call-template name="processBibitem"/>
|
@@ -11513,6 +11598,7 @@
|
|
11513
11598
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
11514
11599
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
11515
11600
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
11601
|
+
<xsl:call-template name="setNamedDestination"/>
|
11516
11602
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
11517
11603
|
|
11518
11604
|
<fo:list-item>
|
@@ -11542,6 +11628,7 @@
|
|
11542
11628
|
<xsl:choose>
|
11543
11629
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
11544
11630
|
<xsl:otherwise>
|
11631
|
+
<xsl:call-template name="setNamedDestination"/>
|
11545
11632
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
11546
11633
|
|
11547
11634
|
<fo:list-item-label end-indent="label-end()">
|
@@ -12196,7 +12283,7 @@
|
|
12196
12283
|
</xsl:template>
|
12197
12284
|
|
12198
12285
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
12199
|
-
<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">
|
12286
|
+
<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">
|
12200
12287
|
<xsl:copy>
|
12201
12288
|
<xsl:copy-of select="@*"/>
|
12202
12289
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -12228,28 +12315,56 @@
|
|
12228
12315
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
12229
12316
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
12230
12317
|
|
12231
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
12318
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
12232
12319
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
12233
12320
|
<xsl:copy-of select="@*"/>
|
12234
12321
|
<xsl:choose>
|
12235
12322
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12236
|
-
<xsl:
|
12323
|
+
<xsl:choose>
|
12324
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12325
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12326
|
+
</xsl:when>
|
12327
|
+
<xsl:otherwise>
|
12328
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
12329
|
+
</xsl:otherwise>
|
12330
|
+
</xsl:choose>
|
12237
12331
|
</xsl:when>
|
12238
12332
|
<xsl:otherwise>
|
12239
|
-
<xsl:
|
12333
|
+
<xsl:choose>
|
12334
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12335
|
+
<xsl:copy-of select="node()"/>
|
12336
|
+
</xsl:when>
|
12337
|
+
<xsl:otherwise>
|
12338
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
12339
|
+
</xsl:otherwise>
|
12340
|
+
</xsl:choose>
|
12240
12341
|
</xsl:otherwise>
|
12241
12342
|
</xsl:choose>
|
12242
12343
|
</xsl:element>
|
12243
12344
|
</xsl:template>
|
12244
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
12345
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
12245
12346
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
12246
12347
|
<xsl:copy-of select="@*"/>
|
12247
12348
|
<xsl:choose>
|
12248
12349
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12249
|
-
<xsl:
|
12350
|
+
<xsl:choose>
|
12351
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12352
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12353
|
+
</xsl:when>
|
12354
|
+
<xsl:otherwise>
|
12355
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
12356
|
+
</xsl:otherwise>
|
12357
|
+
</xsl:choose>
|
12250
12358
|
</xsl:when>
|
12251
12359
|
<xsl:otherwise>
|
12252
|
-
<xsl:
|
12360
|
+
<xsl:choose>
|
12361
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
12362
|
+
<xsl:copy-of select="node()"/>
|
12363
|
+
</xsl:when>
|
12364
|
+
<xsl:otherwise>
|
12365
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
12366
|
+
</xsl:otherwise>
|
12367
|
+
</xsl:choose>
|
12253
12368
|
</xsl:otherwise>
|
12254
12369
|
</xsl:choose>
|
12255
12370
|
</xsl:element>
|
@@ -12344,6 +12459,9 @@
|
|
12344
12459
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
12345
12460
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
12346
12461
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
12462
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
12463
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
12464
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
12347
12465
|
|
12348
12466
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12349
12467
|
<xsl:copy>
|
@@ -12478,16 +12596,24 @@
|
|
12478
12596
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
12479
12597
|
<xsl:element name="title" namespace="{$namespace_full}">
|
12480
12598
|
<xsl:copy-of select="@*"/>
|
12599
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12600
|
+
|
12481
12601
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12482
12602
|
</xsl:element>
|
12483
12603
|
</xsl:template>
|
12484
12604
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
12485
12605
|
<xsl:element name="title" namespace="{$namespace_full}">
|
12486
12606
|
<xsl:copy-of select="@*"/>
|
12607
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12608
|
+
|
12487
12609
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12488
12610
|
</xsl:element>
|
12489
12611
|
</xsl:template>
|
12490
12612
|
|
12613
|
+
<xsl:template name="addNamedDestinationAttribute">
|
12614
|
+
|
12615
|
+
</xsl:template>
|
12616
|
+
|
12491
12617
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
12492
12618
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
12493
12619
|
<xsl:choose>
|
@@ -12497,6 +12623,8 @@
|
|
12497
12623
|
<xsl:otherwise>
|
12498
12624
|
<xsl:element name="name" namespace="{$namespace_full}">
|
12499
12625
|
<xsl:copy-of select="@*"/>
|
12626
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12627
|
+
|
12500
12628
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12501
12629
|
</xsl:element>
|
12502
12630
|
</xsl:otherwise>
|
@@ -12510,6 +12638,8 @@
|
|
12510
12638
|
<xsl:otherwise>
|
12511
12639
|
<xsl:element name="name" namespace="{$namespace_full}">
|
12512
12640
|
<xsl:copy-of select="@*"/>
|
12641
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
12642
|
+
|
12513
12643
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12514
12644
|
</xsl:element>
|
12515
12645
|
</xsl:otherwise>
|
@@ -12614,6 +12744,20 @@
|
|
12614
12744
|
</xsl:element>
|
12615
12745
|
</xsl:template>
|
12616
12746
|
|
12747
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
12748
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
12749
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
12750
|
+
<xsl:copy-of select="@*"/>
|
12751
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12752
|
+
</xsl:element>
|
12753
|
+
</xsl:template>
|
12754
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
12755
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
12756
|
+
<xsl:copy-of select="@*"/>
|
12757
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12758
|
+
</xsl:element>
|
12759
|
+
</xsl:template>
|
12760
|
+
|
12617
12761
|
<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">
|
12618
12762
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12619
12763
|
</xsl:template>
|
@@ -13967,6 +14111,30 @@
|
|
13967
14111
|
</xsl:attribute>
|
13968
14112
|
</xsl:template>
|
13969
14113
|
|
14114
|
+
<xsl:template name="setIDforNamedDestination">
|
14115
|
+
<xsl:if test="@named_dest">
|
14116
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
14117
|
+
</xsl:if>
|
14118
|
+
</xsl:template>
|
14119
|
+
|
14120
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
14121
|
+
<xsl:if test="@named_dest">
|
14122
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
14123
|
+
</xsl:if>
|
14124
|
+
</xsl:template>
|
14125
|
+
|
14126
|
+
<xsl:template name="setNamedDestination">
|
14127
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14128
|
+
<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'">
|
14129
|
+
<fox:destination internal-destination="{@id}"/>
|
14130
|
+
</xsl:if>
|
14131
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
14132
|
+
<xsl:if test="@named_dest">
|
14133
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14134
|
+
</xsl:if>
|
14135
|
+
</xsl:for-each>
|
14136
|
+
</xsl:template>
|
14137
|
+
|
13970
14138
|
<xsl:template name="add-letter-spacing">
|
13971
14139
|
<xsl:param name="text"/>
|
13972
14140
|
<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>
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
@@ -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>
|
@@ -8,7 +8,7 @@ module Metanorma
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def initialize
|
11
|
-
@short = [
|
11
|
+
@short = %i[csd cc]
|
12
12
|
@input_format = :asciidoc
|
13
13
|
@asciidoctor_backend = :cc
|
14
14
|
end
|
@@ -17,7 +17,7 @@ module Metanorma
|
|
17
17
|
super.merge(
|
18
18
|
html: "html",
|
19
19
|
pdf: "pdf",
|
20
|
-
doc: "doc"
|
20
|
+
doc: "doc",
|
21
21
|
)
|
22
22
|
end
|
23
23
|
|
@@ -25,17 +25,21 @@ module Metanorma
|
|
25
25
|
"Metanorma::Cc #{Metanorma::Cc::VERSION}"
|
26
26
|
end
|
27
27
|
|
28
|
-
def output(isodoc_node, inname, outname, format, options={})
|
28
|
+
def output(isodoc_node, inname, outname, format, options = {})
|
29
29
|
options_preprocess(options)
|
30
30
|
case format
|
31
31
|
when :html
|
32
|
-
IsoDoc::Cc::HtmlConvert.new(options)
|
32
|
+
IsoDoc::Cc::HtmlConvert.new(options)
|
33
|
+
.convert(inname, isodoc_node, nil, outname)
|
33
34
|
when :doc
|
34
|
-
IsoDoc::Cc::WordConvert.new(options)
|
35
|
+
IsoDoc::Cc::WordConvert.new(options)
|
36
|
+
.convert(inname, isodoc_node, nil, outname)
|
35
37
|
when :pdf
|
36
|
-
IsoDoc::Cc::PdfConvert.new(options)
|
38
|
+
IsoDoc::Cc::PdfConvert.new(options)
|
39
|
+
.convert(inname, isodoc_node, nil, outname)
|
37
40
|
when :presentation
|
38
|
-
IsoDoc::Cc::PresentationXMLConvert.new(options)
|
41
|
+
IsoDoc::Cc::PresentationXMLConvert.new(options)
|
42
|
+
.convert(inname, isodoc_node, nil, outname)
|
39
43
|
else
|
40
44
|
super
|
41
45
|
end
|
data/lib/metanorma/cc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cc
|
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
|