metanorma-iec 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/iec/iec.international-standard.xsl +199 -29
- data/lib/isodoc/iec/presentation_terms.rb +1 -2
- data/lib/isodoc/iec/presentation_xml_convert.rb +6 -9
- data/lib/metanorma/iec/basicdoc.rng +9 -5
- data/lib/metanorma/iec/converter.rb +0 -3
- data/lib/metanorma/iec/isodoc.rng +147 -5
- data/lib/metanorma/iec/isostandard.rng +0 -5
- data/lib/metanorma/iec/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: a4794261cc63acf08d95528e06b7a10c580abe478297772c36e7d9130a40d80e
|
4
|
+
data.tar.gz: 9340fe93102250bcb1fa77f41c6058d1ebfd04c9c77561ad337daa5b09085ef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4cf101a3aa0380aab1b5ab877319bda5b07cc16d1b6818d315a097bc183aea76bc4b4cc711c1d4fe36dc691efb004c8aea844f6ecae444edf2ac75b5aeed03d
|
7
|
+
data.tar.gz: 8747c25e91a711061887eaaa3cd2aec97d108ee3d2ae7419f87243ff99ae1f00a2f0d9958e457d407b6185b8b80b94028a266ce1f511a055275d2c0189c9ed9f
|
@@ -4568,8 +4568,14 @@
|
|
4568
4568
|
</xsl:choose>
|
4569
4569
|
</xsl:variable>
|
4570
4570
|
|
4571
|
+
<xsl:call-template name="setNamedDestination"/>
|
4572
|
+
|
4571
4573
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4572
4574
|
|
4575
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
4576
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
4577
|
+
</xsl:for-each>
|
4578
|
+
|
4573
4579
|
<xsl:call-template name="refine_table-container-style">
|
4574
4580
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
4575
4581
|
</xsl:call-template>
|
@@ -4779,6 +4785,7 @@
|
|
4779
4785
|
<!-- table/name-->
|
4780
4786
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4781
4787
|
<xsl:param name="continued"/>
|
4788
|
+
<xsl:param name="cols-count"/>
|
4782
4789
|
<xsl:if test="normalize-space() != ''">
|
4783
4790
|
|
4784
4791
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -4810,9 +4817,30 @@
|
|
4810
4817
|
|
4811
4818
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
4812
4819
|
<xsl:if test="$continued = 'true'">
|
4813
|
-
|
4814
|
-
|
4815
|
-
|
4820
|
+
|
4821
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
4822
|
+
|
4823
|
+
<xsl:choose>
|
4824
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
4825
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
4826
|
+
<fo:table-body role="SKIP">
|
4827
|
+
<fo:table-row>
|
4828
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
4829
|
+
<fo:block text-align="right" role="SKIP">
|
4830
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
4831
|
+
</fo:block>
|
4832
|
+
</fo:table-cell>
|
4833
|
+
</fo:table-row>
|
4834
|
+
</fo:table-body>
|
4835
|
+
</fo:table>
|
4836
|
+
</xsl:when>
|
4837
|
+
<xsl:otherwise>
|
4838
|
+
<fo:block text-align="right">
|
4839
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
4840
|
+
</fo:block>
|
4841
|
+
</xsl:otherwise>
|
4842
|
+
</xsl:choose>
|
4843
|
+
|
4816
4844
|
</xsl:if>
|
4817
4845
|
<!-- </xsl:if> -->
|
4818
4846
|
|
@@ -5209,6 +5237,7 @@
|
|
5209
5237
|
|
5210
5238
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
5211
5239
|
<xsl:with-param name="continued">true</xsl:with-param>
|
5240
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5212
5241
|
</xsl:apply-templates>
|
5213
5242
|
|
5214
5243
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -5388,7 +5417,8 @@
|
|
5388
5417
|
|
5389
5418
|
<!-- if there isn't 'thead' and there is a table's title -->
|
5390
5419
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
5391
|
-
<fo:table-header
|
5420
|
+
<fo:table-header>
|
5421
|
+
|
5392
5422
|
<xsl:call-template name="table-header-title">
|
5393
5423
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5394
5424
|
</xsl:call-template>
|
@@ -5645,8 +5675,8 @@
|
|
5645
5675
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
5646
5676
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5647
5677
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5648
|
-
<xsl:if test="$key = 'color' or
|
5649
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5678
|
+
<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'">
|
5679
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
5650
5680
|
</xsl:if>
|
5651
5681
|
</xsl:for-each>
|
5652
5682
|
</xsl:variable>
|
@@ -5710,6 +5740,7 @@
|
|
5710
5740
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
5711
5741
|
<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">
|
5712
5742
|
|
5743
|
+
<xsl:call-template name="setNamedDestination"/>
|
5713
5744
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5714
5745
|
<xsl:copy-of select="@id"/>
|
5715
5746
|
|
@@ -6237,7 +6268,7 @@
|
|
6237
6268
|
<xsl:variable name="target" select="@target"/>
|
6238
6269
|
<xsl:choose>
|
6239
6270
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
6240
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
6271
|
+
<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]">
|
6241
6272
|
<xsl:call-template name="fn">
|
6242
6273
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
6243
6274
|
</xsl:call-template>
|
@@ -6333,6 +6364,10 @@
|
|
6333
6364
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6334
6365
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
6335
6366
|
|
6367
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
6368
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
6369
|
+
</xsl:if>
|
6370
|
+
|
6336
6371
|
<xsl:call-template name="setBlockSpanAll"/>
|
6337
6372
|
|
6338
6373
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -6633,7 +6668,7 @@
|
|
6633
6668
|
|
6634
6669
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
6635
6670
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
6636
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
6671
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
6637
6672
|
<xsl:call-template name="refine_figure_key_style"/>
|
6638
6673
|
<xsl:apply-templates/>
|
6639
6674
|
</fo:block>
|
@@ -6889,6 +6924,7 @@
|
|
6889
6924
|
|
6890
6925
|
<xsl:call-template name="refine_dt-cell-style"/>
|
6891
6926
|
|
6927
|
+
<xsl:call-template name="setNamedDestination"/>
|
6892
6928
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
6893
6929
|
|
6894
6930
|
<xsl:choose>
|
@@ -7325,7 +7361,7 @@
|
|
7325
7361
|
<!-- ================= -->
|
7326
7362
|
|
7327
7363
|
<!-- highlight text -->
|
7328
|
-
<xsl:template match="*[local-name()='hi']">
|
7364
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
7329
7365
|
<fo:inline background-color="yellow">
|
7330
7366
|
<xsl:apply-templates/>
|
7331
7367
|
</fo:inline>
|
@@ -8991,6 +9027,7 @@
|
|
8991
9027
|
<!-- Appendix processing -->
|
8992
9028
|
<!-- ======================== -->
|
8993
9029
|
<xsl:template match="*[local-name()='appendix']">
|
9030
|
+
<xsl:call-template name="setNamedDestination"/>
|
8994
9031
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8995
9032
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
8996
9033
|
</fo:block>
|
@@ -9001,13 +9038,14 @@
|
|
9001
9038
|
<xsl:variable name="level">
|
9002
9039
|
<xsl:call-template name="getLevel"/>
|
9003
9040
|
</xsl:variable>
|
9004
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
9041
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
9005
9042
|
</xsl:template>
|
9006
9043
|
<!-- ======================== -->
|
9007
9044
|
<!-- END Appendix processing -->
|
9008
9045
|
<!-- ======================== -->
|
9009
9046
|
|
9010
9047
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
9048
|
+
<xsl:call-template name="setNamedDestination"/>
|
9011
9049
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
9012
9050
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9013
9051
|
</fo:block>
|
@@ -9037,6 +9075,7 @@
|
|
9037
9075
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
9038
9076
|
<xsl:param name="callout"/>
|
9039
9077
|
<fo:inline id="{@id}">
|
9078
|
+
<xsl:call-template name="setNamedDestination"/>
|
9040
9079
|
<!-- for first p in annotation, put <x> -->
|
9041
9080
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
9042
9081
|
<xsl:apply-templates/>
|
@@ -9083,6 +9122,7 @@
|
|
9083
9122
|
|
9084
9123
|
</xsl:if>
|
9085
9124
|
<fo:block-container margin-left="0mm" role="SKIP">
|
9125
|
+
<xsl:call-template name="setNamedDestination"/>
|
9086
9126
|
<fo:block id="{@id}">
|
9087
9127
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
9088
9128
|
</fo:block>
|
@@ -9128,8 +9168,13 @@
|
|
9128
9168
|
</fo:block>
|
9129
9169
|
</fo:table-cell>
|
9130
9170
|
<fo:table-cell display-align="center">
|
9171
|
+
|
9131
9172
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
9132
9173
|
|
9174
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
9175
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
9176
|
+
</xsl:for-each>
|
9177
|
+
|
9133
9178
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
9134
9179
|
|
9135
9180
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -9164,6 +9209,8 @@
|
|
9164
9209
|
|
9165
9210
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
9166
9211
|
|
9212
|
+
<xsl:call-template name="setNamedDestination"/>
|
9213
|
+
|
9167
9214
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
9168
9215
|
|
9169
9216
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9228,6 +9275,7 @@
|
|
9228
9275
|
</xsl:template>
|
9229
9276
|
|
9230
9277
|
<xsl:template match="*[local-name() = 'termnote']">
|
9278
|
+
<xsl:call-template name="setNamedDestination"/>
|
9231
9279
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
9232
9280
|
|
9233
9281
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9334,12 +9382,14 @@
|
|
9334
9382
|
|
9335
9383
|
<xsl:template match="*[local-name() = 'terms']">
|
9336
9384
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
9385
|
+
<xsl:call-template name="setNamedDestination"/>
|
9337
9386
|
<fo:block id="{@id}">
|
9338
9387
|
<xsl:apply-templates/>
|
9339
9388
|
</fo:block>
|
9340
9389
|
</xsl:template>
|
9341
9390
|
|
9342
9391
|
<xsl:template match="*[local-name() = 'term']">
|
9392
|
+
<xsl:call-template name="setNamedDestination"/>
|
9343
9393
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
9344
9394
|
|
9345
9395
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -9371,6 +9421,7 @@
|
|
9371
9421
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
9372
9422
|
<xsl:variable name="isAdded" select="@added"/>
|
9373
9423
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
9424
|
+
<xsl:call-template name="setNamedDestination"/>
|
9374
9425
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
9375
9426
|
<xsl:call-template name="refine_figure-block-style"/>
|
9376
9427
|
|
@@ -9387,6 +9438,11 @@
|
|
9387
9438
|
</xsl:variable>
|
9388
9439
|
|
9389
9440
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9441
|
+
|
9442
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
9443
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
9444
|
+
</xsl:for-each>
|
9445
|
+
|
9390
9446
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
9391
9447
|
</fo:block>
|
9392
9448
|
|
@@ -9419,6 +9475,7 @@
|
|
9419
9475
|
</xsl:template>
|
9420
9476
|
|
9421
9477
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
9478
|
+
<xsl:call-template name="setNamedDestination"/>
|
9422
9479
|
<fo:block id="{@id}">
|
9423
9480
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
9424
9481
|
</fo:block>
|
@@ -9432,6 +9489,7 @@
|
|
9432
9489
|
</xsl:template>
|
9433
9490
|
|
9434
9491
|
<!-- SOURCE: ... -->
|
9492
|
+
<!-- figure/source -->
|
9435
9493
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
9436
9494
|
|
9437
9495
|
<fo:block xsl:use-attribute-sets="figure-source-style">
|
@@ -10677,6 +10735,7 @@
|
|
10677
10735
|
<xsl:template match="title" mode="bookmark"/>
|
10678
10736
|
<xsl:template match="text()" mode="bookmark"/>
|
10679
10737
|
|
10738
|
+
<!-- figure/name -->
|
10680
10739
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
10681
10740
|
<xsl:if test="normalize-space() != ''">
|
10682
10741
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -10689,11 +10748,11 @@
|
|
10689
10748
|
</xsl:template>
|
10690
10749
|
|
10691
10750
|
<!-- figure/fn -->
|
10692
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
10751
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
10693
10752
|
<!-- figure/note -->
|
10694
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
10753
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
10695
10754
|
<!-- figure/example -->
|
10696
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
10755
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
10697
10756
|
|
10698
10757
|
<!-- figure/note[@type = 'units'] -->
|
10699
10758
|
<!-- image/note[@type = 'units'] -->
|
@@ -11393,6 +11452,7 @@
|
|
11393
11452
|
<!-- permission -->
|
11394
11453
|
<!-- ========== -->
|
11395
11454
|
<xsl:template match="*[local-name() = 'permission']">
|
11455
|
+
<xsl:call-template name="setNamedDestination"/>
|
11396
11456
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
11397
11457
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11398
11458
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11401,10 +11461,12 @@
|
|
11401
11461
|
|
11402
11462
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
11403
11463
|
<xsl:if test="normalize-space() != ''">
|
11404
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11405
|
-
<xsl:apply-templates/>
|
11406
11464
|
|
11407
|
-
|
11465
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11466
|
+
<xsl:apply-templates/>
|
11467
|
+
|
11468
|
+
</fo:block>
|
11469
|
+
|
11408
11470
|
</xsl:if>
|
11409
11471
|
</xsl:template>
|
11410
11472
|
|
@@ -11420,6 +11482,7 @@
|
|
11420
11482
|
<!-- requirement -->
|
11421
11483
|
<!-- ========== -->
|
11422
11484
|
<xsl:template match="*[local-name() = 'requirement']">
|
11485
|
+
<xsl:call-template name="setNamedDestination"/>
|
11423
11486
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
11424
11487
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11425
11488
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -11431,11 +11494,13 @@
|
|
11431
11494
|
|
11432
11495
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
11433
11496
|
<xsl:if test="normalize-space() != ''">
|
11434
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11435
11497
|
|
11436
|
-
|
11498
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11499
|
+
|
11500
|
+
<xsl:apply-templates/>
|
11501
|
+
|
11502
|
+
</fo:block>
|
11437
11503
|
|
11438
|
-
</fo:block>
|
11439
11504
|
</xsl:if>
|
11440
11505
|
</xsl:template>
|
11441
11506
|
|
@@ -11464,6 +11529,7 @@
|
|
11464
11529
|
<!-- recommendation -->
|
11465
11530
|
<!-- ========== -->
|
11466
11531
|
<xsl:template match="*[local-name() = 'recommendation']">
|
11532
|
+
<xsl:call-template name="setNamedDestination"/>
|
11467
11533
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
11468
11534
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11469
11535
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11472,10 +11538,12 @@
|
|
11472
11538
|
|
11473
11539
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
11474
11540
|
<xsl:if test="normalize-space() != ''">
|
11475
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11476
|
-
<xsl:apply-templates/>
|
11477
11541
|
|
11478
|
-
|
11542
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11543
|
+
<xsl:apply-templates/>
|
11544
|
+
|
11545
|
+
</fo:block>
|
11546
|
+
|
11479
11547
|
</xsl:if>
|
11480
11548
|
</xsl:template>
|
11481
11549
|
|
@@ -11554,6 +11622,7 @@
|
|
11554
11622
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
11555
11623
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
11556
11624
|
</xsl:if>
|
11625
|
+
<xsl:call-template name="setNamedDestination"/>
|
11557
11626
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
11558
11627
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
11559
11628
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -11663,6 +11732,7 @@
|
|
11663
11732
|
<!-- termexample -->
|
11664
11733
|
<!-- ====== -->
|
11665
11734
|
<xsl:template match="*[local-name() = 'termexample']">
|
11735
|
+
<xsl:call-template name="setNamedDestination"/>
|
11666
11736
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
11667
11737
|
<xsl:call-template name="refine_termexample-style"/>
|
11668
11738
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11717,6 +11787,7 @@
|
|
11717
11787
|
-->
|
11718
11788
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
11719
11789
|
|
11790
|
+
<xsl:call-template name="setNamedDestination"/>
|
11720
11791
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
11721
11792
|
|
11722
11793
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12245,8 +12316,13 @@
|
|
12245
12316
|
</xsl:if>
|
12246
12317
|
|
12247
12318
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
12319
|
+
|
12248
12320
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
12249
12321
|
|
12322
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
12323
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
12324
|
+
</xsl:for-each>
|
12325
|
+
|
12250
12326
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
12251
12327
|
</fo:block>
|
12252
12328
|
</xsl:if>
|
@@ -12366,6 +12442,7 @@
|
|
12366
12442
|
<!-- main sections -->
|
12367
12443
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
12368
12444
|
|
12445
|
+
<xsl:call-template name="setNamedDestination"/>
|
12369
12446
|
<fo:block>
|
12370
12447
|
<xsl:call-template name="setId"/>
|
12371
12448
|
|
@@ -12406,6 +12483,7 @@
|
|
12406
12483
|
|
12407
12484
|
<fo:block break-after="page"/>
|
12408
12485
|
|
12486
|
+
<xsl:call-template name="setNamedDestination"/>
|
12409
12487
|
<fo:block>
|
12410
12488
|
<xsl:call-template name="setId"/>
|
12411
12489
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -12434,6 +12512,7 @@
|
|
12434
12512
|
</xsl:template>
|
12435
12513
|
|
12436
12514
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
12515
|
+
<xsl:call-template name="setNamedDestination"/>
|
12437
12516
|
<fo:block>
|
12438
12517
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
12439
12518
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -12456,6 +12535,7 @@
|
|
12456
12535
|
</xsl:template> <!-- refine_clause_style -->
|
12457
12536
|
|
12458
12537
|
<xsl:template match="*[local-name() = 'definitions']">
|
12538
|
+
<xsl:call-template name="setNamedDestination"/>
|
12459
12539
|
<fo:block id="{@id}">
|
12460
12540
|
<xsl:apply-templates/>
|
12461
12541
|
</fo:block>
|
@@ -12471,6 +12551,8 @@
|
|
12471
12551
|
<xsl:otherwise>
|
12472
12552
|
|
12473
12553
|
<fo:block break-after="page"/>
|
12554
|
+
<xsl:call-template name="setNamedDestination"/>
|
12555
|
+
|
12474
12556
|
<fo:block id="{@id}">
|
12475
12557
|
|
12476
12558
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12542,6 +12624,7 @@
|
|
12542
12624
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
12543
12625
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
12544
12626
|
<!-- <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> -->
|
12627
|
+
<xsl:call-template name="setNamedDestination"/>
|
12545
12628
|
<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>
|
12546
12629
|
<!-- </xsl:if> -->
|
12547
12630
|
</xsl:if>
|
@@ -13263,6 +13346,7 @@
|
|
13263
13346
|
<!-- Normative references -->
|
13264
13347
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
13265
13348
|
|
13349
|
+
<xsl:call-template name="setNamedDestination"/>
|
13266
13350
|
<fo:block id="{@id}">
|
13267
13351
|
<xsl:apply-templates/>
|
13268
13352
|
|
@@ -13283,6 +13367,7 @@
|
|
13283
13367
|
</xsl:if>
|
13284
13368
|
</xsl:if> -->
|
13285
13369
|
|
13370
|
+
<xsl:call-template name="setNamedDestination"/>
|
13286
13371
|
<fo:block id="{@id}"/>
|
13287
13372
|
|
13288
13373
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -13307,6 +13392,7 @@
|
|
13307
13392
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
13308
13393
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
13309
13394
|
|
13395
|
+
<xsl:call-template name="setNamedDestination"/>
|
13310
13396
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13311
13397
|
|
13312
13398
|
<xsl:call-template name="processBibitem"/>
|
@@ -13320,6 +13406,7 @@
|
|
13320
13406
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
13321
13407
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
13322
13408
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
13409
|
+
<xsl:call-template name="setNamedDestination"/>
|
13323
13410
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
13324
13411
|
|
13325
13412
|
<fo:list-item>
|
@@ -13349,6 +13436,7 @@
|
|
13349
13436
|
<xsl:choose>
|
13350
13437
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13351
13438
|
<xsl:otherwise>
|
13439
|
+
<xsl:call-template name="setNamedDestination"/>
|
13352
13440
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13353
13441
|
|
13354
13442
|
<fo:list-item-label end-indent="label-end()">
|
@@ -13743,6 +13831,7 @@
|
|
13743
13831
|
<xsl:template match="*[local-name() = 'admonition']">
|
13744
13832
|
|
13745
13833
|
<!-- text in the box -->
|
13834
|
+
<xsl:call-template name="setNamedDestination"/>
|
13746
13835
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
13747
13836
|
|
13748
13837
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13998,7 +14087,7 @@
|
|
13998
14087
|
</xsl:template>
|
13999
14088
|
|
14000
14089
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
14001
|
-
<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">
|
14090
|
+
<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">
|
14002
14091
|
<xsl:copy>
|
14003
14092
|
<xsl:copy-of select="@*"/>
|
14004
14093
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -14030,28 +14119,56 @@
|
|
14030
14119
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
14031
14120
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
14032
14121
|
|
14033
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
14122
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
14034
14123
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
14035
14124
|
<xsl:copy-of select="@*"/>
|
14036
14125
|
<xsl:choose>
|
14037
14126
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
14038
|
-
<xsl:
|
14127
|
+
<xsl:choose>
|
14128
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14129
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
14130
|
+
</xsl:when>
|
14131
|
+
<xsl:otherwise>
|
14132
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
14133
|
+
</xsl:otherwise>
|
14134
|
+
</xsl:choose>
|
14039
14135
|
</xsl:when>
|
14040
14136
|
<xsl:otherwise>
|
14041
|
-
<xsl:
|
14137
|
+
<xsl:choose>
|
14138
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14139
|
+
<xsl:copy-of select="node()"/>
|
14140
|
+
</xsl:when>
|
14141
|
+
<xsl:otherwise>
|
14142
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
14143
|
+
</xsl:otherwise>
|
14144
|
+
</xsl:choose>
|
14042
14145
|
</xsl:otherwise>
|
14043
14146
|
</xsl:choose>
|
14044
14147
|
</xsl:element>
|
14045
14148
|
</xsl:template>
|
14046
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
14149
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
14047
14150
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
14048
14151
|
<xsl:copy-of select="@*"/>
|
14049
14152
|
<xsl:choose>
|
14050
14153
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
14051
|
-
<xsl:
|
14154
|
+
<xsl:choose>
|
14155
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14156
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
14157
|
+
</xsl:when>
|
14158
|
+
<xsl:otherwise>
|
14159
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
14160
|
+
</xsl:otherwise>
|
14161
|
+
</xsl:choose>
|
14052
14162
|
</xsl:when>
|
14053
14163
|
<xsl:otherwise>
|
14054
|
-
<xsl:
|
14164
|
+
<xsl:choose>
|
14165
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14166
|
+
<xsl:copy-of select="node()"/>
|
14167
|
+
</xsl:when>
|
14168
|
+
<xsl:otherwise>
|
14169
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
14170
|
+
</xsl:otherwise>
|
14171
|
+
</xsl:choose>
|
14055
14172
|
</xsl:otherwise>
|
14056
14173
|
</xsl:choose>
|
14057
14174
|
</xsl:element>
|
@@ -14146,6 +14263,9 @@
|
|
14146
14263
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
14147
14264
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
14148
14265
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
14266
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
14267
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
14268
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
14149
14269
|
|
14150
14270
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14151
14271
|
<xsl:copy>
|
@@ -14280,16 +14400,24 @@
|
|
14280
14400
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
14281
14401
|
<xsl:element name="title" namespace="{$namespace_full}">
|
14282
14402
|
<xsl:copy-of select="@*"/>
|
14403
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14404
|
+
|
14283
14405
|
<xsl:apply-templates mode="update_xml_step1"/>
|
14284
14406
|
</xsl:element>
|
14285
14407
|
</xsl:template>
|
14286
14408
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
14287
14409
|
<xsl:element name="title" namespace="{$namespace_full}">
|
14288
14410
|
<xsl:copy-of select="@*"/>
|
14411
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14412
|
+
|
14289
14413
|
<xsl:apply-templates mode="update_xml_pres"/>
|
14290
14414
|
</xsl:element>
|
14291
14415
|
</xsl:template>
|
14292
14416
|
|
14417
|
+
<xsl:template name="addNamedDestinationAttribute">
|
14418
|
+
|
14419
|
+
</xsl:template>
|
14420
|
+
|
14293
14421
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
14294
14422
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
14295
14423
|
<xsl:choose>
|
@@ -14299,6 +14427,8 @@
|
|
14299
14427
|
<xsl:otherwise>
|
14300
14428
|
<xsl:element name="name" namespace="{$namespace_full}">
|
14301
14429
|
<xsl:copy-of select="@*"/>
|
14430
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14431
|
+
|
14302
14432
|
<xsl:apply-templates mode="update_xml_step1"/>
|
14303
14433
|
</xsl:element>
|
14304
14434
|
</xsl:otherwise>
|
@@ -14312,6 +14442,8 @@
|
|
14312
14442
|
<xsl:otherwise>
|
14313
14443
|
<xsl:element name="name" namespace="{$namespace_full}">
|
14314
14444
|
<xsl:copy-of select="@*"/>
|
14445
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14446
|
+
|
14315
14447
|
<xsl:apply-templates mode="update_xml_pres"/>
|
14316
14448
|
</xsl:element>
|
14317
14449
|
</xsl:otherwise>
|
@@ -14416,6 +14548,20 @@
|
|
14416
14548
|
</xsl:element>
|
14417
14549
|
</xsl:template>
|
14418
14550
|
|
14551
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
14552
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
14553
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
14554
|
+
<xsl:copy-of select="@*"/>
|
14555
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
14556
|
+
</xsl:element>
|
14557
|
+
</xsl:template>
|
14558
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
14559
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
14560
|
+
<xsl:copy-of select="@*"/>
|
14561
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
14562
|
+
</xsl:element>
|
14563
|
+
</xsl:template>
|
14564
|
+
|
14419
14565
|
<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">
|
14420
14566
|
<xsl:apply-templates mode="update_xml_step1"/>
|
14421
14567
|
</xsl:template>
|
@@ -15776,6 +15922,30 @@
|
|
15776
15922
|
</xsl:attribute>
|
15777
15923
|
</xsl:template>
|
15778
15924
|
|
15925
|
+
<xsl:template name="setIDforNamedDestination">
|
15926
|
+
<xsl:if test="@named_dest">
|
15927
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
15928
|
+
</xsl:if>
|
15929
|
+
</xsl:template>
|
15930
|
+
|
15931
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
15932
|
+
<xsl:if test="@named_dest">
|
15933
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
15934
|
+
</xsl:if>
|
15935
|
+
</xsl:template>
|
15936
|
+
|
15937
|
+
<xsl:template name="setNamedDestination">
|
15938
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
15939
|
+
<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'">
|
15940
|
+
<fox:destination internal-destination="{@id}"/>
|
15941
|
+
</xsl:if>
|
15942
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
15943
|
+
<xsl:if test="@named_dest">
|
15944
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
15945
|
+
</xsl:if>
|
15946
|
+
</xsl:for-each>
|
15947
|
+
</xsl:template>
|
15948
|
+
|
15779
15949
|
<xsl:template name="add-letter-spacing">
|
15780
15950
|
<xsl:param name="text"/>
|
15781
15951
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Iec
|
3
3
|
class PresentationXMLConvert < IsoDoc::Iso::PresentationXMLConvert
|
4
|
-
def
|
5
|
-
@is_iev or return clause1(elem)
|
4
|
+
def iev_termclause1(elem)
|
6
5
|
@suppressheadingnumbers || elem["unnumbered"] or
|
7
6
|
lbl = @xrefs.anchor(elem["id"], :label, true)
|
8
7
|
if lbl
|
@@ -14,21 +14,18 @@ module IsoDoc
|
|
14
14
|
@i18n_lg["default"] = @i18n
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
"//acknowledgements | //colophon | //indexsect "))
|
21
|
-
.each do |f|
|
22
|
-
f.parent.name == "annex" &&
|
23
|
-
@xrefs.klass.single_term_clause?(f.parent) and next
|
24
|
-
clause1(f)
|
25
|
-
end
|
17
|
+
# KILL
|
18
|
+
def clausex(docxml)
|
19
|
+
super
|
26
20
|
docxml.xpath(ns("//terms")).each { |f| termclause1(f) }
|
27
21
|
end
|
28
22
|
|
29
23
|
def clause1(elem)
|
24
|
+
if elem.name == "terms" && @is_iev then iev_termclause1(elem)
|
25
|
+
else
|
30
26
|
IsoDoc::PresentationXMLConvert.instance_method(:clause1).bind(self)
|
31
27
|
.call(elem)
|
28
|
+
end
|
32
29
|
end
|
33
30
|
|
34
31
|
DICT_PATHS = { doctype_dict: "./ext/doctype",
|
@@ -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>
|
@@ -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-iec
|
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: bin
|
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-iso
|