metanorma-iec 2.5.1 → 2.5.2

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: 00d1e56afb7f66bfb86d1e6c57b54a28a11c9cfc3990a9796cd30b4a54a24ee4
4
- data.tar.gz: 654de21e8c76671f7d0e2ec201089860300c4e57099646c50d815bbb1f6b8d94
3
+ metadata.gz: a4e36585fc138ffd8d9480510273706fbbef69781293f80612ed04a19eeaaff6
4
+ data.tar.gz: f5f328461f46ea6ed2cfc7b08c79a819e89e8444f8fe14475569dde6c95dd756
5
5
  SHA512:
6
- metadata.gz: aa7ed1d60eac6a24d07e112ad842967400d388bed1f8d0572c6e3d9fba1cbc167c203170384c35fa2be059e9ac4c756b3b3b46af9385db38d2fd46e52f085040
7
- data.tar.gz: 98ffd97be8b513b64aa71c96ec90fda073ab41ab577dda5dd107f5759794c4bb97008decf9cddb46b16c80aef1e51c203534a2e59feadeb2d7bdd1d217fbc62a
6
+ metadata.gz: 45b1bf15e417d06bdc94fbb30de8cca2c13804e18bdb5c54c630ce86133ea919461e278a27f26ad33ba231d29ca884703d5d74bd104ac25df8ece6d23d3d6b46
7
+ data.tar.gz: 7483ba3a26e8181cd7218f43e6608ded21652aba5b85aa44f6baca9e6d95d1a2b85b6c557d359046e26e0b70ba05b9e4899502a71a30a3fd75be57ba0f9c6ae7
@@ -10,16 +10,10 @@ title: Title
10
10
  proposed_stability_date: PROPOSED STABILITY DATE
11
11
  tc_sc_note: Note from TC/SC officers
12
12
  term_def_boilerplate: |
13
- <p>ISO and IEC maintain terminological databases for use in
14
- standardization at the following addresses:</p>
13
+ ISO and IEC maintain terminological databases for use in standardization at the following addresses:
15
14
 
16
- <ul>
17
- <li> <p>IEC Electropedia: available at
18
- <link target="http://www.electropedia.org"/>
19
- </p> </li>
20
- <li> <p>ISO Online browsing platform: available at
21
- <link target="http://www.iso.org/obp"/></p> </li>
22
- </ul>
15
+ * IEC Electropedia: available at http://www.electropedia.org[]
16
+ * ISO Online browsing platform: available at http://www.iso.org/obp[]
23
17
  doctype_dict:
24
18
  international-standard: International Standard
25
19
  technical-specification: Technical Specification
@@ -10,16 +10,12 @@ title: Titre
10
10
  proposed_stability_date: DATE DE STABILITÉ PROPOSÉE
11
11
  tc_sc_note: Note des officiers TC/SC
12
12
  term_def_boilerplate: |
13
- <p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
14
- destinées à être utilisées en normalisation, consultables aux adresses
15
- suivantes:</p>
16
- <ul>
17
- <li> <p>IEC Electropedia: disponible à l'adresse
18
- <link target="http://www.electropedia.org"/>
19
- </p> </li>
20
- <li> <p>ISO Online browsing platform: disponible à l'adresse
21
- <link target="http://www.iso.org/obp"/></p> </li>
22
- </ul>
13
+ L'ISO et l'IEC tiennent à jour des bases de données terminologiques
14
+ destinées à être utilisées en normalisation, consultables aux adresses
15
+ suivantes:
16
+
17
+ * IEC Electropedia: disponible à l'adresse http://www.electropedia.org[]
18
+ * ISO Online browsing platform: disponible à l'adresse http://www.iso.org/obp[]
23
19
  doctype_dict:
24
20
  international-standard: Norme internationale
25
21
  technical-specification: Spécification technique
@@ -7,11 +7,7 @@ title: 标题
7
7
  proposed_stability_date: 建议的稳定日期
8
8
  tc_sc_note: TC/SC 官员的说明
9
9
  term_def_boilerplate: |
10
- <p>ISO和IEC用于标准化的术语数据库地址如下:</p>
11
- <ul>
12
- <li> <p>IEC Electropedia:
13
- 位于<link target="http://www.electropedia.org"/>
14
- </p> </li>
15
- <li> <p>ISO在线浏览平台:
16
- 位于<link target="http://www.iso.org/obp"/></p></li>
17
- </ul>
10
+ ISO和IEC用于标准化的术语数据库地址如下:
11
+
12
+ * IEC Electropedia: 位于{blank}http://www.electropedia.org[]
13
+ * ISO在线浏览平台: 位于{blank}http://www.iso.org/obp[]
@@ -8413,6 +8413,12 @@
8413
8413
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
8414
8414
  <attachment filename="{@name}"/>
8415
8415
  </xsl:for-each>
8416
+ <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
8417
+ <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
8418
+ <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
8419
+ <attachment filename="{$attachment_path}"/>
8420
+ </xsl:for-each>
8421
+ </xsl:if>
8416
8422
  </xsl:variable>
8417
8423
  <xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
8418
8424
 
@@ -8425,7 +8431,7 @@
8425
8431
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
8426
8432
  </xsl:when>
8427
8433
  <!-- link to the PDF attachment -->
8428
- <xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
8434
+ <xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
8429
8435
  <xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
8430
8436
  </xsl:when>
8431
8437
  <!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
@@ -9076,7 +9082,16 @@
9076
9082
  </xsl:variable>
9077
9083
  <xsl:variable name="img_src">
9078
9084
  <xsl:choose>
9079
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
9085
+ <xsl:when test="not(starts-with(@src, 'data:'))">
9086
+ <xsl:choose>
9087
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9088
+ <xsl:value-of select="@src"/>
9089
+ </xsl:when>
9090
+ <xsl:otherwise>
9091
+ <xsl:value-of select="concat($basepath, @src)"/>
9092
+ </xsl:otherwise>
9093
+ </xsl:choose>
9094
+ </xsl:when>
9080
9095
  <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
9081
9096
  </xsl:choose>
9082
9097
  </xsl:variable>
@@ -9089,7 +9104,7 @@
9089
9104
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
9090
9105
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
9091
9106
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
9092
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9107
+ <xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9093
9108
  <xsl:value-of select="$scale"/>
9094
9109
  </xsl:template>
9095
9110
 
@@ -9108,7 +9123,14 @@
9108
9123
  <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
9109
9124
  </xsl:when>
9110
9125
  <xsl:when test="not(starts-with(@src, 'data:'))">
9111
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9126
+ <xsl:choose>
9127
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9128
+ <xsl:value-of select="concat('url(file:///', @src, ')')"/>
9129
+ </xsl:when>
9130
+ <xsl:otherwise>
9131
+ <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9132
+ </xsl:otherwise>
9133
+ </xsl:choose>
9112
9134
  </xsl:when>
9113
9135
  <xsl:otherwise>
9114
9136
  <xsl:value-of select="@src"/>
@@ -9130,7 +9152,14 @@
9130
9152
  </xsl:when>
9131
9153
  <xsl:when test="not(starts-with(@src, 'data:'))">
9132
9154
  <xsl:variable name="src">
9133
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9155
+ <xsl:choose>
9156
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9157
+ <xsl:value-of select="concat('url(file:///', @src, ')')"/>
9158
+ </xsl:when>
9159
+ <xsl:otherwise>
9160
+ <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9161
+ </xsl:otherwise>
9162
+ </xsl:choose>
9134
9163
  </xsl:variable>
9135
9164
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
9136
9165
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
@@ -13935,26 +13964,37 @@
13935
13964
  </x:xmpmeta>
13936
13965
  <!-- add attachments -->
13937
13966
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
13938
- <xsl:choose>
13939
- <xsl:when test="normalize-space() != ''">
13940
- <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
13941
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
13942
- </xsl:when>
13943
- <xsl:otherwise>
13944
- <!-- _{filename}_attachments -->
13945
- <!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
13946
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
13947
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
13948
- </xsl:otherwise>
13949
- </xsl:choose>
13967
+ <xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
13968
+
13969
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
13970
+ <xsl:attribute name="src">
13971
+ <xsl:choose>
13972
+ <xsl:when test="normalize-space() != ''">
13973
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
13974
+ <xsl:value-of select="$src_attachment"/>
13975
+ </xsl:when>
13976
+ <xsl:otherwise>
13977
+ <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
13978
+ <xsl:value-of select="$url"/>
13979
+ </xsl:otherwise>
13980
+ </xsl:choose>
13981
+ </xsl:attribute>
13982
+ <xsl:if test="$description != ''">
13983
+ <xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
13984
+ </xsl:if>
13985
+ </pdf:embedded-file>
13950
13986
  </xsl:for-each>
13951
13987
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
13952
13988
  <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
13953
13989
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
13954
13990
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
13955
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, $attachment_path, ')')"/>
13956
- <xsl:variable name="filename_embedded" select="substring-after($attachment_path, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
13957
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$filename_embedded}"/>
13991
+ <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
13992
+ <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
13993
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
13994
+ <xsl:if test="$description != ''">
13995
+ <xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
13996
+ </xsl:if>
13997
+ </pdf:embedded-file>
13958
13998
  </xsl:for-each>
13959
13999
  </xsl:if>
13960
14000
  </xsl:template> <!-- addPDFUAmeta -->
@@ -14332,7 +14372,14 @@
14332
14372
  <xsl:value-of select="$src"/>
14333
14373
  </xsl:when>
14334
14374
  <xsl:otherwise>
14335
- <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
14375
+ <xsl:choose>
14376
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
14377
+ <xsl:value-of select="concat('url(file:///', @src, ')')"/>
14378
+ </xsl:when>
14379
+ <xsl:otherwise>
14380
+ <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
14381
+ </xsl:otherwise>
14382
+ </xsl:choose>
14336
14383
  </xsl:otherwise>
14337
14384
  </xsl:choose>
14338
14385
  </xsl:template>
@@ -1000,14 +1000,14 @@
1000
1000
  <define name="PureTextElement">
1001
1001
  <choice>
1002
1002
  <text/>
1003
- <ref name="em"/>
1004
- <ref name="strong"/>
1003
+ <ref name="pure_em"/>
1004
+ <ref name="pure_strong"/>
1005
1005
  <ref name="sub"/>
1006
1006
  <ref name="sup"/>
1007
- <ref name="tt"/>
1008
- <ref name="underline"/>
1009
- <ref name="strike"/>
1010
- <ref name="smallcap"/>
1007
+ <ref name="pure_tt"/>
1008
+ <ref name="pure_underline"/>
1009
+ <ref name="pure_strike"/>
1010
+ <ref name="pure_smallcap"/>
1011
1011
  <ref name="br"/>
1012
1012
  </choice>
1013
1013
  </define>
@@ -1031,6 +1031,13 @@
1031
1031
  </zeroOrMore>
1032
1032
  </element>
1033
1033
  </define>
1034
+ <define name="pure_em">
1035
+ <element name="em">
1036
+ <zeroOrMore>
1037
+ <ref name="PureTextElement"/>
1038
+ </zeroOrMore>
1039
+ </element>
1040
+ </define>
1034
1041
  <define name="strong">
1035
1042
  <element name="strong">
1036
1043
  <zeroOrMore>
@@ -1046,6 +1053,13 @@
1046
1053
  </zeroOrMore>
1047
1054
  </element>
1048
1055
  </define>
1056
+ <define name="pure_strong">
1057
+ <element name="strong">
1058
+ <zeroOrMore>
1059
+ <ref name="PureTextElement"/>
1060
+ </zeroOrMore>
1061
+ </element>
1062
+ </define>
1049
1063
  <define name="tt">
1050
1064
  <element name="tt">
1051
1065
  <zeroOrMore>
@@ -1060,6 +1074,13 @@
1060
1074
  </zeroOrMore>
1061
1075
  </element>
1062
1076
  </define>
1077
+ <define name="pure_tt">
1078
+ <element name="tt">
1079
+ <zeroOrMore>
1080
+ <ref name="PureTextElement"/>
1081
+ </zeroOrMore>
1082
+ </element>
1083
+ </define>
1063
1084
  <define name="keyword">
1064
1085
  <element name="keyword">
1065
1086
  <zeroOrMore>
@@ -1090,13 +1111,42 @@
1090
1111
  <zeroOrMore>
1091
1112
  <choice>
1092
1113
  <ref name="PureTextElement"/>
1114
+ <ref name="stem"/>
1115
+ <ref name="eref"/>
1116
+ <ref name="xref"/>
1117
+ <ref name="hyperlink"/>
1093
1118
  <ref name="index"/>
1094
1119
  <ref name="index-xref"/>
1095
1120
  </choice>
1096
1121
  </zeroOrMore>
1097
1122
  </element>
1098
1123
  </define>
1124
+ <define name="pure_strike">
1125
+ <element name="strike">
1126
+ <zeroOrMore>
1127
+ <ref name="PureTextElement"/>
1128
+ </zeroOrMore>
1129
+ </element>
1130
+ </define>
1099
1131
  <define name="underline">
1132
+ <element name="underline">
1133
+ <optional>
1134
+ <attribute name="style"/>
1135
+ </optional>
1136
+ <zeroOrMore>
1137
+ <choice>
1138
+ <ref name="PureTextElement"/>
1139
+ <ref name="stem"/>
1140
+ <ref name="eref"/>
1141
+ <ref name="xref"/>
1142
+ <ref name="hyperlink"/>
1143
+ <ref name="index"/>
1144
+ <ref name="index-xref"/>
1145
+ </choice>
1146
+ </zeroOrMore>
1147
+ </element>
1148
+ </define>
1149
+ <define name="pure_underline">
1100
1150
  <element name="underline">
1101
1151
  <optional>
1102
1152
  <attribute name="style"/>
@@ -1107,6 +1157,21 @@
1107
1157
  </element>
1108
1158
  </define>
1109
1159
  <define name="smallcap">
1160
+ <element name="smallcap">
1161
+ <zeroOrMore>
1162
+ <choice>
1163
+ <ref name="PureTextElement"/>
1164
+ <ref name="stem"/>
1165
+ <ref name="eref"/>
1166
+ <ref name="xref"/>
1167
+ <ref name="hyperlink"/>
1168
+ <ref name="index"/>
1169
+ <ref name="index-xref"/>
1170
+ </choice>
1171
+ </zeroOrMore>
1172
+ </element>
1173
+ </define>
1174
+ <define name="pure_smallcap">
1110
1175
  <element name="smallcap">
1111
1176
  <zeroOrMore>
1112
1177
  <ref name="PureTextElement"/>
@@ -1204,7 +1204,9 @@
1204
1204
  <optional>
1205
1205
  <ref name="formattedref"/>
1206
1206
  </optional>
1207
- <ref name="btitle"/>
1207
+ <oneOrMore>
1208
+ <ref name="btitle"/>
1209
+ </oneOrMore>
1208
1210
  <optional>
1209
1211
  <ref name="bplace"/>
1210
1212
  </optional>
@@ -92,6 +92,11 @@ module Metanorma
92
92
  super unless @is_iev
93
93
  end
94
94
 
95
+ def terms_terms_cleanup(xmldoc)
96
+ @is_iev and return
97
+ super
98
+ end
99
+
95
100
  def sections_names_pref_cleanup(xml)
96
101
  super
97
102
  @is_iev and replace_title(xml, "//introduction",
@@ -662,6 +662,9 @@
662
662
  <value>LatexMath</value>
663
663
  </choice>
664
664
  </attribute>
665
+ <optional>
666
+ <attribute name="number-format"/>
667
+ </optional>
665
668
  <attribute name="block">
666
669
  <data type="boolean"/>
667
670
  </attribute>
@@ -66,6 +66,9 @@
66
66
  <ref name="MultilingualRenderingType"/>
67
67
  </attribute>
68
68
  </optional>
69
+ <optional>
70
+ <attribute name="class"/>
71
+ </optional>
69
72
  <optional>
70
73
  <ref name="reqtitle"/>
71
74
  </optional>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.5.1".freeze
3
+ VERSION = "2.5.2".freeze
4
4
  end
5
5
  end
6
6
 
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.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-19 00:00:00.000000000 Z
11
+ date: 2024-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso