metanorma-iec 1.2.9 → 1.2.10

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: 1facfa130e99efe5c781d228b39853ceeb4b805391e02b0beb49766b4af0951c
4
- data.tar.gz: e579a5dc4fcaa6bc3df2f7011c93beabcdcd9ef71146e939312623d884b6b863
3
+ metadata.gz: dd81462a8db0750a95d8a1c6546fc3511d7e14218edea0526bc5f9ea604c2dd7
4
+ data.tar.gz: 4cf9b505fce98aaf9752f8dd240c67de1c3e83f5e9dd0972dd217942f99628b1
5
5
  SHA512:
6
- metadata.gz: 6a55ff1b90d0e8993e8bb8699cffd52cea344c63fc08ffb66865a1c25f4ac39598b76fe790b6c0d594b92abf6810c9c21766d9b3076d6b7654b0dce6bc09353c
7
- data.tar.gz: 295aadfd9752db496ff98fd09cf979746c84c97cdf9512cc0fde596fb95a36d70bdd4b6b7c933f7953198e1d066624bb86a60cf95171e5e33894af1e50b75a1a
6
+ metadata.gz: a2dcf92627d826fb3a6e0ce5f617c1a24eecb2cd77e215409ae04038af31a917992842b3cda08ce19db393585fc4c33701fa71061394c1f7d016f6d9ff2f804b
7
+ data.tar.gz: 5feb332fe4695e20c3ff71f62e5842c94db2a3caef09843097e384c35a84e4d6e53affb764ba5d230a95d14d6ae34c96dfa9d952bddf1272f8ccc1c4fd4107d9
@@ -596,6 +596,7 @@
596
596
  <ref name="bookmark"/>
597
597
  <ref name="image"/>
598
598
  <ref name="index"/>
599
+ <ref name="index-xref"/>
599
600
  </choice>
600
601
  </define>
601
602
  <define name="PureTextElement">
@@ -737,6 +738,37 @@
737
738
  </optional>
738
739
  </element>
739
740
  </define>
741
+ <define name="index-xref">
742
+ <element name="index-xref">
743
+ <attribute name="also">
744
+ <data type="boolean"/>
745
+ </attribute>
746
+ <element name="primary">
747
+ <oneOrMore>
748
+ <ref name="PureTextElement"/>
749
+ </oneOrMore>
750
+ </element>
751
+ <optional>
752
+ <element name="secondary">
753
+ <oneOrMore>
754
+ <ref name="PureTextElement"/>
755
+ </oneOrMore>
756
+ </element>
757
+ </optional>
758
+ <optional>
759
+ <element name="tertiary">
760
+ <oneOrMore>
761
+ <ref name="PureTextElement"/>
762
+ </oneOrMore>
763
+ </element>
764
+ </optional>
765
+ <element name="target">
766
+ <oneOrMore>
767
+ <ref name="PureTextElement"/>
768
+ </oneOrMore>
769
+ </element>
770
+ </element>
771
+ </define>
740
772
  <!-- bare ID element, used for referencing arbitrary spans of text -->
741
773
  <define name="bookmark">
742
774
  <element name="bookmark">
@@ -223,6 +223,12 @@ module Asciidoctor
223
223
  xml.horizontal (node.attr("horizontal") || "false")
224
224
  a = node.attr("function") and xml.function a
225
225
  end
226
+
227
+ def metadata_ext(node, xml)
228
+ super
229
+ a = node.attr("accessibility-color-inside") and xml.accessibility_color_inside a
230
+ a = node.attr("price-code") and xml.price_code a
231
+ end
226
232
  end
227
233
  end
228
234
  end
@@ -34,6 +34,12 @@
34
34
  <optional>
35
35
  <ref name="updates_document_type"/>
36
36
  </optional>
37
+ <optional>
38
+ <ref name="accessibility-color-inside"/>
39
+ </optional>
40
+ <optional>
41
+ <ref name="price-code"/>
42
+ </optional>
37
43
  </define>
38
44
  </include>
39
45
  <!-- end overrides -->
@@ -52,6 +58,16 @@
52
58
  <data type="boolean"/>
53
59
  </element>
54
60
  </define>
61
+ <define name="accessibility-color-inside">
62
+ <element name="accessibility-color-inside">
63
+ <data type="boolean"/>
64
+ </element>
65
+ </define>
66
+ <define name="price-code">
67
+ <element name="price-code">
68
+ <text/>
69
+ </element>
70
+ </define>
55
71
  <!--
56
72
  We display the Normative References between scope and terms; but to keep the
57
73
  grammar simple, we keep the references together
@@ -246,6 +246,9 @@
246
246
  <data type="boolean"/>
247
247
  </attribute>
248
248
  </optional>
249
+ <optional>
250
+ <ref name="colgroup"/>
251
+ </optional>
249
252
  <optional>
250
253
  <ref name="tname"/>
251
254
  </optional>
@@ -764,6 +767,18 @@
764
767
  </define>
765
768
  </include>
766
769
  <!-- end overrides -->
770
+ <define name="colgroup">
771
+ <element name="colgroup">
772
+ <oneOrMore>
773
+ <ref name="col"/>
774
+ </oneOrMore>
775
+ </element>
776
+ </define>
777
+ <define name="col">
778
+ <element name="col">
779
+ <attribute name="width"/>
780
+ </element>
781
+ </define>
767
782
  <define name="TextElement" combine="choice">
768
783
  <ref name="concept"/>
769
784
  </define>
@@ -382,6 +382,9 @@
382
382
  <data type="anyURI"/>
383
383
  </attribute>
384
384
  </optional>
385
+ <optional>
386
+ <ref name="colgroup"/>
387
+ </optional>
385
388
  <optional>
386
389
  <ref name="tname"/>
387
390
  </optional>
@@ -5,6 +5,7 @@ IEC: INTERNATIONAL ELECTROTECHNICAL COMMISSION
5
5
  formula: Equation
6
6
  inequality: Inequality
7
7
  section_iev: Section
8
+ price-code: Price Code
8
9
  term_def_boilerplate: |
9
10
  <p>ISO and IEC maintain terminological databases for use in
10
11
  standardization at the following addresses:</p>
@@ -5,6 +5,7 @@ formula: Equation
5
5
  inequality: Inégalité
6
6
  IEC: COMMISSION ELECTROTECHNIQUE INTERNATIONALE
7
7
  section_iev: Section
8
+ price-code: Code prix
8
9
  term_def_boilerplate: |
9
10
  <p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
10
11
  destinées à être utilisées en normalisation, consultables aux adresses
@@ -486,12 +486,22 @@
486
486
  <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
487
487
  <fo:table-cell font-size="8pt" text-align="right" display-align="center">
488
488
  <fo:block>
489
- <fo:block color="{$color_blue}" margin-bottom="3pt">PRICE CODE</fo:block>
490
- <fo:block>CODE PRIX</fo:block>
489
+ <fo:block color="{$color_blue}" margin-bottom="3pt">
490
+ <!-- PRICE CODE -->
491
+ <xsl:variable name="price_code">
492
+ <xsl:call-template name="getLocalizedString">
493
+ <xsl:with-param name="key">price-code</xsl:with-param>
494
+ </xsl:call-template>
495
+ </xsl:variable>
496
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
497
+ </fo:block>
498
+ <xsl:if test="$lang != 'fr'">
499
+ <fo:block>CODE PRIX</fo:block>
500
+ </xsl:if>
491
501
  </fo:block>
492
502
  </fo:table-cell>
493
503
  <fo:table-cell font-size="25pt" font-weight="bold" color="{$color_gray}" text-align="right" display-align="center">
494
- <fo:block padding-top="1mm">XC</fo:block>
504
+ <fo:block padding-top="1mm"><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:price-code"/></fo:block>
495
505
  </fo:table-cell>
496
506
  </fo:table-row>
497
507
  </fo:table-body>
@@ -1151,7 +1161,9 @@
1151
1161
  <fo:block-container margin-left="0mm">
1152
1162
  <fo:block-container height="6mm">
1153
1163
  <fo:block text-align="right" margin-top="-4.5mm" margin-right="-1mm">
1154
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Colour-Inside))}" width="19mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/>
1164
+ <xsl:if test="/iec:iec-standard/iec:bibdata/iec:ext/iec:accessibility-color-inside = 'true'">
1165
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Colour-Inside))}" width="19mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/>
1166
+ </xsl:if>
1155
1167
  </fo:block>
1156
1168
  </fo:block-container>
1157
1169
  <fo:block-container border-bottom="0.5pt solid {$color_gray}" margin-top="4mm" margin-bottom="16pt" height="14mm" display-align="center">
@@ -1911,10 +1923,10 @@
1911
1923
  <xsl:otherwise> <!-- for ordered lists -->
1912
1924
  <xsl:choose>
1913
1925
  <xsl:when test="../@type = 'arabic'">
1914
- <xsl:number format="a)"/>
1926
+ <xsl:number format="a)" lang="en"/>
1915
1927
  </xsl:when>
1916
1928
  <xsl:when test="../@type = 'alphabet'">
1917
- <xsl:number format="a)"/>
1929
+ <xsl:number format="a)" lang="en"/>
1918
1930
  </xsl:when>
1919
1931
  <xsl:otherwise>
1920
1932
  <xsl:number format="1)"/>
@@ -2800,10 +2812,12 @@
2800
2812
 
2801
2813
 
2802
2814
  <xsl:variable name="colwidths">
2803
- <xsl:call-template name="calculate-column-widths">
2804
- <xsl:with-param name="cols-count" select="$cols-count"/>
2805
- <xsl:with-param name="table" select="$simple-table"/>
2806
- </xsl:call-template>
2815
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2816
+ <xsl:call-template name="calculate-column-widths">
2817
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2818
+ <xsl:with-param name="table" select="$simple-table"/>
2819
+ </xsl:call-template>
2820
+ </xsl:if>
2807
2821
  </xsl:variable>
2808
2822
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2809
2823
 
@@ -2879,16 +2893,25 @@
2879
2893
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2880
2894
  </xsl:if>
2881
2895
 
2882
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2883
- <xsl:choose>
2884
- <xsl:when test=". = 1 or . = 0">
2885
- <fo:table-column column-width="proportional-column-width(2)"/>
2886
- </xsl:when>
2887
- <xsl:otherwise>
2888
- <fo:table-column column-width="proportional-column-width({.})"/>
2889
- </xsl:otherwise>
2890
- </xsl:choose>
2891
- </xsl:for-each>
2896
+ <xsl:choose>
2897
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2898
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2899
+ <fo:table-column column-width="{@width}"/>
2900
+ </xsl:for-each>
2901
+ </xsl:when>
2902
+ <xsl:otherwise>
2903
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2904
+ <xsl:choose>
2905
+ <xsl:when test=". = 1 or . = 0">
2906
+ <fo:table-column column-width="proportional-column-width(2)"/>
2907
+ </xsl:when>
2908
+ <xsl:otherwise>
2909
+ <fo:table-column column-width="proportional-column-width({.})"/>
2910
+ </xsl:otherwise>
2911
+ </xsl:choose>
2912
+ </xsl:for-each>
2913
+ </xsl:otherwise>
2914
+ </xsl:choose>
2892
2915
 
2893
2916
  <xsl:choose>
2894
2917
  <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
@@ -2901,10 +2924,12 @@
2901
2924
 
2902
2925
  </fo:table>
2903
2926
 
2927
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2904
2928
  <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2905
2929
  <xsl:call-template name="insertTableFooterInSeparateTable">
2906
2930
  <xsl:with-param name="table_attributes" select="$table_attributes"/>
2907
2931
  <xsl:with-param name="colwidths" select="$colwidths"/>
2932
+ <xsl:with-param name="colgroup" select="$colgroup"/>
2908
2933
  </xsl:call-template>
2909
2934
  </xsl:for-each>
2910
2935
 
@@ -3170,12 +3195,22 @@
3170
3195
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
3171
3196
  <xsl:param name="table_attributes"/>
3172
3197
  <xsl:param name="colwidths"/>
3198
+ <xsl:param name="colgroup"/>
3173
3199
 
3174
3200
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3175
3201
 
3176
3202
  <xsl:if test="$isNoteOrFnExist = 'true'">
3177
3203
 
3178
- <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
3204
+ <xsl:variable name="cols-count">
3205
+ <xsl:choose>
3206
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3207
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
3208
+ </xsl:when>
3209
+ <xsl:otherwise>
3210
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
3211
+ </xsl:otherwise>
3212
+ </xsl:choose>
3213
+ </xsl:variable>
3179
3214
 
3180
3215
  <fo:table keep-with-previous="always">
3181
3216
  <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
@@ -3193,16 +3228,25 @@
3193
3228
  </xsl:choose>
3194
3229
  </xsl:for-each>
3195
3230
 
3196
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3197
- <xsl:choose>
3198
- <xsl:when test=". = 1 or . = 0">
3199
- <fo:table-column column-width="proportional-column-width(2)"/>
3200
- </xsl:when>
3201
- <xsl:otherwise>
3202
- <fo:table-column column-width="proportional-column-width({.})"/>
3203
- </xsl:otherwise>
3204
- </xsl:choose>
3205
- </xsl:for-each>
3231
+ <xsl:choose>
3232
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3233
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3234
+ <fo:table-column column-width="{@width}"/>
3235
+ </xsl:for-each>
3236
+ </xsl:when>
3237
+ <xsl:otherwise>
3238
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3239
+ <xsl:choose>
3240
+ <xsl:when test=". = 1 or . = 0">
3241
+ <fo:table-column column-width="proportional-column-width(2)"/>
3242
+ </xsl:when>
3243
+ <xsl:otherwise>
3244
+ <fo:table-column column-width="proportional-column-width({.})"/>
3245
+ </xsl:otherwise>
3246
+ </xsl:choose>
3247
+ </xsl:for-each>
3248
+ </xsl:otherwise>
3249
+ </xsl:choose>
3206
3250
 
3207
3251
  <fo:table-body>
3208
3252
  <fo:table-row>
@@ -5494,7 +5538,8 @@
5494
5538
  <fo:table-column column-width="107mm"/>
5495
5539
  <fo:table-column column-width="15mm"/>
5496
5540
  <fo:table-body>
5497
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
5541
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
5542
+
5498
5543
  <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
5499
5544
  <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
5500
5545
  <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
@@ -5512,6 +5557,10 @@
5512
5557
  <fo:block><xsl:apply-templates/></fo:block>
5513
5558
  </fo:table-cell>
5514
5559
  </xsl:template><xsl:template name="processBibitem">
5560
+
5561
+
5562
+ <!-- end BIPM bibitem processing-->
5563
+
5515
5564
 
5516
5565
 
5517
5566
 
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "1.2.9"
3
+ VERSION = "1.2.10"
4
4
  end
5
5
  end
6
6
 
@@ -91,6 +91,8 @@ RSpec.describe Asciidoctor::Iec do
91
91
  :title-main-fr: Titre Principal
92
92
  :title-part-fr: Part du Titre
93
93
  :library-ics: 1,2,3
94
+ :accessibility-color-inside: true
95
+ :price-code: XC
94
96
  INPUT
95
97
  <?xml version="1.0" encoding="UTF-8"?>
96
98
  <iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
@@ -165,6 +167,8 @@ RSpec.describe Asciidoctor::Iec do
165
167
  <project-number part="1">IEC 1000</project-number>
166
168
  </structuredidentifier>
167
169
  <stagename>New work item proposal</stagename>
170
+ <accessibility-color-inside>true</accessibility-color-inside>
171
+ <price-code>XC</price-code>
168
172
  </ext>
169
173
  </bibdata>
170
174
  #{UNPUBLISHED_BOILERPLATE}
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.9
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-30 00:00:00.000000000 Z
11
+ date: 2020-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing