metanorma-iec 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -117,810 +117,846 @@
117
117
 
118
118
  <xsl:template match="/">
119
119
  <xsl:call-template name="namespaceCheck"/>
120
- <!-- https://stackoverflow.com/questions/25261949/xsl-fo-letter-spacing-with-text-align -->
121
- <!-- https://xmlgraphics.apache.org/fop/knownissues.html -->
122
- <fo:root xml:lang="{$lang}">
123
- <xsl:variable name="root-style">
124
- <root-style xsl:use-attribute-sets="root-style"/>
125
- </xsl:variable>
126
- <xsl:call-template name="insertRootStyle">
127
- <xsl:with-param name="root-style" select="$root-style"/>
128
- </xsl:call-template>
129
- <fo:layout-master-set>
130
- <!-- cover pages -->
131
- <fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
132
- <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="18mm" margin-right="20.5mm"/>
133
- <fo:region-before region-name="header" extent="17.5mm"/>
134
- <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
135
- <fo:region-start region-name="left-region" extent="18mm"/>
136
- <fo:region-end region-name="right-region" extent="20.5mm"/>
137
- </fo:simple-page-master>
138
- <fo:simple-page-master master-name="cover_2nd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
139
- <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="25mm" margin-right="25mm" column-count="2" column-gap="5mm"/>
140
- <fo:region-before region-name="header" extent="17.5mm"/>
141
- <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
142
- <fo:region-start region-name="left-region" extent="25mm"/>
143
- <fo:region-end region-name="right-region" extent="25mm"/>
144
- </fo:simple-page-master>
145
-
146
- <fo:simple-page-master master-name="cover-FDIS" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
147
- <fo:region-body margin-top="17.5mm" margin-bottom="29mm" margin-left="18mm" margin-right="19mm"/>
148
- <fo:region-before region-name="header" extent="17.5mm"/>
149
- <fo:region-after region-name="footer-FDIS" extent="29mm"/>
150
- <fo:region-start region-name="left-region" extent="18mm"/>
151
- <fo:region-end region-name="right-region" extent="19mm"/>
152
- </fo:simple-page-master>
153
-
154
- <!-- odd pages -->
155
- <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
156
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
157
- <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
158
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
159
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
160
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
161
- </fo:simple-page-master>
162
- <!-- even pages -->
163
- <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
164
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
165
- <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
166
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
167
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
168
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
169
- </fo:simple-page-master>
170
- <fo:page-sequence-master master-name="document">
171
- <fo:repeatable-page-master-alternatives>
172
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
173
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
174
- </fo:repeatable-page-master-alternatives>
175
- </fo:page-sequence-master>
176
-
177
- <fo:simple-page-master master-name="blank-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
178
- <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm"/>
179
- </fo:simple-page-master>
180
-
181
- <fo:simple-page-master master-name="last-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
182
- <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm" background-color="rgb(236, 236, 236)"/>
183
- <fo:region-before region-name="header" extent="107mm"/>
184
- <fo:region-start region-name="left-region" extent="18mm"/>
185
- </fo:simple-page-master>
186
- </fo:layout-master-set>
187
-
188
- <fo:declarations>
189
- <xsl:call-template name="addPDFUAmeta"/>
190
- </fo:declarations>
191
-
192
- <xsl:call-template name="addBookmarks">
193
- <xsl:with-param name="contents" select="$contents"/>
194
- </xsl:call-template>
195
120
 
196
- <!-- For 'Published' documents insert two cover pages -->
197
- <xsl:if test="$stage &gt;= 60">
121
+ <xsl:variable name="xslfo">
122
+ <!-- https://stackoverflow.com/questions/25261949/xsl-fo-letter-spacing-with-text-align -->
123
+ <!-- https://xmlgraphics.apache.org/fop/knownissues.html -->
124
+ <fo:root xml:lang="{$lang}">
125
+ <xsl:variable name="root-style">
126
+ <root-style xsl:use-attribute-sets="root-style"/>
127
+ </xsl:variable>
128
+ <xsl:call-template name="insertRootStyle">
129
+ <xsl:with-param name="root-style" select="$root-style"/>
130
+ </xsl:call-template>
131
+ <fo:layout-master-set>
132
+ <!-- cover pages -->
133
+ <fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
134
+ <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="18mm" margin-right="20.5mm"/>
135
+ <fo:region-before region-name="header" extent="17.5mm"/>
136
+ <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
137
+ <fo:region-start region-name="left-region" extent="18mm"/>
138
+ <fo:region-end region-name="right-region" extent="20.5mm"/>
139
+ </fo:simple-page-master>
140
+ <fo:simple-page-master master-name="cover_2nd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
141
+ <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="25mm" margin-right="25mm" column-count="2" column-gap="5mm"/>
142
+ <fo:region-before region-name="header" extent="17.5mm"/>
143
+ <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
144
+ <fo:region-start region-name="left-region" extent="25mm"/>
145
+ <fo:region-end region-name="right-region" extent="25mm"/>
146
+ </fo:simple-page-master>
147
+
148
+ <fo:simple-page-master master-name="cover-FDIS" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
149
+ <fo:region-body margin-top="17.5mm" margin-bottom="29mm" margin-left="18mm" margin-right="19mm"/>
150
+ <fo:region-before region-name="header" extent="17.5mm"/>
151
+ <fo:region-after region-name="footer-FDIS" extent="29mm"/>
152
+ <fo:region-start region-name="left-region" extent="18mm"/>
153
+ <fo:region-end region-name="right-region" extent="19mm"/>
154
+ </fo:simple-page-master>
155
+
156
+ <!-- odd pages -->
157
+ <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
158
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
159
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
160
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
161
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
162
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
163
+ </fo:simple-page-master>
164
+ <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
165
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
166
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
167
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
168
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
169
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
170
+ </fo:simple-page-master>
171
+ <!-- even pages -->
172
+ <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
173
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
174
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
175
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
176
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
177
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
178
+ </fo:simple-page-master>
179
+ <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
180
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
181
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
182
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
183
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
184
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
185
+ </fo:simple-page-master>
186
+ <fo:page-sequence-master master-name="document">
187
+ <fo:repeatable-page-master-alternatives>
188
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
189
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
190
+ </fo:repeatable-page-master-alternatives>
191
+ </fo:page-sequence-master>
192
+ <fo:page-sequence-master master-name="document-portrait">
193
+ <fo:repeatable-page-master-alternatives>
194
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
195
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
196
+ </fo:repeatable-page-master-alternatives>
197
+ </fo:page-sequence-master>
198
+ <fo:page-sequence-master master-name="document-landscape">
199
+ <fo:repeatable-page-master-alternatives>
200
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
201
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
202
+ </fo:repeatable-page-master-alternatives>
203
+ </fo:page-sequence-master>
204
+
205
+ <fo:simple-page-master master-name="blank-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
206
+ <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm"/>
207
+ </fo:simple-page-master>
208
+
209
+ <fo:simple-page-master master-name="last-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
210
+ <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm" background-color="rgb(236, 236, 236)"/>
211
+ <fo:region-before region-name="header" extent="107mm"/>
212
+ <fo:region-start region-name="left-region" extent="18mm"/>
213
+ </fo:simple-page-master>
214
+ </fo:layout-master-set>
215
+
216
+ <fo:declarations>
217
+ <xsl:call-template name="addPDFUAmeta"/>
218
+ </fo:declarations>
219
+
220
+ <xsl:call-template name="addBookmarks">
221
+ <xsl:with-param name="contents" select="$contents"/>
222
+ </xsl:call-template>
198
223
 
199
- <!-- 1st Cover Page -->
200
- <fo:page-sequence master-reference="cover" force-page-count="no-force">
201
- <fo:static-content flow-name="left-region">
202
- <fo:block-container reference-orientation="90">
203
- <fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
204
- <xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-with-lang']"/>
205
- </fo:block>
206
- </fo:block-container>
207
- </fo:static-content>
208
- <fo:flow flow-name="xsl-region-body">
209
- <fo:block-container absolute-position="fixed" left="18mm" top="107mm">
210
- <fo:block>
211
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="192mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
212
- </fo:block>
213
- </fo:block-container>
214
- <xsl:call-template name="insertCoverPart1"/>
215
- </fo:flow>
216
- </fo:page-sequence>
217
-
218
- <!-- 2nd Cover Page -->
219
- <fo:page-sequence master-reference="cover_2nd" force-page-count="no-force" font-size="8pt">
220
- <fo:flow flow-name="xsl-region-body">
221
- <fo:block span="all">
222
- <fo:block-container border="0.5pt solid black" margin-top="7mm">
223
- <fo:block-container margin-left="2.5mm" margin-right="2.5mm" margin-top="1mm" margin-bottom="1mm">
224
- <fo:block-container margin-left="0mm" margin-right="0mm">
225
- <fo:table table-layout="fixed" width="100%">
226
- <fo:table-column column-width="20mm"/>
227
- <fo:table-column column-width="130mm"/>
228
- <fo:table-body>
229
- <fo:table-row>
230
- <fo:table-cell>
231
- <fo:block>
232
- <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"/>
233
- </fo:block>
234
- </fo:table-cell>
235
- <fo:table-cell font-size="10pt" font-weight="bold" display-align="after">
236
- <fo:block margin-bottom="3pt">THIS PUBLICATION IS COPYRIGHT PROTECTED</fo:block>
237
- <fo:block margin-bottom="10pt">
238
- <!-- Example: Copyright © 2014 IEC, Geneva, Switzerland -->
239
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-year')]"/>
240
- </fo:block>
241
- </fo:table-cell>
242
- </fo:table-row>
243
- </fo:table-body>
244
- </fo:table>
245
- <fo:block>
246
- <fo:block margin-bottom="8pt" text-align="justify">
247
- <!-- Example: All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
248
- or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
249
- either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
250
- copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
251
- your local IEC member National Committee for further information. -->
252
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
253
- </fo:block>
254
- <!-- Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
255
- ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
256
- 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
257
- questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
258
- les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence. -->
259
- <fo:block margin-bottom="8pt" text-align="justify">
260
- <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
261
- </fo:block>
224
+ <!-- For 'Published' documents insert two cover pages -->
225
+ <xsl:if test="$stage &gt;= 60">
262
226
 
263
- <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())"/>
227
+ <!-- 1st Cover Page -->
228
+ <fo:page-sequence master-reference="cover" force-page-count="no-force">
229
+ <fo:static-content flow-name="left-region">
230
+ <fo:block-container reference-orientation="90">
231
+ <fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
232
+ <xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-with-lang']"/>
233
+ </fo:block>
234
+ </fo:block-container>
235
+ </fo:static-content>
236
+ <fo:flow flow-name="xsl-region-body">
237
+ <fo:block-container absolute-position="fixed" left="18mm" top="107mm">
238
+ <fo:block>
239
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="192mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
240
+ </fo:block>
241
+ </fo:block-container>
242
+ <xsl:call-template name="insertCoverPart1"/>
243
+ </fo:flow>
244
+ </fo:page-sequence>
245
+
246
+ <!-- 2nd Cover Page -->
247
+ <fo:page-sequence master-reference="cover_2nd" force-page-count="no-force" font-size="8pt">
248
+ <fo:flow flow-name="xsl-region-body">
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">
264
253
  <fo:table table-layout="fixed" width="100%">
265
- <fo:table-column column-width="59mm"/>
266
- <fo:table-column column-width="90mm"/>
254
+ <fo:table-column column-width="20mm"/>
255
+ <fo:table-column column-width="130mm"/>
267
256
  <fo:table-body>
268
257
  <fo:table-row>
269
258
  <fo:table-cell>
270
259
  <fo:block>
271
- <!-- Example: IEC Central Office
272
- 3, rue de Varembé
273
- CH-1211 Geneva 20
274
- Switzerland -->
275
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-name')]" mode="coverpage"/>
276
- <xsl:choose>
277
- <xsl:when test="$telpos != 0">
278
- <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"/>
279
- </xsl:when>
280
- <xsl:otherwise>
281
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
282
- </xsl:otherwise>
283
- </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"/>
284
261
  </fo:block>
285
262
  </fo:table-cell>
286
- <fo:table-cell>
287
- <fo:block>
288
- <!-- Example: Tel.: +41 22 919 02 11
289
- Fax: +41 22 919 0
290
- info@iec.ch
291
- www.iec.ch -->
292
- <xsl:choose>
293
- <xsl:when test="$telpos != 0">
294
- <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"/>
295
- </xsl:when>
296
- <xsl:otherwise> </xsl:otherwise>
297
- </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')]"/>
298
268
  </fo:block>
299
269
  </fo:table-cell>
300
270
  </fo:table-row>
301
271
  </fo:table-body>
302
272
  </fo:table>
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>
303
290
 
304
- </fo:block>
305
- </fo:block-container>
306
- </fo:block-container>
307
- </fo:block-container>
308
- </fo:block>
309
-
310
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement"/> <!-- //iec:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
311
- <fo:block span="all" border-bottom="0.5pt solid black"/>
312
- <!-- About the IEC
313
- The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
314
- International Standards for all electrical, electronic and related technologies.
315
- About IEC publications
316
- The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
317
- latest edition, a corrigenda or an amendment might have been published.
318
- ...
319
- -->
320
- <xsl:if test="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement">
321
- <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement"/>
322
- <fo:block span="all"/>
323
- </xsl:if>
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>
324
331
 
325
- </fo:flow>
326
- </fo:page-sequence>
327
- </xsl:if>
328
- <xsl:variable name="lang_second" select="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']"/>
329
- <!-- For 'Published' documents insert 3rd Cover Page
330
- OR insert first Covert Page for FDIS -->
331
- <xsl:if test="$stage &gt;= 60 or $stage-abbreviation = 'FDIS'">
332
- <fo:page-sequence master-reference="cover" force-page-count="no-force">
333
- <fo:flow flow-name="xsl-region-body">
334
- <xsl:call-template name="insertCoverPart1"/>
335
- <fo:block-container absolute-position="fixed" left="26.5mm" top="214mm" width="163mm">
336
- <fo:block-container height="32mm" display-align="after">
337
- <fo:block font-size="9pt" color="{$color_blue}" line-height="150%">
338
- <fo:block-container width="40mm">
339
- <fo:block>
340
- <xsl:call-template name="getLocalizedString">
341
- <xsl:with-param name="key">IEC</xsl:with-param>
342
- <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
343
- </xsl:call-template>
344
- </fo:block>
332
+ </fo:block>
333
+ </fo:block-container>
345
334
  </fo:block-container>
346
- </fo:block>
335
+ </fo:block-container>
336
+ </fo:block>
347
337
 
348
- <xsl:variable name="IEC_lang_second">
349
- <xsl:call-template name="getLocalizedString">
350
- <xsl:with-param name="key">IEC</xsl:with-param>
351
- <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
352
- <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
353
- </xsl:call-template>
354
- </xsl:variable>
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
+ <!-- About the IEC
341
+ The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
342
+ International Standards for all electrical, electronic and related technologies.
343
+ About IEC publications
344
+ The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
345
+ latest edition, a corrigenda or an amendment might have been published.
346
+ ...
347
+ -->
348
+ <xsl:if test="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement">
349
+ <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement"/>
350
+ <fo:block span="all"/>
351
+ </xsl:if>
355
352
 
356
- <xsl:if test="normalize-space($IEC_lang_second) != ''">
357
- <fo:block font-size="9pt" line-height="150%" margin-top="8pt">
353
+ </fo:flow>
354
+ </fo:page-sequence>
355
+ </xsl:if>
356
+ <xsl:variable name="lang_second" select="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']"/>
357
+ <!-- For 'Published' documents insert 3rd Cover Page
358
+ OR insert first Covert Page for FDIS -->
359
+ <xsl:if test="$stage &gt;= 60 or $stage-abbreviation = 'FDIS'">
360
+ <fo:page-sequence master-reference="cover" force-page-count="no-force">
361
+ <fo:flow flow-name="xsl-region-body">
362
+ <xsl:call-template name="insertCoverPart1"/>
363
+ <fo:block-container absolute-position="fixed" left="26.5mm" top="214mm" width="163mm">
364
+ <fo:block-container height="32mm" display-align="after">
365
+ <fo:block font-size="9pt" color="{$color_blue}" line-height="150%">
358
366
  <fo:block-container width="40mm">
359
367
  <fo:block>
360
- <!-- 'COMMISSION ELECTROTECHNIQUE INTERNATIONALE' -->
361
- <xsl:value-of select="$IEC_lang_second"/>
368
+ <xsl:call-template name="getLocalizedString">
369
+ <xsl:with-param name="key">IEC</xsl:with-param>
370
+ <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
371
+ </xsl:call-template>
362
372
  </fo:block>
363
373
  </fo:block-container>
364
374
  </fo:block>
365
- </xsl:if>
366
- </fo:block-container>
367
375
 
368
- <xsl:variable name="price_code_value" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:price-code"/>
369
- <fo:table table-layout="fixed" width="102%" margin-top="-9mm" margin-bottom="2mm" id="__internal_layout__price_code">
370
- <fo:table-column column-width="148mm"/>
371
- <fo:table-column column-width="16mm"/>
372
- <fo:table-body>
373
- <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
374
- <fo:table-cell font-size="8pt" text-align="right" display-align="center">
375
- <fo:block>
376
- <xsl:if test="normalize-space($price_code_value) != ''">
377
- <fo:block color="{$color_blue}" margin-bottom="3pt">
378
- <!-- PRICE CODE -->
379
- <xsl:variable name="price_code">
380
- <xsl:call-template name="getLocalizedString">
381
- <xsl:with-param name="key">price-code</xsl:with-param>
382
- <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
383
- </xsl:call-template>
384
- </xsl:variable>
385
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
386
- </fo:block>
376
+ <xsl:variable name="IEC_lang_second">
377
+ <xsl:call-template name="getLocalizedString">
378
+ <xsl:with-param name="key">IEC</xsl:with-param>
379
+ <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
380
+ <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
381
+ </xsl:call-template>
382
+ </xsl:variable>
387
383
 
388
- <fo:block>
389
- <xsl:variable name="price_code">
390
- <xsl:call-template name="getLocalizedString">
391
- <xsl:with-param name="key">price-code</xsl:with-param>
392
- <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
393
- </xsl:call-template>
394
- </xsl:variable>
395
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
396
- </fo:block>
397
- </xsl:if>
398
- </fo:block>
399
- </fo:table-cell>
400
- <fo:table-cell font-size="25pt" font-weight="bold" color="{$color_gray}" text-align="right" display-align="center">
401
- <fo:block padding-top="1mm"><xsl:value-of select="$price_code_value"/></fo:block>
402
- </fo:table-cell>
403
- </fo:table-row>
404
- </fo:table-body>
405
- </fo:table>
406
- <fo:block font-size="8pt" text-align-last="justify">
407
- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:ext/iec:ics">
408
- <xsl:if test="position() = 1">ICS </xsl:if>
409
- <xsl:value-of select="iec:code"/>
410
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
411
- </xsl:for-each>
412
- <xsl:text> </xsl:text>
413
- <fo:inline keep-together.within-line="always"><fo:leader leader-pattern="space"/>
414
- <xsl:text> </xsl:text>
415
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']">
416
- <!-- Example: ISBN 978-2-8322-1532-6 -->
417
- <xsl:text>ISBN </xsl:text>
418
- <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']"/>
384
+ <xsl:if test="normalize-space($IEC_lang_second) != ''">
385
+ <fo:block font-size="9pt" line-height="150%" margin-top="8pt">
386
+ <fo:block-container width="40mm">
387
+ <fo:block>
388
+ <!-- 'COMMISSION ELECTROTECHNIQUE INTERNATIONALE' -->
389
+ <xsl:value-of select="$IEC_lang_second"/>
390
+ </fo:block>
391
+ </fo:block-container>
392
+ </fo:block>
419
393
  </xsl:if>
420
- </fo:inline>
421
- </fo:block>
422
- <fo:block-container margin-left="1.5mm">
423
- <fo:block-container margin-left="0mm">
424
- <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">
425
- <fo:block margin-left="2mm">Warning! Make sure that you obtained this publication from an authorized distributor.</fo:block>
426
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
427
- <fo:block margin-left="2mm" margin-top="3pt">Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agréé.</fo:block>
428
- </xsl:if>
429
- </fo:block-container>
430
394
  </fo:block-container>
431
- </fo:block-container>
432
- <fo:block font-size="6pt" margin-top="6mm" margin-left="1mm">
433
- <xsl:if test="count((//iec:iec-standard)[1]/iec:bibdata/iec:copyright) = 1">
434
- <fo:block>® Registered trademark of the International Electrotechnical Commission</fo:block>
435
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
436
- <fo:block margin-left="2mm">Marque déposée de la Commission Electrotechnique Internationale</fo:block>
437
- </xsl:if>
438
- </xsl:if>
439
- </fo:block>
440
- </fo:block-container>
441
- </fo:flow>
442
- </fo:page-sequence>
443
- </xsl:if>
444
395
 
445
- <!-- for non-published documents insert cover page (2nd for FDIS) ) -->
446
- <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' or $stage-abbreviation = 'FDIS'">
447
- <!-- circulation cover page -->
448
- <fo:page-sequence master-reference="cover-FDIS" force-page-count="no-force">
449
- <fo:static-content flow-name="footer-FDIS">
450
- <fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
451
- <fo:block font-size="8pt" margin-bottom="6pt">
452
-
453
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[not(@id)]"/>
454
-
455
- </fo:block>
456
- </fo:block-container>
457
- </fo:static-content>
458
- <fo:flow flow-name="xsl-region-body">
459
-
460
- <fo:block text-align-last="justify" margin-left="-0.5mm">
461
- <xsl:call-template name="outputLogo"/>
462
-
463
- <xsl:if test="$stage-abbreviation = 'FDIS'">
464
- <fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
465
- </xsl:if>
466
- <fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
467
- <!-- Ex: 34D/1511/FDIS -->
468
- <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso-tc']"/>
469
- <xsl:text> </xsl:text>
470
- </fo:inline>
471
- </fo:block>
472
- <fo:block font-size="10pt" text-align="right" margin-top="-2mm" margin-bottom="8pt">
473
- <!-- Examples: 'FINAL DRAFT INTERNATIONAL STANDARD (FDIS)', 'COMMITTEE DRAFT FOR VOTE (CDV)' -->
474
- <xsl:call-template name="addLetterSpacing">
475
- <xsl:with-param name="text" select="concat($stage-fullname-uppercased, ' (', $stage-abbreviation ,')')"/>
476
- </xsl:call-template>
477
- <xsl:text> </xsl:text>
478
- </fo:block>
479
- <fo:block-container margin-left="57mm">
480
- <fo:block-container margin-left="0mm">
481
- <fo:table table-layout="fixed" width="118mm" background-color="rgb(219, 229, 241)" id="__internal_layout__project_{generate-id()}">
482
- <fo:table-column column-width="50%"/>
483
- <fo:table-column column-width="50%"/>
396
+ <xsl:variable name="price_code_value" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:price-code"/>
397
+ <fo:table table-layout="fixed" width="102%" margin-top="-9mm" margin-bottom="2mm" id="__internal_layout__price_code">
398
+ <fo:table-column column-width="148mm"/>
399
+ <fo:table-column column-width="16mm"/>
484
400
  <fo:table-body>
485
- <fo:table-row height="12mm">
486
- <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
487
- <fo:block font-size="6.5pt" margin-bottom="6pt">
488
- <xsl:call-template name="addLetterSpacingSmallCaps">
489
- <xsl:with-param name="text" select="'Project number:'"/>
490
- </xsl:call-template>
491
- </fo:block>
492
- <fo:block font-size="9pt" font-weight="bold">
493
- <xsl:call-template name="addLetterSpacing">
494
- <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number"/></xsl:with-param>
495
- </xsl:call-template>
496
- </fo:block>
497
- </fo:table-cell>
498
- </fo:table-row>
499
- <fo:table-row height="12mm">
500
- <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
501
- <fo:block font-size="6.5pt" margin-bottom="6pt">
502
- <xsl:call-template name="addLetterSpacingSmallCaps">
503
- <xsl:with-param name="text" select="'Date of circulation:'"/>
504
- </xsl:call-template>
505
- </fo:block>
506
- <fo:block font-size="9pt" font-weight="bold">
507
- <xsl:call-template name="addLetterSpacing">
508
- <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type ='circulated']/iec:on"/></xsl:with-param>
509
- </xsl:call-template>
510
- </fo:block>
511
- </fo:table-cell>
512
- <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
513
- <fo:block font-size="6.5pt" margin-bottom="6pt">
514
- <xsl:call-template name="addLetterSpacingSmallCaps">
515
- <xsl:with-param name="text" select="'Closing date for voting:'"/>
516
- </xsl:call-template>
517
- </fo:block>
518
- <fo:block font-size="9pt" font-weight="bold">
519
- <xsl:call-template name="addLetterSpacing">
520
- <!-- 2019-12-06 -->
521
- <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='vote-ended']/iec:on"/></xsl:with-param>
522
- </xsl:call-template>
401
+ <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
402
+ <fo:table-cell font-size="8pt" text-align="right" display-align="center">
403
+ <fo:block>
404
+ <xsl:if test="normalize-space($price_code_value) != ''">
405
+ <fo:block color="{$color_blue}" margin-bottom="3pt">
406
+ <!-- PRICE CODE -->
407
+ <xsl:variable name="price_code">
408
+ <xsl:call-template name="getLocalizedString">
409
+ <xsl:with-param name="key">price-code</xsl:with-param>
410
+ <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
411
+ </xsl:call-template>
412
+ </xsl:variable>
413
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
414
+ </fo:block>
415
+
416
+ <fo:block>
417
+ <xsl:variable name="price_code">
418
+ <xsl:call-template name="getLocalizedString">
419
+ <xsl:with-param name="key">price-code</xsl:with-param>
420
+ <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
421
+ </xsl:call-template>
422
+ </xsl:variable>
423
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
424
+ </fo:block>
425
+ </xsl:if>
523
426
  </fo:block>
524
427
  </fo:table-cell>
525
- </fo:table-row>
526
- <fo:table-row height="12mm">
527
- <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
528
- <fo:block font-size="6.5pt" margin-bottom="6pt">
529
- <xsl:call-template name="addLetterSpacingSmallCaps">
530
- <xsl:with-param name="text" select="'Supersedes documents:'"/>
531
- </xsl:call-template>
532
- </fo:block>
533
- <fo:block font-size="9pt" font-weight="bold">
534
- <xsl:variable name="supersedes_documents">
535
- <!-- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber"> -->
536
- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='obsoletes']/iec:bibitem/iec:docidentifier">
537
- <xsl:value-of select="."/>
538
- <xsl:if test="position() != last()">,</xsl:if>
539
- </xsl:for-each>
540
- </xsl:variable>
541
- <xsl:call-template name="addLetterSpacing">
542
- <xsl:with-param name="text"><xsl:value-of select="$supersedes_documents"/></xsl:with-param>
543
- </xsl:call-template>
544
- </fo:block>
428
+ <fo:table-cell font-size="25pt" font-weight="bold" color="{$color_gray}" text-align="right" display-align="center">
429
+ <fo:block padding-top="1mm"><xsl:value-of select="$price_code_value"/></fo:block>
545
430
  </fo:table-cell>
546
431
  </fo:table-row>
547
432
  </fo:table-body>
548
433
  </fo:table>
434
+ <fo:block font-size="8pt" text-align-last="justify">
435
+ <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:ext/iec:ics">
436
+ <xsl:if test="position() = 1">ICS </xsl:if>
437
+ <xsl:value-of select="iec:code"/>
438
+ <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
439
+ </xsl:for-each>
440
+ <xsl:text> </xsl:text>
441
+ <fo:inline keep-together.within-line="always"><fo:leader leader-pattern="space"/>
442
+ <xsl:text> </xsl:text>
443
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']">
444
+ <!-- Example: ISBN 978-2-8322-1532-6 -->
445
+ <xsl:text>ISBN </xsl:text>
446
+ <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']"/>
447
+ </xsl:if>
448
+ </fo:inline>
449
+ </fo:block>
450
+ <fo:block-container margin-left="1.5mm">
451
+ <fo:block-container margin-left="0mm">
452
+ <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">
453
+ <fo:block margin-left="2mm">Warning! Make sure that you obtained this publication from an authorized distributor.</fo:block>
454
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
455
+ <fo:block margin-left="2mm" margin-top="3pt">Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agréé.</fo:block>
456
+ </xsl:if>
457
+ </fo:block-container>
458
+ </fo:block-container>
459
+ </fo:block-container>
460
+ <fo:block font-size="6pt" margin-top="6mm" margin-left="1mm">
461
+ <xsl:if test="count((//iec:iec-standard)[1]/iec:bibdata/iec:copyright) = 1">
462
+ <fo:block>® Registered trademark of the International Electrotechnical Commission</fo:block>
463
+ <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
464
+ <fo:block margin-left="2mm">Marque déposée de la Commission Electrotechnique Internationale</fo:block>
465
+ </xsl:if>
466
+ </xsl:if>
467
+ </fo:block>
549
468
  </fo:block-container>
550
- </fo:block-container>
469
+ </fo:flow>
470
+ </fo:page-sequence>
471
+ </xsl:if>
551
472
 
552
- <fo:block-container margin-left="-2mm" margin-right="-2mm" margin-top="5mm">
553
- <fo:block-container margin-left="0mm" margin-right="0mm">
554
- <xsl:variable name="border-color">rgb(221, 213, 213)</xsl:variable>
555
- <fo:table table-layout="fixed" width="100%" border="1.5pt solid {$border-color}">
556
- <fo:table-column column-width="50%"/>
557
- <fo:table-column column-width="50%"/>
558
- <fo:table-body>
559
- <fo:table-row height="4mm">
560
- <fo:table-cell number-columns-spanned="2" border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
561
- <fo:block>
562
- <!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
563
- else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
564
- <xsl:choose>
565
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
566
- <fo:block font-size="6.5pt">
567
- <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>
568
- <xsl:call-template name="addLetterSpacingSmallCaps">
569
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
570
- </xsl:call-template>
571
- </fo:block>
572
- </xsl:when>
573
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
574
- <fo:block font-size="6.5pt">
575
- <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>
576
- <xsl:call-template name="addLetterSpacingSmallCaps">
577
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
578
- </xsl:call-template>
579
- </fo:block>
580
- </xsl:when>
581
- </xsl:choose>
582
- </fo:block>
583
- </fo:table-cell>
584
- </fo:table-row>
585
- <fo:table-row height="12mm">
586
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
587
- <fo:block font-size="6.5pt" margin-bottom="6pt">
588
- <xsl:call-template name="addLetterSpacingSmallCaps">
589
- <xsl:with-param name="text" select="'Secretariat:'"/>
590
- </xsl:call-template>
591
- </fo:block>
592
- <fo:block font-size="9pt">
593
- <xsl:call-template name="addLetterSpacing">
594
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:secretariat"/>
595
- </xsl:call-template>
596
- </fo:block>
597
- </fo:table-cell>
598
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
599
- <fo:block font-size="6.5pt" margin-bottom="6pt">
600
- <xsl:call-template name="addLetterSpacingSmallCaps">
601
- <xsl:with-param name="text" select="'Secretary:'"/>
602
- </xsl:call-template>
603
- </fo:block>
604
- <fo:block font-size="9pt">
605
- <!-- Example: Ms Shanti Conn -->
606
- <xsl:call-template name="addLetterSpacing">
607
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:secretary"/>
608
- </xsl:call-template>
609
- </fo:block>
610
- </fo:table-cell>
611
- </fo:table-row>
612
- <fo:table-row height="12mm">
613
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
614
- <xsl:if test="not($stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD')">
615
- <xsl:attribute name="number-columns-spanned">2</xsl:attribute>
616
- </xsl:if>
617
- <fo:block font-size="6.5pt" margin-bottom="6pt">
618
- <xsl:call-template name="addLetterSpacingSmallCaps">
619
- <xsl:with-param name="text" select="'Of interest to the following committees:'"/>
620
- </xsl:call-template>
621
- </fo:block>
622
- <fo:block font-size="9pt">
623
- <xsl:call-template name="addLetterSpacing">
624
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:interest-to-committees"/>
625
- </xsl:call-template>
626
- </fo:block>
627
- </fo:table-cell>
628
- <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
629
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
473
+ <!-- for non-published documents insert cover page (2nd for FDIS) ) -->
474
+ <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' or $stage-abbreviation = 'FDIS'">
475
+ <!-- circulation cover page -->
476
+ <fo:page-sequence master-reference="cover-FDIS" force-page-count="no-force">
477
+ <fo:static-content flow-name="footer-FDIS">
478
+ <fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
479
+ <fo:block font-size="8pt" margin-bottom="6pt">
480
+
481
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[not(@id)]"/>
482
+
483
+ </fo:block>
484
+ </fo:block-container>
485
+ </fo:static-content>
486
+ <fo:flow flow-name="xsl-region-body">
487
+
488
+ <fo:block text-align-last="justify" margin-left="-0.5mm">
489
+ <xsl:call-template name="outputLogo"/>
490
+
491
+ <xsl:if test="$stage-abbreviation = 'FDIS'">
492
+ <fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
493
+ </xsl:if>
494
+ <fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
495
+ <!-- Ex: 34D/1511/FDIS -->
496
+ <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso-tc']"/>
497
+ <xsl:text> </xsl:text>
498
+ </fo:inline>
499
+ </fo:block>
500
+ <fo:block font-size="10pt" text-align="right" margin-top="-2mm" margin-bottom="8pt">
501
+ <!-- Examples: 'FINAL DRAFT INTERNATIONAL STANDARD (FDIS)', 'COMMITTEE DRAFT FOR VOTE (CDV)' -->
502
+ <xsl:call-template name="addLetterSpacing">
503
+ <xsl:with-param name="text" select="concat($stage-fullname-uppercased, ' (', $stage-abbreviation ,')')"/>
504
+ </xsl:call-template>
505
+ <xsl:text> </xsl:text>
506
+ </fo:block>
507
+ <fo:block-container margin-left="57mm">
508
+ <fo:block-container margin-left="0mm">
509
+ <fo:table table-layout="fixed" width="118mm" background-color="rgb(219, 229, 241)" id="__internal_layout__project_{generate-id()}">
510
+ <fo:table-column column-width="50%"/>
511
+ <fo:table-column column-width="50%"/>
512
+ <fo:table-body>
513
+ <fo:table-row height="12mm">
514
+ <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
630
515
  <fo:block font-size="6.5pt" margin-bottom="6pt">
631
- <xsl:if test="$stage-abbreviation = 'FDIS'">
632
- <xsl:call-template name="addLetterSpacingSmallCaps">
633
- <xsl:with-param name="text" select="'horizontal standard:'"/>
634
- </xsl:call-template>
635
- </xsl:if>
636
- <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
637
- <xsl:call-template name="addLetterSpacingSmallCaps">
638
- <xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
639
- </xsl:call-template>
640
- </xsl:if>
516
+ <xsl:call-template name="addLetterSpacingSmallCaps">
517
+ <xsl:with-param name="text" select="'Project number:'"/>
518
+ </xsl:call-template>
641
519
  </fo:block>
642
- <fo:block>
643
- <xsl:choose>
644
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
645
- <xsl:call-template name="insertCheckBoxOn"/>
646
- </xsl:when>
647
- <xsl:otherwise>
648
- <xsl:call-template name="insertCheckBoxOff"/>
649
- </xsl:otherwise>
650
- </xsl:choose>
520
+ <fo:block font-size="9pt" font-weight="bold">
521
+ <xsl:call-template name="addLetterSpacing">
522
+ <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number"/></xsl:with-param>
523
+ </xsl:call-template>
651
524
  </fo:block>
652
-
653
- <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
654
- <fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
655
- <fo:block-container margin-left="1mm" margin-right="1mm">
656
- <fo:block font-size="8pt" padding="2mm">
657
- <xsl:call-template name="addLetterSpacing">
658
- <xsl:with-param name="text" select="'Other TC/SCs are requested to indicate their interest, if any, in this CDV to the secretary.'"/>
659
- </xsl:call-template>
660
- </fo:block>
661
- </fo:block-container>
662
- </fo:block-container>
663
- </xsl:if>
664
525
  </fo:table-cell>
665
- </xsl:if>
666
- </fo:table-row>
667
-
668
- <xsl:if test="not($stage-abbreviation = 'DPAS')">
669
- <fo:table-row height="10mm">
670
- <fo:table-cell padding="1.5mm" padding-bottom="0mm">
671
- <fo:block font-size="6.5pt" margin-bottom="4pt">
526
+ </fo:table-row>
527
+ <fo:table-row height="12mm">
528
+ <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
529
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
672
530
  <xsl:call-template name="addLetterSpacingSmallCaps">
673
- <xsl:with-param name="text" select="'Functions concerned:'"/>
531
+ <xsl:with-param name="text" select="'Date of circulation:'"/>
674
532
  </xsl:call-template>
675
533
  </fo:block>
676
- <!-- function: { emc | safety | environment | quality-assurance } -->
677
- <fo:block font-size="6.5pt">
678
- <xsl:choose>
679
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'emc'">
680
- <xsl:call-template name="insertCheckBoxOn"/>
681
- </xsl:when>
682
- <xsl:otherwise>
683
- <xsl:call-template name="insertCheckBoxOff"/>
684
- </xsl:otherwise>
685
- </xsl:choose>
686
- <xsl:call-template name="addLetterSpacingSmallCaps">
687
- <xsl:with-param name="text" select="'EMC'"/>
534
+ <fo:block font-size="9pt" font-weight="bold">
535
+ <xsl:call-template name="addLetterSpacing">
536
+ <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type ='circulated']/iec:on"/></xsl:with-param>
688
537
  </xsl:call-template>
689
- <fo:inline padding-right="33mm"> </fo:inline>
690
- <xsl:choose>
691
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'environment'">
692
- <xsl:call-template name="insertCheckBoxOn"/>
693
- </xsl:when>
694
- <xsl:otherwise>
695
- <xsl:call-template name="insertCheckBoxOff"/>
696
- </xsl:otherwise>
697
- </xsl:choose>
538
+ </fo:block>
539
+ </fo:table-cell>
540
+ <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
541
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
698
542
  <xsl:call-template name="addLetterSpacingSmallCaps">
699
- <xsl:with-param name="text" select="'Environment'"/>
543
+ <xsl:with-param name="text" select="'Closing date for voting:'"/>
544
+ </xsl:call-template>
545
+ </fo:block>
546
+ <fo:block font-size="9pt" font-weight="bold">
547
+ <xsl:call-template name="addLetterSpacing">
548
+ <!-- 2019-12-06 -->
549
+ <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='vote-ended']/iec:on"/></xsl:with-param>
700
550
  </xsl:call-template>
701
551
  </fo:block>
702
552
  </fo:table-cell>
703
- <fo:table-cell padding="1.5mm" padding-bottom="0mm">
704
- <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
705
- <fo:block font-size="6.5pt">
706
- <xsl:choose>
707
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'quality-assurance'">
708
- <xsl:call-template name="insertCheckBoxOn"/>
709
- </xsl:when>
710
- <xsl:otherwise>
711
- <xsl:call-template name="insertCheckBoxOff"/>
712
- </xsl:otherwise>
713
- </xsl:choose>
553
+ </fo:table-row>
554
+ <fo:table-row height="12mm">
555
+ <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
556
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
714
557
  <xsl:call-template name="addLetterSpacingSmallCaps">
715
- <xsl:with-param name="text" select="'Quality assurance'"/>
558
+ <xsl:with-param name="text" select="'Supersedes documents:'"/>
716
559
  </xsl:call-template>
717
- <fo:inline padding-right="13mm"> </fo:inline>
718
- <xsl:choose>
719
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'safety'">
720
- <xsl:call-template name="insertCheckBoxOn"/>
721
- </xsl:when>
722
- <xsl:otherwise>
723
- <xsl:call-template name="insertCheckBoxOff"/>
724
- </xsl:otherwise>
725
- </xsl:choose>
726
- <xsl:call-template name="addLetterSpacingSmallCaps">
727
- <xsl:with-param name="text" select="'Safety'"/>
560
+ </fo:block>
561
+ <fo:block font-size="9pt" font-weight="bold">
562
+ <xsl:variable name="supersedes_documents">
563
+ <!-- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber"> -->
564
+ <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='obsoletes']/iec:bibitem/iec:docidentifier">
565
+ <xsl:value-of select="."/>
566
+ <xsl:if test="position() != last()">,</xsl:if>
567
+ </xsl:for-each>
568
+ </xsl:variable>
569
+ <xsl:call-template name="addLetterSpacing">
570
+ <xsl:with-param name="text"><xsl:value-of select="$supersedes_documents"/></xsl:with-param>
728
571
  </xsl:call-template>
729
572
  </fo:block>
730
573
  </fo:table-cell>
731
574
  </fo:table-row>
732
- </xsl:if>
733
-
734
- <xsl:if test="not($stage-abbreviation = 'CD' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS')">
575
+ </fo:table-body>
576
+ </fo:table>
577
+ </fo:block-container>
578
+ </fo:block-container>
735
579
 
736
- <fo:table-row>
737
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
738
- <fo:block font-size="6.5pt" margin-bottom="12pt">
580
+ <fo:block-container margin-left="-2mm" margin-right="-2mm" margin-top="5mm">
581
+ <fo:block-container margin-left="0mm" margin-right="0mm">
582
+ <xsl:variable name="border-color">rgb(221, 213, 213)</xsl:variable>
583
+ <fo:table table-layout="fixed" width="100%" border="1.5pt solid {$border-color}">
584
+ <fo:table-column column-width="50%"/>
585
+ <fo:table-column column-width="50%"/>
586
+ <fo:table-body>
587
+ <fo:table-row height="4mm">
588
+ <fo:table-cell number-columns-spanned="2" border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
589
+ <fo:block>
590
+ <!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
591
+ else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
739
592
  <xsl:choose>
740
- <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
741
- <xsl:call-template name="insertCheckBoxOn"/>
593
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
594
+ <fo:block font-size="6.5pt">
595
+ <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>
596
+ <xsl:call-template name="addLetterSpacingSmallCaps">
597
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
598
+ </xsl:call-template>
599
+ </fo:block>
600
+ </xsl:when>
601
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
602
+ <fo:block font-size="6.5pt">
603
+ <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>
604
+ <xsl:call-template name="addLetterSpacingSmallCaps">
605
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
606
+ </xsl:call-template>
607
+ </fo:block>
742
608
  </xsl:when>
743
- <xsl:otherwise>
744
- <xsl:call-template name="insertCheckBoxOff"/>
745
- </xsl:otherwise>
746
609
  </xsl:choose>
610
+ </fo:block>
611
+ </fo:table-cell>
612
+ </fo:table-row>
613
+ <fo:table-row height="12mm">
614
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
615
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
747
616
  <xsl:call-template name="addLetterSpacingSmallCaps">
748
- <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
617
+ <xsl:with-param name="text" select="'Secretariat:'"/>
618
+ </xsl:call-template>
619
+ </fo:block>
620
+ <fo:block font-size="9pt">
621
+ <xsl:call-template name="addLetterSpacing">
622
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:secretariat"/>
749
623
  </xsl:call-template>
750
624
  </fo:block>
751
-
752
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']"/>
753
-
754
625
  </fo:table-cell>
755
626
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
756
627
  <fo:block font-size="6.5pt" margin-bottom="6pt">
757
- <xsl:choose>
758
- <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
759
- <xsl:call-template name="insertCheckBoxOff"/>
760
- </xsl:when>
761
- <xsl:otherwise>
762
- <xsl:call-template name="insertCheckBoxOn"/>
763
- </xsl:otherwise>
764
- </xsl:choose>
765
628
  <xsl:call-template name="addLetterSpacingSmallCaps">
766
- <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
629
+ <xsl:with-param name="text" select="'Secretary:'"/>
630
+ </xsl:call-template>
631
+ </fo:block>
632
+ <fo:block font-size="9pt">
633
+ <!-- Example: Ms Shanti Conn -->
634
+ <xsl:call-template name="addLetterSpacing">
635
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:secretary"/>
767
636
  </xsl:call-template>
768
637
  </fo:block>
769
638
  </fo:table-cell>
770
639
  </fo:table-row>
771
- </xsl:if>
772
- </fo:table-body>
773
- </fo:table>
774
- </fo:block-container>
775
- </fo:block-container>
640
+ <fo:table-row height="12mm">
641
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
642
+ <xsl:if test="not($stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD')">
643
+ <xsl:attribute name="number-columns-spanned">2</xsl:attribute>
644
+ </xsl:if>
645
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
646
+ <xsl:call-template name="addLetterSpacingSmallCaps">
647
+ <xsl:with-param name="text" select="'Of interest to the following committees:'"/>
648
+ </xsl:call-template>
649
+ </fo:block>
650
+ <fo:block font-size="9pt">
651
+ <xsl:call-template name="addLetterSpacing">
652
+ <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:interest-to-committees"/>
653
+ </xsl:call-template>
654
+ </fo:block>
655
+ </fo:table-cell>
656
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
657
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
658
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
659
+ <xsl:if test="$stage-abbreviation = 'FDIS'">
660
+ <xsl:call-template name="addLetterSpacingSmallCaps">
661
+ <xsl:with-param name="text" select="'horizontal standard:'"/>
662
+ </xsl:call-template>
663
+ </xsl:if>
664
+ <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
665
+ <xsl:call-template name="addLetterSpacingSmallCaps">
666
+ <xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
667
+ </xsl:call-template>
668
+ </xsl:if>
669
+ </fo:block>
670
+ <fo:block>
671
+ <xsl:choose>
672
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
673
+ <xsl:call-template name="insertCheckBoxOn"/>
674
+ </xsl:when>
675
+ <xsl:otherwise>
676
+ <xsl:call-template name="insertCheckBoxOff"/>
677
+ </xsl:otherwise>
678
+ </xsl:choose>
679
+ </fo:block>
776
680
 
777
- <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">
778
- <fo:block>
779
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:license-statement" mode="cover-page-internal"/>
780
- </fo:block>
781
- </fo:block-container>
681
+ <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
682
+ <fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
683
+ <fo:block-container margin-left="1mm" margin-right="1mm">
684
+ <fo:block font-size="8pt" padding="2mm">
685
+ <xsl:call-template name="addLetterSpacing">
686
+ <xsl:with-param name="text" select="'Other TC/SCs are requested to indicate their interest, if any, in this CDV to the secretary.'"/>
687
+ </xsl:call-template>
688
+ </fo:block>
689
+ </fo:block-container>
690
+ </fo:block-container>
691
+ </xsl:if>
692
+ </fo:table-cell>
693
+ </xsl:if>
694
+ </fo:table-row>
695
+
696
+ <xsl:if test="not($stage-abbreviation = 'DPAS')">
697
+ <fo:table-row height="10mm">
698
+ <fo:table-cell padding="1.5mm" padding-bottom="0mm">
699
+ <fo:block font-size="6.5pt" margin-bottom="4pt">
700
+ <xsl:call-template name="addLetterSpacingSmallCaps">
701
+ <xsl:with-param name="text" select="'Functions concerned:'"/>
702
+ </xsl:call-template>
703
+ </fo:block>
704
+ <!-- function: { emc | safety | environment | quality-assurance } -->
705
+ <fo:block font-size="6.5pt">
706
+ <xsl:choose>
707
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'emc'">
708
+ <xsl:call-template name="insertCheckBoxOn"/>
709
+ </xsl:when>
710
+ <xsl:otherwise>
711
+ <xsl:call-template name="insertCheckBoxOff"/>
712
+ </xsl:otherwise>
713
+ </xsl:choose>
714
+ <xsl:call-template name="addLetterSpacingSmallCaps">
715
+ <xsl:with-param name="text" select="'EMC'"/>
716
+ </xsl:call-template>
717
+ <fo:inline padding-right="33mm"> </fo:inline>
718
+ <xsl:choose>
719
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'environment'">
720
+ <xsl:call-template name="insertCheckBoxOn"/>
721
+ </xsl:when>
722
+ <xsl:otherwise>
723
+ <xsl:call-template name="insertCheckBoxOff"/>
724
+ </xsl:otherwise>
725
+ </xsl:choose>
726
+ <xsl:call-template name="addLetterSpacingSmallCaps">
727
+ <xsl:with-param name="text" select="'Environment'"/>
728
+ </xsl:call-template>
729
+ </fo:block>
730
+ </fo:table-cell>
731
+ <fo:table-cell padding="1.5mm" padding-bottom="0mm">
732
+ <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
733
+ <fo:block font-size="6.5pt">
734
+ <xsl:choose>
735
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'quality-assurance'">
736
+ <xsl:call-template name="insertCheckBoxOn"/>
737
+ </xsl:when>
738
+ <xsl:otherwise>
739
+ <xsl:call-template name="insertCheckBoxOff"/>
740
+ </xsl:otherwise>
741
+ </xsl:choose>
742
+ <xsl:call-template name="addLetterSpacingSmallCaps">
743
+ <xsl:with-param name="text" select="'Quality assurance'"/>
744
+ </xsl:call-template>
745
+ <fo:inline padding-right="13mm"> </fo:inline>
746
+ <xsl:choose>
747
+ <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'safety'">
748
+ <xsl:call-template name="insertCheckBoxOn"/>
749
+ </xsl:when>
750
+ <xsl:otherwise>
751
+ <xsl:call-template name="insertCheckBoxOff"/>
752
+ </xsl:otherwise>
753
+ </xsl:choose>
754
+ <xsl:call-template name="addLetterSpacingSmallCaps">
755
+ <xsl:with-param name="text" select="'Safety'"/>
756
+ </xsl:call-template>
757
+ </fo:block>
758
+ </fo:table-cell>
759
+ </fo:table-row>
760
+ </xsl:if>
761
+
762
+ <xsl:if test="not($stage-abbreviation = 'CD' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS')">
763
+
764
+ <fo:table-row>
765
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
766
+ <fo:block font-size="6.5pt" margin-bottom="12pt">
767
+ <xsl:choose>
768
+ <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
769
+ <xsl:call-template name="insertCheckBoxOn"/>
770
+ </xsl:when>
771
+ <xsl:otherwise>
772
+ <xsl:call-template name="insertCheckBoxOff"/>
773
+ </xsl:otherwise>
774
+ </xsl:choose>
775
+ <xsl:call-template name="addLetterSpacingSmallCaps">
776
+ <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
777
+ </xsl:call-template>
778
+ </fo:block>
779
+
780
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']"/>
781
+
782
+ </fo:table-cell>
783
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
784
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
785
+ <xsl:choose>
786
+ <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
787
+ <xsl:call-template name="insertCheckBoxOff"/>
788
+ </xsl:when>
789
+ <xsl:otherwise>
790
+ <xsl:call-template name="insertCheckBoxOn"/>
791
+ </xsl:otherwise>
792
+ </xsl:choose>
793
+ <xsl:call-template name="addLetterSpacingSmallCaps">
794
+ <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
795
+ </xsl:call-template>
796
+ </fo:block>
797
+ </fo:table-cell>
798
+ </fo:table-row>
799
+ </xsl:if>
800
+ </fo:table-body>
801
+ </fo:table>
802
+ </fo:block-container>
803
+ </fo:block-container>
782
804
 
783
- <fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
784
- <fo:block font-size="6.5pt" margin-bottom="6pt">
785
- <xsl:call-template name="addLetterSpacingSmallCaps">
786
- <xsl:with-param name="text">Title:</xsl:with-param>
787
- </xsl:call-template>
788
- </fo:block>
789
- <fo:block font-size="9pt" font-weight="bold">
790
- <xsl:call-template name="addLetterSpacing">
791
- <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>
792
- </xsl:call-template>
793
- </fo:block>
794
- </fo:block-container>
805
+ <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">
806
+ <fo:block>
807
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:license-statement" mode="cover-page-internal"/>
808
+ </fo:block>
809
+ </fo:block-container>
795
810
 
796
- <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
797
- <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="6.5mm" padding="1mm" margin-top="3mm" display-align="center">
798
- <fo:block font-size="6.5pt">
811
+ <fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
812
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
813
+ <xsl:call-template name="addLetterSpacingSmallCaps">
814
+ <xsl:with-param name="text">Title:</xsl:with-param>
815
+ </xsl:call-template>
816
+ </fo:block>
817
+ <fo:block font-size="9pt" font-weight="bold">
799
818
  <xsl:call-template name="addLetterSpacing">
800
- <xsl:with-param name="text">
801
- <xsl:text>PROPOSED STABILITY DATE: </xsl:text>
802
- </xsl:with-param>
819
+ <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>
803
820
  </xsl:call-template>
804
- <!-- 2023 -->
805
- <fo:inline font-size="9pt"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='unchanged']/iec:on"/></fo:inline>
806
821
  </fo:block>
807
822
  </fo:block-container>
808
- </xsl:if>
809
823
 
810
- <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
811
- <fo:block font-size="6.5pt" margin-bottom="6pt">
812
- <xsl:call-template name="addLetterSpacingSmallCaps">
813
- <xsl:with-param name="text">Note from TC/SC officers:</xsl:with-param>
814
- </xsl:call-template>
815
- </fo:block>
816
- <!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
817
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:tc-sc-officers-note"/>
818
- </fo:block-container>
824
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
825
+ <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="6.5mm" padding="1mm" margin-top="3mm" display-align="center">
826
+ <fo:block font-size="6.5pt">
827
+ <xsl:call-template name="addLetterSpacing">
828
+ <xsl:with-param name="text">
829
+ <xsl:text>PROPOSED STABILITY DATE: </xsl:text>
830
+ </xsl:with-param>
831
+ </xsl:call-template>
832
+ <!-- 2023 -->
833
+ <fo:inline font-size="9pt"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='unchanged']/iec:on"/></fo:inline>
834
+ </fo:block>
835
+ </fo:block-container>
836
+ </xsl:if>
819
837
 
820
- </fo:flow>
821
- </fo:page-sequence>
822
- </xsl:if>
838
+ <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
839
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
840
+ <xsl:call-template name="addLetterSpacingSmallCaps">
841
+ <xsl:with-param name="text">Note from TC/SC officers:</xsl:with-param>
842
+ </xsl:call-template>
843
+ </fo:block>
844
+ <!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
845
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:tc-sc-officers-note"/>
846
+ </fo:block-container>
823
847
 
824
- <xsl:if test="$debug = 'true'">
825
- <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
826
- DEBUG
827
- contents=<xsl:copy-of select="$contents"/>
828
- <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
848
+ </fo:flow>
849
+ </fo:page-sequence>
829
850
  </xsl:if>
830
851
 
831
- <xsl:for-each select="//iec:iec-standard">
832
- <xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
833
- <xsl:variable name="current_document">
834
- <xsl:copy-of select="."/>
835
- </xsl:variable>
852
+ <xsl:if test="$debug = 'true'">
853
+ <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
854
+ DEBUG
855
+ contents=<xsl:copy-of select="$contents"/>
856
+ <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
857
+ </xsl:if>
858
+
859
+ <xsl:for-each select="//iec:iec-standard">
860
+ <xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
861
+ <xsl:variable name="current_document">
862
+ <xsl:copy-of select="."/>
863
+ </xsl:variable>
836
864
 
837
- <xsl:variable name="num"><xsl:number count="iec:iec-standard" level="any"/></xsl:variable>
865
+ <xsl:variable name="num"><xsl:number count="iec:iec-standard" level="any"/></xsl:variable>
838
866
 
839
- <xsl:for-each select="xalan:nodeset($current_document)">
867
+ <xsl:for-each select="xalan:nodeset($current_document)">
840
868
 
841
- <xsl:variable name="docid">
842
- <xsl:call-template name="getDocumentId"/>
843
- </xsl:variable>
869
+ <xsl:variable name="docid">
870
+ <xsl:call-template name="getDocumentId"/>
871
+ </xsl:variable>
844
872
 
845
- <fo:page-sequence master-reference="document" format="1" force-page-count="no-force"> <!-- initial-page-number="2" -->
873
+ <fo:page-sequence master-reference="document" format="1" force-page-count="no-force"> <!-- initial-page-number="2" -->
846
874
 
847
- <xsl:if test="$num = '1'">
848
- <xsl:attribute name="initial-page-number">2</xsl:attribute>
849
- </xsl:if>
850
- <xsl:if test="$isIEV = 'true'">
851
- <xsl:attribute name="format">I</xsl:attribute>
852
- </xsl:if>
875
+ <xsl:if test="$num = '1'">
876
+ <xsl:attribute name="initial-page-number">2</xsl:attribute>
877
+ </xsl:if>
878
+ <xsl:if test="$isIEV = 'true'">
879
+ <xsl:attribute name="format">I</xsl:attribute>
880
+ </xsl:if>
853
881
 
854
- <xsl:call-template name="insertHeaderFooter"/>
855
- <fo:flow flow-name="xsl-region-body">
882
+ <xsl:call-template name="insertHeaderFooter"/>
883
+ <fo:flow flow-name="xsl-region-body">
856
884
 
857
- <xsl:call-template name="insertTOCpages">
858
- <xsl:with-param name="contents" select="$contents/doc[@id = $docid]"/>
859
- </xsl:call-template>
885
+ <xsl:call-template name="insertTOCpages">
886
+ <xsl:with-param name="contents" select="$contents/doc[@id = $docid]"/>
887
+ </xsl:call-template>
860
888
 
861
- <xsl:call-template name="insertPrefacepages">
862
- <xsl:with-param name="lang" select="$lang"/>
863
- </xsl:call-template>
889
+ <xsl:call-template name="insertPrefacepages">
890
+ <xsl:with-param name="lang" select="$lang"/>
891
+ </xsl:call-template>
864
892
 
865
- </fo:flow>
866
- </fo:page-sequence>
893
+ </fo:flow>
894
+ </fo:page-sequence>
867
895
 
868
- <xsl:call-template name="insertBodypages">
869
- <xsl:with-param name="lang" select="$lang"/>
870
- </xsl:call-template>
896
+ <xsl:call-template name="insertBodypages">
897
+ <xsl:with-param name="lang" select="$lang"/>
898
+ </xsl:call-template>
871
899
 
900
+ </xsl:for-each>
872
901
  </xsl:for-each>
873
- </xsl:for-each>
874
902
 
875
- <xsl:if test="$stage &gt;= 60">
876
- <fo:page-sequence master-reference="blank-page">
877
- <fo:flow flow-name="xsl-region-body">
878
- <fo:block> </fo:block>
879
- </fo:flow>
880
- </fo:page-sequence>
881
-
882
- <fo:page-sequence master-reference="last-page">
883
- <fo:flow flow-name="xsl-region-body">
884
- <fo:block-container margin-left="20mm" margin-top="19mm">
885
- <fo:block-container margin-left="0mm" margin-top="0mm">
886
- <fo:block font-size="11pt" color="{$color_blue}" margin-bottom="12pt" line-height="150%">
887
- <fo:block-container width="42mm">
888
- <fo:block>
889
- <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))"/>
890
- <xsl:value-of select="$publisher"/>
891
- </fo:block>
892
- </fo:block-container>
893
- </fo:block>
894
- <fo:block font-size="9pt" line-height="150%">
895
- <!-- Example:
896
- 3, rue de Varembé
897
- PO Box 131
898
- CH-1211 Geneva 20
899
- Switzerland
900
-
901
- Tel: + 41 22 919 02 11
902
- Fax: + 41 22 919 03 00
903
- info@iec.ch
904
- www.iec.ch -->
905
- <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())"/>
906
- <xsl:choose>
907
- <xsl:when test="$telpos != 0">
908
- <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"/>
909
- <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">
910
- <xsl:with-param name="lastpage">true</xsl:with-param>
911
- </xsl:apply-templates>
912
- </xsl:when>
913
- <xsl:otherwise>
914
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
915
- </xsl:otherwise>
916
- </xsl:choose>
917
- </fo:block>
903
+ <xsl:if test="$stage &gt;= 60">
904
+ <fo:page-sequence master-reference="blank-page">
905
+ <fo:flow flow-name="xsl-region-body">
906
+ <fo:block> </fo:block>
907
+ </fo:flow>
908
+ </fo:page-sequence>
909
+
910
+ <fo:page-sequence master-reference="last-page">
911
+ <fo:flow flow-name="xsl-region-body">
912
+ <fo:block-container margin-left="20mm" margin-top="19mm">
913
+ <fo:block-container margin-left="0mm" margin-top="0mm">
914
+ <fo:block font-size="11pt" color="{$color_blue}" margin-bottom="12pt" line-height="150%">
915
+ <fo:block-container width="42mm">
916
+ <fo:block>
917
+ <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))"/>
918
+ <xsl:value-of select="$publisher"/>
919
+ </fo:block>
920
+ </fo:block-container>
921
+ </fo:block>
922
+ <fo:block font-size="9pt" line-height="150%">
923
+ <!-- Example:
924
+ 3, rue de Varembé
925
+ PO Box 131
926
+ CH-1211 Geneva 20
927
+ Switzerland
928
+
929
+ Tel: + 41 22 919 02 11
930
+ Fax: + 41 22 919 03 00
931
+ info@iec.ch
932
+ www.iec.ch -->
933
+ <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())"/>
934
+ <xsl:choose>
935
+ <xsl:when test="$telpos != 0">
936
+ <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"/>
937
+ <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">
938
+ <xsl:with-param name="lastpage">true</xsl:with-param>
939
+ </xsl:apply-templates>
940
+ </xsl:when>
941
+ <xsl:otherwise>
942
+ <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
943
+ </xsl:otherwise>
944
+ </xsl:choose>
945
+ </fo:block>
946
+ </fo:block-container>
918
947
  </fo:block-container>
919
- </fo:block-container>
920
- </fo:flow>
921
- </fo:page-sequence>
922
- </xsl:if>
923
- </fo:root>
948
+ </fo:flow>
949
+ </fo:page-sequence>
950
+ </xsl:if>
951
+ </fo:root>
952
+ </xsl:variable>
953
+
954
+ <xsl:apply-templates select="xalan:nodeset($xslfo)" mode="landscape_portrait"/>
955
+
956
+ </xsl:template>
957
+
958
+ <xsl:template match="iec:pagebreak" priority="2">
959
+ <xsl:copy-of select="."/>
924
960
  </xsl:template>
925
961
 
926
962
  <xsl:template match="iec:tc-sc-officers-note/iec:p">
@@ -1056,75 +1092,77 @@
1056
1092
  Electromagnetic compatibility (EMC) –
1057
1093
  Part 4-5: Testing and measurement techniques – Surge immunity test
1058
1094
  -->
1059
- <xsl:variable name="title-intro" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']"/>
1060
- <xsl:value-of select="$title-intro"/>
1061
- <xsl:variable name="title-main" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']"/>
1062
- <xsl:if test="$title-main != ''">
1063
- <!-- <xsl:text> — </xsl:text> -->
1064
- <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1065
- <xsl:value-of select="$title-main"/>
1066
- </xsl:if>
1067
- <xsl:variable name="title-part" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/>
1068
- <xsl:if test="$title-part != ''">
1069
- <!-- <xsl:text> — </xsl:text> -->
1070
- <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1071
- <xsl:value-of select="$linebreak"/>
1072
- <xsl:if test="$part != ''">
1073
- <xsl:variable name="localized_part">
1074
- <xsl:call-template name="getLocalizedString">
1075
- <xsl:with-param name="key">locality.part</xsl:with-param>
1076
- <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
1077
- </xsl:call-template>
1078
- </xsl:variable>
1079
-
1080
- <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1095
+ <xsl:variable name="titles_first_">
1096
+ <title-intro><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']"/></title-intro>
1097
+ <title-main><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']"/></title-main>
1098
+ <title-part><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/></title-part>
1099
+ </xsl:variable>
1100
+ <xsl:variable name="titles_first" select="xalan:nodeset($titles_first_)"/>
1081
1101
 
1102
+ <xsl:for-each select="$titles_first/*[normalize-space() != '']">
1103
+ <xsl:if test="position() != 1">
1104
+ <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1082
1105
  </xsl:if>
1083
- <xsl:value-of select="$title-part"/>
1084
- </xsl:if>
1106
+ <xsl:if test="self::title-part">
1107
+ <xsl:value-of select="$linebreak"/>
1108
+ <xsl:if test="$part != ''">
1109
+ <xsl:variable name="localized_part">
1110
+ <xsl:call-template name="getLocalizedString">
1111
+ <xsl:with-param name="key">locality.part</xsl:with-param>
1112
+ <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
1113
+ </xsl:call-template>
1114
+ </xsl:variable>
1115
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1116
+ </xsl:if>
1117
+ </xsl:if>
1118
+ <xsl:value-of select="."/>
1119
+ </xsl:for-each>
1120
+
1085
1121
  </fo:block>
1086
1122
  <fo:block font-size="12pt" font-weight="bold" role="H1">
1087
1123
  <!-- Example: Compatibilité électromagnétique (CEM) –
1088
1124
  Partie 4-5: Techniques d'essai et de mesure – Essai d'immunité aux ondes de
1089
1125
  choc -->
1090
- <xsl:variable name="title-intro-second" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-intro']"/>
1091
- <xsl:value-of select="$title-intro-second"/>
1092
- <xsl:variable name="title-main-second" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-main']"/>
1093
- <xsl:if test="$title-main-second != ''">
1094
- <!-- <xsl:text> — </xsl:text> -->
1095
- <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1096
- <xsl:value-of select="$title-main-second"/>
1097
- </xsl:if>
1098
- <xsl:variable name="part-second" select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-part']"/>
1099
- <xsl:if test="$part-second != ''">
1100
- <!-- <xsl:text> — </xsl:text> -->
1101
- <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1102
- <xsl:value-of select="$linebreak"/>
1103
- <xsl:if test="$part != ''">
1104
1126
 
1105
- <xsl:variable name="locality_part_lang_second">
1106
- <xsl:call-template name="getLocalizedString">
1107
- <xsl:with-param name="key">locality.part</xsl:with-param>
1108
- <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
1109
- <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
1110
- </xsl:call-template>
1111
- </xsl:variable>
1127
+ <xsl:variable name="titles_second_">
1128
+ <title-intro><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-intro']"/></title-intro>
1129
+ <title-main><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-main']"/></title-main>
1130
+ <title-part><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-part']"/></title-part>
1131
+ </xsl:variable>
1132
+ <xsl:variable name="titles_second" select="xalan:nodeset($titles_second_)"/>
1112
1133
 
1113
- <xsl:choose>
1114
- <xsl:when test="normalize-space($locality_part_lang_second) != ''">
1115
- <xsl:variable name="localized_part">
1116
- <xsl:value-of select="$locality_part_lang_second"/>
1117
- </xsl:variable>
1118
- <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1119
- </xsl:when>
1120
- <xsl:otherwise>
1121
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang_second]),'#',$part)"/>
1122
- </xsl:otherwise>
1123
- </xsl:choose>
1134
+ <xsl:for-each select="$titles_second/*[normalize-space() != '']">
1135
+ <xsl:if test="position() != 1">
1136
+ <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1137
+ </xsl:if>
1138
+ <xsl:if test="self::title-part">
1139
+ <xsl:value-of select="$linebreak"/>
1140
+ <xsl:if test="$part != ''">
1141
+ <xsl:variable name="locality_part_lang_second">
1142
+ <xsl:call-template name="getLocalizedString">
1143
+ <xsl:with-param name="key">locality.part</xsl:with-param>
1144
+ <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
1145
+ <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
1146
+ </xsl:call-template>
1147
+ </xsl:variable>
1148
+ <xsl:value-of select="concat($locality_part_lang_second ,' ',$part, ': ')"/>
1124
1149
 
1150
+ <xsl:choose>
1151
+ <xsl:when test="normalize-space($locality_part_lang_second) != ''">
1152
+ <xsl:variable name="localized_part">
1153
+ <xsl:value-of select="$locality_part_lang_second"/>
1154
+ </xsl:variable>
1155
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1156
+ </xsl:when>
1157
+ <xsl:otherwise>
1158
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang = $lang_second]),'#',$part)"/>
1159
+ </xsl:otherwise>
1160
+ </xsl:choose>
1161
+ </xsl:if>
1125
1162
  </xsl:if>
1126
- <xsl:value-of select="$part-second"/>
1127
- </xsl:if>
1163
+ <xsl:value-of select="."/>
1164
+ </xsl:for-each>
1165
+
1128
1166
  </fo:block>
1129
1167
  </fo:block-container>
1130
1168
  </fo:block-container>
@@ -1331,34 +1369,38 @@
1331
1369
  <xsl:template name="printTitles">
1332
1370
  <xsl:param name="lang"/>
1333
1371
 
1334
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/>
1335
-
1336
- <xsl:variable name="title-main" select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/>
1337
- <xsl:if test="normalize-space($title-main) != ''">
1338
- <!-- <xsl:text> — </xsl:text> -->
1339
- <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1340
- <xsl:value-of select="$title-main"/>
1341
- </xsl:if>
1372
+ <xsl:variable name="titles_doc_">
1373
+ <title-intro><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/></title-intro>
1374
+ <title-main><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/></title-main>
1375
+ <title-part><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/></title-part>
1376
+ </xsl:variable>
1377
+ <xsl:variable name="titles_doc" select="xalan:nodeset($titles_doc_)"/>
1342
1378
 
1343
- <xsl:variable name="title-part" select="/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/>
1344
- <xsl:if test="$title-part != ''">
1345
- <!-- <xsl:text> </xsl:text> -->
1346
- <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1347
- <fo:block> </fo:block>
1348
- <fo:block>
1349
- <xsl:if test="$part != ''">
1350
- <!-- Example: Part 1: Riz -->
1351
- <xsl:variable name="localized_part">
1352
- <xsl:call-template name="getLocalizedString">
1353
- <xsl:with-param name="key">Part.sg</xsl:with-param>
1354
- <xsl:with-param name="lang" select="$lang"/>
1355
- </xsl:call-template>
1356
- </xsl:variable>
1357
- <xsl:value-of select="concat($localized_part ,' ', $part, ': ')"/>
1358
- </xsl:if>
1359
- <xsl:value-of select="$title-part"/>
1360
- </fo:block>
1361
- </xsl:if>
1379
+ <xsl:for-each select="$titles_doc/*[normalize-space() != '']">
1380
+ <xsl:if test="position() != 1">
1381
+ <xsl:value-of select="concat(' ',$en_dash ,' ')"/>
1382
+ </xsl:if>
1383
+ <xsl:choose>
1384
+ <xsl:when test="self::title-part">
1385
+ <fo:block> </fo:block>
1386
+ <fo:block>
1387
+ <xsl:if test="$part != ''">
1388
+ <xsl:variable name="localized_part">
1389
+ <xsl:call-template name="getLocalizedString">
1390
+ <xsl:with-param name="key">Part.sg</xsl:with-param>
1391
+ <xsl:with-param name="lang" select="$lang"/>
1392
+ </xsl:call-template>
1393
+ </xsl:variable>
1394
+ <xsl:value-of select="concat($localized_part ,' ',$part, ': ')"/>
1395
+ </xsl:if>
1396
+ <xsl:value-of select="."/>
1397
+ </fo:block>
1398
+ </xsl:when>
1399
+ <xsl:otherwise>
1400
+ <xsl:value-of select="."/>
1401
+ </xsl:otherwise>
1402
+ </xsl:choose>
1403
+ </xsl:for-each>
1362
1404
  </xsl:template>
1363
1405
 
1364
1406
  <xsl:template match="node()">
@@ -3811,7 +3853,7 @@
3811
3853
  <xsl:variable name="isDeleted" select="@deleted"/>
3812
3854
 
3813
3855
  <xsl:choose>
3814
- <xsl:when test="@width">
3856
+ <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
3815
3857
 
3816
3858
  <!-- centered table when table name is centered (see table-name-style) -->
3817
3859
 
@@ -4141,6 +4183,7 @@
4141
4183
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
4142
4184
  <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
4143
4185
  <!-- difference between the available space and the minimum table width -->
4186
+ <_width_min><xsl:value-of select="@width_min"/></_width_min>
4144
4187
  <xsl:variable name="W" select="$page_width - @width_min"/>
4145
4188
  <W><xsl:value-of select="$W"/></W>
4146
4189
  <!-- difference between maximum and minimum width of the table -->
@@ -4778,17 +4821,20 @@
4778
4821
  <xsl:for-each select="xalan:nodeset($references)//fn">
4779
4822
  <xsl:variable name="reference" select="@reference"/>
4780
4823
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4781
- <fo:block xsl:use-attribute-sets="table-fn-style">
4782
4824
 
4783
- <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
4825
+ <fo:block xsl:use-attribute-sets="table-fn-style">
4784
4826
 
4785
- <xsl:value-of select="@reference"/>
4827
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
4828
+
4829
+ <xsl:value-of select="@reference"/>
4830
+
4831
+ </fo:inline>
4832
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4833
+ <xsl:copy-of select="./node()"/>
4834
+ </fo:inline>
4835
+
4836
+ </fo:block>
4786
4837
 
4787
- </fo:inline>
4788
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4789
- <xsl:copy-of select="./node()"/>
4790
- </fo:inline>
4791
- </fo:block>
4792
4838
  </xsl:if>
4793
4839
  </xsl:for-each>
4794
4840
  </xsl:template>
@@ -4987,7 +5033,7 @@
4987
5033
 
4988
5034
  <xsl:variable name="key_iso">
4989
5035
 
4990
- <xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
5036
+ <xsl:if test="$parent = 'figure' or $parent = 'formula' or ../@key = 'true'">true</xsl:if>
4991
5037
  <!-- and (not(../@class) or ../@class !='pseudocode') -->
4992
5038
  </xsl:variable>
4993
5039
 
@@ -5746,12 +5792,12 @@
5746
5792
  <xsl:param name="value"/>
5747
5793
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
5748
5794
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
5749
- <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
5750
- <xsl:attribute name="height">5mm</xsl:attribute>
5795
+ <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
5796
+ <xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
5751
5797
  <xsl:attribute name="content-width">100%</xsl:attribute>
5752
5798
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
5753
5799
  <xsl:attribute name="scaling">uniform</xsl:attribute>
5754
- <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
5800
+ <!-- <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
5755
5801
  <g>
5756
5802
  <xsl:if test="$type = 'closing' or $type = 'end'">
5757
5803
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
@@ -5765,6 +5811,27 @@
5765
5811
  </xsl:if>
5766
5812
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
5767
5813
  </text>
5814
+ </svg> -->
5815
+ <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
5816
+ <g>
5817
+ <xsl:if test="$type = 'closing' or $type = 'end'">
5818
+ <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
5819
+ </xsl:if>
5820
+ <polyline points="0,2.5 {$maxwidth},2.5 {$maxwidth + 20},40 {$maxwidth},77.5 0,77.5" stroke="black" stroke-width="5" fill="white"/>
5821
+ <line x1="9.5" y1="0" x2="9.5" y2="80" stroke="black" stroke-width="19"/>
5822
+ </g>
5823
+ <xsl:variable name="text_x">
5824
+ <xsl:choose>
5825
+ <xsl:when test="$type = 'closing' or $type = 'end'">28</xsl:when>
5826
+ <xsl:otherwise>22</xsl:otherwise>
5827
+ </xsl:choose>
5828
+ </xsl:variable>
5829
+ <text font-family="Arial" x="{$text_x}" y="50" font-size="40pt">
5830
+ <xsl:value-of select="$kind"/>
5831
+ </text>
5832
+ <text font-family="Arial" x="{$text_x + 33}" y="65" font-size="38pt">
5833
+ <xsl:value-of select="$value"/>
5834
+ </text>
5768
5835
  </svg>
5769
5836
  </fo:instream-foreign-object>
5770
5837
  </xsl:template>
@@ -5824,6 +5891,77 @@
5824
5891
  <fo:block break-after="page"/>
5825
5892
  </xsl:template>
5826
5893
 
5894
+ <!-- ================================================================ -->
5895
+ <!-- landscape/portrait orientation processing (post-processing step) -->
5896
+ <!-- ================================================================ -->
5897
+ <xsl:template match="@*|node()" mode="landscape_portrait">
5898
+ <xsl:copy>
5899
+ <xsl:apply-templates select="@*|node()" mode="landscape_portrait"/>
5900
+ </xsl:copy>
5901
+ </xsl:template>
5902
+
5903
+ <xsl:template match="*[local-name() = 'pagebreak'][not(following-sibling::*[1][local-name() = 'pagebreak'])]" mode="landscape_portrait">
5904
+
5905
+ <!-- determine pagebreak is last element before </fo:flow> or not -->
5906
+ <xsl:variable name="isLast">
5907
+ <xsl:for-each select="ancestor-or-self::*[ancestor::fo:flow]">
5908
+ <xsl:if test="following-sibling::*">false</xsl:if>
5909
+ </xsl:for-each>
5910
+ </xsl:variable>
5911
+
5912
+ <xsl:if test="contains($isLast, 'false')">
5913
+
5914
+ <xsl:variable name="orientation" select="normalize-space(@orientation)"/>
5915
+
5916
+ <xsl:variable name="tree_">
5917
+ <xsl:for-each select="ancestor::*[ancestor::fo:flow]">
5918
+ <element pos="{position()}">
5919
+ <xsl:value-of select="name()"/>
5920
+ </element>
5921
+ </xsl:for-each>
5922
+ </xsl:variable>
5923
+ <xsl:variable name="tree" select="xalan:nodeset($tree_)"/>
5924
+
5925
+ <!-- close fo:page-sequence (closing preceding fo elements) -->
5926
+ <xsl:for-each select="$tree//element">
5927
+ <xsl:sort data-type="number" order="descending" select="@pos"/>
5928
+ <xsl:text disable-output-escaping="yes">&lt;/</xsl:text>
5929
+ <xsl:value-of select="."/>
5930
+ <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
5931
+ </xsl:for-each>
5932
+ <xsl:text disable-output-escaping="yes">&lt;/fo:flow&gt;</xsl:text>
5933
+ <xsl:text disable-output-escaping="yes">&lt;/fo:page-sequence&gt;</xsl:text>
5934
+
5935
+ <!-- <pagebreak/> -->
5936
+ <!-- create a new fo:page-sequence (opening fo elements) -->
5937
+ <xsl:text disable-output-escaping="yes">&lt;fo:page-sequence master-reference="document</xsl:text><xsl:if test="$orientation != ''">-<xsl:value-of select="$orientation"/></xsl:if><xsl:text disable-output-escaping="yes">"&gt;</xsl:text>
5938
+ <fo:static-content flow-name="xsl-footnote-separator">
5939
+ <fo:block>
5940
+ <fo:leader leader-pattern="rule" leader-length="30%"/>
5941
+ </fo:block>
5942
+ </fo:static-content>
5943
+ <xsl:call-template name="insertHeaderFooter"/>
5944
+ <xsl:text disable-output-escaping="yes">&lt;fo:flow flow-name="xsl-region-body"&gt;</xsl:text>
5945
+
5946
+ <xsl:for-each select="$tree//element">
5947
+ <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
5948
+ <xsl:value-of select="."/>
5949
+ <xsl:for-each select="@*[local-name() != 'pos']">
5950
+ <xsl:text> </xsl:text>
5951
+ <xsl:value-of select="local-name()"/>
5952
+ <xsl:text>="</xsl:text>
5953
+ <xsl:value-of select="."/>
5954
+ <xsl:text>"</xsl:text>
5955
+ </xsl:for-each>
5956
+ <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
5957
+ </xsl:for-each>
5958
+
5959
+ </xsl:if>
5960
+ </xsl:template>
5961
+ <!-- ================================================================ -->
5962
+ <!-- END: landscape/portrait orientation processing (post-processing step) -->
5963
+ <!-- ================================================================ -->
5964
+
5827
5965
  <!-- Example: <span style="font-family:&quot;Noto Sans JP&quot;">styled text</span> -->
5828
5966
  <xsl:template match="*[local-name() = 'span'][@style]" priority="2">
5829
5967
  <xsl:variable name="styles__">
@@ -6019,18 +6157,23 @@
6019
6157
 
6020
6158
  <xsl:template name="add-zero-spaces-java">
6021
6159
  <xsl:param name="text" select="."/>
6022
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
6023
- <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1​')"/>
6160
+
6161
+ <!-- add zero-width space (#x200B) after dot with next non-digit -->
6162
+ <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(\.)([^\d\s])','$1​$2')"/>
6163
+ <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right -->
6164
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→)','$1​')"/>
6165
+ <!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
6166
+ <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2),'(:)(\D)','$1​$2')"/>
6024
6167
  <!-- add zero-width space (#x200B) after characters: 'great than' -->
6025
- <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
6168
+ <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
6026
6169
  <!-- add zero-width space (#x200B) before characters: 'less than' -->
6027
- <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
6170
+ <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
6028
6171
  <!-- add zero-width space (#x200B) before character: { -->
6029
- <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
6172
+ <xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
6030
6173
  <!-- add zero-width space (#x200B) after character: , -->
6031
- <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
6174
+ <xsl:variable name="text7" select="java:replaceAll(java:java.lang.String.new($text6), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
6032
6175
 
6033
- <xsl:value-of select="$text5"/>
6176
+ <xsl:value-of select="$text7"/>
6034
6177
  </xsl:template>
6035
6178
 
6036
6179
  <xsl:template name="add-zero-spaces-link-java">
@@ -6039,7 +6182,9 @@
6039
6182
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
6040
6183
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
6041
6184
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
6042
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
6185
+ <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
6186
+ <!-- remove zero-width space at the end -->
6187
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
6043
6188
  </xsl:template>
6044
6189
 
6045
6190
  <!-- add zero space after dash character (for table's entries) -->
@@ -6176,7 +6321,7 @@
6176
6321
  </xsl:copy>
6177
6322
  </xsl:template>
6178
6323
 
6179
- <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
6324
+ <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode']) and not(*[local-name()='ul']) and not(*[local-name()='ol'])]" mode="table-without-br">
6180
6325
  <xsl:copy>
6181
6326
  <xsl:copy-of select="@*"/>
6182
6327
  <p>
@@ -6252,6 +6397,14 @@
6252
6397
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),' {2,}',' ')"/>
6253
6398
  </xsl:template>
6254
6399
 
6400
+ <xsl:template match="*[local-name()='th' or local-name()='td']//*[local-name() = 'ol' or local-name() = 'ul']" mode="table-without-br">
6401
+ <xsl:apply-templates mode="table-without-br"/>
6402
+ </xsl:template>
6403
+
6404
+ <xsl:template match="*[local-name()='th' or local-name()='td']//*[local-name() = 'li']" mode="table-without-br">
6405
+ <xsl:apply-templates mode="table-without-br"/>
6406
+ </xsl:template>
6407
+
6255
6408
  <!-- mode="table-without-br" -->
6256
6409
  <!-- ================================== -->
6257
6410
  <!-- END: Step 0. replace <br/> to <p>...</p> -->
@@ -7069,7 +7222,7 @@
7069
7222
 
7070
7223
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7071
7224
 
7072
- <fo:block-container margin-left="0mm">
7225
+ <fo:block-container margin-left="0mm" margin-right="0mm">
7073
7226
 
7074
7227
  <fo:block>
7075
7228
 
@@ -7245,11 +7398,14 @@
7245
7398
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
7246
7399
  </xsl:call-template>
7247
7400
 
7401
+ <!-- Example: Dimensions in millimeters -->
7402
+ <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7403
+
7248
7404
  <fo:block xsl:use-attribute-sets="figure-style">
7249
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7405
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7250
7406
  </fo:block>
7251
7407
  <xsl:call-template name="fn_display_figure"/>
7252
- <xsl:for-each select="*[local-name() = 'note']">
7408
+ <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
7253
7409
  <xsl:call-template name="note"/>
7254
7410
  </xsl:for-each>
7255
7411
 
@@ -7506,24 +7662,47 @@
7506
7662
 
7507
7663
  </xsl:when>
7508
7664
  <xsl:otherwise>
7509
- <fo:block xsl:use-attribute-sets="image-style">
7510
- <fo:instream-foreign-object fox:alt-text="{$alt-text}">
7511
- <xsl:attribute name="width">100%</xsl:attribute>
7512
- <xsl:attribute name="content-height">100%</xsl:attribute>
7513
- <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7514
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7515
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
7516
- <!-- effective height 297 - 27.4 - 13 = 256.6 -->
7517
- <!-- effective width 210 - 12.5 - 25 = 172.5 -->
7518
- <!-- effective height / width = 1.48, 1.4 - with title -->
7519
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
7520
- <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
7521
- <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
7522
- </xsl:if>
7523
- <xsl:attribute name="scaling">uniform</xsl:attribute>
7524
- <xsl:copy-of select="$svg_content"/>
7525
- </fo:instream-foreign-object>
7526
- </fo:block>
7665
+
7666
+ <xsl:variable name="element">
7667
+ <xsl:choose>
7668
+ <xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
7669
+ <fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
7670
+ </xsl:when>
7671
+ <xsl:otherwise>
7672
+ <fo:block xsl:use-attribute-sets="image-style">
7673
+ <xsl:if test="ancestor::*[local-name() = 'dt']">
7674
+ <xsl:attribute name="text-align">left</xsl:attribute>
7675
+ </xsl:if>
7676
+ </fo:block>
7677
+ </xsl:otherwise>
7678
+ </xsl:choose>
7679
+ </xsl:variable>
7680
+
7681
+ <xsl:for-each select="xalan:nodeset($element)/*">
7682
+ <xsl:copy>
7683
+ <xsl:copy-of select="@*"/>
7684
+ <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
7685
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}">
7686
+ <xsl:if test="$isGenerateTableIF = 'false'">
7687
+ <xsl:attribute name="width">100%</xsl:attribute>
7688
+ </xsl:if>
7689
+ <xsl:attribute name="content-height">100%</xsl:attribute>
7690
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7691
+ <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7692
+ <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
7693
+ <!-- effective height 297 - 27.4 - 13 = 256.6 -->
7694
+ <!-- effective width 210 - 12.5 - 25 = 172.5 -->
7695
+ <!-- effective height / width = 1.48, 1.4 - with title -->
7696
+ <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
7697
+ <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
7698
+ <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
7699
+ </xsl:if>
7700
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
7701
+ <xsl:copy-of select="$svg_content"/>
7702
+ </fo:instream-foreign-object>
7703
+ <!-- </fo:block> -->
7704
+ </xsl:copy>
7705
+ </xsl:for-each>
7527
7706
  </xsl:otherwise>
7528
7707
  </xsl:choose>
7529
7708
  </xsl:template>
@@ -7615,6 +7794,13 @@
7615
7794
  </xsl:for-each>
7616
7795
  </xsl:template>
7617
7796
 
7797
+ <!-- For the structures like: <dt><image src="" mimetype="image/svg+xml" height="" width=""><svg xmlns="http://www.w3.org/2000/svg" ... -->
7798
+ <xsl:template match="*[local-name() != 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
7799
+ <xsl:for-each select="*[local-name() = 'svg']">
7800
+ <xsl:call-template name="image_svg"/>
7801
+ </xsl:for-each>
7802
+ </xsl:template>
7803
+
7618
7804
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
7619
7805
  <xsl:variable name="svg_content" select="document(@src)"/>
7620
7806
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -7753,6 +7939,8 @@
7753
7939
  <xsl:value-of select="."/>
7754
7940
  </xsl:template>
7755
7941
 
7942
+ <xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]/text()" mode="bookmarks" priority="3"/>
7943
+
7756
7944
  <xsl:template match="node()" mode="contents">
7757
7945
  <xsl:apply-templates mode="contents"/>
7758
7946
  </xsl:template>
@@ -8071,7 +8259,15 @@
8071
8259
  <xsl:value-of select="@section"/>
8072
8260
  <xsl:text> </xsl:text>
8073
8261
  </xsl:if>
8074
- <xsl:value-of select="normalize-space(title)"/>
8262
+ <xsl:variable name="title">
8263
+ <xsl:for-each select="title/node()">
8264
+ <xsl:choose>
8265
+ <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
8266
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
8267
+ </xsl:choose>
8268
+ </xsl:for-each>
8269
+ </xsl:variable>
8270
+ <xsl:value-of select="normalize-space($title)"/>
8075
8271
  </fo:bookmark-title>
8076
8272
  <xsl:apply-templates mode="bookmark"/>
8077
8273
  </fo:bookmark>
@@ -8097,6 +8293,12 @@
8097
8293
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
8098
8294
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/>
8099
8295
 
8296
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
8297
+ <fo:block text-align="right" keep-with-next="always">
8298
+ <xsl:apply-templates/>
8299
+ </fo:block>
8300
+ </xsl:template>
8301
+
8100
8302
  <!-- ====== -->
8101
8303
  <!-- ====== -->
8102
8304
  <xsl:template match="*[local-name() = 'title']" mode="contents_item">
@@ -8246,6 +8448,10 @@
8246
8448
  </xsl:for-each>
8247
8449
  </xsl:template>
8248
8450
 
8451
+ <xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]/text()" mode="contents_item" priority="2">
8452
+ <xsl:value-of select="."/>
8453
+ </xsl:template>
8454
+
8249
8455
  <!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
8250
8456
  <xsl:template match="*[local-name() = 'span']" mode="contents_item">
8251
8457
  <xsl:apply-templates mode="contents_item"/>