metanorma-iec 1.2.15 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c57f323b74d44b8b41a9f2190aea21db6b67d03dd1e70e4bfedc71b01d705ea
4
- data.tar.gz: 6fb43df2606f8d5b542291b90d58453b8e8aab305fa38dc02e5cc4a369634bdc
3
+ metadata.gz: f08c3f37c821f3bd1cb589899e6fc5a240cedea8314df63683c0983476c7d675
4
+ data.tar.gz: 481dd653b8771e900a9c073612920e61e62b9f7b2f985c1bdfd8a71cdd99100a
5
5
  SHA512:
6
- metadata.gz: 4fabfd2ee4aa0c1eeeb12ac4fd345f2cea557278d61d2414d4874f427c3951c18ce2c0cbd002c8e3517f5fcb1267fe2b8eda96ee9829216ac8807a40c0b4ce18
7
- data.tar.gz: b2efc462cc9da6b4750ef00e9fe8e653360db113e3de3f1b42fbb5a93ae4f790d980f93e3cee36891ab5fe13a23c1c2e5cd24febaac429736764be76143dd6fc
6
+ metadata.gz: 0c31775a8855a6841150ede2338969ac8d95aa99c930aebc00bc78c0ddf421082b0231a2cf17b53783099033c0f4d0aee510efeeda3da0057dc731927d90c3ef
7
+ data.tar.gz: e627ac800e2b2471f559d9f43354524293983477276ddb34e22b37e99a58bfbc8d7bc84b27d58b372a7009d277ad6bce4442b94faaa2d93c4021eb52d9661154
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
@@ -16,50 +16,27 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.6', '2.5', '2.4' ]
19
+ ruby: [ '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
22
  include:
23
- - ruby: '2.7'
23
+ - ruby: '3.0'
24
24
  os: 'ubuntu-latest'
25
25
  experimental: true
26
- - ruby: '2.7'
26
+ - ruby: '3.0'
27
27
  os: 'windows-latest'
28
28
  experimental: true
29
- - ruby: '2.7'
29
+ - ruby: '3.0'
30
30
  os: 'macos-latest'
31
31
  experimental: true
32
32
  steps:
33
- - uses: actions/checkout@master
33
+ - uses: actions/checkout@v2
34
+ with:
35
+ submodules: true
34
36
 
35
37
  - uses: ruby/setup-ruby@v1
36
38
  with:
37
39
  ruby-version: ${{ matrix.ruby }}
38
-
39
- - if: matrix.os == 'macos-latest'
40
- run: brew install autoconf automake libtool
41
-
42
- - uses: actions/cache@v2
43
- with:
44
- path: vendor/bundle
45
- key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
46
- restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
47
-
48
- - run: bundle config set path 'vendor/bundle'
49
-
50
- - run: bundle install --jobs 4 --retry 3
40
+ bundler-cache: true
51
41
 
52
42
  - run: bundle exec rake
53
-
54
- tests-passed:
55
- needs: rake
56
- runs-on: ubuntu-latest
57
- steps:
58
- - name: Trigger tests passed event
59
- uses: Sibz/github-status-action@v1
60
- with:
61
- authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
62
- context: 'tests-passed-successfully'
63
- description: 'Tests passed successfully'
64
- state: 'success'
65
- sha: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -133,4 +133,9 @@
133
133
  </zeroOrMore>
134
134
  </element>
135
135
  </define>
136
+ <define name="updates_document_type">
137
+ <element name="updates-document-type">
138
+ <ref name="DocumentType"/>
139
+ </element>
140
+ </define>
136
141
  </grammar>
@@ -102,7 +102,7 @@
102
102
  </attribute>
103
103
  </optional>
104
104
  <oneOrMore>
105
- <ref name="li"/>
105
+ <ref name="ul_li"/>
106
106
  </oneOrMore>
107
107
  <zeroOrMore>
108
108
  <ref name="note"/>
@@ -1716,4 +1716,26 @@
1716
1716
  </zeroOrMore>
1717
1717
  </element>
1718
1718
  </define>
1719
+ <define name="ul_li">
1720
+ <element name="li">
1721
+ <optional>
1722
+ <attribute name="id">
1723
+ <data type="ID"/>
1724
+ </attribute>
1725
+ </optional>
1726
+ <optional>
1727
+ <attribute name="uncheckedcheckbox">
1728
+ <data type="boolean"/>
1729
+ </attribute>
1730
+ </optional>
1731
+ <optional>
1732
+ <attribute name="checkedcheckbox">
1733
+ <data type="boolean"/>
1734
+ </attribute>
1735
+ </optional>
1736
+ <oneOrMore>
1737
+ <ref name="BasicBlock"/>
1738
+ </oneOrMore>
1739
+ </element>
1740
+ </define>
1719
1741
  </grammar>
@@ -79,19 +79,6 @@
79
79
  </choice>
80
80
  </element>
81
81
  </define>
82
- <define name="ul">
83
- <element name="ul">
84
- <attribute name="id">
85
- <data type="ID"/>
86
- </attribute>
87
- <oneOrMore>
88
- <ref name="ul_li"/>
89
- </oneOrMore>
90
- <zeroOrMore>
91
- <ref name="note"/>
92
- </zeroOrMore>
93
- </element>
94
- </define>
95
82
  <define name="sections">
96
83
  <element name="sections">
97
84
  <zeroOrMore>
@@ -192,17 +179,6 @@
192
179
  </zeroOrMore>
193
180
  </element>
194
181
  </define>
195
- <define name="definition">
196
- <element name="definition">
197
- <oneOrMore>
198
- <choice>
199
- <ref name="paragraph"/>
200
- <ref name="figure"/>
201
- <ref name="formula"/>
202
- </choice>
203
- </oneOrMore>
204
- </element>
205
- </define>
206
182
  <define name="annex">
207
183
  <element name="annex">
208
184
  <optional>
@@ -333,6 +309,11 @@
333
309
  <optional>
334
310
  <attribute name="script"/>
335
311
  </optional>
312
+ <optional>
313
+ <attribute name="inline-header">
314
+ <data type="boolean"/>
315
+ </attribute>
316
+ </optional>
336
317
  <optional>
337
318
  <attribute name="obligation">
338
319
  <choice>
@@ -341,6 +322,12 @@
341
322
  </choice>
342
323
  </attribute>
343
324
  </optional>
325
+ <optional>
326
+ <attribute name="number"/>
327
+ </optional>
328
+ <optional>
329
+ <attribute name="type"/>
330
+ </optional>
344
331
  <optional>
345
332
  <ref name="section-title"/>
346
333
  </optional>
@@ -358,57 +345,6 @@
358
345
  </oneOrMore>
359
346
  </choice>
360
347
  </define>
361
- <define name="table">
362
- <element name="table">
363
- <attribute name="id">
364
- <data type="ID"/>
365
- </attribute>
366
- <optional>
367
- <attribute name="width"/>
368
- </optional>
369
- <optional>
370
- <attribute name="unnumbered">
371
- <data type="boolean"/>
372
- </attribute>
373
- </optional>
374
- <optional>
375
- <attribute name="number"/>
376
- </optional>
377
- <optional>
378
- <attribute name="subsequence"/>
379
- </optional>
380
- <optional>
381
- <attribute name="alt"/>
382
- </optional>
383
- <optional>
384
- <attribute name="summary"/>
385
- </optional>
386
- <optional>
387
- <attribute name="uri">
388
- <data type="anyURI"/>
389
- </attribute>
390
- </optional>
391
- <optional>
392
- <ref name="colgroup"/>
393
- </optional>
394
- <optional>
395
- <ref name="tname"/>
396
- </optional>
397
- <optional>
398
- <ref name="thead"/>
399
- </optional>
400
- <ref name="tbody"/>
401
- <optional>
402
- <ref name="tfoot"/>
403
- </optional>
404
- <zeroOrMore>
405
- <ref name="table-note"/>
406
- </zeroOrMore>
407
- <optional>
408
- <ref name="dl"/>
409
- </optional>
410
- </element>
411
- </define>
412
348
  </include>
413
349
  <!-- end overrides -->
414
350
  <!--
@@ -533,28 +469,6 @@
533
469
  <ref name="Clause-Section"/>
534
470
  </element>
535
471
  </define>
536
- <define name="ul_li">
537
- <element name="li">
538
- <optional>
539
- <attribute name="id">
540
- <data type="ID"/>
541
- </attribute>
542
- </optional>
543
- <optional>
544
- <attribute name="uncheckedcheckbox">
545
- <data type="boolean"/>
546
- </attribute>
547
- </optional>
548
- <optional>
549
- <attribute name="checkedcheckbox">
550
- <data type="boolean"/>
551
- </attribute>
552
- </optional>
553
- <oneOrMore>
554
- <ref name="BasicBlock"/>
555
- </oneOrMore>
556
- </element>
557
- </define>
558
472
  <define name="stagename">
559
473
  <element name="stagename">
560
474
  <text/>
@@ -3,6 +3,7 @@
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
+ <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
6
7
  <xsl:variable name="images" select="document($svg_images)"/>
7
8
 
8
9
 
@@ -215,7 +216,9 @@
215
216
  </fo:simple-page-master>
216
217
  </fo:layout-master-set>
217
218
 
218
- <xsl:call-template name="addPDFUAmeta"/>
219
+ <fo:declarations>
220
+ <xsl:call-template name="addPDFUAmeta"/>
221
+ </fo:declarations>
219
222
 
220
223
  <xsl:call-template name="addBookmarks">
221
224
  <xsl:with-param name="contents" select="$contents"/>
@@ -2736,6 +2739,7 @@
2736
2739
 
2737
2740
 
2738
2741
 
2742
+
2739
2743
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
2740
2744
 
2741
2745
  <xsl:attribute name="padding-right">10mm</xsl:attribute>
@@ -3362,7 +3366,15 @@
3362
3366
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
3363
3367
  <xsl:value-of select="@target"/>
3364
3368
  </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
3365
- <xsl:variable name="math_text" select="normalize-space(.)"/>
3369
+ <xsl:variable name="mathml">
3370
+ <xsl:for-each select="*">
3371
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
3372
+ <xsl:copy-of select="."/>
3373
+ </xsl:if>
3374
+ </xsl:for-each>
3375
+ </xsl:variable>
3376
+
3377
+ <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
3366
3378
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
3367
3379
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
3368
3380
  <xsl:param name="cols-count"/>
@@ -4402,6 +4414,10 @@
4402
4414
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
4403
4415
  <xsl:apply-templates/>
4404
4416
  </fo:inline>
4417
+ </xsl:template><xsl:template match="*[local-name()='hi']">
4418
+ <fo:inline background-color="yellow">
4419
+ <xsl:apply-templates/>
4420
+ </fo:inline>
4405
4421
  </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4406
4422
  <xsl:variable name="text" select="normalize-space(.)"/>
4407
4423
  <fo:inline font-size="75%">
@@ -4742,6 +4758,7 @@
4742
4758
  <xsl:apply-templates select="." mode="mathml"/>
4743
4759
  </xsl:variable>
4744
4760
  <fo:instream-foreign-object fox:alt-text="Math">
4761
+
4745
4762
  <!-- <xsl:copy-of select="."/> -->
4746
4763
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4747
4764
  </fo:instream-foreign-object>
@@ -4760,7 +4777,7 @@
4760
4777
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
4761
4778
  </xsl:copy>
4762
4779
  <mathml:mspace width="0.5ex"/>
4763
- </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4780
+ </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4764
4781
  <xsl:variable name="target">
4765
4782
  <xsl:choose>
4766
4783
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -4798,8 +4815,6 @@
4798
4815
  </xsl:otherwise>
4799
4816
  </xsl:choose>
4800
4817
  </fo:inline>
4801
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
4802
- <fo:inline id="{@id}"/>
4803
4818
  </xsl:template><xsl:template match="*[local-name()='appendix']">
4804
4819
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
4805
4820
  <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
@@ -5008,6 +5023,7 @@
5008
5023
  <fo:block id="{@id}">
5009
5024
  <xsl:apply-templates/>
5010
5025
  </fo:block>
5026
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
5011
5027
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
5012
5028
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
5013
5029
  <xsl:apply-templates/>
@@ -5591,10 +5607,11 @@
5591
5607
  </xsl:choose>
5592
5608
 
5593
5609
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5594
-
5610
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
5595
5611
  <xsl:variable name="element">
5596
5612
  block
5597
5613
 
5614
+
5598
5615
  </xsl:variable>
5599
5616
  <xsl:choose>
5600
5617
  <xsl:when test="normalize-space($element) = 'block'">
@@ -5698,29 +5715,47 @@
5698
5715
  <xsl:text>— </xsl:text>
5699
5716
  <xsl:apply-templates/>
5700
5717
  </xsl:template><xsl:template match="*[local-name() = 'eref']">
5701
- <fo:inline xsl:use-attribute-sets="eref-style">
5702
- <xsl:if test="@type = 'footnote'">
5703
-
5704
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5705
- <xsl:attribute name="font-size">80%</xsl:attribute>
5706
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5707
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5708
-
5709
-
5710
- </xsl:if>
5711
-
5712
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5713
-
5714
- <xsl:if test="@type = 'inline'">
5715
-
5716
-
5717
-
5718
- </xsl:if>
5719
-
5720
-
5721
- <xsl:apply-templates/>
5722
- </fo:basic-link>
5723
- </fo:inline>
5718
+
5719
+ <xsl:variable name="bibitemid">
5720
+ <xsl:choose>
5721
+ <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
5722
+ <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
5723
+ <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
5724
+ </xsl:choose>
5725
+ </xsl:variable>
5726
+
5727
+ <xsl:choose>
5728
+ <xsl:when test="normalize-space($bibitemid) != ''">
5729
+ <fo:inline xsl:use-attribute-sets="eref-style">
5730
+ <xsl:if test="@type = 'footnote'">
5731
+
5732
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5733
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5734
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5735
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5736
+
5737
+
5738
+ </xsl:if>
5739
+
5740
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5741
+ <xsl:if test="normalize-space(@citeas) = ''">
5742
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
5743
+ </xsl:if>
5744
+ <xsl:if test="@type = 'inline'">
5745
+
5746
+
5747
+
5748
+ </xsl:if>
5749
+
5750
+ <xsl:apply-templates/>
5751
+ </fo:basic-link>
5752
+
5753
+ </fo:inline>
5754
+ </xsl:when>
5755
+ <xsl:otherwise>
5756
+ <fo:inline><xsl:apply-templates/></fo:inline>
5757
+ </xsl:otherwise>
5758
+ </xsl:choose>
5724
5759
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
5725
5760
  <!-- zero-space char -->
5726
5761
  <xsl:variable name="depth">
@@ -5900,6 +5935,153 @@
5900
5935
  </fo:block>
5901
5936
  </xsl:otherwise>
5902
5937
  </xsl:choose>
5938
+ </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
5939
+ <xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
5940
+ <bookmark><xsl:value-of select="@id"/></bookmark>
5941
+ </xsl:for-each>
5942
+ </xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
5943
+ <xsl:copy>
5944
+ <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
5945
+ </xsl:copy>
5946
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
5947
+ <xsl:variable name="id">
5948
+ <xsl:call-template name="generateIndexXrefId"/>
5949
+ </xsl:variable>
5950
+ <xsl:copy> <!-- add id to xref -->
5951
+ <xsl:apply-templates select="@*" mode="index_add_id"/>
5952
+ <xsl:attribute name="id">
5953
+ <xsl:value-of select="$id"/>
5954
+ </xsl:attribute>
5955
+ <xsl:apply-templates mode="index_add_id"/>
5956
+ </xsl:copy>
5957
+ <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
5958
+ <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
5959
+ <xsl:if test="@to">
5960
+ <xsl:value-of select="$dash"/>
5961
+ <xsl:copy>
5962
+ <xsl:copy-of select="@*"/>
5963
+ <xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
5964
+ <xsl:attribute name="id">
5965
+ <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
5966
+ </xsl:attribute>
5967
+ <xsl:apply-templates mode="index_add_id"/>
5968
+ </xsl:copy>
5969
+ </xsl:if>
5970
+ </xsl:template><xsl:template match="@*|node()" mode="index_update">
5971
+ <xsl:copy>
5972
+ <xsl:apply-templates select="@*|node()" mode="index_update"/>
5973
+ </xsl:copy>
5974
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
5975
+ <xsl:copy>
5976
+ <xsl:apply-templates select="@*" mode="index_update"/>
5977
+ <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
5978
+ </xsl:copy>
5979
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
5980
+ <xsl:param name="element"/>
5981
+ <xsl:param name="remove" select="'false'"/>
5982
+ <xsl:param name="target"/>
5983
+ <!-- <node></node> -->
5984
+ <xsl:choose>
5985
+ <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
5986
+ <!-- skip text (i.e. remove it) and process next element -->
5987
+ <!-- [removed_<xsl:value-of select="."/>] -->
5988
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5989
+ <xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
5990
+ </xsl:apply-templates>
5991
+ </xsl:when>
5992
+ <xsl:when test="self::text()">
5993
+ <xsl:value-of select="."/>
5994
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5995
+ </xsl:when>
5996
+ <xsl:when test="self::* and local-name(.) = 'xref'">
5997
+ <xsl:variable name="id" select="@id"/>
5998
+ <xsl:variable name="page" select="$index//item[@id = $id]"/>
5999
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
6000
+ <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
6001
+
6002
+ <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
6003
+ <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
6004
+
6005
+ <xsl:choose>
6006
+ <!-- 2nd pass -->
6007
+ <!-- if page is equal to page for next and page is not the end of range -->
6008
+ <xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
6009
+ <!-- skip element (i.e. remove it) and remove next text ',' -->
6010
+ <!-- [removed_xref] -->
6011
+
6012
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
6013
+ <xsl:with-param name="remove">true</xsl:with-param>
6014
+ <xsl:with-param name="target">
6015
+ <xsl:choose>
6016
+ <xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
6017
+ <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
6018
+ </xsl:choose>
6019
+ </xsl:with-param>
6020
+ </xsl:apply-templates>
6021
+ </xsl:when>
6022
+
6023
+ <xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
6024
+ <!-- remove xref -->
6025
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
6026
+ <xsl:with-param name="remove">true</xsl:with-param>
6027
+ </xsl:apply-templates>
6028
+ </xsl:when>
6029
+
6030
+ <xsl:otherwise>
6031
+ <xsl:apply-templates select="." mode="xref_copy">
6032
+ <xsl:with-param name="target" select="$target"/>
6033
+ </xsl:apply-templates>
6034
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
6035
+ </xsl:otherwise>
6036
+ </xsl:choose>
6037
+ </xsl:when>
6038
+ <xsl:when test="self::* and local-name(.) = 'ul'">
6039
+ <!-- ul -->
6040
+ <xsl:apply-templates select="." mode="index_update"/>
6041
+ </xsl:when>
6042
+ <xsl:otherwise>
6043
+ <xsl:apply-templates select="." mode="xref_copy">
6044
+ <xsl:with-param name="target" select="$target"/>
6045
+ </xsl:apply-templates>
6046
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
6047
+ </xsl:otherwise>
6048
+ </xsl:choose>
6049
+ </xsl:template><xsl:template match="@*|node()" mode="xref_copy">
6050
+ <xsl:param name="target"/>
6051
+ <xsl:copy>
6052
+ <xsl:apply-templates select="@*" mode="xref_copy"/>
6053
+ <xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
6054
+ <xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
6055
+ </xsl:if>
6056
+ <xsl:apply-templates select="node()" mode="xref_copy"/>
6057
+ </xsl:copy>
6058
+ </xsl:template><xsl:template name="generateIndexXrefId">
6059
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
6060
+
6061
+ <xsl:variable name="docid">
6062
+ <xsl:call-template name="getDocumentId"/>
6063
+ </xsl:variable>
6064
+ <xsl:variable name="item_number">
6065
+ <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
6066
+ </xsl:variable>
6067
+ <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
6068
+ <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
6069
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
6070
+ <xsl:apply-templates/>
6071
+ <fo:block>
6072
+ <xsl:if test="following-sibling::*[local-name() = 'clause']">
6073
+ <fo:block> </fo:block>
6074
+ </xsl:if>
6075
+ </fo:block>
6076
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
6077
+ <xsl:apply-templates/>
6078
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
6079
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
6080
+ <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
6081
+ <xsl:apply-templates/>
6082
+ </fo:block>
6083
+ </xsl:template><xsl:template match="*[local-name() = 'bookmark']">
6084
+ <fo:inline id="{@id}"/>
5903
6085
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
5904
6086
  <!-- <row>
5905
6087
  <date>05-07-2013</date>
@@ -6116,70 +6298,68 @@
6116
6298
  <xsl:variable name="lang">
6117
6299
  <xsl:call-template name="getLang"/>
6118
6300
  </xsl:variable>
6119
- <fo:declarations>
6120
- <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
6121
- <pdf:dictionary type="normal" key="ViewerPreferences">
6122
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
6123
- </pdf:dictionary>
6124
- </pdf:catalog>
6125
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
6126
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
6127
- <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
6128
- <!-- Dublin Core properties go here -->
6129
- <dc:title>
6130
- <xsl:variable name="title">
6131
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6132
-
6133
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
6134
-
6135
-
6136
-
6137
-
6138
-
6139
-
6140
- </xsl:for-each>
6141
- </xsl:variable>
6142
- <xsl:choose>
6143
- <xsl:when test="normalize-space($title) != ''">
6144
- <xsl:value-of select="$title"/>
6145
- </xsl:when>
6146
- <xsl:otherwise>
6147
- <xsl:text> </xsl:text>
6148
- </xsl:otherwise>
6149
- </xsl:choose>
6150
- </dc:title>
6151
- <dc:creator>
6301
+ <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
6302
+ <pdf:dictionary type="normal" key="ViewerPreferences">
6303
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
6304
+ </pdf:dictionary>
6305
+ </pdf:catalog>
6306
+ <x:xmpmeta xmlns:x="adobe:ns:meta/">
6307
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
6308
+ <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
6309
+ <!-- Dublin Core properties go here -->
6310
+ <dc:title>
6311
+ <xsl:variable name="title">
6152
6312
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6153
6313
 
6154
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6155
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6156
- <xsl:if test="position() != last()">; </xsl:if>
6157
- </xsl:for-each>
6158
-
6314
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
6159
6315
 
6160
6316
 
6161
- </xsl:for-each>
6162
- </dc:creator>
6163
- <dc:description>
6164
- <xsl:variable name="abstract">
6165
6317
 
6166
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6167
6318
 
6168
6319
 
6169
- </xsl:variable>
6170
- <xsl:value-of select="normalize-space($abstract)"/>
6171
- </dc:description>
6172
- <pdf:Keywords>
6173
- <xsl:call-template name="insertKeywords"/>
6174
- </pdf:Keywords>
6175
- </rdf:Description>
6176
- <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
6177
- <!-- XMP properties go here -->
6178
- <xmp:CreatorTool/>
6179
- </rdf:Description>
6180
- </rdf:RDF>
6181
- </x:xmpmeta>
6182
- </fo:declarations>
6320
+
6321
+ </xsl:for-each>
6322
+ </xsl:variable>
6323
+ <xsl:choose>
6324
+ <xsl:when test="normalize-space($title) != ''">
6325
+ <xsl:value-of select="$title"/>
6326
+ </xsl:when>
6327
+ <xsl:otherwise>
6328
+ <xsl:text> </xsl:text>
6329
+ </xsl:otherwise>
6330
+ </xsl:choose>
6331
+ </dc:title>
6332
+ <dc:creator>
6333
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6334
+
6335
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6336
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6337
+ <xsl:if test="position() != last()">; </xsl:if>
6338
+ </xsl:for-each>
6339
+
6340
+
6341
+
6342
+ </xsl:for-each>
6343
+ </dc:creator>
6344
+ <dc:description>
6345
+ <xsl:variable name="abstract">
6346
+
6347
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6348
+
6349
+
6350
+ </xsl:variable>
6351
+ <xsl:value-of select="normalize-space($abstract)"/>
6352
+ </dc:description>
6353
+ <pdf:Keywords>
6354
+ <xsl:call-template name="insertKeywords"/>
6355
+ </pdf:Keywords>
6356
+ </rdf:Description>
6357
+ <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
6358
+ <!-- XMP properties go here -->
6359
+ <xmp:CreatorTool/>
6360
+ </rdf:Description>
6361
+ </rdf:RDF>
6362
+ </x:xmpmeta>
6183
6363
  </xsl:template><xsl:template name="getId">
6184
6364
  <xsl:choose>
6185
6365
  <xsl:when test="../@id">
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "1.2.15"
3
+ VERSION = "1.2.16"
4
4
  end
5
5
  end
6
6
 
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
36
  spec.add_development_dependency "guard", "~> 2.14"
37
37
  spec.add_development_dependency "guard-rspec", "~> 4.7"
38
- spec.add_development_dependency "rake", "~> 12.0"
38
+ spec.add_development_dependency "rake", "~> 13.0"
39
39
  spec.add_development_dependency "rspec", "~> 3.6"
40
40
  spec.add_development_dependency "rubocop", "= 0.54.0"
41
41
  spec.add_development_dependency "simplecov", "~> 0.15"
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: 1.2.15
4
+ version: 1.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-22 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '12.0'
117
+ version: '13.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '12.0'
124
+ version: '13.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement