metanorma-iec 1.2.8 → 1.2.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +7 -5
  3. data/lib/asciidoctor/iec/basicdoc.rng +52 -3
  4. data/lib/asciidoctor/iec/converter.rb +25 -1
  5. data/lib/asciidoctor/iec/front.rb +35 -58
  6. data/lib/asciidoctor/iec/iec.rng +81 -1
  7. data/lib/asciidoctor/iec/iec_intro_en.xml +110 -56
  8. data/lib/asciidoctor/iec/iec_intro_fr.xml +78 -22
  9. data/lib/asciidoctor/iec/isodoc.rng +51 -3
  10. data/lib/asciidoctor/iec/isostandard.rng +27 -10
  11. data/lib/isodoc/iec/base_convert.rb +2 -2
  12. data/lib/isodoc/iec/html/html_iec_intro.html +1 -1
  13. data/lib/isodoc/iec/html/htmlstyle.css +5 -5
  14. data/lib/isodoc/iec/html/htmlstyle.scss +4 -4
  15. data/lib/isodoc/iec/html/isodoc.css +79 -79
  16. data/lib/isodoc/iec/html/isodoc.scss +79 -79
  17. data/lib/isodoc/iec/html/word_iec_intro.html +1 -1
  18. data/lib/isodoc/iec/html/wordstyle.css +120 -120
  19. data/lib/isodoc/iec/html/wordstyle.scss +120 -120
  20. data/lib/isodoc/iec/html_convert.rb +10 -2
  21. data/lib/isodoc/iec/i18n-en.yaml +17 -0
  22. data/lib/isodoc/iec/i18n-fr.yaml +18 -0
  23. data/lib/isodoc/iec/iec.international-standard.xsl +914 -398
  24. data/lib/isodoc/iec/metadata.rb +33 -0
  25. data/lib/isodoc/iec/presentation_xml_convert.rb +12 -0
  26. data/lib/isodoc/iec/word_convert.rb +12 -2
  27. data/lib/metanorma/iec/processor.rb +11 -8
  28. data/lib/metanorma/iec/version.rb +1 -1
  29. data/metanorma-iec.gemspec +2 -3
  30. data/spec/asciidoctor-iec/base_spec.rb +444 -10
  31. data/spec/asciidoctor-iec/blocks_spec.rb +25 -21
  32. data/spec/asciidoctor-iec/cleanup_spec.rb +99 -14
  33. data/spec/asciidoctor-iec/iev_spec.rb +15 -6
  34. data/spec/asciidoctor-iec/inline_spec.rb +11 -7
  35. data/spec/asciidoctor-iec/lists_spec.rb +13 -9
  36. data/spec/asciidoctor-iec/section_spec.rb +9 -5
  37. data/spec/asciidoctor-iec/validate_spec.rb +16 -1
  38. data/spec/isodoc/i18n_spec.rb +30 -0
  39. data/spec/isodoc/iso_spec.rb +4 -4
  40. data/spec/isodoc/metadata_spec.rb +23 -1
  41. data/spec/metanorma/processor_spec.rb +1 -1
  42. data/spec/spec_helper.rb +20 -31
  43. metadata +5 -19
@@ -13,9 +13,11 @@ module IsoDoc
13
13
 
14
14
  def default_fonts(options)
15
15
  {
16
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Arial",sans-serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Arial",sans-serif'),
16
+ bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Arial",sans-serif'),
17
+ headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Arial",sans-serif'),
18
18
  monospacefont: ('"Courier New",monospace'),
19
+ monospacefontsize: "1.0em",
20
+ footnotefontsize: "0.9em",
19
21
  }
20
22
  end
21
23
 
@@ -36,6 +38,12 @@ module IsoDoc
36
38
  docxml
37
39
  end
38
40
 
41
+ def authority_cleanup(docxml)
42
+ auth = docxml.at("//div[@id = 'boilerplate-feedback' or @class = 'boilerplate-feedback']")
43
+ auth&.remove
44
+ super
45
+ end
46
+
39
47
  include BaseConvert
40
48
  include Init
41
49
  end
@@ -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>
@@ -16,3 +17,19 @@ term_def_boilerplate: |
16
17
  <li> <p>ISO Online browsing platform: available at
17
18
  <link target="http://www.iso.org/obp"/></p> </li>
18
19
  </ul>
20
+ doctype_dict:
21
+ international-standard: International Standard
22
+ technical-specification: Technical Specification
23
+ technical-report: Technical Report
24
+ publicly-available-specification: Publicly Available Specification
25
+ international-workshop-agreement: International Workshop Agreement
26
+ guide: Guide
27
+ interpretation-sheet: Interpretation Sheet
28
+ function_dict:
29
+ emc: Basic EMC Publication
30
+ safety: Basic Safety Publication
31
+ environment: Basic Environment Publication
32
+ quality-assurance: Basic Quality Assurance Publication
33
+ horizontal_dict:
34
+ "true": Horizontal Standard
35
+ "false":
@@ -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
@@ -16,3 +17,20 @@ term_def_boilerplate: |
16
17
  <li> <p>ISO Online browsing platform: disponible à l'adresse
17
18
  <link target="http://www.iso.org/obp"/></p> </li>
18
19
  </ul>
20
+ doctype_dict:
21
+ international-standard: Norme international
22
+ technical-specification: Spécification technique
23
+ technical-report: Rapport technique
24
+ publicly-available-specification: Spécification disponible publiquement
25
+ international-workshop-agreement: Accord internationale d’atelier
26
+ guide: Guide
27
+ interpretation-sheet: Feuille d’interprétation
28
+ function_dict:
29
+ emc: Publication fondamentale en CEM
30
+ safety: Publication fondamentale de sécurité
31
+ environment: Publication fondamentale sur l’environnement
32
+ quality-assurance: Publication fondamentale sur l’assurance de la qualité
33
+ horizontal_dict:
34
+ "true": Norme horizontale
35
+ "false":
36
+
@@ -17,31 +17,23 @@
17
17
 
18
18
 
19
19
 
20
- <xsl:variable name="debug">true</xsl:variable>
20
+ <xsl:variable name="debug">false</xsl:variable>
21
21
  <xsl:variable name="pageWidth" select="'210mm'"/>
22
22
  <xsl:variable name="pageHeight" select="'297mm'"/>
23
23
 
24
- <xsl:variable name="copyrightText" select="concat('© ', /iec:iec-standard/iec:bibdata/iec:copyright/iec:owner/iec:organization/iec:abbreviation, ':', iec:iec-standard/iec:bibdata/iec:copyright/iec:from)"/>
24
+ <xsl:variable name="copyrightText" select="concat('© ', //iec:iec-standard/iec:bibdata/iec:copyright/iec:owner/iec:organization/iec:abbreviation, ':', //iec:iec-standard/iec:bibdata/iec:copyright/iec:from)"/>
25
25
  <!-- <xsl:variable name="lang-1st-letter" select="concat('(', translate(substring(iec:iec-standard/iec:bibdata/iec:language,1,1),$lower, $upper), ')')"/> -->
26
26
  <xsl:variable name="lang-1st-letter" select="''"/>
27
- <xsl:variable name="ISOname" select="/iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso']"/>
27
+ <xsl:variable name="ISOname" select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso' or @type='ISO']"/>
28
28
 
29
- <xsl:variable name="title-intro" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-intro']"/>
30
- <xsl:variable name="title-intro-fr" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr' and @type = 'title-intro']"/>
31
- <xsl:variable name="title-main" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-main']"/>
32
- <xsl:variable name="title-main-fr" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr' and @type = 'title-main']"/>
33
- <xsl:variable name="part" select="/iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number/@part"/>
29
+ <xsl:variable name="part" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number/@part"/>
34
30
 
35
- <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new(translate(/iec:iec-standard/iec:bibdata/iec:ext/iec:doctype,'-',' ')))"/>
36
-
37
-
38
-
39
- <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:contributor[iec:role/@type = 'publisher']/iec:organization/iec:name))"/>
31
+ <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:doctype[@language = $lang]))"/>
40
32
 
41
- <xsl:variable name="stage" select="number(/iec:iec-standard/iec:bibdata/iec:status/iec:stage)"/>
42
- <xsl:variable name="substage" select="number(/iec:iec-standard/iec:bibdata/iec:status/iec:substage)"/>
43
- <xsl:variable name="stagename" select="normalize-space(/iec:iec-standard/iec:bibdata/iec:ext/iec:stagename)"/>
44
- <xsl:variable name="abbreviation" select="normalize-space(/iec:iec-standard/iec:bibdata/iec:status/iec:stage/@abbreviation)"/>
33
+ <xsl:variable name="stage" select="number(//iec:iec-standard/iec:bibdata/iec:status/iec:stage)"/>
34
+ <xsl:variable name="substage" select="number(//iec:iec-standard/iec:bibdata/iec:status/iec:substage)"/>
35
+ <xsl:variable name="stagename" select="normalize-space(//iec:iec-standard/iec:bibdata/iec:ext/iec:stagename)"/>
36
+ <xsl:variable name="abbreviation" select="normalize-space(//iec:iec-standard/iec:bibdata/iec:status/iec:stage/@abbreviation)"/>
45
37
 
46
38
  <xsl:variable name="stage-abbreviation">
47
39
  <xsl:choose>
@@ -87,7 +79,24 @@
87
79
  <item id="term-script" display="false">3.2</item>
88
80
  -->
89
81
  <xsl:variable name="contents">
90
- <xsl:variable name="docid">
82
+
83
+ <xsl:for-each select="//iec:iec-standard">
84
+ <xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
85
+ <xsl:variable name="current_document">
86
+ <xsl:copy-of select="."/>
87
+ </xsl:variable>
88
+ <xsl:for-each select="xalan:nodeset($current_document)">
89
+ <xsl:variable name="docid">
90
+ <xsl:call-template name="getDocumentId"/>
91
+ </xsl:variable>
92
+ <doc id="{$docid}" lang="{$lang}">
93
+ <xsl:call-template name="generateContents"/>
94
+ </doc>
95
+ </xsl:for-each>
96
+ </xsl:for-each>
97
+
98
+
99
+ <!-- <xsl:variable name="docid">
91
100
  <xsl:call-template name="getDocumentId"/>
92
101
  </xsl:variable>
93
102
  <doc id="{$docid}" lang="{$lang}">
@@ -113,7 +122,7 @@
113
122
  </doc>
114
123
  </xsl:for-each>
115
124
  </xsl:for-each>
116
- </xsl:for-each>
125
+ </xsl:for-each> -->
117
126
 
118
127
 
119
128
  </xsl:variable>
@@ -122,6 +131,16 @@
122
131
  <contents>
123
132
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
124
133
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
134
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
135
+ <figure id="{@id}">
136
+ <title><xsl:value-of select="*[local-name() = 'name']/text()"/></title>
137
+ </figure>
138
+ </xsl:for-each>
139
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
140
+ <table id="{@id}">
141
+ <title><xsl:value-of select="*[local-name() = 'name']/text()"/></title>
142
+ </table>
143
+ </xsl:for-each>
125
144
  </contents>
126
145
  </xsl:template>
127
146
 
@@ -136,7 +155,7 @@
136
155
  <xsl:call-template name="namespaceCheck"/>
137
156
  <!-- https://stackoverflow.com/questions/25261949/xsl-fo-letter-spacing-with-text-align -->
138
157
  <!-- https://xmlgraphics.apache.org/fop/knownissues.html -->
139
- <fo:root font-family="Arial, Times New Roman, STIX Two Math, HanSans" font-size="10pt" xml:lang="{$lang}">
158
+ <fo:root font-family="Arial, Times New Roman, STIX Two Math, Source Han Sans" font-size="10pt" xml:lang="{$lang}">
140
159
  <fo:layout-master-set>
141
160
  <!-- cover pages -->
142
161
  <fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
@@ -146,6 +165,13 @@
146
165
  <fo:region-start region-name="left-region" extent="18mm"/>
147
166
  <fo:region-end region-name="right-region" extent="20.5mm"/>
148
167
  </fo:simple-page-master>
168
+ <fo:simple-page-master master-name="cover_2nd" page-width="{$pageWidth}" page-height="{$pageHeight}">
169
+ <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="25mm" margin-right="25mm" column-count="2" column-gap="5mm"/>
170
+ <fo:region-before region-name="header" extent="17.5mm"/>
171
+ <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
172
+ <fo:region-start region-name="left-region" extent="25mm"/>
173
+ <fo:region-end region-name="right-region" extent="25mm"/>
174
+ </fo:simple-page-master>
149
175
 
150
176
  <fo:simple-page-master master-name="cover-FDIS" page-width="{$pageWidth}" page-height="{$pageHeight}">
151
177
  <fo:region-body margin-top="17.5mm" margin-bottom="29mm" margin-left="18mm" margin-right="19mm"/>
@@ -203,7 +229,7 @@
203
229
  <fo:static-content flow-name="left-region">
204
230
  <fo:block-container reference-orientation="90">
205
231
  <fo:block font-size="7pt" margin-left="0.5mm" margin-top="5mm">
206
- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso-with-lang']"/>
232
+ <xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-with-lang']"/>
207
233
  </fo:block>
208
234
  </fo:block-container>
209
235
  </fo:static-content>
@@ -218,226 +244,240 @@
218
244
  </fo:page-sequence>
219
245
 
220
246
  <!-- 2nd Cover Page -->
221
- <fo:page-sequence master-reference="cover" force-page-count="no-force">
247
+ <fo:page-sequence master-reference="cover_2nd" force-page-count="no-force" font-size="8pt">
222
248
  <fo:flow flow-name="xsl-region-body">
223
- <fo:block-container margin-left="7mm" margin-right="4.5mm" border="0.5pt solid black" margin-top="7mm">
224
- <fo:block-container margin-left="2.5mm" margin-right="2.5mm" margin-top="1mm" margin-bottom="1mm">
225
- <fo:block-container margin-left="0mm" margin-right="0mm">
226
- <fo:table table-layout="fixed" width="100%">
227
- <fo:table-column column-width="20mm"/>
228
- <fo:table-column column-width="130mm"/>
229
- <fo:table-body>
230
- <fo:table-row>
231
- <fo:table-cell>
232
- <fo:block>
233
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="17.8mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
234
- </fo:block>
235
- </fo:table-cell>
236
- <fo:table-cell font-size="10pt" font-weight="bold" display-align="after">
237
- <fo:block margin-bottom="3pt">THIS PUBLICATION IS COPYRIGHT PROTECTED</fo:block>
238
- <fo:block margin-bottom="10pt">
239
- <!-- Example: Copyright © 2014 IEC, Geneva, Switzerland -->
240
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-year']"/>
241
- </fo:block>
242
- </fo:table-cell>
243
- </fo:table-row>
244
- </fo:table-body>
245
- </fo:table>
246
- <fo:block font-size="8pt">
247
- <fo:block margin-bottom="8pt" text-align="justify">
248
- <!-- Example: All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
249
- or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
250
- either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
251
- copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
252
- your local IEC member National Committee for further information. -->
253
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-message']"/>
254
- </fo:block>
255
- <fo:block margin-bottom="8pt" text-align="justify">Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
256
- ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
257
- et les microfilms, sans l'accord écrit de l'IEC ou du Comité national de l'IEC du pays du demandeur. Si vous avez des
258
- questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
259
- les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence.</fo:block>
260
-
261
- <xsl:variable name="telpos" select="count(/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
249
+ <fo:block span="all">
250
+ <fo:block-container border="0.5pt solid black" margin-top="7mm">
251
+ <fo:block-container margin-left="2.5mm" margin-right="2.5mm" margin-top="1mm" margin-bottom="1mm">
252
+ <fo:block-container margin-left="0mm" margin-right="0mm">
262
253
  <fo:table table-layout="fixed" width="100%">
263
- <fo:table-column column-width="59mm"/>
264
- <fo:table-column column-width="90mm"/>
254
+ <fo:table-column column-width="20mm"/>
255
+ <fo:table-column column-width="130mm"/>
265
256
  <fo:table-body>
266
257
  <fo:table-row>
267
258
  <fo:table-cell>
268
259
  <fo:block>
269
- <!-- Example: IEC Central Office
270
- 3, rue de Varembé
271
- CH-1211 Geneva 20
272
- Switzerland -->
273
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-name']" mode="coverpage"/>
274
- <xsl:choose>
275
- <xsl:when test="$telpos != 0">
276
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']/node()[position() &lt; $telpos]" mode="coverpage"/>
277
- </xsl:when>
278
- <xsl:otherwise>
279
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']" mode="coverpage"/>
280
- </xsl:otherwise>
281
- </xsl:choose>
260
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="17.8mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
282
261
  </fo:block>
283
262
  </fo:table-cell>
284
- <fo:table-cell>
285
- <fo:block>
286
- <!-- Example: Tel.: +41 22 919 02 11
287
- Fax: +41 22 919 0
288
- info@iec.ch
289
- www.iec.ch -->
290
- <xsl:choose>
291
- <xsl:when test="$telpos != 0">
292
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']/node()[position() &gt; $telpos]" mode="coverpage"/>
293
- </xsl:when>
294
- <xsl:otherwise> </xsl:otherwise>
295
- </xsl:choose>
263
+ <fo:table-cell font-size="10pt" font-weight="bold" display-align="after">
264
+ <fo:block margin-bottom="3pt">THIS PUBLICATION IS COPYRIGHT PROTECTED</fo:block>
265
+ <fo:block margin-bottom="10pt">
266
+ <!-- Example: Copyright © 2014 IEC, Geneva, Switzerland -->
267
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-year')]"/>
296
268
  </fo:block>
297
269
  </fo:table-cell>
298
270
  </fo:table-row>
299
271
  </fo:table-body>
300
272
  </fo:table>
301
-
302
- </fo:block>
273
+ <fo:block>
274
+ <fo:block margin-bottom="8pt" text-align="justify">
275
+ <!-- Example: All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
276
+ or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
277
+ either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
278
+ copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
279
+ your local IEC member National Committee for further information. -->
280
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
281
+ </fo:block>
282
+ <!-- Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
283
+ ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
284
+ et les microfilms, sans l'accord écrit de l'IEC ou du Comité national de l'IEC du pays du demandeur. Si vous avez des
285
+ questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
286
+ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence. -->
287
+ <fo:block margin-bottom="8pt" text-align="justify">
288
+ <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
289
+ </fo:block>
290
+
291
+ <xsl:variable name="telpos" select="count((//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
292
+ <fo:table table-layout="fixed" width="100%">
293
+ <fo:table-column column-width="59mm"/>
294
+ <fo:table-column column-width="90mm"/>
295
+ <fo:table-body>
296
+ <fo:table-row>
297
+ <fo:table-cell>
298
+ <fo:block>
299
+ <!-- Example: IEC Central Office
300
+ 3, rue de Varembé
301
+ CH-1211 Geneva 20
302
+ Switzerland -->
303
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-name')]" mode="coverpage"/>
304
+ <xsl:choose>
305
+ <xsl:when test="$telpos != 0">
306
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &lt; $telpos]" mode="coverpage"/>
307
+ </xsl:when>
308
+ <xsl:otherwise>
309
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
310
+ </xsl:otherwise>
311
+ </xsl:choose>
312
+ </fo:block>
313
+ </fo:table-cell>
314
+ <fo:table-cell>
315
+ <fo:block>
316
+ <!-- Example: Tel.: +41 22 919 02 11
317
+ Fax: +41 22 919 0
318
+ info@iec.ch
319
+ www.iec.ch -->
320
+ <xsl:choose>
321
+ <xsl:when test="$telpos != 0">
322
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &gt; $telpos]" mode="coverpage"/>
323
+ </xsl:when>
324
+ <xsl:otherwise> </xsl:otherwise>
325
+ </xsl:choose>
326
+ </fo:block>
327
+ </fo:table-cell>
328
+ </fo:table-row>
329
+ </fo:table-body>
330
+ </fo:table>
331
+
332
+ </fo:block>
333
+ </fo:block-container>
303
334
  </fo:block-container>
304
335
  </fo:block-container>
305
- </fo:block-container>
336
+ </fo:block>
306
337
 
307
- <fo:block-container margin-left="7mm" margin-right="4.5mm" margin-top="6pt">
308
- <fo:block-container font-size="8pt" text-align="justify" margin-left="0mm" margin-right="0mm">
309
-
310
- <fo:block font-weight="bold">About the IEC</fo:block>
311
- <fo:block margin-bottom="6pt">The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
312
- International Standards for all electrical, electronic and related technologies.</fo:block>
313
-
314
- <fo:block font-weight="bold">About IEC publications</fo:block>
315
- <fo:block margin-bottom="6pt">The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
316
- latest edition, a corrigenda or an amendment might have been published.</fo:block>
317
-
318
- <fo:table table-layout="fixed" width="100%" margin-bottom="12pt">
319
- <fo:table-column column-width="82mm"/>
320
- <fo:table-column column-width="78mm"/>
321
- <fo:table-body>
322
- <fo:table-row border-bottom="0.5pt solid black">
323
- <fo:table-cell padding-right="5mm">
324
- <fo:block font-weight="bold">IEC Catalogue - <fo:inline color="blue">webstore.iec.ch/catalogue</fo:inline></fo:block>
325
- <fo:block margin-bottom="6pt">
326
- <xsl:text>The stand-alone application for consulting the entire
327
- bibliographical information on IEC International Standards,
328
- Technical Specifications, Technical Reports and other
329
- documents. Available for PC, Mac OS, Android Tablets and
330
- iPad.</xsl:text>
331
- </fo:block>
332
- <fo:block font-weight="bold">IEC publications search - <fo:inline color="blue">www.iec.ch/searchpub</fo:inline></fo:block>
333
- <fo:block margin-bottom="6pt">
334
- <xsl:text>The advanced search enables to find IEC publications by a
335
- variety of criteria (reference number, text, technical
336
- committee,…). It also gives information on projects, replaced
337
- and withdrawn publications.</xsl:text>
338
- </fo:block>
339
- <fo:block font-weight="bold">IEC Just Published - <fo:inline color="blue">webstore.iec.ch/justpublished</fo:inline></fo:block>
340
- <fo:block margin-bottom="6pt">
341
- <xsl:text>Stay up to date on all new IEC publications. Just Published
342
- details all new publications released. Available online and
343
- also once a month by email.</xsl:text>
344
- </fo:block>
345
- </fo:table-cell>
346
- <fo:table-cell>
347
- <fo:block font-weight="bold">Electropedia - <fo:inline color="blue">www.electropedia.org</fo:inline></fo:block>
348
- <fo:block margin-bottom="6pt">
349
- <xsl:text>The world's leading online dictionary of electronic and
350
- electrical terms containing more than 30 000 terms and
351
- definitions in English and French, with equivalent terms in 14
352
- additional languages. Also known as the International
353
- Electrotechnical Vocabulary (IEV) online.</xsl:text>
354
- </fo:block>
355
- <fo:block font-weight="bold">IEC Glossary - <fo:inline color="blue">std.iec.ch/glossary</fo:inline></fo:block>
356
- <fo:block margin-bottom="6pt">
357
- <xsl:text>More than 55 000 electrotechnical terminology entries in
358
- English and French extracted from the Terms and Definitions
359
- clause of IEC publications issued since 2002. Some entries
360
- have been collected from earlier publications of IEC TC 37,
361
- 77, 86 and CISPR.</xsl:text>
362
- </fo:block>
363
- <fo:block font-weight="bold">IEC Customer Service Centre - <fo:inline color="blue">webstore.iec.ch/csc</fo:inline></fo:block>
364
- <fo:block margin-bottom="6pt">
365
- <xsl:text>If you wish to give us your feedback on this publication or
366
- need further assistance, please contact the Customer Service
367
- Centre: </xsl:text><fo:inline color="blue">csc@iec.ch</fo:inline>.
368
- </fo:block>
369
- </fo:table-cell>
370
- </fo:table-row>
371
- </fo:table-body>
372
- </fo:table>
373
- <fo:block font-weight="bold">A propos de l'IEC</fo:block>
374
- <fo:block margin-bottom="6pt">La Commission Electrotechnique Internationale (IEC) est la première organisation mondiale qui élabore et publie des
375
- Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.</fo:block>
338
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement"/> <!-- //iec:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
339
+ <fo:block span="all" border-bottom="0.5pt solid black"/>
340
+ <xsl:if test="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement">
341
+ <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement"/>
342
+ <fo:block span="all"/>
343
+ </xsl:if>
344
+ <!-- <fo:block span="all">
345
+ <fo:block-container margin-top="6pt">
346
+ <fo:block-container text-align="justify" margin-left="0mm" margin-right="0mm">
347
+
348
+ <fo:block font-weight="bold">About the IEC</fo:block>
349
+ <fo:block margin-bottom="6pt">The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
350
+ International Standards for all electrical, electronic and related technologies.</fo:block>
376
351
 
377
- <fo:block font-weight="bold">A propos des publications IEC</fo:block>
378
- <fo:block margin-bottom="6pt">Le contenu technique des publications IEC est constamment revu. Veuillez vous assurer que vous possédez l’édition la
379
- plus récente, un corrigendum ou amendement peut avoir été publié.</fo:block>
352
+ <fo:block font-weight="bold">About IEC publications</fo:block>
353
+ <fo:block margin-bottom="6pt">The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
354
+ latest edition, a corrigenda or an amendment might have been published.</fo:block>
355
+
356
+ <fo:table table-layout="fixed" width="100%" margin-bottom="12pt">
357
+ <fo:table-column column-width="82mm"/>
358
+ <fo:table-column column-width="78mm"/>
359
+ <fo:table-body>
360
+ <fo:table-row border-bottom="0.5pt solid black">
361
+ <fo:table-cell padding-right="5mm">
362
+ <fo:block font-weight="bold">IEC Catalogue - <fo:inline color="blue">webstore.iec.ch/catalogue</fo:inline></fo:block>
363
+ <fo:block margin-bottom="6pt">
364
+ <xsl:text>The stand-alone application for consulting the entire
365
+ bibliographical information on IEC International Standards,
366
+ Technical Specifications, Technical Reports and other
367
+ documents. Available for PC, Mac OS, Android Tablets and
368
+ iPad.</xsl:text>
369
+ </fo:block>
370
+ <fo:block font-weight="bold">IEC publications search - <fo:inline color="blue">www.iec.ch/searchpub</fo:inline></fo:block>
371
+ <fo:block margin-bottom="6pt">
372
+ <xsl:text>The advanced search enables to find IEC publications by a
373
+ variety of criteria (reference number, text, technical
374
+ committee,…). It also gives information on projects, replaced
375
+ and withdrawn publications.</xsl:text>
376
+ </fo:block>
377
+ <fo:block font-weight="bold">IEC Just Published - <fo:inline color="blue">webstore.iec.ch/justpublished</fo:inline></fo:block>
378
+ <fo:block margin-bottom="6pt">
379
+ <xsl:text>Stay up to date on all new IEC publications. Just Published
380
+ details all new publications released. Available online and
381
+ also once a month by email.</xsl:text>
382
+ </fo:block>
383
+ </fo:table-cell>
384
+ <fo:table-cell>
385
+ <fo:block font-weight="bold">Electropedia - <fo:inline color="blue">www.electropedia.org</fo:inline></fo:block>
386
+ <fo:block margin-bottom="6pt">
387
+ <xsl:text>The world's leading online dictionary of electronic and
388
+ electrical terms containing more than 30 000 terms and
389
+ definitions in English and French, with equivalent terms in 14
390
+ additional languages. Also known as the International
391
+ Electrotechnical Vocabulary (IEV) online.</xsl:text>
392
+ </fo:block>
393
+ <fo:block font-weight="bold">IEC Glossary - <fo:inline color="blue">std.iec.ch/glossary</fo:inline></fo:block>
394
+ <fo:block margin-bottom="6pt">
395
+ <xsl:text>More than 55 000 electrotechnical terminology entries in
396
+ English and French extracted from the Terms and Definitions
397
+ clause of IEC publications issued since 2002. Some entries
398
+ have been collected from earlier publications of IEC TC 37,
399
+ 77, 86 and CISPR.</xsl:text>
400
+ </fo:block>
401
+ <fo:block font-weight="bold">IEC Customer Service Centre - <fo:inline color="blue">webstore.iec.ch/csc</fo:inline></fo:block>
402
+ <fo:block margin-bottom="6pt">
403
+ <xsl:text>If you wish to give us your feedback on this publication or
404
+ need further assistance, please contact the Customer Service
405
+ Centre: </xsl:text><fo:inline color="blue">csc@iec.ch</fo:inline>.
406
+ </fo:block>
407
+ </fo:table-cell>
408
+ </fo:table-row>
409
+ </fo:table-body>
410
+ </fo:table>
411
+
412
+ <fo:block font-weight="bold">A propos de l'IEC</fo:block>
413
+ <fo:block margin-bottom="6pt">La Commission Electrotechnique Internationale (IEC) est la première organisation mondiale qui élabore et publie des
414
+ Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.</fo:block>
415
+
416
+ <fo:block font-weight="bold">A propos des publications IEC</fo:block>
417
+ <fo:block margin-bottom="6pt">Le contenu technique des publications IEC est constamment revu. Veuillez vous assurer que vous possédez l’édition la
418
+ plus récente, un corrigendum ou amendement peut avoir été publié.</fo:block>
380
419
 
381
- <fo:table table-layout="fixed" width="100%">
382
- <fo:table-column column-width="82mm"/>
383
- <fo:table-column column-width="78mm"/>
384
- <fo:table-body>
385
- <fo:table-row>
386
- <fo:table-cell padding-right="5mm">
387
- <fo:block font-weight="bold">Catalogue IEC - <fo:inline color="blue">webstore.iec.ch/catalogue</fo:inline></fo:block>
388
- <fo:block margin-bottom="6pt">
389
- <xsl:text>Application autonome pour consulter tous les renseignements
390
- bibliographiques sur les Normes internationales,
391
- Spécifications techniques, Rapports techniques et autres
392
- documents de l'IEC. Disponible pour PC, Mac OS, tablettes
393
- Android et iPad.</xsl:text>
394
- </fo:block>
395
- <fo:block font-weight="bold">Recherche de publications IEC - <fo:inline color="blue">www.iec.ch/searchpub</fo:inline></fo:block>
396
- <fo:block margin-bottom="6pt">
397
- <xsl:text>La recherche avancée permet de trouver des publications IEC
398
- en utilisant différents critères (numéro de référence, texte,
399
- comité d’études,…). Elle donne aussi des informations sur les
400
- projets et les publications remplacées ou retirées.</xsl:text>
401
- </fo:block>
402
- <fo:block font-weight="bold">IEC Just Published - <fo:inline color="blue">webstore.iec.ch/justpublished</fo:inline></fo:block>
403
- <fo:block margin-bottom="6pt">
404
- <xsl:text>Restez informé sur les nouvelles publications IEC. Just
405
- Published détaille les nouvelles publications parues.
406
- Disponible en ligne et aussi une fois par mois par email.</xsl:text>
407
- </fo:block>
408
- </fo:table-cell>
409
- <fo:table-cell>
410
- <fo:block font-weight="bold">Electropedia - <fo:inline color="blue">www.electropedia.org</fo:inline></fo:block>
411
- <fo:block margin-bottom="6pt">
412
- <xsl:text>Le premier dictionnaire en ligne de termes électroniques et
413
- électriques. Il contient plus de 30 000 termes et définitions en
414
- anglais et en français, ainsi que les termes équivalents dans
415
- 14 langues additionnelles. Egalement appelé Vocabulaire
416
- Electrotechnique International (IEV) en ligne.</xsl:text>
417
- </fo:block>
418
- <fo:block font-weight="bold">Glossaire IEC - <fo:inline color="blue">std.iec.ch/glossary</fo:inline></fo:block>
419
- <fo:block margin-bottom="6pt">
420
- <xsl:text>Plus de 55 000 entrées terminologiques électrotechniques, en
421
- anglais et en français, extraites des articles Termes et
422
- Définitions des publications IEC parues depuis 2002. Plus
423
- certaines entrées antérieures extraites des publications des
424
- CE 37, 77, 86 et CISPR de l'IEC.</xsl:text>
425
- </fo:block>
426
- <fo:block font-weight="bold">Service Clients - <fo:inline color="blue">webstore.iec.ch/csc</fo:inline></fo:block>
427
- <fo:block margin-bottom="6pt">
428
- <xsl:text>Si vous désirez nous donner des commentaires sur cette
429
- publication ou si vous avez des questions contactez-nous: </xsl:text><fo:inline color="blue">csc@iec.ch</fo:inline>.
430
- </fo:block>
431
- </fo:table-cell>
432
- </fo:table-row>
433
- </fo:table-body>
434
- </fo:table>
420
+ <fo:table table-layout="fixed" width="100%">
421
+ <fo:table-column column-width="82mm"/>
422
+ <fo:table-column column-width="78mm"/>
423
+ <fo:table-body>
424
+ <fo:table-row>
425
+ <fo:table-cell padding-right="5mm">
426
+ <fo:block font-weight="bold">Catalogue IEC - <fo:inline color="blue">webstore.iec.ch/catalogue</fo:inline></fo:block>
427
+ <fo:block margin-bottom="6pt">
428
+ <xsl:text>Application autonome pour consulter tous les renseignements
429
+ bibliographiques sur les Normes internationales,
430
+ Spécifications techniques, Rapports techniques et autres
431
+ documents de l'IEC. Disponible pour PC, Mac OS, tablettes
432
+ Android et iPad.</xsl:text>
433
+ </fo:block>
434
+ <fo:block font-weight="bold">Recherche de publications IEC - <fo:inline color="blue">www.iec.ch/searchpub</fo:inline></fo:block>
435
+ <fo:block margin-bottom="6pt">
436
+ <xsl:text>La recherche avancée permet de trouver des publications IEC
437
+ en utilisant différents critères (numéro de référence, texte,
438
+ comité d’études,…). Elle donne aussi des informations sur les
439
+ projets et les publications remplacées ou retirées.</xsl:text>
440
+ </fo:block>
441
+ <fo:block font-weight="bold">IEC Just Published - <fo:inline color="blue">webstore.iec.ch/justpublished</fo:inline></fo:block>
442
+ <fo:block margin-bottom="6pt">
443
+ <xsl:text>Restez informé sur les nouvelles publications IEC. Just
444
+ Published détaille les nouvelles publications parues.
445
+ Disponible en ligne et aussi une fois par mois par email.</xsl:text>
446
+ </fo:block>
447
+ </fo:table-cell>
448
+ <fo:table-cell>
449
+ <fo:block font-weight="bold">Electropedia - <fo:inline color="blue">www.electropedia.org</fo:inline></fo:block>
450
+ <fo:block margin-bottom="6pt">
451
+ <xsl:text>Le premier dictionnaire en ligne de termes électroniques et
452
+ électriques. Il contient plus de 30 000 termes et définitions en
453
+ anglais et en français, ainsi que les termes équivalents dans
454
+ 14 langues additionnelles. Egalement appelé Vocabulaire
455
+ Electrotechnique International (IEV) en ligne.</xsl:text>
456
+ </fo:block>
457
+ <fo:block font-weight="bold">Glossaire IEC - <fo:inline color="blue">std.iec.ch/glossary</fo:inline></fo:block>
458
+ <fo:block margin-bottom="6pt">
459
+ <xsl:text>Plus de 55 000 entrées terminologiques électrotechniques, en
460
+ anglais et en français, extraites des articles Termes et
461
+ Définitions des publications IEC parues depuis 2002. Plus
462
+ certaines entrées antérieures extraites des publications des
463
+ CE 37, 77, 86 et CISPR de l'IEC.</xsl:text>
464
+ </fo:block>
465
+ <fo:block font-weight="bold">Service Clients - <fo:inline color="blue">webstore.iec.ch/csc</fo:inline></fo:block>
466
+ <fo:block margin-bottom="6pt">
467
+ <xsl:text>Si vous désirez nous donner des commentaires sur cette
468
+ publication ou si vous avez des questions contactez-nous: </xsl:text><fo:inline color="blue">csc@iec.ch</fo:inline>.
469
+ </fo:block>
470
+ </fo:table-cell>
471
+ </fo:table-row>
472
+ </fo:table-body>
473
+ </fo:table>
474
+ </fo:block-container>
435
475
  </fo:block-container>
436
- </fo:block-container>
476
+ </fo:block> -->
437
477
  </fo:flow>
438
478
  </fo:page-sequence>
439
479
  </xsl:if>
440
-
480
+ <xsl:variable name="lang_second" select="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']"/>
441
481
  <!-- For 'Published' documents insert 3rd Cover Page
442
482
  OR insert first Covert Page for FDIS -->
443
483
  <xsl:if test="$stage &gt;= 60 or $stage-abbreviation = 'FDIS'">
@@ -449,15 +489,18 @@
449
489
  <fo:block font-size="9pt" color="{$color_blue}" line-height="150%">
450
490
  <fo:block-container width="40mm">
451
491
  <fo:block>
452
- <xsl:value-of select="$publisher"/>
492
+ <!-- <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:contributor[iec:role/@type = 'publisher']/iec:organization/iec:name))"/> -->
493
+ <!-- <xsl:value-of select="$publisher"/> -->
494
+ <xsl:value-of select="(//iec:iec-standard)[1]/iec:localized-strings/iec:localized-string[@key='IEC' and @language=$lang]"/>
453
495
  </fo:block>
454
496
  </fo:block-container>
455
497
  </fo:block>
456
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
498
+ <xsl:if test="(//iec:iec-standard)[2]/iec:localized-strings/iec:localized-string[@key='IEC' and @language=$lang_second]">
457
499
  <fo:block font-size="9pt" line-height="150%" margin-top="8pt">
458
500
  <fo:block-container width="40mm">
459
501
  <fo:block>
460
- <xsl:value-of select="'COMMISSION ELECTROTECHNIQUE INTERNATIONALE'"/>
502
+ <!-- <xsl:value-of select="'COMMISSION ELECTROTECHNIQUE INTERNATIONALE'"/> -->
503
+ <xsl:value-of select="(//iec:iec-standard)[2]/iec:localized-strings/iec:localized-string[@key='IEC' and @language=$lang_second]"/>
461
504
  </fo:block>
462
505
  </fo:block-container>
463
506
  </fo:block>
@@ -471,18 +514,35 @@
471
514
  <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
472
515
  <fo:table-cell font-size="8pt" text-align="right" display-align="center">
473
516
  <fo:block>
474
- <fo:block color="{$color_blue}" margin-bottom="3pt">PRICE CODE</fo:block>
475
- <fo:block>CODE PRIX</fo:block>
517
+ <fo:block color="{$color_blue}" margin-bottom="3pt">
518
+ <!-- PRICE CODE -->
519
+ <xsl:variable name="price_code">
520
+ <!-- <xsl:call-template name="getLocalizedString">
521
+ <xsl:with-param name="key">price-code</xsl:with-param>
522
+ </xsl:call-template> -->
523
+ <xsl:value-of select="(//iec:iec-standard)[1]/iec:localized-strings/iec:localized-string[@key='price-code' and @language=$lang]"/>
524
+ </xsl:variable>
525
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
526
+ </fo:block>
527
+ <!-- <xsl:if test="$lang != 'fr'">
528
+ <fo:block>CODE PRIX</fo:block>
529
+ </xsl:if> -->
530
+ <fo:block>
531
+ <xsl:variable name="price_code">
532
+ <xsl:value-of select="(//iec:iec-standard)[2]/iec:localized-strings/iec:localized-string[@key='price-code' and @language=$lang_second]"/>
533
+ </xsl:variable>
534
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
535
+ </fo:block>
476
536
  </fo:block>
477
537
  </fo:table-cell>
478
538
  <fo:table-cell font-size="25pt" font-weight="bold" color="{$color_gray}" text-align="right" display-align="center">
479
- <fo:block padding-top="1mm">XC</fo:block>
539
+ <fo:block padding-top="1mm"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:price-code"/></fo:block>
480
540
  </fo:table-cell>
481
541
  </fo:table-row>
482
542
  </fo:table-body>
483
543
  </fo:table>
484
544
  <fo:block font-size="8pt" text-align-last="justify">
485
- <xsl:for-each select="/iec:iec-standard/iec:bibdata/iec:ext/iec:ics">
545
+ <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:ext/iec:ics">
486
546
  <xsl:if test="position() = 1">ICS </xsl:if>
487
547
  <xsl:value-of select="iec:code"/>
488
548
  <xsl:if test="position() != last()"><xsl:text> </xsl:text></xsl:if>
@@ -490,15 +550,17 @@
490
550
  <xsl:text> </xsl:text>
491
551
  <fo:inline keep-together.within-line="always"><fo:leader leader-pattern="space"/>
492
552
  <xsl:text> </xsl:text>
493
- <!-- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:isbn"/> -->
494
- <xsl:text>Example: ISBN 978-2-8322-1532-6</xsl:text>
553
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']">
554
+ <!-- <xsl:text>Example: ISBN 978-2-8322-1532-6</xsl:text> -->
555
+ <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']"/>
556
+ </xsl:if>
495
557
  </fo:inline>
496
558
  </fo:block>
497
559
  <fo:block-container margin-left="1.5mm">
498
560
  <fo:block-container margin-left="0mm">
499
561
  <fo:block-container border="0.5pt solid black" font-size="10pt" margin-top="8mm" font-weight="bold" padding-left="1.5mm" padding-top="0.5mm" width="102%" height="11mm" display-align="center">
500
562
  <fo:block>Warning! Make sure that you obtained this publication from an authorized distributor.</fo:block>
501
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
563
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
502
564
  <fo:block margin-top="3pt">Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agréé.</fo:block>
503
565
  </xsl:if>
504
566
  </fo:block-container>
@@ -506,7 +568,7 @@
506
568
  </fo:block-container>
507
569
  <fo:block font-size="6pt" margin-top="6mm" margin-left="1mm">
508
570
  <fo:block>® Registered trademark of the International Electrotechnical Commission</fo:block>
509
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
571
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
510
572
  <fo:block margin-left="2mm">Marque déposée de la Commission Electrotechnique Internationale</fo:block>
511
573
  </xsl:if>
512
574
  </fo:block>
@@ -522,10 +584,15 @@
522
584
  <fo:static-content flow-name="footer-FDIS">
523
585
  <fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
524
586
  <fo:block font-size="8pt" margin-bottom="6pt">
525
- <fo:inline font-weight="bold">
587
+
588
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[not(@id)]"/>
589
+
590
+ <!-- <fo:inline font-weight="bold">
526
591
  <xsl:call-template name="addLetterSpacing">
527
592
  <xsl:with-param name="text">
528
- <xsl:text>Copyright © 2019 International Electrotechnical Commission, IEC</xsl:text>
593
+ <xsl:for-each select="(//iec:iec-standard)[1]/iec:bibdata/iec:copyright">
594
+ <xsl:text>Copyright © </xsl:text><xsl:value-of select="iec:from"/><xsl:text> </xsl:text><xsl:value-of select="iec:owner/iec:organization/iec:name"/><xsl:text>, </xsl:text><xsl:value-of select="iec:owner/iec:organization/iec:abbreviation"/>
595
+ </xsl:for-each>
529
596
  </xsl:with-param>
530
597
  </xsl:call-template>
531
598
  </fo:inline>
@@ -535,7 +602,7 @@
535
602
  <xsl:text>. All rights reserved. It is permitted to download this electronic file, to make a copy and to print out the content for the sole purpose of preparing National Committee positions. You may not copy or "mirror" the file or printed version of the document, or any part of it, for any other purpose without permission in writing from IEC.</xsl:text>
536
603
  </xsl:with-param>
537
604
  </xsl:call-template>
538
- </fo:inline>
605
+ </fo:inline> -->
539
606
  </fo:block>
540
607
  </fo:block-container>
541
608
  </fo:static-content>
@@ -547,7 +614,8 @@
547
614
  <fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
548
615
  </xsl:if>
549
616
  <fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
550
- <xsl:text>Ex: 34D/1511/FDIS</xsl:text>
617
+ <!-- Ex: 34D/1511/FDIS -->
618
+ <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso-tc']"/>
551
619
  <xsl:text> </xsl:text>
552
620
  </fo:inline>
553
621
  </fo:block>
@@ -582,7 +650,7 @@
582
650
  </fo:block>
583
651
  <fo:block font-size="9pt" font-weight="bold">
584
652
  <xsl:call-template name="addLetterSpacing">
585
- <xsl:with-param name="text"><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number"/></xsl:with-param>
653
+ <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number"/></xsl:with-param>
586
654
  </xsl:call-template>
587
655
  </fo:block>
588
656
  </fo:table-cell>
@@ -596,7 +664,7 @@
596
664
  </fo:block>
597
665
  <fo:block font-size="9pt" font-weight="bold">
598
666
  <xsl:call-template name="addLetterSpacing">
599
- <xsl:with-param name="text"><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:date[@type ='circulated']/iec:on"/></xsl:with-param>
667
+ <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type ='circulated']/iec:on"/></xsl:with-param>
600
668
  </xsl:call-template>
601
669
  </fo:block>
602
670
  </fo:table-cell>
@@ -608,7 +676,8 @@
608
676
  </fo:block>
609
677
  <fo:block font-size="9pt" font-weight="bold">
610
678
  <xsl:call-template name="addLetterSpacing">
611
- <xsl:with-param name="text">2019-12-06</xsl:with-param>
679
+ <!-- 2019-12-06 -->
680
+ <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='vote-ended']/iec:on"/></xsl:with-param>
612
681
  </xsl:call-template>
613
682
  </fo:block>
614
683
  </fo:table-cell>
@@ -622,7 +691,8 @@
622
691
  </fo:block>
623
692
  <fo:block font-size="9pt" font-weight="bold">
624
693
  <xsl:variable name="supersedes_documents">
625
- <xsl:for-each select="/iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber">
694
+ <!-- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber"> -->
695
+ <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='obsoletes']/iec:bibitem/iec:docidentifier">
626
696
  <xsl:value-of select="."/>
627
697
  <xsl:if test="position() != last()">,</xsl:if>
628
698
  </xsl:for-each>
@@ -648,22 +718,26 @@
648
718
  <fo:table-row height="4mm">
649
719
  <fo:table-cell number-columns-spanned="2" border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
650
720
  <fo:block>
651
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
652
- <fo:block font-size="6.5pt">
653
- <fo:inline font-size="8pt">IEC SC <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee/@number"/> : </fo:inline>
654
- <xsl:call-template name="addLetterSpacingSmallCaps">
655
- <xsl:with-param name="text" select="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
656
- </xsl:call-template>
657
- </fo:block>
658
- </xsl:if>
659
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
660
- <fo:block font-size="6.5pt">
661
- <fo:inline font-size="8pt">IEC TC <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee/@number"/> : </fo:inline>
662
- <xsl:call-template name="addLetterSpacingSmallCaps">
663
- <xsl:with-param name="text" select="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
664
- </xsl:call-template>
665
- </fo:block>
666
- </xsl:if>
721
+ <!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
722
+ else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
723
+ <xsl:choose>
724
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
725
+ <fo:block font-size="6.5pt">
726
+ <fo:inline font-size="8pt">IEC SC <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee/@number"/> : </fo:inline>
727
+ <xsl:call-template name="addLetterSpacingSmallCaps">
728
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
729
+ </xsl:call-template>
730
+ </fo:block>
731
+ </xsl:when>
732
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
733
+ <fo:block font-size="6.5pt">
734
+ <fo:inline font-size="8pt">IEC TC <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee/@number"/> : </fo:inline>
735
+ <xsl:call-template name="addLetterSpacingSmallCaps">
736
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
737
+ </xsl:call-template>
738
+ </fo:block>
739
+ </xsl:when>
740
+ </xsl:choose>
667
741
  </fo:block>
668
742
  </fo:table-cell>
669
743
  </fo:table-row>
@@ -676,7 +750,7 @@
676
750
  </fo:block>
677
751
  <fo:block font-size="9pt">
678
752
  <xsl:call-template name="addLetterSpacing">
679
- <xsl:with-param name="text" select="/iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:secretariat"/>
753
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:secretariat"/>
680
754
  </xsl:call-template>
681
755
  </fo:block>
682
756
  </fo:table-cell>
@@ -687,8 +761,9 @@
687
761
  </xsl:call-template>
688
762
  </fo:block>
689
763
  <fo:block font-size="9pt">
764
+ <!-- Example: Ms Shanti Conn -->
690
765
  <xsl:call-template name="addLetterSpacing">
691
- <xsl:with-param name="text" select="'Ms Shanti Conn'"/>
766
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:secretary"/>
692
767
  </xsl:call-template>
693
768
  </fo:block>
694
769
  </fo:table-cell>
@@ -703,6 +778,11 @@
703
778
  <xsl:with-param name="text" select="'Of interest to the following committees:'"/>
704
779
  </xsl:call-template>
705
780
  </fo:block>
781
+ <fo:block font-size="9pt">
782
+ <xsl:call-template name="addLetterSpacing">
783
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:interest-to-committees"/>
784
+ </xsl:call-template>
785
+ </fo:block>
706
786
  </fo:table-cell>
707
787
  <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
708
788
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
@@ -718,9 +798,15 @@
718
798
  </xsl:call-template>
719
799
  </xsl:if>
720
800
  </fo:block>
721
-
722
801
  <fo:block>
723
- <xsl:call-template name="insertCheckBoxOff"/>
802
+ <xsl:choose>
803
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
804
+ <xsl:call-template name="insertCheckBoxOn"/>
805
+ </xsl:when>
806
+ <xsl:otherwise>
807
+ <xsl:call-template name="insertCheckBoxOff"/>
808
+ </xsl:otherwise>
809
+ </xsl:choose>
724
810
  </fo:block>
725
811
 
726
812
  <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
@@ -746,13 +832,28 @@
746
832
  <xsl:with-param name="text" select="'Functions concerned:'"/>
747
833
  </xsl:call-template>
748
834
  </fo:block>
835
+ <!-- function: { emc | safety | environment | quality-assurance } -->
749
836
  <fo:block font-size="6.5pt">
750
- <xsl:call-template name="insertCheckBoxOff"/>
837
+ <xsl:choose>
838
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'emc'">
839
+ <xsl:call-template name="insertCheckBoxOn"/>
840
+ </xsl:when>
841
+ <xsl:otherwise>
842
+ <xsl:call-template name="insertCheckBoxOff"/>
843
+ </xsl:otherwise>
844
+ </xsl:choose>
751
845
  <xsl:call-template name="addLetterSpacingSmallCaps">
752
846
  <xsl:with-param name="text" select="'EMC'"/>
753
847
  </xsl:call-template>
754
848
  <fo:inline padding-right="33mm"> </fo:inline>
755
- <xsl:call-template name="insertCheckBoxOff"/>
849
+ <xsl:choose>
850
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'environment'">
851
+ <xsl:call-template name="insertCheckBoxOn"/>
852
+ </xsl:when>
853
+ <xsl:otherwise>
854
+ <xsl:call-template name="insertCheckBoxOff"/>
855
+ </xsl:otherwise>
856
+ </xsl:choose>
756
857
  <xsl:call-template name="addLetterSpacingSmallCaps">
757
858
  <xsl:with-param name="text" select="'Environment'"/>
758
859
  </xsl:call-template>
@@ -761,12 +862,26 @@
761
862
  <fo:table-cell padding="1.5mm" padding-bottom="0mm">
762
863
  <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
763
864
  <fo:block font-size="6.5pt">
764
- <xsl:call-template name="insertCheckBoxOff"/>
865
+ <xsl:choose>
866
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'quality-assurance'">
867
+ <xsl:call-template name="insertCheckBoxOn"/>
868
+ </xsl:when>
869
+ <xsl:otherwise>
870
+ <xsl:call-template name="insertCheckBoxOff"/>
871
+ </xsl:otherwise>
872
+ </xsl:choose>
765
873
  <xsl:call-template name="addLetterSpacingSmallCaps">
766
874
  <xsl:with-param name="text" select="'Quality assurance'"/>
767
875
  </xsl:call-template>
768
876
  <fo:inline padding-right="13mm"> </fo:inline>
769
- <xsl:call-template name="insertCheckBoxOn"/>
877
+ <xsl:choose>
878
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'safety'">
879
+ <xsl:call-template name="insertCheckBoxOn"/>
880
+ </xsl:when>
881
+ <xsl:otherwise>
882
+ <xsl:call-template name="insertCheckBoxOff"/>
883
+ </xsl:otherwise>
884
+ </xsl:choose>
770
885
  <xsl:call-template name="addLetterSpacingSmallCaps">
771
886
  <xsl:with-param name="text" select="'Safety'"/>
772
887
  </xsl:call-template>
@@ -780,18 +895,22 @@
780
895
  <fo:table-row>
781
896
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
782
897
  <fo:block font-size="6.5pt" margin-bottom="12pt">
783
- <xsl:call-template name="insertCheckBoxOn"/>
898
+ <xsl:choose>
899
+ <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
900
+ <xsl:call-template name="insertCheckBoxOn"/>
901
+ </xsl:when>
902
+ <xsl:otherwise>
903
+ <xsl:call-template name="insertCheckBoxOff"/>
904
+ </xsl:otherwise>
905
+ </xsl:choose>
784
906
  <xsl:call-template name="addLetterSpacingSmallCaps">
785
907
  <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
786
908
  </xsl:call-template>
787
909
  </fo:block>
788
- <fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt">
789
- <xsl:call-template name="addLetterSpacing">
790
- <xsl:with-param name="text" select="'Attention IEC-CENELEC parallel voting'"/>
791
- </xsl:call-template>
792
- </fo:block>
793
910
 
794
- <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
911
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']"/>
912
+
913
+ <!-- <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
795
914
  <xsl:if test="$stage-abbreviation = 'FDIS'">
796
915
  <xsl:call-template name="addLetterSpacing">
797
916
  <xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Final Draft International Standard (FDIS) is submitted for parallel voting.'"/>
@@ -807,11 +926,19 @@
807
926
  <xsl:call-template name="addLetterSpacing">
808
927
  <xsl:with-param name="text" select="'The CENELEC members are invited to vote through the CENELEC online voting system.'"/>
809
928
  </xsl:call-template>
810
- </fo:block>
929
+ </fo:block> -->
930
+
811
931
  </fo:table-cell>
812
932
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
813
933
  <fo:block font-size="6.5pt" margin-bottom="6pt">
814
- <xsl:call-template name="insertCheckBoxOff"/>
934
+ <xsl:choose>
935
+ <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
936
+ <xsl:call-template name="insertCheckBoxOff"/>
937
+ </xsl:when>
938
+ <xsl:otherwise>
939
+ <xsl:call-template name="insertCheckBoxOn"/>
940
+ </xsl:otherwise>
941
+ </xsl:choose>
815
942
  <xsl:call-template name="addLetterSpacingSmallCaps">
816
943
  <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
817
944
  </xsl:call-template>
@@ -825,7 +952,10 @@
825
952
  </fo:block-container>
826
953
 
827
954
  <fo:block-container font-size="8pt" background-color="rgb(236, 232, 232)" margin-top="5mm" padding="2mm" text-align="justify" border="1.5pt solid white">
828
- <xsl:if test="$stage-abbreviation = 'FDIS'">
955
+ <fo:block>
956
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:license-statement" mode="cover-page-internal"/>
957
+ </fo:block>
958
+ <!-- <xsl:if test="$stage-abbreviation = 'FDIS'">
829
959
  <fo:block margin-bottom="6pt">
830
960
  <xsl:call-template name="addLetterSpacing">
831
961
  <xsl:with-param name="text">This document is a draft distributed for approval. It may not be referred to as an International Standard until published as such.</xsl:with-param>
@@ -842,7 +972,17 @@
842
972
  </xsl:call-template>
843
973
  </fo:block>
844
974
  </xsl:if>
845
- <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
975
+ <xsl:if test="$stage-abbreviation = 'NWIP' or
976
+ $stage-abbreviation = 'PWI' or
977
+ $stage-abbreviation = 'NP' or
978
+ $stage-abbreviation = 'AWI' or
979
+ $stage-abbreviation = 'WD' or
980
+ $stage-abbreviation = 'CD' or
981
+ $stage-abbreviation = 'CDV' or
982
+ $stage-abbreviation = 'CD-TSTR' or
983
+ $stage-abbreviation = 'DTS' or
984
+ $stage-abbreviation = 'DTR' or
985
+ $stage-abbreviation = 'DPAS'">
846
986
  <fo:block margin-bottom="6pt">
847
987
  <xsl:call-template name="addLetterSpacing">
848
988
  <xsl:with-param name="text">This document is still under study and subject to change. It should not be used for reference purposes.</xsl:with-param>
@@ -853,7 +993,7 @@
853
993
  <xsl:with-param name="text">Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</xsl:with-param>
854
994
  </xsl:call-template>
855
995
  </fo:block>
856
- </xsl:if>
996
+ </xsl:if> -->
857
997
  </fo:block-container>
858
998
 
859
999
  <fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
@@ -864,7 +1004,7 @@
864
1004
  </fo:block>
865
1005
  <fo:block font-size="9pt" font-weight="bold">
866
1006
  <xsl:call-template name="addLetterSpacing">
867
- <xsl:with-param name="text"><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'main']"/></xsl:with-param>
1007
+ <xsl:with-param name="text"><xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:title[@language = $lang and @type = 'main']"/></xsl:with-param>
868
1008
  </xsl:call-template>
869
1009
  </fo:block>
870
1010
  </fo:block-container>
@@ -877,24 +1017,24 @@
877
1017
  <xsl:text>PROPOSED STABILITY DATE: </xsl:text>
878
1018
  </xsl:with-param>
879
1019
  </xsl:call-template>
880
- <fo:inline font-size="9pt">2023</fo:inline>
1020
+ <!-- 2023 -->
1021
+ <fo:inline font-size="9pt"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='unchanged']/iec:on"/></fo:inline>
881
1022
  </fo:block>
882
1023
  </fo:block-container>
883
1024
  </xsl:if>
884
1025
 
885
- <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="13mm" padding="1mm" margin-top="3mm">
1026
+ <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
886
1027
  <fo:block font-size="6.5pt" margin-bottom="6pt">
887
1028
  <xsl:call-template name="addLetterSpacingSmallCaps">
888
1029
  <xsl:with-param name="text">Note from TC/SC officers:</xsl:with-param>
889
1030
  </xsl:call-template>
890
1031
  </fo:block>
891
- <!-- <fo:block font-size="9pt">This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in</fo:block> -->
1032
+ <!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
1033
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:tc-sc-officers-note"/>
892
1034
  </fo:block-container>
893
1035
 
894
-
895
-
896
- <xsl:if test="$stage-abbreviation = 'FDIS'">
897
- <fo:block-container font-size="9pt" border="1.5 solid" border-color="rgb(221, 213, 213)" height="13mm" padding="1mm" margin-top="3mm">
1036
+ <!-- <xsl:if test="$stage-abbreviation = 'FDIS'">
1037
+ <fo:block-container font-size="9pt" border="1.5 solid" border-color="rgb(221, 213, 213)" height="13mm" padding="1mm" margin-top="3mm">
898
1038
  <fo:block margin-bottom="6pt">
899
1039
  <xsl:call-template name="addLetterSpacing">
900
1040
  <xsl:with-param name="text">
@@ -910,14 +1050,62 @@
910
1050
  </xsl:call-template>
911
1051
  </fo:block>
912
1052
  </fo:block-container>
913
- </xsl:if>
1053
+ </xsl:if> -->
914
1054
 
915
1055
  </fo:flow>
916
1056
  </fo:page-sequence>
917
1057
  </xsl:if>
918
1058
 
1059
+ <xsl:if test="$debug = 'true'">
1060
+ <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
1061
+ DEBUG
1062
+ contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
1063
+ <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
1064
+ </xsl:if>
1065
+
1066
+ <xsl:for-each select="//iec:iec-standard">
1067
+ <xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
1068
+ <xsl:variable name="current_document">
1069
+ <xsl:copy-of select="."/>
1070
+ </xsl:variable>
1071
+ <xsl:for-each select="xalan:nodeset($current_document)">
1072
+
1073
+ <xsl:variable name="docid">
1074
+ <xsl:call-template name="getDocumentId"/>
1075
+ </xsl:variable>
1076
+
1077
+
1078
+ <fo:page-sequence master-reference="document" format="1" force-page-count="no-force"> <!-- initial-page-number="2" -->
1079
+ <xsl:variable name="num"><xsl:number count="iec:iec-standard" level="any"/></xsl:variable>
1080
+ <xsl:if test="$num = '1'">
1081
+ <xsl:attribute name="initial-page-number">2</xsl:attribute>
1082
+ </xsl:if>
1083
+
1084
+ <xsl:call-template name="insertHeaderFooter"/>
1085
+ <fo:flow flow-name="xsl-region-body">
1086
+
1087
+ <xsl:call-template name="insertTOCpages">
1088
+ <xsl:with-param name="contents" select="xalan:nodeset($contents)/doc[@id = $docid]"/>
1089
+ </xsl:call-template>
1090
+
1091
+ <xsl:call-template name="insertPrefacepages">
1092
+ <xsl:with-param name="lang" select="$lang"/>
1093
+ </xsl:call-template>
1094
+
1095
+
1096
+ </fo:flow>
1097
+ </fo:page-sequence>
1098
+
1099
+ <xsl:call-template name="insertBodypages">
1100
+ <xsl:with-param name="lang" select="$lang"/>
1101
+ </xsl:call-template>
1102
+
1103
+ </xsl:for-each>
1104
+ </xsl:for-each>
1105
+
919
1106
 
920
- <fo:page-sequence master-reference="document" format="1" initial-page-number="2" force-page-count="no-force">
1107
+
1108
+ <!-- <fo:page-sequence master-reference="document" format="1" initial-page-number="2" force-page-count="no-force">
921
1109
  <xsl:call-template name="insertHeaderFooter"/>
922
1110
  <fo:flow flow-name="xsl-region-body">
923
1111
 
@@ -925,13 +1113,7 @@
925
1113
  <xsl:call-template name="getDocumentId"/>
926
1114
  </xsl:variable>
927
1115
 
928
- <xsl:if test="$debug = 'true'">
929
- <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
930
- DEBUG
931
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
932
- <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
933
- </xsl:if>
934
-
1116
+
935
1117
  <xsl:call-template name="insertTOCpages">
936
1118
  <xsl:with-param name="contents" select="xalan:nodeset($contents)/doc[@id = $docid]"/>
937
1119
  </xsl:call-template>
@@ -943,11 +1125,11 @@
943
1125
 
944
1126
 
945
1127
  <xsl:call-template name="insertBodypages"/>
946
-
1128
+ -->
947
1129
 
948
1130
 
949
1131
  <!-- Test=<xsl:copy-of select="$additionalDocs"/> Test -->
950
- <xsl:for-each select="xalan:nodeset($additionalXMLsArray)/*">
1132
+ <!-- <xsl:for-each select="xalan:nodeset($additionalXMLsArray)/*">
951
1133
 
952
1134
  <xsl:for-each select="document(.)">
953
1135
  <xsl:variable name="lang">
@@ -988,7 +1170,7 @@
988
1170
 
989
1171
  </xsl:for-each>
990
1172
  </xsl:for-each>
991
- </xsl:for-each>
1173
+ </xsl:for-each> -->
992
1174
 
993
1175
 
994
1176
 
@@ -1007,6 +1189,7 @@
1007
1189
  <fo:block font-size="11pt" color="{$color_blue}" margin-bottom="12pt" line-height="150%">
1008
1190
  <fo:block-container width="42mm">
1009
1191
  <fo:block>
1192
+ <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:contributor[iec:role/@type = 'publisher']/iec:organization/iec:name))"/>
1010
1193
  <xsl:value-of select="$publisher"/>
1011
1194
  </fo:block>
1012
1195
  </fo:block-container>
@@ -1022,14 +1205,14 @@
1022
1205
  Fax: + 41 22 919 03 00
1023
1206
  info@iec.ch
1024
1207
  www.iec.ch -->
1025
- <xsl:variable name="telpos" select="count(/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
1208
+ <xsl:variable name="telpos" select="count((//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
1026
1209
  <xsl:choose>
1027
1210
  <xsl:when test="$telpos != 0">
1028
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']/node()[position() &lt;= $telpos]" mode="coverpage"/>
1029
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']/node()[position() &gt;= $telpos]" mode="coverpage"/>
1211
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &lt;= $telpos]" mode="coverpage"/>
1212
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &gt;= $telpos]" mode="coverpage"/>
1030
1213
  </xsl:when>
1031
1214
  <xsl:otherwise>
1032
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[@id = 'boilerplate-address']" mode="coverpage"/>
1215
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
1033
1216
  </xsl:otherwise>
1034
1217
  </xsl:choose>
1035
1218
  </fo:block>
@@ -1041,11 +1224,25 @@
1041
1224
  </fo:root>
1042
1225
  </xsl:template>
1043
1226
 
1227
+ <xsl:template match="iec:tc-sc-officers-note/iec:p">
1228
+ <fo:block><xsl:apply-templates/></fo:block>
1229
+ </xsl:template>
1230
+
1044
1231
  <xsl:template name="insertCoverPart1">
1232
+ <xsl:variable name="lang_second">
1233
+ <xsl:choose>
1234
+ <xsl:when test="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']">
1235
+ <xsl:value-of select="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']"/>
1236
+ </xsl:when>
1237
+ <xsl:otherwise>
1238
+ <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:title[@language and @language != $lang]/@language"/>
1239
+ </xsl:otherwise>
1240
+ </xsl:choose>
1241
+ </xsl:variable>
1045
1242
  <fo:block text-align-last="justify">
1046
1243
  <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IEC))}" width="18mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/>
1047
1244
  <fo:inline font-size="8pt" padding-left="0.5mm" color="rgb(88, 88, 90)">®</fo:inline>
1048
- <fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso']"/></fo:inline>
1245
+ <fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso' or @type = 'ISO']"/></fo:inline>
1049
1246
  </fo:block>
1050
1247
  <fo:block font-size="10.5pt" text-align="right" margin-top="0.5mm">
1051
1248
  <xsl:variable name="title-edition">
@@ -1055,12 +1252,13 @@
1055
1252
  </xsl:variable>
1056
1253
  <xsl:value-of select="$title-edition"/>
1057
1254
  <fo:inline>
1058
- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:edition"/>
1059
- <xsl:if test="not(contains(/iec:iec-standard/iec:bibdata/iec:edition, '.'))">.0</xsl:if>
1255
+ <xsl:variable name="edition" select="//iec:iec-standard/iec:bibdata/iec:edition"/>
1256
+ <xsl:value-of select="$edition"/>
1257
+ <xsl:if test="not(contains($edition, '.'))">.0</xsl:if>
1060
1258
  </fo:inline>
1061
1259
  <fo:inline padding-left="4mm">
1062
1260
  <!-- Example 2014-05 -->
1063
- <xsl:value-of select="substring(/iec:iec-standard/iec:bibdata/iec:version/iec:revision-date, 1, 7)"/>
1261
+ <xsl:value-of select="substring(//iec:iec-standard/iec:bibdata/iec:version/iec:revision-date, 1, 7)"/>
1064
1262
  </fo:inline>
1065
1263
  <fo:block> </fo:block>
1066
1264
  </fo:block>
@@ -1076,6 +1274,7 @@
1076
1274
  <xsl:text>PRE-RELEASE VERSION (FDIS)</xsl:text>
1077
1275
  </xsl:when>
1078
1276
  <xsl:when test="$stage &gt;= 60">
1277
+ <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new((//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:doctype[@language = $lang]))"/>
1079
1278
  <xsl:value-of select="$doctype_uppercased"/>
1080
1279
  </xsl:when>
1081
1280
  <xsl:otherwise>
@@ -1083,17 +1282,18 @@
1083
1282
  <xsl:text> (</xsl:text><xsl:value-of select="$stage-abbreviation"/><xsl:text>)</xsl:text>
1084
1283
  </xsl:otherwise>
1085
1284
  </xsl:choose>
1086
-
1087
1285
  </fo:block>
1088
1286
  </fo:block-container>
1089
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
1287
+
1288
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second]">
1090
1289
  <fo:block-container height="26mm" margin-top="10pt" display-align="after">
1091
1290
  <xsl:if test="$stage &gt;= 60">
1092
1291
  <xsl:attribute name="width">100mm</xsl:attribute>
1093
1292
  </xsl:if>
1094
1293
  <fo:block color="{$color_gray}">
1095
1294
  <xsl:if test="$stage &gt;= 60">
1096
- <xsl:text>NORME INTERNATIONALE</xsl:text>
1295
+ <!-- <xsl:text>NORME INTERNATIONALE</xsl:text> -->
1296
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:doctype[@language = $lang_second]))"/>
1097
1297
  </xsl:if>
1098
1298
  </fo:block>
1099
1299
  </fo:block-container>
@@ -1104,21 +1304,39 @@
1104
1304
  <fo:block-container margin-left="0mm">
1105
1305
  <fo:block-container height="6mm">
1106
1306
  <fo:block text-align="right" margin-top="-4.5mm" margin-right="-1mm">
1107
- <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"/>
1307
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:ext/iec:accessibility-color-inside = 'true'">
1308
+ <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"/>
1309
+ </xsl:if>
1108
1310
  </fo:block>
1109
1311
  </fo:block-container>
1110
1312
  <fo:block-container border-bottom="0.5pt solid {$color_gray}" margin-top="4mm" margin-bottom="16pt" height="14mm" display-align="center">
1111
1313
  <fo:block font-size="10pt" color="{$color_blue}" margin-bottom="4pt">
1112
- Example: BASIC EMC PUBLICATION
1314
+ <xsl:choose>
1315
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
1316
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal[@language = $lang]))"/>
1317
+ </xsl:when>
1318
+ <xsl:otherwise><!-- horizontal is false -->
1319
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:function[@language = $lang]))"/>
1320
+ </xsl:otherwise>
1321
+ </xsl:choose>
1322
+ <!-- Example: BASIC EMC PUBLICATION -->
1113
1323
  <!-- HORIZONTAL STANDARD -->
1114
1324
  <!-- Basic EMC Publication
1115
1325
  Basic Safety Publication
1116
1326
  Basic Environment Publication
1117
1327
  Basic Quality Assurance Publication -->
1118
1328
  </fo:block>
1119
- <xsl:if test="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
1329
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second]">
1120
1330
  <fo:block font-size="10pt" margin-bottom="10pt">
1121
- Example: PUBLICATION FONDAMENTALE EN CEM
1331
+ <xsl:choose>
1332
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
1333
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal[@language = $lang_second]))"/>
1334
+ </xsl:when>
1335
+ <xsl:otherwise><!-- horizontal is false -->
1336
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:function[@language = $lang_second]))"/>
1337
+ </xsl:otherwise>
1338
+ </xsl:choose>
1339
+ <!-- Example: PUBLICATION FONDAMENTALE EN CEM -->
1122
1340
  <!-- NORME HORIZONTALE -->
1123
1341
  </fo:block>
1124
1342
  </xsl:if>
@@ -1132,42 +1350,62 @@
1132
1350
  Electromagnetic compatibility (EMC) –
1133
1351
  Part 4-5: Testing and measurement techniques – Surge immunity test
1134
1352
  -->
1353
+ <xsl:variable name="title-intro" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']"/>
1135
1354
  <xsl:value-of select="$title-intro"/>
1355
+ <xsl:variable name="title-main" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']"/>
1136
1356
  <xsl:if test="$title-main != ''">
1137
1357
  <xsl:text> — </xsl:text>
1138
1358
  <xsl:value-of select="$title-main"/>
1139
1359
  </xsl:if>
1140
- <xsl:variable name="part-en" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-part']"/>
1141
- <xsl:if test="$part-en != ''">
1360
+ <xsl:variable name="title-part" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/>
1361
+ <xsl:if test="$title-part != ''">
1142
1362
  <xsl:text> — </xsl:text>
1143
1363
  <xsl:value-of select="$linebreak"/>
1144
1364
  <xsl:if test="$part != ''">
1145
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part)"/>
1365
+ <xsl:variable name="localized_part" select="(//iec:iec-standard)[1]/iec:localized-strings/iec:localized-string[@key='locality.part' and @language=$lang]"/>
1366
+ <!-- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($localized_part),'#',$part)"/> -->
1367
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1146
1368
  <!-- <xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
1147
1369
  <xsl:text>: </xsl:text> -->
1148
1370
  </xsl:if>
1149
- <xsl:value-of select="$part-en"/>
1371
+ <xsl:value-of select="$title-part"/>
1150
1372
  </xsl:if>
1151
1373
  </fo:block>
1152
1374
  <fo:block font-size="12pt" font-weight="bold">
1153
1375
  <!-- Example: Compatibilité électromagnétique (CEM) –
1154
1376
  Partie 4-5: Techniques d'essai et de mesure – Essai d'immunité aux ondes de
1155
1377
  choc -->
1156
- <xsl:value-of select="$title-intro-fr"/>
1157
- <xsl:if test="$title-main-fr != ''">
1378
+ <xsl:variable name="title-intro-second" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-intro']"/>
1379
+ <xsl:value-of select="$title-intro-second"/>
1380
+ <xsl:variable name="title-main-second" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-main']"/>
1381
+ <xsl:if test="$title-main-second != ''">
1158
1382
  <xsl:text> — </xsl:text>
1159
- <xsl:value-of select="$title-main-fr"/>
1383
+ <xsl:value-of select="$title-main-second"/>
1160
1384
  </xsl:if>
1161
- <xsl:variable name="part-fr" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr' and @type = 'title-part']"/>
1162
- <xsl:if test="$part-fr != ''">
1385
+ <xsl:variable name="part-second" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-part']"/>
1386
+ <xsl:if test="$part-second != ''">
1163
1387
  <xsl:text> — </xsl:text>
1164
1388
  <xsl:value-of select="$linebreak"/>
1165
1389
  <xsl:if test="$part != ''">
1166
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part)"/>
1390
+
1391
+ <xsl:choose>
1392
+ <xsl:when test="(//iec:iec-standard)[2]/iec:localized-strings/iec:localized-string[@key='locality.part' and @language=$lang_second]">
1393
+ <xsl:variable name="localized_part">
1394
+ <xsl:value-of select="(//iec:iec-standard)[2]/iec:localized-strings/iec:localized-string[@key='locality.part' and @language=$lang_second]"/>
1395
+ </xsl:variable>
1396
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1397
+ </xsl:when>
1398
+ <xsl:otherwise>
1399
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang_second]),'#',$part)"/>
1400
+ </xsl:otherwise>
1401
+ </xsl:choose>
1402
+
1403
+ <!-- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($localized_part),'#',$part)"/> -->
1404
+
1167
1405
  <!-- <xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
1168
1406
  <xsl:text>: </xsl:text> -->
1169
1407
  </xsl:if>
1170
- <xsl:value-of select="$part-fr"/>
1408
+ <xsl:value-of select="$part-second"/>
1171
1409
  </xsl:if>
1172
1410
  </fo:block>
1173
1411
  </fo:block-container>
@@ -1289,7 +1527,8 @@
1289
1527
  <xsl:param name="lang" select="$lang"/>
1290
1528
  <fo:block break-after="page"/>
1291
1529
  <fo:block-container font-size="12pt" text-align="center" margin-bottom="18pt">
1292
- <fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:contributor/iec:organization/iec:name))"/></fo:block>
1530
+ <!-- <fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:contributor/iec:organization/iec:name))"/></fo:block> -->
1531
+ <fo:block><xsl:value-of select="/iec:iec-standard/iec:localized-strings/iec:localized-string[@key='IEC' and @language=$lang]"/></fo:block>
1293
1532
  <fo:block>___________</fo:block>
1294
1533
  <fo:block> </fo:block>
1295
1534
  <fo:block font-weight="bold">
@@ -1304,7 +1543,9 @@
1304
1543
  <fo:block>
1305
1544
  <xsl:if test="$part != ''">
1306
1545
  <!-- Example: Part 1: Riz -->
1307
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang]),'#',$part)"/>
1546
+ <!-- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang]),'#',$part)"/> -->
1547
+ <xsl:variable name="localized_part" select="//iec:iec-standard/iec:localized-strings/iec:localized-string[@key='locality.part' and @language = $lang]"/>
1548
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1308
1549
  </xsl:if>
1309
1550
  <xsl:value-of select="$title-part"/>
1310
1551
  </fo:block>
@@ -1344,7 +1585,9 @@
1344
1585
  <fo:block>
1345
1586
  <xsl:if test="$part != ''">
1346
1587
  <!-- Example: Part 1: Rice -->
1347
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang]),'#',$part)"/>
1588
+ <!-- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang]),'#',$part)"/> -->
1589
+ <xsl:variable name="localized_part" select="//iec:iec-standard/iec:localized-strings/iec:localized-string[@key='locality.part' and @language = $lang]"/>
1590
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1348
1591
  </xsl:if>
1349
1592
  <xsl:value-of select="$title-part"/>
1350
1593
  </fo:block>
@@ -1367,6 +1610,68 @@
1367
1610
  <xsl:apply-templates/>
1368
1611
  </xsl:template>
1369
1612
 
1613
+
1614
+ <xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']" priority="3">
1615
+ <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
1616
+ <xsl:apply-templates/>
1617
+ </fo:block>
1618
+ </xsl:template>
1619
+
1620
+ <xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//iec:title" priority="3">
1621
+ <fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt">
1622
+ <xsl:apply-templates/>
1623
+ </fo:block>
1624
+ </xsl:template>
1625
+
1626
+ <xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//iec:p" priority="3">
1627
+ <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
1628
+ <xsl:apply-templates/>
1629
+ </fo:block>
1630
+ </xsl:template>
1631
+
1632
+ <xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//text()" priority="3">
1633
+ <!-- Example: Attention IEC-CENELEC parallel voting -->
1634
+ <xsl:if test="normalize-space() ! = ''">
1635
+ <xsl:call-template name="addLetterSpacing">
1636
+ <xsl:with-param name="text" select="."/>
1637
+ </xsl:call-template>
1638
+ </xsl:if>
1639
+ </xsl:template>
1640
+
1641
+ <xsl:template match="iec:boilerplate/iec:feedback-statement">
1642
+ <fo:block margin-top="6pt" font-size="1pt" span="all">
1643
+ </fo:block>
1644
+ <xsl:apply-templates select="*[not(@id) or @id != 'boilerplate-cenelec-attention']"/>
1645
+ </xsl:template>
1646
+
1647
+ <xsl:template match="iec:feedback-statement//iec:clause/iec:title" priority="2">
1648
+ <fo:block font-weight="bold" keep-with-next="always"><xsl:apply-templates/></fo:block>
1649
+ </xsl:template>
1650
+
1651
+ <xsl:template match="iec:feedback-statement//iec:clause/iec:p" priority="2">
1652
+ <fo:block margin-bottom="6pt"><xsl:apply-templates/></fo:block>
1653
+ </xsl:template>
1654
+
1655
+ <xsl:template match="iec:feedback-statement/iec:clause[not(iec:clause)]" priority="2">
1656
+ <fo:block span="all" text-align="justify">
1657
+ <!-- <xsl:if test="not(preceding-sibling::iec:clause)">
1658
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1659
+ </xsl:if> -->
1660
+ <xsl:apply-templates/>
1661
+ </fo:block>
1662
+ </xsl:template>
1663
+
1664
+ <xsl:template match="iec:feedback-statement/iec:clause[iec:clause]" priority="2">
1665
+ <fo:block text-align="justify">
1666
+ <xsl:apply-templates/>
1667
+ </fo:block>
1668
+ </xsl:template>
1669
+ <xsl:template match="iec:feedback-statement/iec:clause/iec:clause" priority="3">
1670
+ <fo:block text-align="justify">
1671
+ <xsl:apply-templates/>
1672
+ </fo:block>
1673
+ </xsl:template>
1674
+
1370
1675
  <!-- ============================= -->
1371
1676
  <!-- CONTENTS -->
1372
1677
  <!-- ============================= -->
@@ -1458,6 +1763,23 @@
1458
1763
  </fo:block>
1459
1764
  </xsl:template>
1460
1765
 
1766
+ <xsl:template match="iec:license-statement//iec:title" mode="cover-page-internal">
1767
+ <fo:block text-align="center" font-weight="bold">
1768
+ <xsl:apply-templates/>
1769
+ </fo:block>
1770
+ </xsl:template>
1771
+ <xsl:template match="iec:license-statement//iec:p" mode="cover-page-internal">
1772
+ <fo:block margin-bottom="6pt">
1773
+ <xsl:apply-templates mode="cover-page-internal"/>
1774
+ </fo:block>
1775
+ </xsl:template>
1776
+ <xsl:template match="iec:license-statement//iec:p//text()" mode="cover-page-internal">
1777
+ <xsl:call-template name="addLetterSpacing">
1778
+ <xsl:with-param name="text"><xsl:value-of select="."/></xsl:with-param>
1779
+ </xsl:call-template>
1780
+ </xsl:template>
1781
+
1782
+
1461
1783
  <!-- <fo:block margin-bottom="12pt">© ISO 2019, Published in Switzerland.</fo:block>
1462
1784
  <fo:block font-size="10pt" margin-bottom="12pt">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of the requester.</fo:block>
1463
1785
  <fo:block font-size="10pt" text-indent="7.1mm">
@@ -1493,6 +1815,15 @@
1493
1815
  <xsl:apply-templates/>
1494
1816
  </fo:block>
1495
1817
  </xsl:template>
1818
+
1819
+ <!-- copyright text in footer internal footer -->
1820
+ <xsl:template match="iec:copyright-statement//iec:p[not(@id)]//text()">
1821
+ <xsl:if test="normalize-space() ! = ''">
1822
+ <xsl:call-template name="addLetterSpacing">
1823
+ <xsl:with-param name="text" select="normalize-space(.)"/>
1824
+ </xsl:call-template>
1825
+ </xsl:if>
1826
+ </xsl:template>
1496
1827
 
1497
1828
 
1498
1829
  <xsl:template match="iec:iec-standard/iec:preface/iec:foreword" priority="3">
@@ -1721,9 +2052,9 @@
1721
2052
  <fo:inline id="{$lang}_footnote_{@reference}" keep-with-next.within-line="always" baseline-shift="15%" padding-right="3mm"> <!-- padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
1722
2053
  <xsl:value-of select="$number + count(//iec:bibitem/iec:note)"/><!-- <xsl:text>)</xsl:text> -->
1723
2054
  </fo:inline>
1724
- <xsl:for-each select="iec:p">
1725
- <xsl:apply-templates/>
1726
- </xsl:for-each>
2055
+ <!-- <xsl:for-each select="iec:p"> -->
2056
+ <xsl:apply-templates/>
2057
+ <!-- </xsl:for-each> -->
1727
2058
  </fo:block>
1728
2059
  </fo:footnote-body>
1729
2060
  </fo:footnote>
@@ -1819,10 +2150,10 @@
1819
2150
  <xsl:otherwise> <!-- for ordered lists -->
1820
2151
  <xsl:choose>
1821
2152
  <xsl:when test="../@type = 'arabic'">
1822
- <xsl:number format="a)"/>
2153
+ <xsl:number format="a)" lang="en"/>
1823
2154
  </xsl:when>
1824
2155
  <xsl:when test="../@type = 'alphabet'">
1825
- <xsl:number format="a)"/>
2156
+ <xsl:number format="a)" lang="en"/>
1826
2157
  </xsl:when>
1827
2158
  <xsl:otherwise>
1828
2159
  <xsl:number format="1)"/>
@@ -2508,10 +2839,12 @@
2508
2839
 
2509
2840
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2510
2841
 
2842
+
2511
2843
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
2512
2844
 
2513
2845
 
2514
2846
 
2847
+
2515
2848
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
2516
2849
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
2517
2850
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
@@ -2545,6 +2878,7 @@
2545
2878
  </xsl:attribute-set><xsl:attribute-set name="term-style">
2546
2879
 
2547
2880
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2881
+
2548
2882
 
2549
2883
 
2550
2884
 
@@ -2661,7 +2995,7 @@
2661
2995
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2662
2996
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
2663
2997
  <xsl:call-template name="add-zero-spaces-java"/>
2664
- </xsl:template><xsl:template match="*[local-name()='table']">
2998
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2665
2999
 
2666
3000
  <xsl:variable name="simple-table">
2667
3001
  <xsl:call-template name="getSimpleTable"/>
@@ -2707,10 +3041,12 @@
2707
3041
 
2708
3042
 
2709
3043
  <xsl:variable name="colwidths">
2710
- <xsl:call-template name="calculate-column-widths">
2711
- <xsl:with-param name="cols-count" select="$cols-count"/>
2712
- <xsl:with-param name="table" select="$simple-table"/>
2713
- </xsl:call-template>
3044
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
3045
+ <xsl:call-template name="calculate-column-widths">
3046
+ <xsl:with-param name="cols-count" select="$cols-count"/>
3047
+ <xsl:with-param name="table" select="$simple-table"/>
3048
+ </xsl:call-template>
3049
+ </xsl:if>
2714
3050
  </xsl:variable>
2715
3051
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2716
3052
 
@@ -2755,7 +3091,12 @@
2755
3091
 
2756
3092
  <xsl:variable name="table_attributes">
2757
3093
  <attribute name="table-layout">fixed</attribute>
2758
- <attribute name="width">100%</attribute>
3094
+ <attribute name="width">
3095
+ <xsl:choose>
3096
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
3097
+ <xsl:otherwise>100%</xsl:otherwise>
3098
+ </xsl:choose>
3099
+ </attribute>
2759
3100
  <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2760
3101
  <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2761
3102
 
@@ -2786,16 +3127,25 @@
2786
3127
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2787
3128
  </xsl:if>
2788
3129
 
2789
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2790
- <xsl:choose>
2791
- <xsl:when test=". = 1 or . = 0">
2792
- <fo:table-column column-width="proportional-column-width(2)"/>
2793
- </xsl:when>
2794
- <xsl:otherwise>
2795
- <fo:table-column column-width="proportional-column-width({.})"/>
2796
- </xsl:otherwise>
2797
- </xsl:choose>
2798
- </xsl:for-each>
3130
+ <xsl:choose>
3131
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
3132
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
3133
+ <fo:table-column column-width="{@width}"/>
3134
+ </xsl:for-each>
3135
+ </xsl:when>
3136
+ <xsl:otherwise>
3137
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3138
+ <xsl:choose>
3139
+ <xsl:when test=". = 1 or . = 0">
3140
+ <fo:table-column column-width="proportional-column-width(2)"/>
3141
+ </xsl:when>
3142
+ <xsl:otherwise>
3143
+ <fo:table-column column-width="proportional-column-width({.})"/>
3144
+ </xsl:otherwise>
3145
+ </xsl:choose>
3146
+ </xsl:for-each>
3147
+ </xsl:otherwise>
3148
+ </xsl:choose>
2799
3149
 
2800
3150
  <xsl:choose>
2801
3151
  <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
@@ -2808,10 +3158,12 @@
2808
3158
 
2809
3159
  </fo:table>
2810
3160
 
3161
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2811
3162
  <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2812
3163
  <xsl:call-template name="insertTableFooterInSeparateTable">
2813
3164
  <xsl:with-param name="table_attributes" select="$table_attributes"/>
2814
3165
  <xsl:with-param name="colwidths" select="$colwidths"/>
3166
+ <xsl:with-param name="colgroup" select="$colgroup"/>
2815
3167
  </xsl:call-template>
2816
3168
  </xsl:for-each>
2817
3169
 
@@ -3077,12 +3429,22 @@
3077
3429
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
3078
3430
  <xsl:param name="table_attributes"/>
3079
3431
  <xsl:param name="colwidths"/>
3432
+ <xsl:param name="colgroup"/>
3080
3433
 
3081
3434
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3082
3435
 
3083
3436
  <xsl:if test="$isNoteOrFnExist = 'true'">
3084
3437
 
3085
- <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
3438
+ <xsl:variable name="cols-count">
3439
+ <xsl:choose>
3440
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3441
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
3442
+ </xsl:when>
3443
+ <xsl:otherwise>
3444
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
3445
+ </xsl:otherwise>
3446
+ </xsl:choose>
3447
+ </xsl:variable>
3086
3448
 
3087
3449
  <fo:table keep-with-previous="always">
3088
3450
  <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
@@ -3100,16 +3462,25 @@
3100
3462
  </xsl:choose>
3101
3463
  </xsl:for-each>
3102
3464
 
3103
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3104
- <xsl:choose>
3105
- <xsl:when test=". = 1 or . = 0">
3106
- <fo:table-column column-width="proportional-column-width(2)"/>
3107
- </xsl:when>
3108
- <xsl:otherwise>
3109
- <fo:table-column column-width="proportional-column-width({.})"/>
3110
- </xsl:otherwise>
3111
- </xsl:choose>
3112
- </xsl:for-each>
3465
+ <xsl:choose>
3466
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3467
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3468
+ <fo:table-column column-width="{@width}"/>
3469
+ </xsl:for-each>
3470
+ </xsl:when>
3471
+ <xsl:otherwise>
3472
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3473
+ <xsl:choose>
3474
+ <xsl:when test=". = 1 or . = 0">
3475
+ <fo:table-column column-width="proportional-column-width(2)"/>
3476
+ </xsl:when>
3477
+ <xsl:otherwise>
3478
+ <fo:table-column column-width="proportional-column-width({.})"/>
3479
+ </xsl:otherwise>
3480
+ </xsl:choose>
3481
+ </xsl:for-each>
3482
+ </xsl:otherwise>
3483
+ </xsl:choose>
3113
3484
 
3114
3485
  <fo:table-body>
3115
3486
  <fo:table-row>
@@ -3572,7 +3943,9 @@
3572
3943
  </xsl:template><xsl:template match="*[local-name()='dl']">
3573
3944
  <fo:block-container>
3574
3945
 
3575
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3946
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3947
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3948
+ </xsl:if>
3576
3949
 
3577
3950
 
3578
3951
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -3587,6 +3960,7 @@
3587
3960
  <fo:block-container>
3588
3961
 
3589
3962
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3963
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3590
3964
 
3591
3965
 
3592
3966
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -3786,12 +4160,32 @@
3786
4160
  </xsl:otherwise>
3787
4161
  </xsl:choose>
3788
4162
  </xsl:template><xsl:template name="getMaxLength_dt">
3789
- <xsl:for-each select="*[local-name()='dt']">
3790
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3791
- <xsl:if test="position() = 1">
3792
- <xsl:value-of select="string-length(normalize-space(.))"/>
3793
- </xsl:if>
3794
- </xsl:for-each>
4163
+ <xsl:variable name="lengths">
4164
+ <xsl:for-each select="*[local-name()='dt']">
4165
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
4166
+ <xsl:variable name="attributes">
4167
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
4168
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
4169
+ </xsl:variable>
4170
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
4171
+ </xsl:for-each>
4172
+ </xsl:variable>
4173
+ <xsl:variable name="maxLength">
4174
+ <!-- <xsl:for-each select="*[local-name()='dt']">
4175
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
4176
+ <xsl:if test="position() = 1">
4177
+ <xsl:value-of select="string-length(normalize-space(.))"/>
4178
+ </xsl:if>
4179
+ </xsl:for-each> -->
4180
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
4181
+ <xsl:sort select="." data-type="number" order="descending"/>
4182
+ <xsl:if test="position() = 1">
4183
+ <xsl:value-of select="."/>
4184
+ </xsl:if>
4185
+ </xsl:for-each>
4186
+ </xsl:variable>
4187
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
4188
+ <xsl:value-of select="$maxLength"/>
3795
4189
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3796
4190
  <xsl:param name="key_iso"/>
3797
4191
 
@@ -3907,6 +4301,7 @@
3907
4301
  </fo:inline>
3908
4302
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
3909
4303
  <fo:inline font-weight="bold">
4304
+
3910
4305
  <xsl:apply-templates/>
3911
4306
  </fo:inline>
3912
4307
  </xsl:template><xsl:template match="*[local-name()='sup']">
@@ -3933,6 +4328,7 @@
3933
4328
 
3934
4329
 
3935
4330
 
4331
+
3936
4332
 
3937
4333
  </xsl:variable>
3938
4334
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3946,6 +4342,10 @@
3946
4342
  </xsl:if>
3947
4343
  <xsl:apply-templates/>
3948
4344
  </fo:inline>
4345
+ </xsl:template><xsl:template match="*[local-name()='underline']">
4346
+ <fo:inline text-decoration="underline">
4347
+ <xsl:apply-templates/>
4348
+ </fo:inline>
3949
4349
  </xsl:template><xsl:template match="*[local-name()='del']">
3950
4350
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3951
4351
  <xsl:apply-templates/>
@@ -4311,6 +4711,11 @@
4311
4711
  </xsl:choose>
4312
4712
  </xsl:variable>
4313
4713
  <fo:inline xsl:use-attribute-sets="link-style">
4714
+
4715
+ <xsl:if test="ancestor::*[local-name()='feedback-statement']">
4716
+ <xsl:attribute name="color">blue</xsl:attribute>
4717
+ </xsl:if>
4718
+
4314
4719
  <xsl:choose>
4315
4720
  <xsl:when test="$target = ''">
4316
4721
  <xsl:apply-templates/>
@@ -4523,8 +4928,9 @@
4523
4928
  </xsl:if> -->
4524
4929
  </fo:inline>
4525
4930
  </xsl:if>
4526
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
4527
- <fo:block-container id="{@id}">
4931
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
4932
+ <fo:block-container id="{@id}">
4933
+
4528
4934
  <fo:block>
4529
4935
  <xsl:apply-templates/>
4530
4936
  </fo:block>
@@ -4575,7 +4981,7 @@
4575
4981
  <xsl:apply-templates mode="bookmarks"/>
4576
4982
  </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
4577
4983
  <xsl:apply-templates select="."/>
4578
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4984
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4579
4985
  <xsl:apply-templates mode="bookmarks"/>
4580
4986
  </xsl:template><xsl:template name="addBookmarks">
4581
4987
  <xsl:param name="contents"/>
@@ -4591,6 +4997,8 @@
4591
4997
  <xsl:variable name="bookmark-title_">
4592
4998
  <xsl:call-template name="getLangVersion">
4593
4999
  <xsl:with-param name="lang" select="@lang"/>
5000
+ <xsl:with-param name="doctype" select="@doctype"/>
5001
+ <xsl:with-param name="title" select="@title-part"/>
4594
5002
  </xsl:call-template>
4595
5003
  </xsl:variable>
4596
5004
  <xsl:choose>
@@ -4608,13 +5016,34 @@
4608
5016
  </xsl:choose>
4609
5017
  </fo:bookmark-title>
4610
5018
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
5019
+
5020
+ <xsl:call-template name="insertFigureBookmarks">
5021
+ <xsl:with-param name="contents" select="contents"/>
5022
+ </xsl:call-template>
5023
+
5024
+ <xsl:call-template name="insertTableBookmarks">
5025
+ <xsl:with-param name="contents" select="contents"/>
5026
+ <xsl:with-param name="lang" select="@lang"/>
5027
+ </xsl:call-template>
5028
+
4611
5029
  </fo:bookmark>
4612
5030
 
4613
5031
  </xsl:for-each>
4614
5032
  </xsl:when>
4615
5033
  <xsl:otherwise>
4616
5034
  <xsl:for-each select="xalan:nodeset($contents)/doc">
5035
+
4617
5036
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
5037
+
5038
+ <xsl:call-template name="insertFigureBookmarks">
5039
+ <xsl:with-param name="contents" select="contents"/>
5040
+ </xsl:call-template>
5041
+
5042
+ <xsl:call-template name="insertTableBookmarks">
5043
+ <xsl:with-param name="contents" select="contents"/>
5044
+ <xsl:with-param name="lang" select="@lang"/>
5045
+ </xsl:call-template>
5046
+
4618
5047
  </xsl:for-each>
4619
5048
  </xsl:otherwise>
4620
5049
  </xsl:choose>
@@ -4626,42 +5055,51 @@
4626
5055
 
4627
5056
 
4628
5057
 
4629
- <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4630
- <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
4631
- <fo:bookmark-title>Figures</fo:bookmark-title>
4632
- <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
4633
- <fo:bookmark internal-destination="{@id}">
4634
- <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
4635
- </fo:bookmark>
4636
- </xsl:for-each>
4637
- </fo:bookmark>
4638
- </xsl:if>
4639
5058
 
4640
5059
 
4641
-
4642
- <xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
4643
- <fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
4644
- <fo:bookmark-title>
4645
- <xsl:choose>
4646
- <xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
4647
- <xsl:otherwise>Tables</xsl:otherwise>
4648
- </xsl:choose>
4649
- </fo:bookmark-title>
4650
- <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
4651
- <fo:bookmark internal-destination="{@id}">
4652
- <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
4653
- </fo:bookmark>
4654
- </xsl:for-each>
4655
- </fo:bookmark>
4656
- </xsl:if>
4657
-
4658
5060
 
4659
5061
 
4660
5062
 
4661
5063
  </fo:bookmark-tree>
4662
5064
  </xsl:if>
5065
+ </xsl:template><xsl:template name="insertFigureBookmarks">
5066
+ <xsl:param name="contents"/>
5067
+ <xsl:if test="xalan:nodeset($contents)/figure">
5068
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
5069
+ <fo:bookmark-title>Figures</fo:bookmark-title>
5070
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
5071
+ <fo:bookmark internal-destination="{@id}">
5072
+ <fo:bookmark-title>
5073
+ <xsl:value-of select="normalize-space(title)"/>
5074
+ </fo:bookmark-title>
5075
+ </fo:bookmark>
5076
+ </xsl:for-each>
5077
+ </fo:bookmark>
5078
+ </xsl:if>
5079
+ </xsl:template><xsl:template name="insertTableBookmarks">
5080
+ <xsl:param name="contents"/>
5081
+ <xsl:param name="lang"/>
5082
+ <xsl:if test="xalan:nodeset($contents)/table">
5083
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
5084
+ <fo:bookmark-title>
5085
+ <xsl:choose>
5086
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
5087
+ <xsl:otherwise>Tables</xsl:otherwise>
5088
+ </xsl:choose>
5089
+ </fo:bookmark-title>
5090
+ <xsl:for-each select="xalan:nodeset($contents)/table">
5091
+ <fo:bookmark internal-destination="{@id}">
5092
+ <fo:bookmark-title>
5093
+ <xsl:value-of select="normalize-space(title)"/>
5094
+ </fo:bookmark-title>
5095
+ </fo:bookmark>
5096
+ </xsl:for-each>
5097
+ </fo:bookmark>
5098
+ </xsl:if>
4663
5099
  </xsl:template><xsl:template name="getLangVersion">
4664
5100
  <xsl:param name="lang"/>
5101
+ <xsl:param name="doctype" select="''"/>
5102
+ <xsl:param name="title" select="''"/>
4665
5103
  <xsl:choose>
4666
5104
  <xsl:when test="$lang = 'en'">
4667
5105
  English
@@ -4697,6 +5135,12 @@
4697
5135
  <!-- <xsl:text> </xsl:text> -->
4698
5136
  </xsl:template><xsl:template name="getSection">
4699
5137
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5138
+ <!--
5139
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
5140
+ <xsl:value-of select="."/>
5141
+ </xsl:for-each>
5142
+ -->
5143
+
4700
5144
  </xsl:template><xsl:template name="getName">
4701
5145
  <xsl:choose>
4702
5146
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4749,6 +5193,10 @@
4749
5193
  <xsl:copy>
4750
5194
  <xsl:apply-templates mode="contents_item"/>
4751
5195
  </xsl:copy>
5196
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
5197
+ <xsl:copy>
5198
+ <xsl:apply-templates mode="contents_item"/>
5199
+ </xsl:copy>
4752
5200
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4753
5201
  <xsl:text> </xsl:text>
4754
5202
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -4774,6 +5222,7 @@
4774
5222
 
4775
5223
 
4776
5224
 
5225
+
4777
5226
 
4778
5227
 
4779
5228
 
@@ -5157,7 +5606,8 @@
5157
5606
  <fo:block-container margin-left="0mm">
5158
5607
 
5159
5608
  <fo:block xsl:use-attribute-sets="quote-style">
5160
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
5609
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5610
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5161
5611
  </fo:block>
5162
5612
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
5163
5613
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -5310,6 +5760,7 @@
5310
5760
 
5311
5761
 
5312
5762
 
5763
+
5313
5764
 
5314
5765
 
5315
5766
 
@@ -5321,7 +5772,7 @@
5321
5772
 
5322
5773
 
5323
5774
 
5324
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
5775
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
5325
5776
  <fo:block break-after="page"/>
5326
5777
  <fo:block>
5327
5778
  <xsl:call-template name="setId"/>
@@ -5329,7 +5780,8 @@
5329
5780
  </fo:block>
5330
5781
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
5331
5782
  <fo:block>
5332
- <xsl:call-template name="setId"/>
5783
+ <xsl:call-template name="setId"/>
5784
+
5333
5785
 
5334
5786
  <xsl:apply-templates/>
5335
5787
  </fo:block>
@@ -5337,7 +5789,7 @@
5337
5789
  <fo:block id="{@id}">
5338
5790
  <xsl:apply-templates/>
5339
5791
  </fo:block>
5340
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
5792
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
5341
5793
 
5342
5794
  <fo:block id="{@id}">
5343
5795
  <xsl:apply-templates/>
@@ -5394,7 +5846,8 @@
5394
5846
  <fo:table-column column-width="107mm"/>
5395
5847
  <fo:table-column column-width="15mm"/>
5396
5848
  <fo:table-body>
5397
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
5849
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
5850
+
5398
5851
  <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
5399
5852
  <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
5400
5853
  <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
@@ -5412,6 +5865,10 @@
5412
5865
  <fo:block><xsl:apply-templates/></fo:block>
5413
5866
  </fo:table-cell>
5414
5867
  </xsl:template><xsl:template name="processBibitem">
5868
+
5869
+
5870
+ <!-- end BIPM bibitem processing-->
5871
+
5415
5872
 
5416
5873
 
5417
5874
 
@@ -5470,6 +5927,8 @@
5470
5927
  <xsl:value-of select="translate(.,'. ','')"/>
5471
5928
  </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
5472
5929
  <xsl:value-of select="substring(.,1,1)"/>
5930
+ </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5931
+ <fo:inline><xsl:apply-templates/></fo:inline>
5473
5932
  </xsl:template><xsl:template name="convertDate">
5474
5933
  <xsl:param name="date"/>
5475
5934
  <xsl:param name="format" select="'short'"/>
@@ -5494,6 +5953,57 @@
5494
5953
  </xsl:variable>
5495
5954
  <xsl:variable name="result">
5496
5955
  <xsl:choose>
5956
+ <xsl:when test="$format = 'ddMMyyyy'">
5957
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5958
+ <xsl:text> </xsl:text>
5959
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5960
+ </xsl:when>
5961
+ <xsl:when test="$format = 'ddMM'">
5962
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5963
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5964
+ </xsl:when>
5965
+ <xsl:when test="$format = 'short' or $day = ''">
5966
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5967
+ </xsl:when>
5968
+ <xsl:otherwise>
5969
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
5970
+ </xsl:otherwise>
5971
+ </xsl:choose>
5972
+ </xsl:variable>
5973
+ <xsl:value-of select="$result"/>
5974
+ </xsl:template><xsl:template name="convertDateLocalized">
5975
+ <xsl:param name="date"/>
5976
+ <xsl:param name="format" select="'short'"/>
5977
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
5978
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
5979
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
5980
+ <xsl:variable name="monthStr">
5981
+ <xsl:choose>
5982
+ <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
5983
+ <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
5984
+ <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
5985
+ <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
5986
+ <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
5987
+ <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
5988
+ <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
5989
+ <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
5990
+ <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
5991
+ <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
5992
+ <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
5993
+ <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
5994
+ </xsl:choose>
5995
+ </xsl:variable>
5996
+ <xsl:variable name="result">
5997
+ <xsl:choose>
5998
+ <xsl:when test="$format = 'ddMMyyyy'">
5999
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6000
+ <xsl:text> </xsl:text>
6001
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6002
+ </xsl:when>
6003
+ <xsl:when test="$format = 'ddMM'">
6004
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6005
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6006
+ </xsl:when>
5497
6007
  <xsl:when test="$format = 'short' or $day = ''">
5498
6008
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5499
6009
  </xsl:when>
@@ -5688,6 +6198,7 @@
5688
6198
 
5689
6199
 
5690
6200
 
6201
+
5691
6202
  </xsl:variable>
5692
6203
  <xsl:if test="$documentNS != $XSLNS">
5693
6204
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -5747,6 +6258,11 @@
5747
6258
  <xsl:call-template name="getLang"/>
5748
6259
  </xsl:variable>
5749
6260
 
5750
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6261
+ <xsl:choose>
6262
+ <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
6263
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6264
+ </xsl:when>
6265
+ <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
6266
+ </xsl:choose>
5751
6267
 
5752
6268
  </xsl:template></xsl:stylesheet>