metanorma-iec 2.6.9 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
 
5
5
  <xsl:param name="additionalXMLs" select="''"/> <!-- iec-rice.fr.xml -->
6
6
 
7
- <xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:name))]" use="@reference"/>
7
+ <xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
8
8
 
9
9
  <xsl:variable name="additionalXMLsArray">
10
10
  <xsl:call-template name="split">
@@ -115,6 +115,93 @@
115
115
 
116
116
  <xsl:variable name="isIEV" select="normalize-space((//mn:metanorma/mn:bibdata/mn:title[@language = 'en' and @type = 'title-main'] = 'International Electrotechnical Vocabulary') and 1 = 1)"/>
117
117
 
118
+ <xsl:template name="layout-master-set">
119
+ <fo:layout-master-set>
120
+ <!-- cover pages -->
121
+ <fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
122
+ <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="18mm" margin-right="20.5mm"/>
123
+ <fo:region-before region-name="header" extent="17.5mm"/>
124
+ <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
125
+ <fo:region-start region-name="left-region" extent="18mm"/>
126
+ <fo:region-end region-name="right-region" extent="20.5mm"/>
127
+ </fo:simple-page-master>
128
+ <fo:simple-page-master master-name="cover_2nd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
129
+ <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="25mm" margin-right="25mm" column-count="2" column-gap="5mm"/>
130
+ <fo:region-before region-name="header" extent="17.5mm"/>
131
+ <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
132
+ <fo:region-start region-name="left-region" extent="25mm"/>
133
+ <fo:region-end region-name="right-region" extent="25mm"/>
134
+ </fo:simple-page-master>
135
+
136
+ <fo:simple-page-master master-name="cover-FDIS" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
137
+ <fo:region-body margin-top="17.5mm" margin-bottom="29mm" margin-left="18mm" margin-right="19mm"/>
138
+ <fo:region-before region-name="header" extent="17.5mm"/>
139
+ <fo:region-after region-name="footer-FDIS" extent="29mm"/>
140
+ <fo:region-start region-name="left-region" extent="18mm"/>
141
+ <fo:region-end region-name="right-region" extent="19mm"/>
142
+ </fo:simple-page-master>
143
+
144
+ <!-- odd pages -->
145
+ <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
146
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
147
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
148
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
149
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
150
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
151
+ </fo:simple-page-master>
152
+ <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
153
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
154
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
155
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
156
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
157
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
158
+ </fo:simple-page-master>
159
+ <!-- even pages -->
160
+ <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
161
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
162
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
163
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
164
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
165
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
166
+ </fo:simple-page-master>
167
+ <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
168
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
169
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
170
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
171
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
172
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
173
+ </fo:simple-page-master>
174
+ <fo:page-sequence-master master-name="document">
175
+ <fo:repeatable-page-master-alternatives>
176
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
177
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
178
+ </fo:repeatable-page-master-alternatives>
179
+ </fo:page-sequence-master>
180
+ <fo:page-sequence-master master-name="document-portrait">
181
+ <fo:repeatable-page-master-alternatives>
182
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
183
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
184
+ </fo:repeatable-page-master-alternatives>
185
+ </fo:page-sequence-master>
186
+ <fo:page-sequence-master master-name="document-landscape">
187
+ <fo:repeatable-page-master-alternatives>
188
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
189
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
190
+ </fo:repeatable-page-master-alternatives>
191
+ </fo:page-sequence-master>
192
+
193
+ <fo:simple-page-master master-name="blank-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
194
+ <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm"/>
195
+ </fo:simple-page-master>
196
+
197
+ <fo:simple-page-master master-name="back-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
198
+ <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm" background-color="rgb(236, 236, 236)"/>
199
+ <fo:region-before region-name="header" extent="107mm"/>
200
+ <fo:region-start region-name="left-region" extent="18mm"/>
201
+ </fo:simple-page-master>
202
+ </fo:layout-master-set>
203
+ </xsl:template> <!-- END: layout-master-set -->
204
+
118
205
  <xsl:template match="/">
119
206
 
120
207
  <!-- <xsl:variable name="xslfo"> -->
@@ -127,90 +214,8 @@
127
214
  <xsl:call-template name="insertRootStyle">
128
215
  <xsl:with-param name="root-style" select="$root-style"/>
129
216
  </xsl:call-template>
130
- <fo:layout-master-set>
131
- <!-- cover pages -->
132
- <fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
133
- <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="18mm" margin-right="20.5mm"/>
134
- <fo:region-before region-name="header" extent="17.5mm"/>
135
- <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
136
- <fo:region-start region-name="left-region" extent="18mm"/>
137
- <fo:region-end region-name="right-region" extent="20.5mm"/>
138
- </fo:simple-page-master>
139
- <fo:simple-page-master master-name="cover_2nd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
140
- <fo:region-body margin-top="17.5mm" margin-bottom="12.5mm" margin-left="25mm" margin-right="25mm" column-count="2" column-gap="5mm"/>
141
- <fo:region-before region-name="header" extent="17.5mm"/>
142
- <fo:region-after region-name="footer" extent="12.5mm" precedence="true"/>
143
- <fo:region-start region-name="left-region" extent="25mm"/>
144
- <fo:region-end region-name="right-region" extent="25mm"/>
145
- </fo:simple-page-master>
146
-
147
- <fo:simple-page-master master-name="cover-FDIS" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
148
- <fo:region-body margin-top="17.5mm" margin-bottom="29mm" margin-left="18mm" margin-right="19mm"/>
149
- <fo:region-before region-name="header" extent="17.5mm"/>
150
- <fo:region-after region-name="footer-FDIS" extent="29mm"/>
151
- <fo:region-start region-name="left-region" extent="18mm"/>
152
- <fo:region-end region-name="right-region" extent="19mm"/>
153
- </fo:simple-page-master>
154
-
155
- <!-- odd pages -->
156
- <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
157
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
158
- <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
159
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
160
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
161
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
162
- </fo:simple-page-master>
163
- <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}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-odd" 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
- <!-- even pages -->
171
- <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
172
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
173
- <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
174
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
175
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
176
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
177
- </fo:simple-page-master>
178
- <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
179
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
180
- <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
181
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
182
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
183
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
184
- </fo:simple-page-master>
185
- <fo:page-sequence-master master-name="document">
186
- <fo:repeatable-page-master-alternatives>
187
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
188
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
189
- </fo:repeatable-page-master-alternatives>
190
- </fo:page-sequence-master>
191
- <fo:page-sequence-master master-name="document-portrait">
192
- <fo:repeatable-page-master-alternatives>
193
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
194
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
195
- </fo:repeatable-page-master-alternatives>
196
- </fo:page-sequence-master>
197
- <fo:page-sequence-master master-name="document-landscape">
198
- <fo:repeatable-page-master-alternatives>
199
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
200
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
201
- </fo:repeatable-page-master-alternatives>
202
- </fo:page-sequence-master>
203
-
204
- <fo:simple-page-master master-name="blank-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
205
- <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm"/>
206
- </fo:simple-page-master>
207
-
208
- <fo:simple-page-master master-name="last-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
209
- <fo:region-body margin-top="107mm" margin-bottom="0mm" margin-left="18mm" margin-right="0mm" background-color="rgb(236, 236, 236)"/>
210
- <fo:region-before region-name="header" extent="107mm"/>
211
- <fo:region-start region-name="left-region" extent="18mm"/>
212
- </fo:simple-page-master>
213
- </fo:layout-master-set>
217
+
218
+ <xsl:call-template name="layout-master-set"/>
214
219
 
215
220
  <fo:declarations>
216
221
  <xsl:call-template name="addPDFUAmeta"/>
@@ -226,755 +231,713 @@
226
231
  </redirect:write>
227
232
  </xsl:if>
228
233
 
229
- <!-- For 'Published' documents insert two cover pages -->
230
- <xsl:if test="$stage &gt;= 60">
234
+ <xsl:call-template name="cover-page"/>
231
235
 
232
- <!-- 1st Cover Page -->
233
- <fo:page-sequence master-reference="cover" force-page-count="no-force">
234
- <fo:static-content flow-name="left-region">
235
- <fo:block-container reference-orientation="90">
236
- <fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
237
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docidentifier[@type = 'iso-revdate']"/>
238
- </fo:block>
239
- </fo:block-container>
240
- </fo:static-content>
241
- <fo:flow flow-name="xsl-region-body">
242
- <fo:block-container absolute-position="fixed" left="18mm" top="107mm">
243
- <fo:block>
244
- <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"/>
245
- </fo:block>
246
- </fo:block-container>
247
- <xsl:call-template name="insertCoverPart1"/>
248
- </fo:flow>
249
- </fo:page-sequence> <!-- END: 1st Cover Page -->
236
+ <xsl:for-each select="//mn:metanorma">
237
+ <xsl:variable name="lang" select="mn:bibdata/mn:language[@current = 'true']"/>
238
+ <xsl:variable name="current_document">
239
+ <xsl:copy-of select="."/>
240
+ </xsl:variable>
250
241
 
251
- <!-- 2nd Cover Page -->
252
- <fo:page-sequence master-reference="cover_2nd" force-page-count="no-force" font-size="8pt">
253
- <fo:flow flow-name="xsl-region-body">
254
- <fo:block span="all">
255
- <fo:block-container border="0.5pt solid black" margin-top="7mm">
256
- <fo:block-container margin-left="2.5mm" margin-right="2.5mm" margin-top="1mm" margin-bottom="1mm">
257
- <fo:block-container margin-left="0mm" margin-right="0mm">
258
- <fo:table table-layout="fixed" width="100%">
259
- <fo:table-column column-width="20mm"/>
260
- <fo:table-column column-width="130mm"/>
261
- <fo:table-body>
262
- <fo:table-row>
263
- <fo:table-cell>
264
- <fo:block>
265
- <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"/>
266
- </fo:block>
267
- </fo:table-cell>
268
- <fo:table-cell font-size="10pt" font-weight="bold" display-align="after">
269
- <fo:block margin-bottom="3pt">THIS PUBLICATION IS COPYRIGHT PROTECTED</fo:block>
270
- <fo:block margin-bottom="10pt">
271
- <!-- Example: Copyright © 2014 IEC, Geneva, Switzerland -->
272
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-year')]"/>
273
- </fo:block>
274
- </fo:table-cell>
275
- </fo:table-row>
276
- </fo:table-body>
277
- </fo:table>
278
- <fo:block>
279
- <fo:block margin-bottom="8pt" text-align="justify">
280
- <!-- Example: All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
281
- or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
282
- either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
283
- copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
284
- your local IEC member National Committee for further information. -->
285
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-message')]"/>
286
- </fo:block>
287
- <!-- Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
288
- ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
289
- 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
290
- questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
291
- les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence. -->
292
- <fo:block margin-bottom="8pt" text-align="justify">
293
- <xsl:apply-templates select="(//mn:metanorma)[2]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-message')]"/>
294
- </fo:block>
242
+ <xsl:variable name="num"><xsl:number count="mn:metanorma" level="any"/></xsl:variable>
295
243
 
296
- <xsl:variable name="telpos" select="count((//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
297
- <fo:table table-layout="fixed" width="100%">
298
- <fo:table-column column-width="59mm"/>
299
- <fo:table-column column-width="90mm"/>
300
- <fo:table-body>
301
- <fo:table-row>
302
- <fo:table-cell>
303
- <fo:block>
304
- <!-- Example: IEC Central Office
305
- 3, rue de Varembé
306
- CH-1211 Geneva 20
307
- Switzerland -->
308
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-name')]" mode="coverpage"/>
309
- <xsl:choose>
310
- <xsl:when test="$telpos != 0">
311
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &lt; $telpos]" mode="coverpage"/>
312
- </xsl:when>
313
- <xsl:otherwise>
314
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
315
- </xsl:otherwise>
316
- </xsl:choose>
317
- </fo:block>
318
- </fo:table-cell>
319
- <fo:table-cell>
320
- <fo:block>
321
- <!-- Example: Tel.: +41 22 919 02 11
322
- Fax: +41 22 919 0
323
- info@iec.ch
324
- www.iec.ch -->
325
- <xsl:choose>
326
- <xsl:when test="$telpos != 0">
327
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &gt; $telpos]" mode="coverpage"/>
328
- </xsl:when>
329
- <xsl:otherwise> </xsl:otherwise>
330
- </xsl:choose>
331
- </fo:block>
332
- </fo:table-cell>
333
- </fo:table-row>
334
- </fo:table-body>
335
- </fo:table>
244
+ <xsl:variable name="updated_xml">
245
+ <xsl:for-each select="xalan:nodeset($current_document)">
246
+ <xsl:call-template name="updateXML"/>
247
+ </xsl:for-each>
248
+ </xsl:variable>
336
249
 
337
- </fo:block>
338
- </fo:block-container>
339
- </fo:block-container>
340
- </fo:block-container>
341
- </fo:block>
250
+ <xsl:for-each select="xalan:nodeset($updated_xml)/*">
342
251
 
343
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:feedback-statement"/> <!-- //mn:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
344
- <fo:block span="all" border-bottom="0.5pt solid black"/>
345
- <!-- About the IEC
346
- The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
347
- International Standards for all electrical, electronic and related technologies.
348
- About IEC publications
349
- The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
350
- latest edition, a corrigenda or an amendment might have been published.
351
- ...
352
- -->
353
- <xsl:if test="(//mn:metanorma)[2]/mn:boilerplate/mn:feedback-statement">
354
- <xsl:apply-templates select="(//mn:metanorma)[2]/mn:boilerplate/mn:feedback-statement"/>
355
- <fo:block span="all"/>
356
- </xsl:if>
252
+ <!-- <xsl:for-each select="xalan:nodeset($current_document)"> -->
357
253
 
358
- </fo:flow>
359
- </fo:page-sequence> <!-- END: 2nd Cover Page -->
360
- </xsl:if>
361
- <xsl:variable name="lang_second" select="(//mn:metanorma)[2]/mn:bibdata/mn:language[@current = 'true']"/>
362
- <!-- For 'Published' documents insert 3rd Cover Page
363
- OR insert first Cover Page for FDIS -->
364
- <xsl:if test="$stage &gt;= 60 or $stage-abbreviation = 'FDIS'">
365
- <fo:page-sequence master-reference="cover" force-page-count="no-force">
366
- <fo:flow flow-name="xsl-region-body">
367
- <xsl:call-template name="insertCoverPart1"/>
368
- <fo:block-container absolute-position="fixed" left="26.5mm" top="214mm" width="163mm">
369
- <fo:block-container height="32mm" display-align="after">
370
- <fo:block font-size="9pt" color="{$color_blue}" line-height="150%">
371
- <fo:block-container width="40mm">
372
- <fo:block>
373
- <xsl:call-template name="getLocalizedString">
374
- <xsl:with-param name="key">IEC</xsl:with-param>
375
- <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
376
- </xsl:call-template>
377
- </fo:block>
378
- </fo:block-container>
379
- </fo:block>
254
+ <!-- <xsl:variable name="docid">
255
+ <xsl:call-template name="getDocumentId"/>
256
+ </xsl:variable> -->
380
257
 
381
- <xsl:variable name="IEC_lang_second">
382
- <xsl:call-template name="getLocalizedString">
383
- <xsl:with-param name="key">IEC</xsl:with-param>
384
- <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
385
- <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
386
- </xsl:call-template>
387
- </xsl:variable>
258
+ <xsl:variable name="updated_xml_with_pages">
259
+ <xsl:call-template name="processPrefaceAndMainSectionsDefault_items"/>
260
+ <xsl:copy-of select="//mn:indexsect"/>
261
+ </xsl:variable>
388
262
 
389
- <xsl:if test="normalize-space($IEC_lang_second) != ''">
390
- <fo:block font-size="9pt" line-height="150%" margin-top="8pt">
391
- <fo:block-container width="40mm">
392
- <fo:block>
393
- <!-- 'COMMISSION ELECTROTECHNIQUE INTERNATIONALE' -->
394
- <xsl:value-of select="$IEC_lang_second"/>
395
- </fo:block>
396
- </fo:block-container>
397
- </fo:block>
398
- </xsl:if>
399
- </fo:block-container>
263
+ <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
400
264
 
401
- <xsl:variable name="price_code_value" select="//mn:metanorma/mn:bibdata/mn:ext/mn:price-code"/>
402
- <fo:table table-layout="fixed" width="102%" margin-top="-9mm" margin-bottom="2mm" id="__internal_layout__price_code">
403
- <fo:table-column column-width="148mm"/>
404
- <fo:table-column column-width="16mm"/>
405
- <fo:table-body>
406
- <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
407
- <fo:table-cell font-size="8pt" text-align="right" display-align="center">
408
- <fo:block padding-top="1mm">
409
- <xsl:if test="normalize-space($price_code_value) != ''">
410
- <fo:block color="{$color_blue}" margin-bottom="3pt">
411
- <!-- PRICE CODE -->
412
- <xsl:variable name="price_code">
413
- <xsl:call-template name="getLocalizedString">
414
- <xsl:with-param name="key">price-code</xsl:with-param>
415
- <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
416
- </xsl:call-template>
417
- </xsl:variable>
418
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
419
- </fo:block>
265
+ <xsl:call-template name="insertPrefacepages">
266
+ <xsl:with-param name="num" select="$num"/>
267
+ </xsl:call-template>
420
268
 
421
- <xsl:variable name="price_code_lang_second">
422
- <xsl:call-template name="getLocalizedString">
423
- <xsl:with-param name="key">price-code</xsl:with-param>
424
- <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
425
- <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
426
- </xsl:call-template>
427
- </xsl:variable>
428
- <xsl:if test="normalize-space($price_code_lang_second) != ''">
429
- <fo:block>
430
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code_lang_second))"/>
431
- </fo:block>
432
- </xsl:if>
433
- </xsl:if>
434
- </fo:block>
435
- </fo:table-cell>
436
- <fo:table-cell font-size="25pt" font-weight="bold" color="{$color_gray}" text-align="right" display-align="center">
437
- <fo:block padding-top="1mm"><xsl:value-of select="$price_code_value"/></fo:block>
438
- </fo:table-cell>
439
- </fo:table-row>
440
- </fo:table-body>
441
- </fo:table>
442
- <fo:block font-size="8pt" text-align-last="justify">
443
- <xsl:for-each select="//mn:metanorma/mn:bibdata/mn:ext/mn:ics">
444
- <xsl:if test="position() = 1">ICS </xsl:if>
445
- <xsl:value-of select="mn:code"/>
446
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
447
- </xsl:for-each>
448
- <xsl:text> </xsl:text>
449
- <fo:inline keep-together.within-line="always"><fo:leader leader-pattern="space"/>
450
- <xsl:text> </xsl:text>
451
- <xsl:if test="//mn:metanorma/mn:bibdata/mn:docidentifier[@type='ISBN']">
452
- <!-- Example: ISBN 978-2-8322-1532-6 -->
453
- <xsl:text>ISBN </xsl:text>
454
- <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:docidentifier[@type='ISBN']"/>
455
- </xsl:if>
456
- </fo:inline>
457
- </fo:block>
458
- <fo:block-container margin-left="1.5mm">
459
- <fo:block-container margin-left="0mm">
460
- <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" id="__internal_layout__warning_block">
461
- <fo:block margin-left="1mm">Warning! Make sure that you obtained this publication from an authorized distributor.</fo:block>
462
- <xsl:if test="//mn:metanorma/mn:bibdata/mn:title[@language = 'fr']">
463
- <fo:block margin-left="1mm" margin-top="3pt">Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agréé.</fo:block>
464
- </xsl:if>
465
- </fo:block-container>
466
- </fo:block-container>
467
- </fo:block-container>
468
- <fo:block font-size="6pt" margin-top="6mm" margin-left="1mm">
469
- <xsl:if test="count((//mn:metanorma)[1]/mn:bibdata/mn:copyright) = 1">
470
- <fo:block>® Registered trademark of the International Electrotechnical Commission</fo:block>
471
- <xsl:if test="//mn:metanorma/mn:bibdata/mn:title[@language = 'fr']">
472
- <fo:block margin-left="2mm">Marque déposée de la Commission Electrotechnique Internationale</fo:block>
473
- </xsl:if>
474
- </xsl:if>
475
- </fo:block>
476
- </fo:block-container>
269
+ <xsl:call-template name="insertBodypages">
270
+ <xsl:with-param name="lang" select="$lang"/>
271
+ </xsl:call-template>
272
+
273
+ </xsl:for-each>
274
+
275
+ </xsl:for-each>
276
+ </xsl:for-each>
277
+
278
+ <xsl:call-template name="back-page"/>
279
+
280
+ <!-- namespace document doesn't equal to xslt namespace -->
281
+ <xsl:if test="not(//mn:metanorma)">
282
+ <fo:page-sequence master-reference="blank-page">
283
+ <fo:flow flow-name="xsl-region-body">
284
+ <fo:block> </fo:block>
477
285
  </fo:flow>
478
- </fo:page-sequence> <!-- END: cover -->
286
+ </fo:page-sequence>
479
287
  </xsl:if>
480
288
 
481
- <!-- for non-published documents insert cover page (2nd for FDIS) ) -->
482
- <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'">
483
- <!-- circulation cover page -->
484
- <fo:page-sequence master-reference="cover-FDIS" force-page-count="no-force">
485
- <fo:static-content flow-name="footer-FDIS">
486
- <fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
487
- <fo:block font-size="8pt" margin-bottom="6pt">
289
+ </fo:root>
290
+ <!-- </xsl:variable> -->
488
291
 
489
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[not(@id)]"/>
292
+ </xsl:template>
490
293
 
491
- </fo:block>
492
- </fo:block-container>
493
- </fo:static-content>
494
- <fo:flow flow-name="xsl-region-body">
294
+ <xsl:template name="cover-page">
295
+ <!-- For 'Published' documents insert two cover pages -->
296
+ <xsl:if test="$stage &gt;= 60">
495
297
 
496
- <fo:block text-align-last="justify" margin-left="-0.5mm">
497
- <xsl:call-template name="outputLogo"/>
298
+ <!-- 1st Cover Page -->
299
+ <fo:page-sequence master-reference="cover" force-page-count="no-force">
300
+ <fo:static-content flow-name="left-region">
301
+ <fo:block-container reference-orientation="90">
302
+ <fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
303
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docidentifier[@type = 'iso-revdate']"/>
304
+ </fo:block>
305
+ </fo:block-container>
306
+ </fo:static-content>
307
+ <fo:flow flow-name="xsl-region-body">
308
+ <fo:block-container absolute-position="fixed" left="18mm" top="107mm">
309
+ <fo:block>
310
+ <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"/>
311
+ </fo:block>
312
+ </fo:block-container>
313
+ <xsl:call-template name="insertCoverPart1"/>
314
+ </fo:flow>
315
+ </fo:page-sequence> <!-- END: 1st Cover Page -->
498
316
 
499
- <xsl:if test="$stage-abbreviation = 'FDIS'">
500
- <fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
501
- </xsl:if>
502
- <fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
503
- <!-- Ex: 34D/1511/FDIS -->
504
- <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:docidentifier[@type='iso-tc']"/>
505
- <xsl:text> </xsl:text>
506
- </fo:inline>
507
- </fo:block>
508
- <fo:block font-size="10pt" text-align="right" margin-top="-2mm" margin-bottom="8pt">
509
- <!-- Examples: 'FINAL DRAFT INTERNATIONAL STANDARD (FDIS)', 'COMMITTEE DRAFT FOR VOTE (CDV)' -->
510
- <xsl:call-template name="addLetterSpacing">
511
- <xsl:with-param name="text" select="concat($stage-fullname-uppercased, ' (', $stage-abbreviation ,')')"/>
512
- </xsl:call-template>
513
- <xsl:text> </xsl:text>
514
- </fo:block>
515
- <fo:block-container margin-left="57mm">
516
- <fo:block-container margin-left="0mm">
517
- <fo:table table-layout="fixed" width="118mm" background-color="rgb(219, 229, 241)" id="__internal_layout__project_{generate-id()}">
518
- <fo:table-column column-width="50%"/>
519
- <fo:table-column column-width="50%"/>
317
+ <!-- 2nd Cover Page -->
318
+ <fo:page-sequence master-reference="cover_2nd" force-page-count="no-force" font-size="8pt">
319
+ <fo:flow flow-name="xsl-region-body">
320
+ <fo:block span="all">
321
+ <fo:block-container border="0.5pt solid black" margin-top="7mm">
322
+ <fo:block-container margin-left="2.5mm" margin-right="2.5mm" margin-top="1mm" margin-bottom="1mm">
323
+ <fo:block-container margin-left="0mm" margin-right="0mm">
324
+ <fo:table table-layout="fixed" width="100%">
325
+ <fo:table-column column-width="20mm"/>
326
+ <fo:table-column column-width="130mm"/>
520
327
  <fo:table-body>
521
- <fo:table-row height="12mm">
522
- <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
523
- <fo:block font-size="6.5pt" margin-bottom="6pt">
524
- <xsl:call-template name="addLetterSpacingSmallCaps">
525
- <xsl:with-param name="text" select="'Project number:'"/>
526
- </xsl:call-template>
527
- </fo:block>
528
- <fo:block font-size="9pt" font-weight="bold">
529
- <xsl:call-template name="addLetterSpacing">
530
- <xsl:with-param name="text"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:ext/mn:structuredidentifier/mn:project-number"/></xsl:with-param>
531
- </xsl:call-template>
532
- </fo:block>
533
- </fo:table-cell>
534
- </fo:table-row>
535
- <fo:table-row height="12mm">
536
- <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
537
- <fo:block font-size="6.5pt" margin-bottom="6pt">
538
- <xsl:call-template name="addLetterSpacingSmallCaps">
539
- <xsl:with-param name="text" select="'Date of circulation:'"/>
540
- </xsl:call-template>
541
- </fo:block>
542
- <fo:block font-size="9pt" font-weight="bold">
543
- <xsl:call-template name="addLetterSpacing">
544
- <xsl:with-param name="text"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:date[@type ='circulated']/mn:on"/></xsl:with-param>
545
- </xsl:call-template>
546
- </fo:block>
547
- </fo:table-cell>
548
- <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
549
- <fo:block font-size="6.5pt" margin-bottom="6pt">
550
- <xsl:call-template name="addLetterSpacingSmallCaps">
551
- <xsl:with-param name="text" select="'Closing date for voting:'"/>
552
- </xsl:call-template>
553
- </fo:block>
554
- <fo:block font-size="9pt" font-weight="bold">
555
- <xsl:call-template name="addLetterSpacing">
556
- <!-- 2019-12-06 -->
557
- <xsl:with-param name="text"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:date[@type='vote-ended']/mn:on"/></xsl:with-param>
558
- </xsl:call-template>
328
+ <fo:table-row>
329
+ <fo:table-cell>
330
+ <fo:block>
331
+ <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"/>
559
332
  </fo:block>
560
333
  </fo:table-cell>
561
- </fo:table-row>
562
- <fo:table-row height="12mm">
563
- <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
564
- <fo:block font-size="6.5pt" margin-bottom="6pt">
565
- <xsl:call-template name="addLetterSpacingSmallCaps">
566
- <xsl:with-param name="text" select="'Supersedes documents:'"/>
567
- </xsl:call-template>
568
- </fo:block>
569
- <fo:block font-size="9pt" font-weight="bold">
570
- <xsl:variable name="supersedes_documents">
571
- <!-- <xsl:for-each select="//mn:metanorma/mn:bibdata/mn:relation[@type='supersedes']/mn:bibitem/mn:docnumber"> -->
572
- <xsl:for-each select="//mn:metanorma/mn:bibdata/mn:relation[@type='obsoletes']/mn:bibitem/mn:docidentifier">
573
- <xsl:value-of select="."/>
574
- <xsl:if test="position() != last()">,</xsl:if>
575
- </xsl:for-each>
576
- </xsl:variable>
577
- <xsl:call-template name="addLetterSpacing">
578
- <xsl:with-param name="text"><xsl:value-of select="$supersedes_documents"/></xsl:with-param>
579
- </xsl:call-template>
334
+ <fo:table-cell font-size="10pt" font-weight="bold" display-align="after">
335
+ <fo:block margin-bottom="3pt">THIS PUBLICATION IS COPYRIGHT PROTECTED</fo:block>
336
+ <fo:block margin-bottom="10pt">
337
+ <!-- Example: Copyright © 2014 IEC, Geneva, Switzerland -->
338
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-year')]"/>
580
339
  </fo:block>
581
340
  </fo:table-cell>
582
341
  </fo:table-row>
583
342
  </fo:table-body>
584
343
  </fo:table>
585
- </fo:block-container>
586
- </fo:block-container>
344
+ <fo:block>
345
+ <fo:block margin-bottom="8pt" text-align="justify">
346
+ <!-- Example: All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
347
+ or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
348
+ either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
349
+ copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
350
+ your local IEC member National Committee for further information. -->
351
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-message')]"/>
352
+ </fo:block>
353
+ <!-- Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
354
+ ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
355
+ 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
356
+ questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
357
+ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence. -->
358
+ <fo:block margin-bottom="8pt" text-align="justify">
359
+ <xsl:apply-templates select="(//mn:metanorma)[2]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-message')]"/>
360
+ </fo:block>
587
361
 
588
- <fo:block-container margin-left="-2mm" margin-right="-2mm" margin-top="5mm">
589
- <fo:block-container margin-left="0mm" margin-right="0mm">
590
- <xsl:variable name="border-color">rgb(221, 213, 213)</xsl:variable>
591
- <fo:table table-layout="fixed" width="100%" border="1.5pt solid {$border-color}">
592
- <fo:table-column column-width="50%"/>
593
- <fo:table-column column-width="50%"/>
594
- <fo:table-body>
595
- <fo:table-row height="4mm">
596
- <fo:table-cell number-columns-spanned="2" border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
597
- <fo:block>
598
- <!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
599
- else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
600
- <xsl:choose>
601
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subcommittee">
602
- <fo:block font-size="6.5pt">
603
- <fo:inline font-size="8pt">IEC SC <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subcommittee/@number"/> : </fo:inline>
604
- <xsl:call-template name="addLetterSpacingSmallCaps">
605
- <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subcommittee"/>
606
- </xsl:call-template>
607
- </fo:block>
608
- </xsl:when>
609
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee">
610
- <fo:block font-size="6.5pt">
611
- <fo:inline font-size="8pt">IEC TC <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee/@number"/> : </fo:inline>
612
- <xsl:call-template name="addLetterSpacingSmallCaps">
613
- <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/>
614
- </xsl:call-template>
615
- </fo:block>
616
- </xsl:when>
617
- </xsl:choose>
618
- </fo:block>
619
- </fo:table-cell>
620
- </fo:table-row>
621
- <fo:table-row height="12mm">
622
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
623
- <fo:block font-size="6.5pt" margin-bottom="6pt">
624
- <xsl:call-template name="addLetterSpacingSmallCaps">
625
- <xsl:with-param name="text" select="'Secretariat:'"/>
626
- </xsl:call-template>
627
- </fo:block>
628
- <fo:block font-size="9pt">
629
- <xsl:call-template name="addLetterSpacing">
630
- <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:secretariat"/>
631
- </xsl:call-template>
632
- </fo:block>
633
- </fo:table-cell>
634
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
635
- <fo:block font-size="6.5pt" margin-bottom="6pt">
636
- <xsl:call-template name="addLetterSpacingSmallCaps">
637
- <xsl:with-param name="text" select="'Secretary:'"/>
638
- </xsl:call-template>
639
- </fo:block>
640
- <fo:block font-size="9pt">
641
- <!-- Example: Ms Shanti Conn -->
642
- <xsl:call-template name="addLetterSpacing">
643
- <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:secretary"/>
644
- </xsl:call-template>
645
- </fo:block>
646
- </fo:table-cell>
647
- </fo:table-row>
648
- <fo:table-row height="12mm">
649
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
650
- <xsl:if test="not($stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD')">
651
- <xsl:attribute name="number-columns-spanned">2</xsl:attribute>
652
- </xsl:if>
653
- <fo:block font-size="6.5pt" margin-bottom="6pt">
654
- <xsl:call-template name="addLetterSpacingSmallCaps">
655
- <xsl:with-param name="text" select="'Of interest to the following committees:'"/>
656
- </xsl:call-template>
657
- </fo:block>
658
- <fo:block font-size="9pt">
659
- <xsl:call-template name="addLetterSpacing">
660
- <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:interest-to-committees"/>
661
- </xsl:call-template>
662
- </fo:block>
663
- </fo:table-cell>
664
- <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
665
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
666
- <fo:block font-size="6.5pt" margin-bottom="6pt">
667
- <xsl:if test="$stage-abbreviation = 'FDIS'">
668
- <xsl:call-template name="addLetterSpacingSmallCaps">
669
- <xsl:with-param name="text" select="'horizontal standard:'"/>
670
- </xsl:call-template>
671
- </xsl:if>
672
- <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
673
- <xsl:call-template name="addLetterSpacingSmallCaps">
674
- <xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
675
- </xsl:call-template>
676
- </xsl:if>
677
- </fo:block>
362
+ <xsl:variable name="telpos" select="count((//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
363
+ <fo:table table-layout="fixed" width="100%">
364
+ <fo:table-column column-width="59mm"/>
365
+ <fo:table-column column-width="90mm"/>
366
+ <fo:table-body>
367
+ <fo:table-row>
368
+ <fo:table-cell>
678
369
  <fo:block>
370
+ <!-- Example: IEC Central Office
371
+ 3, rue de Varembé
372
+ CH-1211 Geneva 20
373
+ Switzerland -->
374
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-name')]" mode="coverpage"/>
679
375
  <xsl:choose>
680
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:horizontal = 'true'">
681
- <xsl:call-template name="insertCheckBoxOn"/>
376
+ <xsl:when test="$telpos != 0">
377
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &lt; $telpos]" mode="coverpage"/>
682
378
  </xsl:when>
683
379
  <xsl:otherwise>
684
- <xsl:call-template name="insertCheckBoxOff"/>
380
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
685
381
  </xsl:otherwise>
686
382
  </xsl:choose>
687
383
  </fo:block>
688
-
689
- <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
690
- <fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
691
- <fo:block-container margin-left="1mm" margin-right="1mm">
692
- <fo:block font-size="8pt" padding="2mm">
693
- <xsl:call-template name="addLetterSpacing">
694
- <xsl:with-param name="text" select="'Other TC/SCs are requested to indicate their interest, if any, in this CDV to the secretary.'"/>
695
- </xsl:call-template>
696
- </fo:block>
697
- </fo:block-container>
698
- </fo:block-container>
699
- </xsl:if>
700
384
  </fo:table-cell>
701
- </xsl:if>
702
- </fo:table-row>
703
-
704
- <xsl:if test="not($stage-abbreviation = 'DPAS')">
705
- <fo:table-row height="10mm">
706
- <fo:table-cell padding="1.5mm" padding-bottom="0mm">
707
- <fo:block font-size="6.5pt" margin-bottom="4pt">
708
- <xsl:call-template name="addLetterSpacingSmallCaps">
709
- <xsl:with-param name="text" select="'Functions concerned:'"/>
710
- </xsl:call-template>
711
- </fo:block>
712
- <!-- function: { emc | safety | environment | quality-assurance } -->
713
- <fo:block font-size="6.5pt">
714
- <xsl:choose>
715
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'emc'">
716
- <xsl:call-template name="insertCheckBoxOn"/>
717
- </xsl:when>
718
- <xsl:otherwise>
719
- <xsl:call-template name="insertCheckBoxOff"/>
720
- </xsl:otherwise>
721
- </xsl:choose>
722
- <xsl:call-template name="addLetterSpacingSmallCaps">
723
- <xsl:with-param name="text" select="'EMC'"/>
724
- </xsl:call-template>
725
- <fo:inline padding-right="33mm"> </fo:inline>
726
- <xsl:choose>
727
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'environment'">
728
- <xsl:call-template name="insertCheckBoxOn"/>
729
- </xsl:when>
730
- <xsl:otherwise>
731
- <xsl:call-template name="insertCheckBoxOff"/>
732
- </xsl:otherwise>
733
- </xsl:choose>
734
- <xsl:call-template name="addLetterSpacingSmallCaps">
735
- <xsl:with-param name="text" select="'Environment'"/>
736
- </xsl:call-template>
737
- </fo:block>
738
- </fo:table-cell>
739
- <fo:table-cell padding="1.5mm" padding-bottom="0mm">
740
- <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
741
- <fo:block font-size="6.5pt">
742
- <xsl:choose>
743
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'quality-assurance'">
744
- <xsl:call-template name="insertCheckBoxOn"/>
745
- </xsl:when>
746
- <xsl:otherwise>
747
- <xsl:call-template name="insertCheckBoxOff"/>
748
- </xsl:otherwise>
749
- </xsl:choose>
750
- <xsl:call-template name="addLetterSpacingSmallCaps">
751
- <xsl:with-param name="text" select="'Quality assurance'"/>
752
- </xsl:call-template>
753
- <fo:inline padding-right="13mm"> </fo:inline>
385
+ <fo:table-cell>
386
+ <fo:block>
387
+ <!-- Example: Tel.: +41 22 919 02 11
388
+ Fax: +41 22 919 0
389
+ info@iec.ch
390
+ www.iec.ch -->
754
391
  <xsl:choose>
755
- <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'safety'">
756
- <xsl:call-template name="insertCheckBoxOn"/>
392
+ <xsl:when test="$telpos != 0">
393
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &gt; $telpos]" mode="coverpage"/>
757
394
  </xsl:when>
758
- <xsl:otherwise>
759
- <xsl:call-template name="insertCheckBoxOff"/>
760
- </xsl:otherwise>
395
+ <xsl:otherwise> </xsl:otherwise>
761
396
  </xsl:choose>
762
- <xsl:call-template name="addLetterSpacingSmallCaps">
763
- <xsl:with-param name="text" select="'Safety'"/>
764
- </xsl:call-template>
765
397
  </fo:block>
766
398
  </fo:table-cell>
767
399
  </fo:table-row>
768
- </xsl:if>
769
-
770
- <xsl:if test="not($stage-abbreviation = 'CD' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS')">
771
-
772
- <fo:table-row>
773
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
774
- <fo:block font-size="6.5pt" margin-bottom="12pt">
775
- <xsl:choose>
776
- <xsl:when test="/mn:metanorma/mn:bibdata/mn:ext/mn:cen-processing = 'true'">
777
- <xsl:call-template name="insertCheckBoxOn"/>
778
- </xsl:when>
779
- <xsl:otherwise>
780
- <xsl:call-template name="insertCheckBoxOff"/>
781
- </xsl:otherwise>
782
- </xsl:choose>
783
- <xsl:call-template name="addLetterSpacingSmallCaps">
784
- <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
785
- </xsl:call-template>
786
- </fo:block>
787
-
788
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:feedback-statement/mn:clause[@id = 'boilerplate-cenelec-attention']"/>
400
+ </fo:table-body>
401
+ </fo:table>
789
402
 
790
- </fo:table-cell>
791
- <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
792
- <fo:block font-size="6.5pt" margin-bottom="6pt">
793
- <xsl:choose>
794
- <xsl:when test="/mn:metanorma/mn:bibdata/mn:ext/mn:cen-processing = 'true'">
795
- <xsl:call-template name="insertCheckBoxOff"/>
796
- </xsl:when>
797
- <xsl:otherwise>
798
- <xsl:call-template name="insertCheckBoxOn"/>
799
- </xsl:otherwise>
800
- </xsl:choose>
801
- <xsl:call-template name="addLetterSpacingSmallCaps">
802
- <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
803
- </xsl:call-template>
804
- </fo:block>
805
- </fo:table-cell>
806
- </fo:table-row>
807
- </xsl:if>
808
- </fo:table-body>
809
- </fo:table>
403
+ </fo:block>
810
404
  </fo:block-container>
811
405
  </fo:block-container>
406
+ </fo:block-container>
407
+ </fo:block>
812
408
 
813
- <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">
814
- <fo:block>
815
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:license-statement" mode="cover-page-internal"/>
816
- </fo:block>
817
- </fo:block-container>
818
-
819
- <fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
820
- <fo:block font-size="6.5pt" margin-bottom="6pt">
821
- <xsl:call-template name="addLetterSpacingSmallCaps">
822
- <xsl:with-param name="text">
823
- <!-- Title: -->
824
- <xsl:call-template name="getLocalizedString">
825
- <xsl:with-param name="key">title</xsl:with-param>
826
- </xsl:call-template>
827
- <xsl:text>:</xsl:text>
828
- </xsl:with-param>
829
- </xsl:call-template>
830
- </fo:block>
831
- <fo:block font-size="9pt" font-weight="bold">
832
- <xsl:call-template name="addLetterSpacing">
833
- <xsl:with-param name="text"><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'main']"/></xsl:with-param>
834
- </xsl:call-template>
835
- </fo:block>
836
- </fo:block-container>
409
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:feedback-statement"/> <!-- //mn:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
410
+ <fo:block span="all" border-bottom="0.5pt solid black"/>
411
+ <!-- About the IEC
412
+ The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
413
+ International Standards for all electrical, electronic and related technologies.
414
+ About IEC publications
415
+ The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
416
+ latest edition, a corrigenda or an amendment might have been published.
417
+ ...
418
+ -->
419
+ <xsl:if test="(//mn:metanorma)[2]/mn:boilerplate/mn:feedback-statement">
420
+ <xsl:apply-templates select="(//mn:metanorma)[2]/mn:boilerplate/mn:feedback-statement"/>
421
+ <fo:block span="all"/>
422
+ </xsl:if>
837
423
 
838
- <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
839
- <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="6.5mm" padding="1mm" margin-top="3mm" display-align="center">
840
- <fo:block font-size="6.5pt">
841
- <xsl:call-template name="addLetterSpacing">
842
- <xsl:with-param name="text">
843
- <!-- PROPOSED STABILITY DATE: -->
844
- <xsl:call-template name="getLocalizedString">
845
- <xsl:with-param name="key">proposed_stability_date</xsl:with-param>
846
- </xsl:call-template>
847
- <xsl:text>: </xsl:text>
848
- </xsl:with-param>
424
+ </fo:flow>
425
+ </fo:page-sequence> <!-- END: 2nd Cover Page -->
426
+ </xsl:if>
427
+ <xsl:variable name="lang_second" select="(//mn:metanorma)[2]/mn:bibdata/mn:language[@current = 'true']"/>
428
+ <!-- For 'Published' documents insert 3rd Cover Page
429
+ OR insert first Cover Page for FDIS -->
430
+ <xsl:if test="$stage &gt;= 60 or $stage-abbreviation = 'FDIS'">
431
+ <fo:page-sequence master-reference="cover" force-page-count="no-force">
432
+ <fo:flow flow-name="xsl-region-body">
433
+ <xsl:call-template name="insertCoverPart1"/>
434
+ <fo:block-container absolute-position="fixed" left="26.5mm" top="214mm" width="163mm">
435
+ <fo:block-container height="32mm" display-align="after">
436
+ <fo:block font-size="9pt" color="{$color_blue}" line-height="150%">
437
+ <fo:block-container width="40mm">
438
+ <fo:block>
439
+ <xsl:call-template name="getLocalizedString">
440
+ <xsl:with-param name="key">IEC</xsl:with-param>
441
+ <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
849
442
  </xsl:call-template>
850
- <!-- 2023 -->
851
- <fo:inline font-size="9pt"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:date[@type='unchanged']/mn:on"/></fo:inline>
852
443
  </fo:block>
853
444
  </fo:block-container>
854
- </xsl:if>
445
+ </fo:block>
855
446
 
856
- <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
857
- <fo:block font-size="6.5pt" margin-bottom="6pt">
858
- <xsl:call-template name="addLetterSpacingSmallCaps">
859
- <xsl:with-param name="text">
860
- <!-- Note from TC/SC officers: -->
861
- <xsl:call-template name="getLocalizedString">
862
- <xsl:with-param name="key">tc_sc_note</xsl:with-param>
863
- </xsl:call-template>
864
- <xsl:text>:</xsl:text>
865
- </xsl:with-param>
866
- </xsl:call-template>
447
+ <xsl:variable name="IEC_lang_second">
448
+ <xsl:call-template name="getLocalizedString">
449
+ <xsl:with-param name="key">IEC</xsl:with-param>
450
+ <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
451
+ <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
452
+ </xsl:call-template>
453
+ </xsl:variable>
454
+
455
+ <xsl:if test="normalize-space($IEC_lang_second) != ''">
456
+ <fo:block font-size="9pt" line-height="150%" margin-top="8pt">
457
+ <fo:block-container width="40mm">
458
+ <fo:block>
459
+ <!-- 'COMMISSION ELECTROTECHNIQUE INTERNATIONALE' -->
460
+ <xsl:value-of select="$IEC_lang_second"/>
461
+ </fo:block>
462
+ </fo:block-container>
867
463
  </fo:block>
868
- <!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
869
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:tc-sc-officers-note"/>
870
- </fo:block-container>
464
+ </xsl:if>
465
+ </fo:block-container>
871
466
 
872
- </fo:flow>
873
- </fo:page-sequence> <!-- END: cover-FDIS -->
874
- </xsl:if>
467
+ <xsl:variable name="price_code_value" select="//mn:metanorma/mn:bibdata/mn:ext/mn:price-code"/>
468
+ <fo:table table-layout="fixed" width="102%" margin-top="-9mm" margin-bottom="2mm" id="__internal_layout__price_code">
469
+ <fo:table-column column-width="148mm"/>
470
+ <fo:table-column column-width="16mm"/>
471
+ <fo:table-body>
472
+ <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
473
+ <fo:table-cell font-size="8pt" text-align="right" display-align="center">
474
+ <fo:block padding-top="1mm">
475
+ <xsl:if test="normalize-space($price_code_value) != ''">
476
+ <fo:block color="{$color_blue}" margin-bottom="3pt">
477
+ <!-- PRICE CODE -->
478
+ <xsl:variable name="price_code">
479
+ <xsl:call-template name="getLocalizedString">
480
+ <xsl:with-param name="key">price-code</xsl:with-param>
481
+ <xsl:with-param name="lang"><xsl:value-of select="$lang"/></xsl:with-param>
482
+ </xsl:call-template>
483
+ </xsl:variable>
484
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
485
+ </fo:block>
875
486
 
876
- <xsl:for-each select="//mn:metanorma">
877
- <xsl:variable name="lang" select="mn:bibdata/mn:language[@current = 'true']"/>
878
- <xsl:variable name="current_document">
879
- <xsl:copy-of select="."/>
880
- </xsl:variable>
487
+ <xsl:variable name="price_code_lang_second">
488
+ <xsl:call-template name="getLocalizedString">
489
+ <xsl:with-param name="key">price-code</xsl:with-param>
490
+ <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
491
+ <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
492
+ </xsl:call-template>
493
+ </xsl:variable>
494
+ <xsl:if test="normalize-space($price_code_lang_second) != ''">
495
+ <fo:block>
496
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code_lang_second))"/>
497
+ </fo:block>
498
+ </xsl:if>
499
+ </xsl:if>
500
+ </fo:block>
501
+ </fo:table-cell>
502
+ <fo:table-cell font-size="25pt" font-weight="bold" color="{$color_gray}" text-align="right" display-align="center">
503
+ <fo:block padding-top="1mm"><xsl:value-of select="$price_code_value"/></fo:block>
504
+ </fo:table-cell>
505
+ </fo:table-row>
506
+ </fo:table-body>
507
+ </fo:table>
508
+ <fo:block font-size="8pt" text-align-last="justify">
509
+ <xsl:for-each select="//mn:metanorma/mn:bibdata/mn:ext/mn:ics">
510
+ <xsl:if test="position() = 1">ICS </xsl:if>
511
+ <xsl:value-of select="mn:code"/>
512
+ <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
513
+ </xsl:for-each>
514
+ <xsl:text> </xsl:text>
515
+ <fo:inline keep-together.within-line="always"><fo:leader leader-pattern="space"/>
516
+ <xsl:text> </xsl:text>
517
+ <xsl:if test="//mn:metanorma/mn:bibdata/mn:docidentifier[@type='ISBN']">
518
+ <!-- Example: ISBN 978-2-8322-1532-6 -->
519
+ <xsl:text>ISBN </xsl:text>
520
+ <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:docidentifier[@type='ISBN']"/>
521
+ </xsl:if>
522
+ </fo:inline>
523
+ </fo:block>
524
+ <fo:block-container margin-left="1.5mm">
525
+ <fo:block-container margin-left="0mm">
526
+ <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" id="__internal_layout__warning_block">
527
+ <fo:block margin-left="1mm">Warning! Make sure that you obtained this publication from an authorized distributor.</fo:block>
528
+ <xsl:if test="//mn:metanorma/mn:bibdata/mn:title[@language = 'fr']">
529
+ <fo:block margin-left="1mm" margin-top="3pt">Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agréé.</fo:block>
530
+ </xsl:if>
531
+ </fo:block-container>
532
+ </fo:block-container>
533
+ </fo:block-container>
534
+ <fo:block font-size="6pt" margin-top="6mm" margin-left="1mm">
535
+ <xsl:if test="count((//mn:metanorma)[1]/mn:bibdata/mn:copyright) = 1">
536
+ <fo:block>® Registered trademark of the International Electrotechnical Commission</fo:block>
537
+ <xsl:if test="//mn:metanorma/mn:bibdata/mn:title[@language = 'fr']">
538
+ <fo:block margin-left="2mm">Marque déposée de la Commission Electrotechnique Internationale</fo:block>
539
+ </xsl:if>
540
+ </xsl:if>
541
+ </fo:block>
542
+ </fo:block-container>
543
+ </fo:flow>
544
+ </fo:page-sequence> <!-- END: cover -->
545
+ </xsl:if>
881
546
 
882
- <xsl:variable name="num"><xsl:number count="mn:metanorma" level="any"/></xsl:variable>
547
+ <!-- for non-published documents insert cover page (2nd for FDIS) ) -->
548
+ <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'">
549
+ <!-- circulation cover page -->
550
+ <fo:page-sequence master-reference="cover-FDIS" force-page-count="no-force">
551
+ <fo:static-content flow-name="footer-FDIS">
552
+ <fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
553
+ <fo:block font-size="8pt" margin-bottom="6pt">
883
554
 
884
- <xsl:variable name="updated_xml">
885
- <xsl:for-each select="xalan:nodeset($current_document)">
886
- <xsl:call-template name="updateXML"/>
887
- </xsl:for-each>
888
- </xsl:variable>
555
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[not(@id)]"/>
889
556
 
890
- <xsl:for-each select="xalan:nodeset($updated_xml)/*">
557
+ </fo:block>
558
+ </fo:block-container>
559
+ </fo:static-content>
560
+ <fo:flow flow-name="xsl-region-body">
891
561
 
892
- <!-- <xsl:for-each select="xalan:nodeset($current_document)"> -->
562
+ <fo:block text-align-last="justify" margin-left="-0.5mm">
563
+ <xsl:call-template name="outputLogo"/>
893
564
 
894
- <!-- <xsl:variable name="docid">
895
- <xsl:call-template name="getDocumentId"/>
896
- </xsl:variable> -->
565
+ <xsl:if test="$stage-abbreviation = 'FDIS'">
566
+ <fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
567
+ </xsl:if>
568
+ <fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
569
+ <!-- Ex: 34D/1511/FDIS -->
570
+ <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:docidentifier[@type='iso-tc']"/>
571
+ <xsl:text> </xsl:text>
572
+ </fo:inline>
573
+ </fo:block>
574
+ <fo:block font-size="10pt" text-align="right" margin-top="-2mm" margin-bottom="8pt">
575
+ <!-- Examples: 'FINAL DRAFT INTERNATIONAL STANDARD (FDIS)', 'COMMITTEE DRAFT FOR VOTE (CDV)' -->
576
+ <xsl:call-template name="addLetterSpacing">
577
+ <xsl:with-param name="text" select="concat($stage-fullname-uppercased, ' (', $stage-abbreviation ,')')"/>
578
+ </xsl:call-template>
579
+ <xsl:text> </xsl:text>
580
+ </fo:block>
581
+ <fo:block-container margin-left="57mm">
582
+ <fo:block-container margin-left="0mm">
583
+ <fo:table table-layout="fixed" width="118mm" background-color="rgb(219, 229, 241)" id="__internal_layout__project_{generate-id()}">
584
+ <fo:table-column column-width="50%"/>
585
+ <fo:table-column column-width="50%"/>
586
+ <fo:table-body>
587
+ <fo:table-row height="12mm">
588
+ <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
589
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
590
+ <xsl:call-template name="addLetterSpacingSmallCaps">
591
+ <xsl:with-param name="text" select="'Project number:'"/>
592
+ </xsl:call-template>
593
+ </fo:block>
594
+ <fo:block font-size="9pt" font-weight="bold">
595
+ <xsl:call-template name="addLetterSpacing">
596
+ <xsl:with-param name="text"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:ext/mn:structuredidentifier/mn:project-number"/></xsl:with-param>
597
+ </xsl:call-template>
598
+ </fo:block>
599
+ </fo:table-cell>
600
+ </fo:table-row>
601
+ <fo:table-row height="12mm">
602
+ <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
603
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
604
+ <xsl:call-template name="addLetterSpacingSmallCaps">
605
+ <xsl:with-param name="text" select="'Date of circulation:'"/>
606
+ </xsl:call-template>
607
+ </fo:block>
608
+ <fo:block font-size="9pt" font-weight="bold">
609
+ <xsl:call-template name="addLetterSpacing">
610
+ <xsl:with-param name="text"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:date[@type ='circulated']/mn:on"/></xsl:with-param>
611
+ </xsl:call-template>
612
+ </fo:block>
613
+ </fo:table-cell>
614
+ <fo:table-cell border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
615
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
616
+ <xsl:call-template name="addLetterSpacingSmallCaps">
617
+ <xsl:with-param name="text" select="'Closing date for voting:'"/>
618
+ </xsl:call-template>
619
+ </fo:block>
620
+ <fo:block font-size="9pt" font-weight="bold">
621
+ <xsl:call-template name="addLetterSpacing">
622
+ <!-- 2019-12-06 -->
623
+ <xsl:with-param name="text"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:date[@type='vote-ended']/mn:on"/></xsl:with-param>
624
+ </xsl:call-template>
625
+ </fo:block>
626
+ </fo:table-cell>
627
+ </fo:table-row>
628
+ <fo:table-row height="12mm">
629
+ <fo:table-cell number-columns-spanned="2" border="1.5pt solid white" padding="1.5mm" padding-bottom="0mm">
630
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
631
+ <xsl:call-template name="addLetterSpacingSmallCaps">
632
+ <xsl:with-param name="text" select="'Supersedes documents:'"/>
633
+ </xsl:call-template>
634
+ </fo:block>
635
+ <fo:block font-size="9pt" font-weight="bold">
636
+ <xsl:variable name="supersedes_documents">
637
+ <!-- <xsl:for-each select="//mn:metanorma/mn:bibdata/mn:relation[@type='supersedes']/mn:bibitem/mn:docnumber"> -->
638
+ <xsl:for-each select="//mn:metanorma/mn:bibdata/mn:relation[@type='obsoletes']/mn:bibitem/mn:docidentifier">
639
+ <xsl:value-of select="."/>
640
+ <xsl:if test="position() != last()">,</xsl:if>
641
+ </xsl:for-each>
642
+ </xsl:variable>
643
+ <xsl:call-template name="addLetterSpacing">
644
+ <xsl:with-param name="text"><xsl:value-of select="$supersedes_documents"/></xsl:with-param>
645
+ </xsl:call-template>
646
+ </fo:block>
647
+ </fo:table-cell>
648
+ </fo:table-row>
649
+ </fo:table-body>
650
+ </fo:table>
651
+ </fo:block-container>
652
+ </fo:block-container>
897
653
 
898
- <xsl:variable name="updated_xml_with_pages">
899
- <xsl:call-template name="processPrefaceAndMainSectionsDefault_items"/>
900
- </xsl:variable>
654
+ <fo:block-container margin-left="-2mm" margin-right="-2mm" margin-top="5mm">
655
+ <fo:block-container margin-left="0mm" margin-right="0mm">
656
+ <xsl:variable name="border-color">rgb(221, 213, 213)</xsl:variable>
657
+ <fo:table table-layout="fixed" width="100%" border="1.5pt solid {$border-color}">
658
+ <fo:table-column column-width="50%"/>
659
+ <fo:table-column column-width="50%"/>
660
+ <fo:table-body>
661
+ <fo:table-row height="4mm">
662
+ <fo:table-cell number-columns-spanned="2" border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
663
+ <fo:block>
664
+ <!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
665
+ else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
666
+ <xsl:choose>
667
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subcommittee">
668
+ <fo:block font-size="6.5pt">
669
+ <fo:inline font-size="8pt">IEC SC <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subcommittee/@number"/> : </fo:inline>
670
+ <xsl:call-template name="addLetterSpacingSmallCaps">
671
+ <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subcommittee"/>
672
+ </xsl:call-template>
673
+ </fo:block>
674
+ </xsl:when>
675
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee">
676
+ <fo:block font-size="6.5pt">
677
+ <fo:inline font-size="8pt">IEC TC <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee/@number"/> : </fo:inline>
678
+ <xsl:call-template name="addLetterSpacingSmallCaps">
679
+ <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/>
680
+ </xsl:call-template>
681
+ </fo:block>
682
+ </xsl:when>
683
+ </xsl:choose>
684
+ </fo:block>
685
+ </fo:table-cell>
686
+ </fo:table-row>
687
+ <fo:table-row height="12mm">
688
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
689
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
690
+ <xsl:call-template name="addLetterSpacingSmallCaps">
691
+ <xsl:with-param name="text" select="'Secretariat:'"/>
692
+ </xsl:call-template>
693
+ </fo:block>
694
+ <fo:block font-size="9pt">
695
+ <xsl:call-template name="addLetterSpacing">
696
+ <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:secretariat"/>
697
+ </xsl:call-template>
698
+ </fo:block>
699
+ </fo:table-cell>
700
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
701
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
702
+ <xsl:call-template name="addLetterSpacingSmallCaps">
703
+ <xsl:with-param name="text" select="'Secretary:'"/>
704
+ </xsl:call-template>
705
+ </fo:block>
706
+ <fo:block font-size="9pt">
707
+ <!-- Example: Ms Shanti Conn -->
708
+ <xsl:call-template name="addLetterSpacing">
709
+ <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:secretary"/>
710
+ </xsl:call-template>
711
+ </fo:block>
712
+ </fo:table-cell>
713
+ </fo:table-row>
714
+ <fo:table-row height="12mm">
715
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
716
+ <xsl:if test="not($stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD')">
717
+ <xsl:attribute name="number-columns-spanned">2</xsl:attribute>
718
+ </xsl:if>
719
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
720
+ <xsl:call-template name="addLetterSpacingSmallCaps">
721
+ <xsl:with-param name="text" select="'Of interest to the following committees:'"/>
722
+ </xsl:call-template>
723
+ </fo:block>
724
+ <fo:block font-size="9pt">
725
+ <xsl:call-template name="addLetterSpacing">
726
+ <xsl:with-param name="text" select="//mn:metanorma/mn:bibdata/mn:ext/mn:interest-to-committees"/>
727
+ </xsl:call-template>
728
+ </fo:block>
729
+ </fo:table-cell>
730
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
731
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
732
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
733
+ <xsl:if test="$stage-abbreviation = 'FDIS'">
734
+ <xsl:call-template name="addLetterSpacingSmallCaps">
735
+ <xsl:with-param name="text" select="'horizontal standard:'"/>
736
+ </xsl:call-template>
737
+ </xsl:if>
738
+ <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
739
+ <xsl:call-template name="addLetterSpacingSmallCaps">
740
+ <xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
741
+ </xsl:call-template>
742
+ </xsl:if>
743
+ </fo:block>
744
+ <fo:block>
745
+ <xsl:choose>
746
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:horizontal = 'true'">
747
+ <xsl:call-template name="insertCheckBoxOn"/>
748
+ </xsl:when>
749
+ <xsl:otherwise>
750
+ <xsl:call-template name="insertCheckBoxOff"/>
751
+ </xsl:otherwise>
752
+ </xsl:choose>
753
+ </fo:block>
901
754
 
902
- <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
755
+ <xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
756
+ <fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
757
+ <fo:block-container margin-left="1mm" margin-right="1mm">
758
+ <fo:block font-size="8pt" padding="2mm">
759
+ <xsl:call-template name="addLetterSpacing">
760
+ <xsl:with-param name="text" select="'Other TC/SCs are requested to indicate their interest, if any, in this CDV to the secretary.'"/>
761
+ </xsl:call-template>
762
+ </fo:block>
763
+ </fo:block-container>
764
+ </fo:block-container>
765
+ </xsl:if>
766
+ </fo:table-cell>
767
+ </xsl:if>
768
+ </fo:table-row>
769
+
770
+ <xsl:if test="not($stage-abbreviation = 'DPAS')">
771
+ <fo:table-row height="10mm">
772
+ <fo:table-cell padding="1.5mm" padding-bottom="0mm">
773
+ <fo:block font-size="6.5pt" margin-bottom="4pt">
774
+ <xsl:call-template name="addLetterSpacingSmallCaps">
775
+ <xsl:with-param name="text" select="'Functions concerned:'"/>
776
+ </xsl:call-template>
777
+ </fo:block>
778
+ <!-- function: { emc | safety | environment | quality-assurance } -->
779
+ <fo:block font-size="6.5pt">
780
+ <xsl:choose>
781
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'emc'">
782
+ <xsl:call-template name="insertCheckBoxOn"/>
783
+ </xsl:when>
784
+ <xsl:otherwise>
785
+ <xsl:call-template name="insertCheckBoxOff"/>
786
+ </xsl:otherwise>
787
+ </xsl:choose>
788
+ <xsl:call-template name="addLetterSpacingSmallCaps">
789
+ <xsl:with-param name="text" select="'EMC'"/>
790
+ </xsl:call-template>
791
+ <fo:inline padding-right="33mm"> </fo:inline>
792
+ <xsl:choose>
793
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'environment'">
794
+ <xsl:call-template name="insertCheckBoxOn"/>
795
+ </xsl:when>
796
+ <xsl:otherwise>
797
+ <xsl:call-template name="insertCheckBoxOff"/>
798
+ </xsl:otherwise>
799
+ </xsl:choose>
800
+ <xsl:call-template name="addLetterSpacingSmallCaps">
801
+ <xsl:with-param name="text" select="'Environment'"/>
802
+ </xsl:call-template>
803
+ </fo:block>
804
+ </fo:table-cell>
805
+ <fo:table-cell padding="1.5mm" padding-bottom="0mm">
806
+ <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
807
+ <fo:block font-size="6.5pt">
808
+ <xsl:choose>
809
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'quality-assurance'">
810
+ <xsl:call-template name="insertCheckBoxOn"/>
811
+ </xsl:when>
812
+ <xsl:otherwise>
813
+ <xsl:call-template name="insertCheckBoxOff"/>
814
+ </xsl:otherwise>
815
+ </xsl:choose>
816
+ <xsl:call-template name="addLetterSpacingSmallCaps">
817
+ <xsl:with-param name="text" select="'Quality assurance'"/>
818
+ </xsl:call-template>
819
+ <fo:inline padding-right="13mm"> </fo:inline>
820
+ <xsl:choose>
821
+ <xsl:when test="//mn:metanorma/mn:bibdata/mn:ext/mn:function = 'safety'">
822
+ <xsl:call-template name="insertCheckBoxOn"/>
823
+ </xsl:when>
824
+ <xsl:otherwise>
825
+ <xsl:call-template name="insertCheckBoxOff"/>
826
+ </xsl:otherwise>
827
+ </xsl:choose>
828
+ <xsl:call-template name="addLetterSpacingSmallCaps">
829
+ <xsl:with-param name="text" select="'Safety'"/>
830
+ </xsl:call-template>
831
+ </fo:block>
832
+ </fo:table-cell>
833
+ </fo:table-row>
834
+ </xsl:if>
903
835
 
904
- <xsl:call-template name="insertPrefacepages">
905
- <xsl:with-param name="num" select="$num"/>
906
- </xsl:call-template>
836
+ <xsl:if test="not($stage-abbreviation = 'CD' or $stage-abbreviation = 'CD-TSTR' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS')">
907
837
 
908
- <xsl:call-template name="insertBodypages">
909
- <xsl:with-param name="lang" select="$lang"/>
910
- </xsl:call-template>
838
+ <fo:table-row>
839
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
840
+ <fo:block font-size="6.5pt" margin-bottom="12pt">
841
+ <xsl:choose>
842
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:ext/mn:cen-processing = 'true'">
843
+ <xsl:call-template name="insertCheckBoxOn"/>
844
+ </xsl:when>
845
+ <xsl:otherwise>
846
+ <xsl:call-template name="insertCheckBoxOff"/>
847
+ </xsl:otherwise>
848
+ </xsl:choose>
849
+ <xsl:call-template name="addLetterSpacingSmallCaps">
850
+ <xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
851
+ </xsl:call-template>
852
+ </fo:block>
911
853
 
912
- </xsl:for-each>
854
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:feedback-statement/mn:clause[@id = 'boilerplate-cenelec-attention']"/>
913
855
 
914
- </xsl:for-each>
915
- </xsl:for-each>
856
+ </fo:table-cell>
857
+ <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
858
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
859
+ <xsl:choose>
860
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:ext/mn:cen-processing = 'true'">
861
+ <xsl:call-template name="insertCheckBoxOff"/>
862
+ </xsl:when>
863
+ <xsl:otherwise>
864
+ <xsl:call-template name="insertCheckBoxOn"/>
865
+ </xsl:otherwise>
866
+ </xsl:choose>
867
+ <xsl:call-template name="addLetterSpacingSmallCaps">
868
+ <xsl:with-param name="text" select="'Not submitted for CENELEC parallel voting'"/>
869
+ </xsl:call-template>
870
+ </fo:block>
871
+ </fo:table-cell>
872
+ </fo:table-row>
873
+ </xsl:if>
874
+ </fo:table-body>
875
+ </fo:table>
876
+ </fo:block-container>
877
+ </fo:block-container>
916
878
 
917
- <xsl:if test="$stage &gt;= 60">
918
- <fo:page-sequence master-reference="blank-page">
919
- <fo:flow flow-name="xsl-region-body">
920
- <fo:block> </fo:block>
921
- </fo:flow>
922
- </fo:page-sequence>
879
+ <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">
880
+ <fo:block>
881
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:license-statement" mode="cover-page-internal"/>
882
+ </fo:block>
883
+ </fo:block-container>
923
884
 
924
- <fo:page-sequence master-reference="last-page">
925
- <fo:flow flow-name="xsl-region-body">
926
- <fo:block-container margin-left="20mm" margin-top="19mm">
927
- <fo:block-container margin-left="0mm" margin-top="0mm">
928
- <fo:block font-size="11pt" color="{$color_blue}" margin-bottom="12pt" line-height="150%">
929
- <fo:block-container width="42mm">
930
- <fo:block>
931
- <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(//mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type = 'publisher']/mn:organization/mn:name))"/>
932
- <xsl:value-of select="$publisher"/>
933
- </fo:block>
934
- </fo:block-container>
935
- </fo:block>
936
- <fo:block font-size="9pt" line-height="150%">
937
- <!-- Example:
938
- 3, rue de Varembé
939
- PO Box 131
940
- CH-1211 Geneva 20
941
- Switzerland
942
-
943
- Tel: + 41 22 919 02 11
944
- Fax: + 41 22 919 03 00
945
- info@iec.ch
946
- www.iec.ch -->
947
- <xsl:variable name="telpos" select="count((//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
948
- <xsl:choose>
949
- <xsl:when test="$telpos != 0">
950
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &lt;= $telpos]" mode="coverpage"/>
951
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &gt;= $telpos]" mode="coverpage">
952
- <xsl:with-param name="lastpage">true</xsl:with-param>
953
- </xsl:apply-templates>
954
- </xsl:when>
955
- <xsl:otherwise>
956
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
957
- </xsl:otherwise>
958
- </xsl:choose>
959
- </fo:block>
960
- </fo:block-container>
961
- </fo:block-container>
962
- </fo:flow>
963
- </fo:page-sequence>
964
- </xsl:if>
885
+ <fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
886
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
887
+ <xsl:call-template name="addLetterSpacingSmallCaps">
888
+ <xsl:with-param name="text">
889
+ <!-- Title: -->
890
+ <xsl:call-template name="getLocalizedString">
891
+ <xsl:with-param name="key">title</xsl:with-param>
892
+ </xsl:call-template>
893
+ <xsl:text>:</xsl:text>
894
+ </xsl:with-param>
895
+ </xsl:call-template>
896
+ </fo:block>
897
+ <fo:block font-size="9pt" font-weight="bold">
898
+ <xsl:call-template name="addLetterSpacing">
899
+ <xsl:with-param name="text"><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'main']"/></xsl:with-param>
900
+ </xsl:call-template>
901
+ </fo:block>
902
+ </fo:block-container>
965
903
 
966
- <!-- namespace document doesn't equal to xslt namespace -->
967
- <xsl:if test="not(//mn:metanorma)">
968
- <fo:page-sequence master-reference="blank-page">
969
- <fo:flow flow-name="xsl-region-body">
970
- <fo:block> </fo:block>
971
- </fo:flow>
972
- </fo:page-sequence>
973
- </xsl:if>
904
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'DTS' or $stage-abbreviation = 'DTR' or $stage-abbreviation = 'DPAS'">
905
+ <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="6.5mm" padding="1mm" margin-top="3mm" display-align="center">
906
+ <fo:block font-size="6.5pt">
907
+ <xsl:call-template name="addLetterSpacing">
908
+ <xsl:with-param name="text">
909
+ <!-- PROPOSED STABILITY DATE: -->
910
+ <xsl:call-template name="getLocalizedString">
911
+ <xsl:with-param name="key">proposed_stability_date</xsl:with-param>
912
+ </xsl:call-template>
913
+ <xsl:text>: </xsl:text>
914
+ </xsl:with-param>
915
+ </xsl:call-template>
916
+ <!-- 2023 -->
917
+ <fo:inline font-size="9pt"><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:date[@type='unchanged']/mn:on"/></fo:inline>
918
+ </fo:block>
919
+ </fo:block-container>
920
+ </xsl:if>
974
921
 
975
- </fo:root>
976
- <!-- </xsl:variable> -->
922
+ <fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
923
+ <fo:block font-size="6.5pt" margin-bottom="6pt">
924
+ <xsl:call-template name="addLetterSpacingSmallCaps">
925
+ <xsl:with-param name="text">
926
+ <!-- Note from TC/SC officers: -->
927
+ <xsl:call-template name="getLocalizedString">
928
+ <xsl:with-param name="key">tc_sc_note</xsl:with-param>
929
+ </xsl:call-template>
930
+ <xsl:text>:</xsl:text>
931
+ </xsl:with-param>
932
+ </xsl:call-template>
933
+ </fo:block>
934
+ <!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
935
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:tc-sc-officers-note"/>
936
+ </fo:block-container>
977
937
 
938
+ </fo:flow>
939
+ </fo:page-sequence> <!-- END: cover-FDIS -->
940
+ </xsl:if>
978
941
  </xsl:template>
979
942
 
980
943
  <xsl:template match="mn:pagebreak" priority="2">
@@ -1235,43 +1198,13 @@
1235
1198
  <xsl:for-each select="xalan:nodeset($contents)//mnx:item[@display = 'true']"><!-- [@display = 'true']
1236
1199
  [@level &lt;= 3]
1237
1200
  [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
1238
- <fo:block text-align-last="justify" role="TOCI">
1239
- <xsl:if test="@level = 1">
1240
- <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
1241
- </xsl:if>
1242
- <xsl:if test="@level = 2">
1243
- <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
1244
- </xsl:if>
1245
- <xsl:if test="@level &gt;= 3">
1246
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
1247
- </xsl:if>
1248
- <xsl:if test="@type = 'indexsect'">
1249
- <xsl:attribute name="space-before">16pt</xsl:attribute>
1250
- </xsl:if>
1251
- <xsl:if test="@type = 'references'">
1252
- <xsl:attribute name="space-before">5pt</xsl:attribute>
1253
- </xsl:if>
1254
-
1201
+ <fo:block role="TOCI">
1255
1202
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{@section} {mnx:title}"> <!-- link at this level needs for PDF structure tags -->
1256
1203
 
1257
- <fo:list-block role="SKIP">
1258
- <xsl:attribute name="margin-left">
1259
- <xsl:choose>
1260
- <xsl:when test="mnx:title/@variant-title = 'true'">0mm</xsl:when>
1261
- <xsl:when test="@level = 2">8mm</xsl:when>
1262
- <xsl:when test="@level &gt;= 3"><xsl:value-of select="(@level - 2) * 23"/>mm</xsl:when>
1263
- <xsl:otherwise>0mm</xsl:otherwise>
1264
- </xsl:choose>
1265
- </xsl:attribute>
1266
- <xsl:attribute name="provisional-distance-between-starts">
1267
- <xsl:choose>
1268
- <xsl:when test="@section = ''">0mm</xsl:when>
1269
- <xsl:when test="@level = 1">8mm</xsl:when>
1270
- <xsl:when test="@level = 2">15mm</xsl:when>
1271
- <xsl:when test="@level &gt;= 3"><xsl:value-of select="(@level - 2) * 19"/>mm</xsl:when>
1272
- <xsl:otherwise>0mm</xsl:otherwise>
1273
- </xsl:choose>
1274
- </xsl:attribute>
1204
+ <fo:list-block xsl:use-attribute-sets="toc-item-style">
1205
+
1206
+ <xsl:call-template name="refine_toc-item-style"/>
1207
+
1275
1208
  <fo:list-item role="SKIP">
1276
1209
  <fo:list-item-label end-indent="label-end()" role="SKIP">
1277
1210
  <fo:block>
@@ -1289,7 +1222,7 @@
1289
1222
  </xsl:call-template>
1290
1223
  <xsl:text> </xsl:text>
1291
1224
  <fo:inline keep-together.within-line="always" role="SKIP">
1292
- <fo:leader leader-pattern="dots"/>
1225
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
1293
1226
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
1294
1227
  </fo:inline>
1295
1228
  </fo:basic-link>
@@ -1301,31 +1234,31 @@
1301
1234
  </fo:block>
1302
1235
  </xsl:for-each>
1303
1236
 
1304
- <xsl:if test="$contents//mnx:figures/mnx:figure">
1305
- <fo:block margin-bottom="5pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
1306
- <xsl:for-each select="$contents//mnx:figures/mnx:figure">
1307
- <xsl:call-template name="insertListOf_Item"/>
1308
- </xsl:for-each>
1309
- </xsl:if>
1237
+ <xsl:for-each select="$contents//mnx:figures/mnx:figure">
1238
+ <xsl:if test="position() = 1">
1239
+ <fo:block margin-bottom="5pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
1240
+ </xsl:if>
1241
+ <xsl:call-template name="insertListOf_Item"/>
1242
+ </xsl:for-each>
1310
1243
 
1311
- <xsl:if test="$contents//mnx:tables/mnx:table">
1312
- <fo:block margin-bottom="5pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
1313
- <xsl:for-each select="$contents//mnx:tables/mnx:table">
1314
- <xsl:call-template name="insertListOf_Item"/>
1315
- </xsl:for-each>
1316
- </xsl:if>
1244
+ <xsl:for-each select="$contents//mnx:tables/mnx:table">
1245
+ <xsl:if test="position() = 1">
1246
+ <fo:block margin-bottom="5pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
1247
+ </xsl:if>
1248
+ <xsl:call-template name="insertListOf_Item"/>
1249
+ </xsl:for-each>
1317
1250
 
1318
1251
  <!-- </fo:block>
1319
1252
  </fo:block-container> -->
1320
1253
  </xsl:template> <!-- END: insertTOCpages -->
1321
1254
 
1322
1255
  <xsl:template name="insertListOf_Item">
1323
- <fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm" role="TOCI">
1324
- <xsl:variable name="alt_text" select="normalize-space(translate(normalize-space(mn:name), ' —', ' -'))"/>
1256
+ <fo:block xsl:use-attribute-sets="toc-listof-item-style">
1257
+ <xsl:variable name="alt_text" select="normalize-space(translate(normalize-space(mn:fmt-name), ' —', ' -'))"/>
1325
1258
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{$alt_text}"> <!-- {local-name()} {@id} -->
1326
1259
  <xsl:apply-templates select="." mode="contents"/>
1327
1260
  <fo:inline keep-together.within-line="always" role="SKIP">
1328
- <fo:leader leader-pattern="dots"/>
1261
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
1329
1262
  <fo:wrapper role="artifact">
1330
1263
  <fo:page-number-citation ref-id="{@id}"/>
1331
1264
  </fo:wrapper>
@@ -1334,14 +1267,14 @@
1334
1267
  </fo:block>
1335
1268
  </xsl:template>
1336
1269
 
1337
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="3">
1270
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="3">
1338
1271
  <fo:block-container role="SKIP">
1339
1272
  <!-- render 'Contents' outside if role="TOC" -->
1340
- <xsl:apply-templates select="mn:title"/>
1273
+ <xsl:apply-templates select="mn:fmt-title"/>
1341
1274
  <fo:block role="TOC">
1342
- <xsl:apply-templates select="node()[not(self::mn:title)]"/>
1275
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
1343
1276
 
1344
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
1277
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
1345
1278
  <xsl:variable name="docid">
1346
1279
  <xsl:call-template name="getDocumentId"/>
1347
1280
  </xsl:variable>
@@ -1353,8 +1286,8 @@
1353
1286
  </fo:block-container>
1354
1287
  </xsl:template>
1355
1288
 
1356
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
1357
- <fo:block font-size="12pt" text-align="center" margin-bottom="22pt">
1289
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
1290
+ <fo:block xsl:use-attribute-sets="toc-title-style">
1358
1291
  <xsl:call-template name="addLetterSpacing">
1359
1292
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(.))"/>
1360
1293
  </xsl:call-template>
@@ -1546,7 +1479,7 @@
1546
1479
  </fo:block>
1547
1480
  </xsl:template>
1548
1481
 
1549
- <xsl:template match="mn:feedback-statement/mn:clause[@id = 'boilerplate-cenelec-attention']//mn:title" priority="3">
1482
+ <xsl:template match="mn:feedback-statement/mn:clause[@id = 'boilerplate-cenelec-attention']//mn:fmt-title" priority="3">
1550
1483
  <xsl:variable name="level">
1551
1484
  <xsl:call-template name="getLevel"/>
1552
1485
  </xsl:variable>
@@ -1682,7 +1615,7 @@
1682
1615
  <!-- ============================= -->
1683
1616
  <!-- ============================= -->
1684
1617
 
1685
- <xsl:template match="mn:license-statement//mn:title" mode="cover-page-internal">
1618
+ <xsl:template match="mn:license-statement//mn:fmt-title" mode="cover-page-internal">
1686
1619
  <xsl:variable name="level">
1687
1620
  <xsl:call-template name="getLevel"/>
1688
1621
  </xsl:variable>
@@ -1719,7 +1652,7 @@
1719
1652
  <xsl:template match="mn:br" mode="coverpage">
1720
1653
  <xsl:value-of select="$linebreak"/>
1721
1654
  </xsl:template>
1722
- <xsl:template match="mn:link" mode="coverpage">
1655
+ <xsl:template match="mn:fmt-link" mode="coverpage">
1723
1656
  <xsl:param name="lastpage">false</xsl:param>
1724
1657
  <xsl:choose>
1725
1658
  <xsl:when test="$lastpage = 'true'">
@@ -1756,7 +1689,7 @@
1756
1689
  <fo:block id="{@id}" margin-bottom="12pt" font-size="12pt" text-align="center">
1757
1690
  <xsl:call-template name="addLetterSpacing">
1758
1691
  <!-- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(mn:title))"/> -->
1759
- <xsl:with-param name="text" select="mn:title"/>
1692
+ <xsl:with-param name="text" select="mn:fmt-title"/>
1760
1693
  </xsl:call-template>
1761
1694
  </fo:block>
1762
1695
  <!-- margin-left="6.3mm" -->
@@ -1764,7 +1697,7 @@
1764
1697
  <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement/*"/>
1765
1698
  </fo:block> -->
1766
1699
  <fo:block>
1767
- <xsl:apply-templates select="*[not(self::mn:title)]"/>
1700
+ <xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
1768
1701
  </fo:block>
1769
1702
  </xsl:template>
1770
1703
 
@@ -1789,19 +1722,19 @@
1789
1722
  <!-- ====== -->
1790
1723
  <!-- title -->
1791
1724
  <!-- ====== -->
1792
- <xsl:template match="mn:introduction/mn:title">
1725
+ <xsl:template match="mn:introduction/mn:fmt-title">
1793
1726
  <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" role="H1">
1794
1727
  <xsl:apply-templates/>
1795
1728
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
1796
1729
  </fo:block>
1797
1730
  </xsl:template>
1798
- <xsl:template match="mn:introduction/mn:title/text()">
1731
+ <xsl:template match="mn:introduction/mn:fmt-title/text()">
1799
1732
  <xsl:call-template name="addLetterSpacing">
1800
1733
  <xsl:with-param name="text" select="."/>
1801
1734
  </xsl:call-template>
1802
1735
  </xsl:template>
1803
1736
 
1804
- <xsl:template match="mn:annex/mn:title">
1737
+ <xsl:template match="mn:annex/mn:fmt-title">
1805
1738
  <fo:block font-size="12pt" text-align="center" margin-bottom="32pt" keep-with-next="always" role="H1">
1806
1739
  <xsl:apply-templates/>
1807
1740
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
@@ -1809,18 +1742,18 @@
1809
1742
  </xsl:template>
1810
1743
 
1811
1744
  <!-- Bibliography -->
1812
- <xsl:template match="mn:references[not(@normative='true')]/mn:title">
1745
+ <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
1813
1746
  <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always" role="H1">
1814
1747
  <xsl:apply-templates/>
1815
1748
  </fo:block>
1816
1749
  </xsl:template>
1817
- <xsl:template match="mn:references[not(@normative='true')]/mn:title/text()">
1750
+ <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title/text()">
1818
1751
  <xsl:call-template name="addLetterSpacing">
1819
1752
  <xsl:with-param name="text" select="."/>
1820
1753
  </xsl:call-template>
1821
1754
  </xsl:template>
1822
1755
 
1823
- <xsl:template match="mn:title" name="title">
1756
+ <xsl:template match="mn:fmt-title" name="title">
1824
1757
 
1825
1758
  <xsl:variable name="level">
1826
1759
  <xsl:call-template name="getLevel"/>
@@ -1874,7 +1807,7 @@
1874
1807
  <xsl:variable name="element-name">
1875
1808
  <xsl:choose>
1876
1809
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
1877
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
1810
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
1878
1811
  <xsl:when test="parent::mn:admonition and $previous-element = 'p'">fo:block</xsl:when>
1879
1812
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
1880
1813
  <xsl:otherwise>fo:block</xsl:otherwise>
@@ -1890,7 +1823,7 @@
1890
1823
  </xsl:call-template>
1891
1824
 
1892
1825
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
1893
- <xsl:if test="ancestor::mn:definition">
1826
+ <xsl:if test="ancestor::mn:fmt-definition">
1894
1827
  <xsl:attribute name="margin-top">1pt</xsl:attribute>
1895
1828
  </xsl:if>
1896
1829
  <xsl:if test="ancestor::mn:dl">
@@ -1978,7 +1911,7 @@
1978
1911
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
1979
1912
  </xsl:template>
1980
1913
 
1981
- <xsl:template match="mn:xref[@pagenumber = 'true']" priority="2">
1914
+ <xsl:template match="mn:xref[@pagenumber = 'true'] | mn:fmt-xref[@pagenumber = 'true']" priority="2">
1982
1915
  <xsl:call-template name="insert_basic_link">
1983
1916
  <xsl:with-param name="element">
1984
1917
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
@@ -2047,6 +1980,57 @@
2047
1980
  </fo:static-content>
2048
1981
  </xsl:template>
2049
1982
 
1983
+ <xsl:template name="back-page">
1984
+ <xsl:if test="$stage &gt;= 60">
1985
+ <fo:page-sequence master-reference="blank-page">
1986
+ <fo:flow flow-name="xsl-region-body">
1987
+ <fo:block> </fo:block>
1988
+ </fo:flow>
1989
+ </fo:page-sequence>
1990
+
1991
+ <fo:page-sequence master-reference="back-page">
1992
+ <fo:flow flow-name="xsl-region-body">
1993
+ <fo:block-container margin-left="20mm" margin-top="19mm">
1994
+ <fo:block-container margin-left="0mm" margin-top="0mm">
1995
+ <fo:block font-size="11pt" color="{$color_blue}" margin-bottom="12pt" line-height="150%">
1996
+ <fo:block-container width="42mm">
1997
+ <fo:block>
1998
+ <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(//mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type = 'publisher']/mn:organization/mn:name))"/>
1999
+ <xsl:value-of select="$publisher"/>
2000
+ </fo:block>
2001
+ </fo:block-container>
2002
+ </fo:block>
2003
+ <fo:block font-size="9pt" line-height="150%">
2004
+ <!-- Example:
2005
+ 3, rue de Varembé
2006
+ PO Box 131
2007
+ CH-1211 Geneva 20
2008
+ Switzerland
2009
+
2010
+ Tel: + 41 22 919 02 11
2011
+ Fax: + 41 22 919 03 00
2012
+ info@iec.ch
2013
+ www.iec.ch -->
2014
+ <xsl:variable name="telpos" select="count((//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
2015
+ <xsl:choose>
2016
+ <xsl:when test="$telpos != 0">
2017
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &lt;= $telpos]" mode="coverpage"/>
2018
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]/node()[position() &gt;= $telpos]" mode="coverpage">
2019
+ <xsl:with-param name="lastpage">true</xsl:with-param>
2020
+ </xsl:apply-templates>
2021
+ </xsl:when>
2022
+ <xsl:otherwise>
2023
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:boilerplate/mn:copyright-statement/mn:clause/mn:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
2024
+ </xsl:otherwise>
2025
+ </xsl:choose>
2026
+ </fo:block>
2027
+ </fo:block-container>
2028
+ </fo:block-container>
2029
+ </fo:flow>
2030
+ </fo:page-sequence>
2031
+ </xsl:if>
2032
+ </xsl:template>
2033
+
2050
2034
  <!--<xsl:variable name="Image-Logo-IEC">
2051
2035
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAMAAAC9ZjJ/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpjNTIxY2ZhYi04NGZmLWZiNDctYWQwZi0xMDQxODQ5MjJlNzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjFDQzJCRTE4MzA2MTFFQTlENjc4RjAzNEJDNTMwNUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjFDQzJCRTA4MzA2MTFFQTlENjc4RjAzNEJDNTMwNUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6ZjkyOWQwNjktMzcxYy0xMzRlLWExMTEtMDFjMzM4ZTc0NzZjIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NTEwYjk4MGQtODMwNi0xMWVhLWFhOGEtOTA5ZjdmOTQ5N2QzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k0DzWwAAAwBQTFRFncf77P//ydDhdY2tkrntNFR6Ilui/f7/Gleg//7/9f//F0uVHVaay9DcHlii5f//2Pj/+vfqkam6Gled//n+OGKT//z/QV2Cxub/IFSeXIvKbZXHIVWULVWLNliFS3awIFShG1OU/Pv5///0J2Gn+v/5S2eT8/7yNmey+v//8f//tcrU/fX80+b6IVSZianH9fX9HVWk/v/xHFWqGliZNWimI1mc/v37q7zOeanmF0iKIFOkGVakHViTFlqbIVKrTWB5IVOhJUyVWYS2OFeS1NrgIlOeE1Ccttn8HVKLIlyq5+v4///66vb+jrfuhqnU9fT0/fPxJUyDpsn6//v6QmeNmrncIlGY/Pv/9///KlKaGUuf+f/1//73GlqzFFOiZ3WJgJaw4fX/7vLoHlWe3dLUHlahKGGzxcvVHFqovNPoGVieH1SgGVGYs8nmHlSjTnzI+vn++evnt8v3pMTpwOT/2uTmJF2yjbzqHFacHUp4HVmZJFOak6nDJ1yjFVmiy/T+H1ie4+fsc4mfI1mViKnkJ02nEEqSFFOUGFWa/P/6//j2HWetLFucIlKO+fj4K1KDH1WbKlys+/z69fn+irDjG1WjHlaeG1Wg+fv1JFadmL7uJ1CdF1asLVOSG1af1NvzM1+g6fb3jaDKB0iILlShK1qU/f/8GFGd//z8G1SepKm1FV2QHlKcH1ab+v/8LVuNx9/sHU+X5fLzG1Sbm7bQ8vn/ep/JWnebGlOhrNP8//v3G1ahFlmpHk+iwN3/IVekT2uJHFaj9vz3JVWXmrXoYn6n/Pz9EFCr+Pnw//zyClOc+vz/6v3y2PLviqvz+P/8/P/4JFehDEqi9/3/GVClIk9/JFCnJVeNJFKgy8niKFeuHl2hhrHdKViFJFd7I2CZH1KnhLPu/P349v/xPXG7EFOONE6EJFenIFaiCFOxgrj3HWG8cY/b8fn29P779Pv54Nzel8LSPW6q0tDpS3+kPGZ2j6zSx8jK8vD8IUF1+Pz8QF+e/P3/ipijHVaeKAIWIgAAHApJREFUeNrsnA9cU1eWx0075OU90qBNCEYiggT1RY2GxGDJHxrEZEjDqohCQETp2zgxZKL9Z2MwmErlnyChFjSCGboqgYFgaaqlRksp1UqdWcV/sGYUxv6Bna7OrNvt6tTJ3pdgW+MYcYUO+/n4e4EEXki+Offec8859z4meMaxJjyBewL3BO4J3BO4J3BP4J7APYEbd3AGKpXPlwDxqTZMKBSOOzhAhsN5xh2cxUEmk/lAZIeFI+vrG7dwjPEG5wISeeXqxLC8vPEK5xp3cJiay63mer8wDLNYxhecDwxIPX7gMIPT6cTMlLZ0Wb4sH9xkHA7HKjCNCzgzxQxuHmeP1Sqz9vSUg3srwOOMCziiGcOIRLNB0dkEDFjjdDbtdonqRHXjA65Jp1MTicTOdrvTTMR0xA6iRiMS5YwLuJomnVMNLGZuiiIXFhYyC5lmimb16tXjAs5QQyQOGXTBLKLAwYyqEDOZ5N2iunEC56EQiR6MYkqtjAgNwxXxdWVqYm3teBmtTp151pdvL588MQRo4uTlb065eeDR4EwHv/66oiLZITD1Xrly5d+/kUqFQjGfTxIeV5SsXl00KJJHrPnt4tcWv/aXv/xl8eLXXlt8n15bPHdFhZNEYjCkAyKRnWUOVigKCtyHrgatWZjLRlQ3PmlVxsU1wnBGxuFf/S3sSiFFpDEdqK1NUPAupGcGhEtetOjpKbg2LFo05dt/X63H4cR80uDxpoKc1VVZii+XpCDvvIe8tbMRhs4jCOonBEHY7BP1RC+cUFS3Ts5Y55Tv+Ly4P3zyDUIIG/xBa4MSjtu5MwNCz6vOTPzDAptI01ObWJvA4/Ey8wPCnUih0U8jyDsIooo581R9G5YnFPL5WtKgUMfKyZkVH/ZrCCptQN5BG5Tg82fHxfgpNjp6j+qDxLbqaoZMJnOQv2Jp5Nza1LC1z9z43TsQTKPR6DCMfwrV/AyYPmeZsjR3S9jm3n4zSdRu381gBIRbgdDokAo9g/619bpqcWK6JQ+3nMQ1KFSDt+mp/5B9EodDrjcoy+Li4pbFlN6r6OhoJXIidVDtg+NHgY+0KXHGKwQ2aFEIpgM6GNr13htvICi8EZAqX0QIv1zUKzYTNSK5vSUwXChhY9z0U7GxwAKrkHd1RINBr5dISCTpcZaHqEs+osqe1B196j3kTGvMn1UoBPsLOnweYZ9INJFIGEOWz2RqFKzkyqffiOtethSCUm5BhMnfLbpZXzUYuW5a+PKJIQQ0uvtF5Zn3NycX87VN9paewJYjzIeV0bGxAOEs+m5wDQ6HN6swy1RE9JTPZSu7J3UrEeTM9dZWNGXj/XAqFMldlGi24XAyJtMuspcfIdxZtqw7e+l5dOOv1qwImrrvgD4rsqXi4uagtbOvZ8fGKlUTPwxtLqYShxiB4WYQQJ+A0xrp9LKGW+tbiFp+NZcvEYkiW8w6suBECLu1O1sZh6IxMxHC8vDwKf4KnxIeHl4fBTIYLUkvlOVXxUcshOJeVMKnd4H2C0/W6XR2EUXTqclxsfqLi1nhvySgL6WlQQtP9KZfFqYfCAwXAsNL4WXwHNoc+Px6q5Ovra6W8EWiwR6zycI8EsKOyc5Wgh5dWspe+N+bk/ZZ71GXdd/UK5sPJfez7sLlz3oF2bVUmX1yF8peOGNzr85GpFS3axQ5JA21hM8Xx4duOZy2bBnMXhnaMni8rTYwHJuOi+btuE9lWvhaLlerFYnMFqfHmj6PwFb5+hkEEVaYFKvrqH6qq9NSDQYDmf+Vu6Ba0VYR9tQuOhigKEIIWXIw6rPVWpDakB1MJodjcXhIJDCDmRZNvkOjvQS/nxQ8WBX8kNH6QLgaB4BDhuFgAFeoWV3n+rtwZHIxa3+OoshUv5J9mk5rbERTCO9/fNH5zTmJFsAxOQCO44X7rK4t9cR/0ZbRlrLfHqyKn/WQPncHAl7oDHCnKmR9AtdmA4kviUQykps6I2vnsZVAw3ChDuA2yX6qAakfnvJZdW65If3KPBp4apxyOoT8ekFxidwUJQaiknwZjs1AdtTWlhQVTXv55NEyVe6X+xWUh4zWn8Jd5u4ehjOTm1x+cBFOLo9n8IerIZMtOFwRS1HctWgiTJsOK5XT4ZSPL5pI1GBW7zBcnUjUCeDItQcoLHP8B79JK0NWHjDJtQ/pc+C1oqNjs5VnS9GnrFK9/tKlPIxENYpzNAPb57GPHs1WNjTggIQIncVixe6VpauLyZEKL10qmlXEqgibi9KXxilXrUIJ8/YNKuSs3t7azHwOU+wVJ7+vNjPxQJRkU076tIkhr8wI7ihxB7bcPXA9P4ETiXjb5yE/gUuKuh8O66pgOnC4tllFuvp5hMN0mrIUwM0N+v7CgEZ+sLe2Nr9rGI6ZX9tXeyAxyphzrCP16Q/DUqviWdqHNCsEBMfR4QwUWW/mDoA3kmIkPoCrA3Bs0KClZ2LAHAUTQqlUvtEfTtYHUoM6Ho9UwopflFJWhiDZ2Q0oYUkyq4jCKmpXJCQMcLneUWTwYBhDqrhQ2G+xr/6m2G3KujQr/mEzBPoDnOpHOKrYC/fdPXAGrZH/IDi5O6p/r6rsKILsudaA5oaWF7E89nXt1QkDAK6TdBcu8twmZjKr6rM6d7GzqiihKj5wn0O8lrtzB4oDrsQMPpvLxWB0dpoN7Vyu6NnTwM3AUAM+KghhHG4CTyvBqzJUW3U1V10D2ksq5VYnJJAdvIGIbbfAsIHhU5+Uor+wOiwcjkQikz1W8fCBcOT2TnXTs6of4dhhjI574RwOsbhPyuUCOPLghcpfN8LzYXinsrT0zH8ct3jh8hhjBtcJ4IDXAi2LexN2GNOsVku96ruEq68vM79P6uIODJDJHT1groHmw9DShgY0ZVYbZuGQJRKpdEwtB/vo4nC4Ln+42vxMmdRVjcO1VC1hZ+DNGlfa0PpMYp8D81puLOG2IJCXDYbpdCSs12igSsAMz5dotcBPu/ByL4hl1Vw9mVlRPxkBHQBqaFjagDybaMIwjkUiiYwcS8sBOB8dDsc0k6ne2rP2friuaQQE3ghB0wGcas2BHsxrubGE2/0sCK7xiATHI4QZtQUFfJ/uzvsGCwg2bDYyc+p3bBTe2dpQuicOdICeFgxzOLSkMbbcj3DsUHEAuMqP2OjSRqi14UV4aUpqpg+OOsaWg7xwuAihxTnHdhiHVeJ2F2lZ8hKLxYJRqeSuFSmnwTwIImYwsH/9tZWRpyaTPdjY97m7cCv6dxz73DhsOr7RXaJ1y93DcMwPCD64UgD3ytcC7GeDQ/EZbmdu2OZCZpTDOtQDjiGLzplXnXVhk8PCYFC1jvS1KJ2erVSpziqVaZ92GdV6vcHAiIzM+1ng4uDcD3qTmQIOwyvM5Kzp6OBtysJ8cPnvn6c3ZivR86XKhox/SfyZ4GAfHFwWhz71/rxnt/z22R+1ZcuWGQ7QdFotVjsbppWBZlWdzY7b+B/pRrNeT+XL+iLVY+qE78IdPQohBCD2Da/Y4BGbwE45wanxwb1Lo83B+xyAy5iSaLSB7Jc6tnDOLQg+5QM4elpZGW0XBH5q8I6O1tKYVlSlOr+mBpNKtdq82rl02py4ayje52gbZFoqbrm+vryxtdxduGVpjfCu00ePeuFA0tH6yZkbyHnVmh5MKMUt90IGjRa3B0XORsPwhlozFbfcGMMBJ+xlgZTdkyAkhBBCuKtccIDv2zxqoVRYLWl+cc81+A68p/SakjZng6LNIRL19UmFj7kYPGK4bnjh2rXb1j59V2vxY22QQy0VCrkA7uxbOFzDWSV9zobLupoxh+ts2oJmZ8fR8WfshFM+SE/sqjAPS0B0Ej0eltPmkkojAdx70EkA91ap8hqdtoHBMItEMplQP6aWm/cDXAaUezuzoj69ZlhOp8fp1OmINpsP7o3WkyCYe+uacg9M29DSI/gZ4Lw5BB3yViZzU1maTTktdzXU08LoCG7B4fSd1OZ30TvgZaBr8B4YnpIu6OjslMn0Ywyn+hEuZKpCLsrBfDMEo6WnRzdkihyG04pne5M4uEEZB9OP9Fl/FjgEf0cQa8SsWkUIKyymGh3Dcjp0FqdT4LTZ8GeTxCvZgO4Onm1k0L87aOnIy5PJ1NyfCS5mVciKYhApOS2+w2HWmczBxB/gvsPhTuK5UAZ9ZTmnB4fjqscUbgvuShpaW/GSMUhwrNIh232yWEQiV0V4SOv8095sIyNjfZClRiZjMFyuAAt3Th1WxHJSHtfPjQDOxpwRAp4J76TDjTCa+zWx5WFwTieRRTTZiY8TCat8lUNlNJ5Uyzq4PJmfXDaH5ZgoLz954mHwMktBJgQdPv+8SZffJ8NIpAfDNemIGFGnYz1u3gqE14XZobUdPO59cC4HmKr0XRWvILsgkKPhcKptwUN9+YHhDE5iEVFnfjzLed8Qzw4hJMxCIZG4fuoEIfqxY335XVNUu6CTdBqddl61ceH+ntpamYekDdCsFKKOpTDpHstyPjhvxh/KoWhFnf5wJBxOlt91CLzQUry6jKApL1gZAA6khoYAq4rBhiIP8XHgtrBXxZwtRVFfIYcDLOdfE3a5mF7LySoWotBOOo1GR9Dz56e0ADhygdbwQDoiJfjLIl0N8bFcyU/gQvMDwJm61pTi63B0OoJAp/9UXVvL8WgLyA+EqyGue24Wy/MocEPgN1Ip5iFRjcYcUcJ23JUMD4iYkNCCYzye2k95eRhIA8ViQ1v5LwnR3S99UZpGo2fkRlQFK4acgs826fPyGAyOVwxGnl6/Y39tfeL2b86ZNv9W9as1+yX/FzgSgKv2h5MEgDPrysPZpyZ1r4oBcDAhPLgqS28q4q0GCdg9cAU7auO3X/7sG+OJW4eR9RuaH6lZ1SDsxmy45dpFHdvn4WE6mMsbG+k0diiYUpkcP8ny1Fwuz4BpLggzf8mmwdDGhrOxXyDvRtTLie4iU7qWT6XaQKKo16vVVKqWTxnMb7MPddhD1yv3oIRpbY8E58GEfQCOhMMNbn/Wtw4R54PjmO9j88LxuB4DTxHcd4IAvHBGQ3bsF2zCkTYzS84ytVHvgeNrO4KtLIadOLSXoFQeXp+U/miW4woHvHCCkt0dfXg1HU+4gOOn7fo+30o2+k9eGIYvz5AdaoXcffU/CUhjI4S2rpq56vcf63iffVOYDPJvj1aLF84kWgOIt4JNkuL+ryLmqdC//vnwiQPbHwmOyx0Q5nkt1yTqqJ3Hhn6AO5+UyXggHFlNcRdd/e/1yM60v4IYZuZMwivuc6s/YxZ64XxsXrgWh6T4q/4jE2+AEPH929sfBc4BOtDAAGAjOcwlTRTpPAKIbyEEQVTge1gXr67Ov9QvFuPVRDAgmr45546f8tF8+LoS+BOainCkflNWO5HJJJN9a18kKpnMFLOKtKZDR96LfTEWmfz98axNjwiXMAznbKLIlvwULjSTd+yBcALXsdXF9alPww2n4DkA7jBh4qIL66r94ZgSliQqfGvMF7GT2NsSqzZdeNRmHaBSSSS7qcRNEUwLQZfCyl0qhN2KsrfdZm06RyFROn/6lZVwgWcz63RYNa+Ol1C77825SGtaHI0G70LeeboysUVRkEMimjkWa5vODB4X9F9M2nIL3qO8EbKkN8pdUPAocGqu3gfHMJUYdB0rJl6H4pZCKe8hKIqsDI2XryO57lVCFa/aTmkxYdw6Hg53e+XvXkyLmzPnBUgVMnFJrbTgmNvt0bVxOCZGUZFbsYMZ+ik7I0N5DVm4YnPxI8JhmHpggM8nkaSDTqqdwlrJjs7ups+ZDyn3xLAXfhCUWumnxH2J+6aGBoNpyMEQDnA4ivbwiQiClkZHZzc2Hl4Ytq+iotAoNrr7v4pi1SfHJ257I3ZSdzdK2Lsgvj9K19Hxf4JrE5qJNkrFiZDu7u4yOjRfqfwEIWz9aO/bfvrXf33zzTeP9DgAnGVAyOHIKVO3zUVvlJ6KzU6jo+ytU26WM5lGY3PxV+LC+OQpywnXJ8V2d7/wcuhFMSu5eDDvUaYvzOHQC5v5WtHx4xSiiBJ8cCUBfiMtbT6Ywpa+BUb/ef+tG2zkxpmQV0MtLld+fkJCnUgi512qfyWEwL4+nw4vPdWNLv7bx0EXK3oP9laGrX338J9jY2NnIiGvlHdobMX2DqH9UeH0/GaqSyisKWkXtaWumA3R09Iy4I3wdHwvEno/3Mwz7K2HgknDcO4dWVmZEdt+j9yAQCAYPUmFEHInL//jc89NmDyRwEbQSbGxMe+srezSK0RyFjGr45HgyGTMI27mdwoTauQaUV9+1pcvg4AJ/TMK7QIoR7P9dguVKrPLuulzM7N4vIquvsjm5vi2TesuBB/4/k0CIWTmqlv0jSBdVO7pjlZOOqVs2LkThu6ELP9SyyouKhFpdhR81f+ocFizWOI6njBUotBYrdKs539bpryOnkehDAguy/bfaJWd3d0Nz82s4tX1VvTJmps59RfOratKTEoK2/L7362izwEZ2fRrIKjJxufot07C0OKnk3QlJW53sTzn84LmwFHJtFdDJvoE7ifMmOp/3sFJT7/53IeTXwXH39Ork7e+OnlCaHIXh6HX83h1BccKgL+tzrNGJS+YMmHrRAJw4Mgnb5VCqsMIO2XuRxtmYU61TuccUVKd+v3U1IiIyqArQZtvR0y9vc//fJRAUJHcdajiCnjO31NEZeXm0NDUrmE4XkEBDufyCATM5KuHbn678Fe/Bz219BMITfnNwrUf32ZR5WYTscY8sp2HxGCduThKQDYKDDWYTuF/Xn5MI3JRnMFD+OagrszMoY57DnViZmJiZnpwOsdisXgMBqp3zc5m262zCARi8aH+YoN7wc1pi6ZMu8liaTR1xwzBOiLL7DSMCK6oYx3LGWUmR0WZiYamJsz/vEYjksvbKeoe79alzK4OPyWWZx7oSixPl90L5yEKLMzCg+JkIzUqKjmZWdjLjAqW59StphgM5hqdbmRwGgrRLlew7ESKzWWv1rT7ny+WuAvcbje+gulSc9Vc/71Mly9nJWRlVR3Hw3XHcNJj8GB6VkdTHtFkMmspbpbJ1BXV1kIEpisoAG4eJNQU04jgFHK7vVNBdDtL5Ls7NQq5//kSSYFWoi2RU0m7vfKHy7qUdbkqoaol8l44zK7uwHTBOgO1pFgXxeF0CayWEnnBMY3BU2OmEInEEcH1yOpZPZxgq9XUFtyWbkr3P18oZorJhf0so8BXC+7puPfgUuz2drv3ogI8FteD1mVgeZjaXq1QdLZrFAKjUSCwprflg5DeaDTy1WZzDcVcM7LR2tZmDU43tXUFl+fn94DD/7w4iikWM6PEZLLPLnl+slMU7frddsU9cGCGVnS0t2s0nTlGchTZKrByrBwmDhdF8Th1TjNlZH1OjXF9B9d3739+uF4zvByHYX4Rk8u3MOyxuTAvnVAoBbfIPLUanCOJ8EPku1ZDr+fabOCZHsxgwEZYPBwmw/v6Y8HZwCsAOK6w7ydwXrZhOO4wHOhyZkrNyODAsHe5OquBOl0um+2+opWvsdRqnNoAxPeTwSdvhaEGq7EkDAwIhZH4kDRQ8aAVX2oHZ72XuFhA4uvBhwPFPDpweu4wnHpEcNhAAoDLezBcTU0NGBI1NSOCI+Nd3ZergB4vJt8HD1wqvinz7qa+yPuUh7s4XDUOh8GDd65hp2IAjW0rKJDgh8TrnIEZzB4nkMf8j4Az3Af3A5sPrqbG4HQaRmg5b4e24V3bhu9h4f+dv8GvJYuM9G0T6vMv5PjGC0CMxIcDGFmg+Yc/hwcDQ0Tto7ZgDGmf8NKlS5gZeGCiGRtvcPgGxUtOM4u1Dsz8I4J7/t3ZzzzzzOLZTz31zFPP4LfR1//817/9zzOz351StEnDjNi28IXz6K1/+1tQUtumc5/ZTYHhQGDPfkeFgryZjW/ER0dZKhW0kUaDWtmzm1k5dawPN5a2Iqfv3Jkz94RMs7pOEXgT87StISEhhFxCyNgpF6QTIVvrL19OnfFaCr6RvPSv6Gn25CMXe0wPKfVvXhEUFPZ8UNhYKWL4PrT3eNb3HxHYqCqmtKEBRXMJWxcVCQyBm3V1nVwQlZ6fPjQEuq3DalWPrszlTCNre1Yb//Mdzn3/Ah9V3jkNMtfYVau+mHljclBFR1FguHPt6wRdVW3SPMwAAgoGNsoqFIuJx2ut7h2fs77/zXxl2WnIC/fFqpkEwqKkpsDrEKYFvZWVF5NSp46RgoKuVn6ddGjz/h37n55De4MOw9GnTl1rjXkxNnv+y0kXAtfnTH/849t73/70zX8aI73//ut/eHPvkm937O9/G5oDxi0Eklh8HXLSqozc25cD1+fWIEirsvQtGIbQ1ob7L7F5XEEnT6awUZTwcTOL+fJSGN6F15jxPW/d0ctoKd8PBoZ7/j0UvabcCXu32UDQqOPR7yAIuovwQfNXyS9DdPz178IpaUjSwEBAuAV/ev31P+x9/Z9eH9YvRlmffrr3U6AZVdLyva17lKfwwgSOGB0N7yLsa8ECwkX19165GHqlshe/mu/KlVEfEJWpEalfRyTdHtRnhuNrGoAt2ws3aTr6clJkYDhRjtlU0ZWemQ/SIyYnf9TVX+K2X7p0oGpoKP7bEPYcuLS0FYVgemP0HjYhvHxIHRBuk8gp6O2qyE9Pj+JEMdNHXZJit+h4wvG+oqrCK7Nv0Gl34bqjkdwZFUOB63PB9b0XIyIi8Ba4MhZ+rvJi0JXKq5VXy02C/d9O9oUCKExrPHo2d0l51uXAA+LmnyZMmPCL5csnjJX2vr535et7X/+jgMy6+rf3foBTrlofVN627iGuBIaUtzbi27vp9EbwFTfayk5rAPEYIWReamq5Y8rWsrTssjJIlRLy6YJ4nYXpCOyEX7pFh+kbb2V4NT1j+ijr6FFahhfu1fCk4MT+m//80vTsOChl7onQ+AqHxSIICBe/YdasBbNm3QTfwLEAPBx93Zx18+bNDVVZxy/3RMUvmPLcc+E3mYxInmKwhWMNXMgxtfXIrG0mDvAk+EV3slEWRyaVWgWFhcyW45erEoLbrNauitSDB60sBfdCe4eAExDuQlG1QqGQV1PGSBqNhuIGKqY22dVEhzPnmIZoNEYFl5RQS4z9hckB4dZpFNVybjWl2ld+220bZYlEIpCy8o0sIsXWhBnImmOkEr4Y33jPcvPF4sBwmN2jpnRQKHe3O45yJKyuTe8CslprgouIRHk7a7AvvS093Wpqu8C9YJebA+9lUjfZh1hNTt3deWS04fK9cF1WkEybS2yd8r4+WX5XenrLkJ6rUKg9gbeo+e9NIo+yvP/gBS+OYQ4LyK3z8B1GNptarRcODAilkYx/LJzaD45XPXI4Dmd4O4YFF4chHGXx+R4XXjXFvC/P4TjIZCOfbySDxzL8p8Bwd7eKeOEsPyOcDL+SmfywQg5ey9FqqaQxEZMpG0hIAC0oBHcJA/ra2j4Zg5GXJ5VKhXquSDQCOO3Yw0kTHh0OT6SB8CqgtxkiR1ec5mYJ8MPg84uBX9GLmUIh1yUSkUgG73/hkkj+kXCRzVclBaI6KpgMXGp1nheuE0waI4MbT3oC9wTuCdwTuCdwT+D+H8L9rwADACN6luUjPP0FAAAAAElFTkSuQmCC</xsl:text>
2052
2036
  </xsl:variable>-->
@@ -2150,7 +2134,7 @@
2150
2134
  <xsl:template match="@*" mode="change_id">
2151
2135
  <xsl:param name="lang"/>
2152
2136
  <xsl:choose>
2153
- <xsl:when test="local-name() = 'id' or local-name() = 'bibitemid' or (local-name() = 'target' and parent::mn:xref)">
2137
+ <xsl:when test="local-name() = 'id' or local-name() = 'bibitemid' or (local-name() = 'target' and parent::mn:fmt-xref)">
2154
2138
  <xsl:attribute name="{local-name()}">
2155
2139
  <xsl:value-of select="."/>_<xsl:value-of select="$lang"/>
2156
2140
  </xsl:attribute>
@@ -2316,10 +2300,6 @@
2316
2300
  <xsl:text>Часть #: </xsl:text>
2317
2301
  </title-part>
2318
2302
  <title-part lang="zh">第 # 部分:</title-part>
2319
-
2320
- <title-subpart lang="en">Sub-part #</title-subpart>
2321
- <title-subpart lang="fr">Partie de sub #</title-subpart>
2322
-
2323
2303
  </xsl:variable>
2324
2304
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2325
2305
 
@@ -2772,7 +2752,8 @@
2772
2752
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
2773
2753
 
2774
2754
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
2775
- <xsl:element name="stem" namespace="{$namespace_full}">
2755
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
2756
+ <xsl:copy>
2776
2757
  <xsl:copy-of select="@*"/>
2777
2758
  <xsl:choose>
2778
2759
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -2796,7 +2777,8 @@
2796
2777
  </xsl:choose>
2797
2778
  </xsl:otherwise>
2798
2779
  </xsl:choose>
2799
- </xsl:element>
2780
+ </xsl:copy>
2781
+ <!-- </xsl:element> -->
2800
2782
  </xsl:template>
2801
2783
 
2802
2784
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -2958,12 +2940,14 @@
2958
2940
  </xsl:template>
2959
2941
 
2960
2942
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
2961
- <xsl:element name="title" namespace="{$namespace_full}">
2943
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
2944
+ <xsl:copy>
2962
2945
  <xsl:copy-of select="@*"/>
2963
2946
  <xsl:call-template name="addNamedDestinationAttribute"/>
2964
2947
 
2965
2948
  <xsl:apply-templates mode="update_xml_step1"/>
2966
- </xsl:element>
2949
+ </xsl:copy>
2950
+ <!-- </xsl:element> -->
2967
2951
  </xsl:template>
2968
2952
 
2969
2953
  <xsl:template name="addNamedDestinationAttribute">
@@ -2975,12 +2959,14 @@
2975
2959
  <xsl:apply-templates mode="update_xml_step1"/>
2976
2960
  </xsl:when>
2977
2961
  <xsl:otherwise>
2978
- <xsl:element name="name" namespace="{$namespace_full}">
2962
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2963
+ <xsl:copy>
2979
2964
  <xsl:copy-of select="@*"/>
2980
2965
  <xsl:call-template name="addNamedDestinationAttribute"/>
2981
2966
 
2982
2967
  <xsl:apply-templates mode="update_xml_step1"/>
2983
- </xsl:element>
2968
+ </xsl:copy>
2969
+ <!-- </xsl:element> -->
2984
2970
  </xsl:otherwise>
2985
2971
  </xsl:choose>
2986
2972
  </xsl:template>
@@ -2995,7 +2981,7 @@
2995
2981
  <xsl:apply-templates mode="update_xml_step1"/>
2996
2982
  </xsl:template>
2997
2983
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
2998
- <xsl:element name="preferred" namespace="{$namespace_full}">
2984
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
2999
2985
  <xsl:copy-of select="@*"/>
3000
2986
  <xsl:apply-templates mode="update_xml_step1"/>
3001
2987
  </xsl:element>
@@ -3005,7 +2991,7 @@
3005
2991
  <xsl:apply-templates mode="update_xml_step1"/>
3006
2992
  </xsl:template>
3007
2993
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
3008
- <xsl:element name="admitted" namespace="{$namespace_full}">
2994
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
3009
2995
  <xsl:copy-of select="@*"/>
3010
2996
  <xsl:apply-templates mode="update_xml_step1"/>
3011
2997
  </xsl:element>
@@ -3015,32 +3001,32 @@
3015
3001
  <xsl:apply-templates mode="update_xml_step1"/>
3016
3002
  </xsl:template>
3017
3003
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
3018
- <xsl:element name="deprecates" namespace="{$namespace_full}">
3004
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
3019
3005
  <xsl:copy-of select="@*"/>
3020
3006
  <xsl:apply-templates mode="update_xml_step1"/>
3021
3007
  </xsl:element>
3022
3008
  </xsl:template>
3023
3009
 
3024
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
3010
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
3025
3011
  <xsl:element name="definition" namespace="{$namespace_full}">
3026
3012
  <xsl:copy-of select="@*"/>
3027
3013
  <xsl:apply-templates mode="update_xml_step1"/>
3028
3014
  </xsl:element>
3029
3015
  </xsl:template>
3030
-
3016
+
3031
3017
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
3032
3018
  <xsl:element name="termsource" namespace="{$namespace_full}">
3033
3019
  <xsl:copy-of select="@*"/>
3034
3020
  <xsl:apply-templates mode="update_xml_step1"/>
3035
3021
  </xsl:element>
3036
3022
  </xsl:template>
3037
-
3023
+
3038
3024
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
3039
3025
  <xsl:element name="source" namespace="{$namespace_full}">
3040
3026
  <xsl:copy-of select="@*"/>
3041
3027
  <xsl:apply-templates mode="update_xml_step1"/>
3042
3028
  </xsl:element>
3043
- </xsl:template>
3029
+ </xsl:template> -->
3044
3030
 
3045
3031
  <xsl:template match="mn:span[ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
3046
3032
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -3063,12 +3049,12 @@
3063
3049
  </xsl:template>
3064
3050
 
3065
3051
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
3066
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
3052
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
3067
3053
  <xsl:element name="identifier" namespace="{$namespace_full}">
3068
3054
  <xsl:copy-of select="@*"/>
3069
3055
  <xsl:apply-templates mode="update_xml_step1"/>
3070
3056
  </xsl:element>
3071
- </xsl:template>
3057
+ </xsl:template> -->
3072
3058
 
3073
3059
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
3074
3060
 
@@ -3078,51 +3064,53 @@
3078
3064
 
3079
3065
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
3080
3066
 
3081
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
3067
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
3082
3068
  <xsl:element name="eref" namespace="{$namespace_full}">
3083
3069
  <xsl:copy-of select="@*"/>
3084
3070
  <xsl:apply-templates mode="update_xml_step1"/>
3085
3071
  </xsl:element>
3086
- </xsl:template>
3072
+ </xsl:template> -->
3087
3073
 
3088
3074
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
3089
3075
 
3090
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
3076
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
3091
3077
  <xsl:element name="xref" namespace="{$namespace_full}">
3092
3078
  <xsl:copy-of select="@*"/>
3093
3079
  <xsl:apply-templates mode="update_xml_step1"/>
3094
3080
  </xsl:element>
3095
- </xsl:template>
3081
+ </xsl:template> -->
3096
3082
 
3097
3083
  <xsl:template match="mn:link" mode="update_xml_step1"/>
3098
3084
 
3099
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
3085
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
3100
3086
  <xsl:element name="link" namespace="{$namespace_full}">
3101
3087
  <xsl:copy-of select="@*"/>
3102
3088
  <xsl:apply-templates mode="update_xml_step1"/>
3103
3089
  </xsl:element>
3104
- </xsl:template>
3090
+ </xsl:template> -->
3105
3091
 
3106
3092
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
3107
3093
 
3108
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
3094
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
3109
3095
  <xsl:element name="origin" namespace="{$namespace_full}">
3110
3096
  <xsl:copy-of select="@*"/>
3111
3097
  <xsl:apply-templates mode="update_xml_step1"/>
3112
3098
  </xsl:element>
3113
- </xsl:template>
3099
+ </xsl:template> -->
3114
3100
 
3115
3101
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
3116
3102
 
3117
3103
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
3118
3104
 
3119
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
3105
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
3120
3106
 
3121
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
3122
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
3123
- <xsl:value-of select="."/>
3124
- </xsl:element>
3125
- </xsl:template>
3107
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
3108
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
3109
+ <xsl:value-of select="."/>
3110
+ </xsl:element>
3111
+ </xsl:template>
3112
+
3113
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
3126
3114
 
3127
3115
  <!-- END: update new Presentation XML -->
3128
3116
 
@@ -3318,7 +3306,7 @@
3318
3306
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
3319
3307
  <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
3320
3308
 
3321
- <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(.,' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
3309
+ <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
3322
3310
 
3323
3311
  <xsl:variable name="parent" select="local-name(..)"/>
3324
3312
 
@@ -3437,7 +3425,7 @@
3437
3425
  </xsl:if>
3438
3426
  </xsl:template>
3439
3427
 
3440
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3428
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3441
3429
  <xsl:copy-of select="."/>
3442
3430
  </xsl:template>
3443
3431
 
@@ -3766,7 +3754,7 @@
3766
3754
  </fo:block>
3767
3755
  </xsl:template> <!-- copyright-statement -->
3768
3756
 
3769
- <xsl:template match="mn:copyright-statement//mn:title">
3757
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
3770
3758
  <!-- process in the template 'title' -->
3771
3759
  <xsl:call-template name="title"/>
3772
3760
  </xsl:template> <!-- copyright-statement//title -->
@@ -3782,7 +3770,7 @@
3782
3770
  </fo:block>
3783
3771
  </xsl:template> <!-- license-statement -->
3784
3772
 
3785
- <xsl:template match="mn:license-statement//mn:title">
3773
+ <xsl:template match="mn:license-statement//mn:fmt-title">
3786
3774
  <!-- process in the template 'title' -->
3787
3775
  <xsl:call-template name="title"/>
3788
3776
  </xsl:template> <!-- license-statement/title -->
@@ -3799,7 +3787,7 @@
3799
3787
  </fo:block>
3800
3788
  </xsl:template> <!-- legal-statement -->
3801
3789
 
3802
- <xsl:template match="mn:legal-statement//mn:title">
3790
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
3803
3791
  <!-- process in the template 'title' -->
3804
3792
  <xsl:call-template name="title"/>
3805
3793
 
@@ -3819,7 +3807,7 @@
3819
3807
  </fo:block>
3820
3808
  </xsl:template> <!-- feedback-statement -->
3821
3809
 
3822
- <xsl:template match="mn:feedback-statement//mn:title">
3810
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
3823
3811
  <xsl:variable name="level">
3824
3812
  <xsl:call-template name="getLevel"/>
3825
3813
  </xsl:variable>
@@ -3850,7 +3838,7 @@
3850
3838
  </xsl:if>
3851
3839
  </xsl:template> <!-- refine_link-style -->
3852
3840
 
3853
- <xsl:template match="mn:link" name="link">
3841
+ <xsl:template match="mn:fmt-link" name="link">
3854
3842
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
3855
3843
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
3856
3844
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -4071,7 +4059,7 @@
4071
4059
  <xsl:value-of select="."/>
4072
4060
  </xsl:attribute>
4073
4061
  </xsl:for-each>
4074
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4062
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4075
4063
  </xsl:when>
4076
4064
 
4077
4065
  <xsl:otherwise>
@@ -4113,11 +4101,11 @@
4113
4101
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4114
4102
  </xsl:if>
4115
4103
 
4116
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
4104
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
4117
4105
  </fo:block>
4118
4106
 
4119
4107
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
4120
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
4108
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
4121
4109
 
4122
4110
  </fo:block-container>
4123
4111
  </fo:block-container>
@@ -4418,7 +4406,7 @@
4418
4406
 
4419
4407
  <!-- end mode="syntax_highlight" -->
4420
4408
 
4421
- <xsl:template match="mn:sourcecode/mn:name">
4409
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
4422
4410
  <xsl:if test="normalize-space() != ''">
4423
4411
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4424
4412
  <xsl:apply-templates/>
@@ -4436,7 +4424,7 @@
4436
4424
  </xsl:choose>
4437
4425
  </xsl:template>
4438
4426
 
4439
- <xsl:template match="mn:annotation">
4427
+ <xsl:template match="mn:callout-annotation">
4440
4428
  <xsl:variable name="annotation-id" select="@id"/>
4441
4429
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
4442
4430
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -4448,7 +4436,7 @@
4448
4436
  </fo:block>
4449
4437
  </xsl:template>
4450
4438
 
4451
- <xsl:template match="mn:annotation/mn:p">
4439
+ <xsl:template match="mn:callout-annotation/mn:p">
4452
4440
  <xsl:param name="callout"/>
4453
4441
  <fo:inline id="{@id}">
4454
4442
  <xsl:call-template name="setNamedDestination"/>
@@ -4601,7 +4589,7 @@
4601
4589
  <xsl:when test="starts-with(., $ace_tag) or self::mn:change-open-tag or self::mn:change-close-tag"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
4602
4590
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
4603
4591
  <xsl:choose>
4604
- <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][self::mn:tab]) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][self::mn:add][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
4592
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (parent::mn:fmt-title and preceding-sibling::node()[1][self::mn:tab]) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][self::mn:add][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
4605
4593
  <xsl:otherwise>
4606
4594
  <xsl:variable name="tag">
4607
4595
  <xsl:call-template name="insertTag">
@@ -5002,12 +4990,12 @@
5002
4990
  <xsl:template match="mn:permission">
5003
4991
  <xsl:call-template name="setNamedDestination"/>
5004
4992
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
5005
- <xsl:apply-templates select="mn:name"/>
5006
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4993
+ <xsl:apply-templates select="mn:fmt-name"/>
4994
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5007
4995
  </fo:block>
5008
4996
  </xsl:template>
5009
4997
 
5010
- <xsl:template match="mn:permission/mn:name">
4998
+ <xsl:template match="mn:permission/mn:fmt-name">
5011
4999
  <xsl:if test="normalize-space() != ''">
5012
5000
  <fo:block xsl:use-attribute-sets="permission-name-style">
5013
5001
  <xsl:apply-templates/>
@@ -5029,15 +5017,15 @@
5029
5017
  <xsl:template match="mn:requirement">
5030
5018
  <xsl:call-template name="setNamedDestination"/>
5031
5019
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
5032
- <xsl:apply-templates select="mn:name"/>
5020
+ <xsl:apply-templates select="mn:fmt-name"/>
5033
5021
  <xsl:apply-templates select="mn:label"/>
5034
5022
  <xsl:apply-templates select="@obligation"/>
5035
5023
  <xsl:apply-templates select="mn:subject"/>
5036
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
5024
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
5037
5025
  </fo:block>
5038
5026
  </xsl:template>
5039
5027
 
5040
- <xsl:template match="mn:requirement/mn:name">
5028
+ <xsl:template match="mn:requirement/mn:fmt-name">
5041
5029
  <xsl:if test="normalize-space() != ''">
5042
5030
 
5043
5031
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -5073,12 +5061,12 @@
5073
5061
  <xsl:template match="mn:recommendation">
5074
5062
  <xsl:call-template name="setNamedDestination"/>
5075
5063
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5076
- <xsl:apply-templates select="mn:name"/>
5077
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5064
+ <xsl:apply-templates select="mn:fmt-name"/>
5065
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5078
5066
  </fo:block>
5079
5067
  </xsl:template>
5080
5068
 
5081
- <xsl:template match="mn:recommendation/mn:name">
5069
+ <xsl:template match="mn:recommendation/mn:fmt-name">
5082
5070
  <xsl:if test="normalize-space() != ''">
5083
5071
 
5084
5072
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -5335,11 +5323,11 @@
5335
5323
 
5336
5324
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
5337
5325
  </xsl:if>
5338
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5326
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5339
5327
  </fo:block>
5340
5328
  </xsl:template>
5341
5329
 
5342
- <xsl:template match="mn:term/mn:name">
5330
+ <xsl:template match="mn:term/mn:fmt-name">
5343
5331
  <xsl:if test="normalize-space() != ''">
5344
5332
  <!-- <xsl:variable name="level">
5345
5333
  <xsl:call-template name="getLevelTermName"/>
@@ -5358,7 +5346,7 @@
5358
5346
  <!-- origin -->
5359
5347
  <!-- modification -->
5360
5348
  <!-- ====== -->
5361
- <xsl:template match="mn:termsource" name="termsource">
5349
+ <xsl:template match="mn:fmt-termsource" name="termsource">
5362
5350
  <fo:block xsl:use-attribute-sets="termsource-style">
5363
5351
 
5364
5352
  <xsl:call-template name="refine_termsource-style"/>
@@ -5397,24 +5385,24 @@
5397
5385
  </fo:block>
5398
5386
  </xsl:template>
5399
5387
 
5400
- <xsl:template match="mn:termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
5388
+ <xsl:template match="mn:fmt-termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
5401
5389
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5402
5390
  </xsl:template>
5403
5391
 
5404
- <xsl:template match="mn:termsource/text()">
5392
+ <xsl:template match="mn:fmt-termsource/text()">
5405
5393
  <xsl:if test="normalize-space() != ''">
5406
5394
  <xsl:value-of select="."/>
5407
5395
  </xsl:if>
5408
5396
  </xsl:template>
5409
5397
 
5410
5398
  <!-- text SOURCE: -->
5411
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
5399
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5412
5400
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
5413
5401
  <xsl:value-of select="."/>
5414
5402
  </fo:inline>
5415
5403
  </xsl:template>
5416
5404
 
5417
- <xsl:template match="mn:origin">
5405
+ <xsl:template match="mn:fmt-origin">
5418
5406
  <xsl:call-template name="insert_basic_link">
5419
5407
  <xsl:with-param name="element">
5420
5408
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -5460,7 +5448,7 @@
5460
5448
  <!-- ====== -->
5461
5449
 
5462
5450
  <!-- Preferred, admitted, deprecated -->
5463
- <xsl:template match="mn:preferred">
5451
+ <xsl:template match="mn:fmt-preferred">
5464
5452
  <xsl:variable name="level">
5465
5453
  <xsl:call-template name="getLevel"/>
5466
5454
  </xsl:variable>
@@ -5470,19 +5458,19 @@
5470
5458
  <xsl:call-template name="getLevelTermName"/>
5471
5459
  </xsl:variable>
5472
5460
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5473
- <xsl:if test="preceding-sibling::*[1][self::mn:preferred]">
5461
+ <xsl:if test="preceding-sibling::*[1][self::mn:fmt-preferred]">
5474
5462
  <xsl:attribute name="space-before">1pt</xsl:attribute>
5475
5463
  </xsl:if>
5476
5464
 
5477
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
5465
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5478
5466
 
5479
5467
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5480
5468
 
5481
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
5469
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5482
5470
  <xsl:call-template name="setIDforNamedDestination"/>
5483
5471
  </xsl:for-each>
5484
5472
 
5485
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
5473
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
5486
5474
  </fo:block>
5487
5475
  </xsl:if>
5488
5476
 
@@ -5506,13 +5494,13 @@
5506
5494
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
5507
5495
  <xsl:template match="mn:domain"/>
5508
5496
 
5509
- <xsl:template match="mn:admitted">
5497
+ <xsl:template match="mn:fmt-admitted">
5510
5498
  <fo:block xsl:use-attribute-sets="admitted-style">
5511
5499
  <xsl:apply-templates/>
5512
5500
  </fo:block>
5513
5501
  </xsl:template>
5514
5502
 
5515
- <xsl:template match="mn:deprecates">
5503
+ <xsl:template match="mn:fmt-deprecates">
5516
5504
  <fo:block xsl:use-attribute-sets="deprecates-style">
5517
5505
  <xsl:apply-templates/>
5518
5506
  </fo:block>
@@ -5526,7 +5514,7 @@
5526
5514
 
5527
5515
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
5528
5516
  <!-- in metanorma xml preferred terms delimited by semicolons -->
5529
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
5517
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
5530
5518
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5531
5519
  </xsl:template>
5532
5520
  <!-- End Preferred, admitted, deprecated -->
@@ -5545,16 +5533,16 @@
5545
5533
  <!-- ========== -->
5546
5534
  <!-- definition -->
5547
5535
  <!-- ========== -->
5548
- <xsl:template match="mn:definition">
5536
+ <xsl:template match="mn:fmt-definition">
5549
5537
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5550
5538
  <xsl:apply-templates/>
5551
5539
  </fo:block>
5552
5540
  </xsl:template>
5553
5541
 
5554
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
5542
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
5555
5543
  <xsl:apply-templates/>
5556
5544
  </xsl:template>
5557
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
5545
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
5558
5546
  <fo:inline> <xsl:apply-templates/></fo:inline>
5559
5547
  <fo:block/>
5560
5548
  </xsl:template>
@@ -5621,12 +5609,12 @@
5621
5609
  <xsl:call-template name="refine_termexample-style"/>
5622
5610
  <xsl:call-template name="setBlockSpanAll"/>
5623
5611
 
5624
- <xsl:apply-templates select="mn:name"/>
5625
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5612
+ <xsl:apply-templates select="mn:fmt-name"/>
5613
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5626
5614
  </fo:block>
5627
5615
  </xsl:template>
5628
5616
 
5629
- <xsl:template match="mn:termexample/mn:name">
5617
+ <xsl:template match="mn:termexample/mn:fmt-name">
5630
5618
  <xsl:if test="normalize-space() != ''">
5631
5619
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5632
5620
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -5677,10 +5665,10 @@
5677
5665
  <xsl:call-template name="refine_example-style"/>
5678
5666
 
5679
5667
  <xsl:variable name="fo_element">
5680
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>
5668
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
5681
5669
  <xsl:choose>
5682
5670
  <!-- if example contains only one (except 'name') element (paragraph for example), then display it on the same line as EXAMPLE title -->
5683
- <xsl:when test="count(*[not(self::mn:name)]) = 1">inline</xsl:when>
5671
+ <xsl:when test="count(*[not(self::mn:fmt-name)]) = 1">inline</xsl:when>
5684
5672
  <xsl:otherwise>block</xsl:otherwise>
5685
5673
  </xsl:choose>
5686
5674
 
@@ -5694,7 +5682,7 @@
5694
5682
 
5695
5683
  <!-- display name 'EXAMPLE' in a separate block -->
5696
5684
  <fo:block>
5697
- <xsl:apply-templates select="mn:name">
5685
+ <xsl:apply-templates select="mn:fmt-name">
5698
5686
  <xsl:with-param name="fo_element" select="$fo_element"/>
5699
5687
  </xsl:apply-templates>
5700
5688
  </fo:block>
@@ -5702,7 +5690,7 @@
5702
5690
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5703
5691
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5704
5692
  <xsl:variable name="example_body">
5705
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5693
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5706
5694
  <xsl:with-param name="fo_element" select="$fo_element"/>
5707
5695
  </xsl:apply-templates>
5708
5696
  </xsl:variable>
@@ -5729,14 +5717,14 @@
5729
5717
  <fo:list-item>
5730
5718
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
5731
5719
  <fo:block>
5732
- <xsl:apply-templates select="mn:name">
5720
+ <xsl:apply-templates select="mn:fmt-name">
5733
5721
  <xsl:with-param name="fo_element">block</xsl:with-param>
5734
5722
  </xsl:apply-templates>
5735
5723
  </fo:block>
5736
5724
  </fo:list-item-label>
5737
5725
  <fo:list-item-body start-indent="body-start()">
5738
5726
  <fo:block>
5739
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5727
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5740
5728
  <xsl:with-param name="fo_element" select="$fo_element"/>
5741
5729
  </xsl:apply-templates>
5742
5730
  </fo:block>
@@ -5749,21 +5737,21 @@
5749
5737
 
5750
5738
  <!-- display 'EXAMPLE' and first element in the same line -->
5751
5739
  <fo:block>
5752
- <xsl:apply-templates select="mn:name">
5740
+ <xsl:apply-templates select="mn:fmt-name">
5753
5741
  <xsl:with-param name="fo_element" select="$fo_element"/>
5754
5742
  </xsl:apply-templates>
5755
5743
  <fo:inline>
5756
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
5744
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
5757
5745
  <xsl:with-param name="fo_element" select="$fo_element"/>
5758
5746
  </xsl:apply-templates>
5759
5747
  </fo:inline>
5760
5748
  </fo:block>
5761
5749
 
5762
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
5750
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
5763
5751
  <!-- display further elements in blocks -->
5764
5752
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5765
5753
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5766
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
5754
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
5767
5755
  <xsl:with-param name="fo_element" select="'block'"/>
5768
5756
  </xsl:apply-templates>
5769
5757
  </fo:block-container>
@@ -5777,7 +5765,7 @@
5777
5765
  </xsl:template>
5778
5766
 
5779
5767
  <!-- example/name -->
5780
- <xsl:template match="mn:example/mn:name">
5768
+ <xsl:template match="mn:example/mn:fmt-name">
5781
5769
  <xsl:param name="fo_element">block</xsl:param>
5782
5770
 
5783
5771
  <xsl:choose>
@@ -5802,7 +5790,7 @@
5802
5790
  </xsl:template>
5803
5791
 
5804
5792
  <!-- table/example/name, table/tfoot//example/name -->
5805
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
5793
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
5806
5794
  <fo:inline xsl:use-attribute-sets="example-name-style">
5807
5795
  <xsl:apply-templates/>
5808
5796
  </fo:inline>
@@ -6107,7 +6095,7 @@
6107
6095
 
6108
6096
  <!-- Display table's name before table as standalone block -->
6109
6097
  <!-- $namespace = 'iso' or -->
6110
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
6098
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
6111
6099
  <xsl:call-template name="table_name_fn_display"/>
6112
6100
 
6113
6101
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -6149,7 +6137,7 @@
6149
6137
 
6150
6138
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
6151
6139
 
6152
- <xsl:for-each select="mn:name">
6140
+ <xsl:for-each select="mn:fmt-name">
6153
6141
  <xsl:call-template name="setIDforNamedDestination"/>
6154
6142
  </xsl:for-each>
6155
6143
 
@@ -6179,6 +6167,10 @@
6179
6167
  <xsl:with-param name="margin-side" select="$margin-side"/>
6180
6168
  </xsl:call-template>
6181
6169
 
6170
+ <xsl:call-template name="setTableStyles">
6171
+ <xsl:with-param name="scope">table</xsl:with-param>
6172
+ </xsl:call-template>
6173
+
6182
6174
  </xsl:element>
6183
6175
  </xsl:variable>
6184
6176
 
@@ -6199,7 +6191,7 @@
6199
6191
  </xsl:attribute>
6200
6192
  </xsl:for-each>
6201
6193
 
6202
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
6194
+ <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[not(parent::mn:fmt-name)] or ./mn:fmt-source"/>
6203
6195
  <xsl:if test="$isNoteOrFnExist = 'true'">
6204
6196
  <!-- <xsl:choose>
6205
6197
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -6255,7 +6247,7 @@
6255
6247
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
6256
6248
  </xsl:when>
6257
6249
  <xsl:otherwise>
6258
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
6250
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
6259
6251
  </xsl:otherwise>
6260
6252
  </xsl:choose>
6261
6253
 
@@ -6356,7 +6348,7 @@
6356
6348
  </xsl:template>
6357
6349
 
6358
6350
  <!-- table/name-->
6359
- <xsl:template match="*[local-name()='table']/mn:name">
6351
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
6360
6352
  <xsl:param name="continued"/>
6361
6353
  <xsl:param name="cols-count"/>
6362
6354
  <xsl:if test="normalize-space() != ''">
@@ -6430,7 +6422,7 @@
6430
6422
  </xsl:template>
6431
6423
 
6432
6424
  <!-- SOURCE: ... -->
6433
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
6425
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
6434
6426
  <xsl:call-template name="termsource"/>
6435
6427
  </xsl:template>
6436
6428
 
@@ -6595,11 +6587,11 @@
6595
6587
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
6596
6588
  </xsl:template>
6597
6589
 
6598
- <xsl:template match="mn:termsource" mode="td_text">
6599
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
6590
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
6591
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
6600
6592
  </xsl:template>
6601
6593
 
6602
- <xsl:template match="mn:link" mode="td_text">
6594
+ <xsl:template match="mn:fmt-link" mode="td_text">
6603
6595
  <xsl:value-of select="@target"/>
6604
6596
  </xsl:template>
6605
6597
 
@@ -6804,12 +6796,12 @@
6804
6796
 
6805
6797
  <xsl:call-template name="refine_table-header-title-style"/>
6806
6798
 
6807
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
6799
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
6808
6800
  <xsl:with-param name="continued">true</xsl:with-param>
6809
6801
  <xsl:with-param name="cols-count" select="$cols-count"/>
6810
6802
  </xsl:apply-templates>
6811
6803
 
6812
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6804
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6813
6805
  <fo:block role="SKIP"/>
6814
6806
  </xsl:if>
6815
6807
 
@@ -6848,7 +6840,7 @@
6848
6840
  <xsl:param name="colwidths"/>
6849
6841
  <xsl:param name="colgroup"/>
6850
6842
 
6851
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[local-name(..) != 'name'] or ../mn:source or ../mn:p"/>
6843
+ <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
6852
6844
 
6853
6845
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6854
6846
  </xsl:variable>
@@ -6889,6 +6881,12 @@
6889
6881
  </xsl:choose>
6890
6882
  </xsl:for-each>
6891
6883
 
6884
+ <xsl:for-each select="ancestor::mn:table[1]">
6885
+ <xsl:call-template name="setTableStyles">
6886
+ <xsl:with-param name="scope">table</xsl:with-param>
6887
+ </xsl:call-template>
6888
+ </xsl:for-each>
6889
+
6892
6890
  <xsl:choose>
6893
6891
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
6894
6892
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -6905,10 +6903,22 @@
6905
6903
 
6906
6904
  <fo:table-body role="SKIP">
6907
6905
  <fo:table-row role="SKIP">
6906
+ <xsl:for-each select="ancestor::mn:table[1]">
6907
+ <xsl:call-template name="setTableStyles">
6908
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6909
+ </xsl:call-template>
6910
+ </xsl:for-each>
6911
+
6908
6912
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
6909
6913
 
6910
6914
  <xsl:call-template name="refine_table-footer-cell-style"/>
6911
6915
 
6916
+ <xsl:for-each select="ancestor::mn:table[1]">
6917
+ <xsl:call-template name="setTableStyles">
6918
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6919
+ </xsl:call-template>
6920
+ </xsl:for-each>
6921
+
6912
6922
  <xsl:call-template name="setBordersTableArray"/>
6913
6923
 
6914
6924
  <!-- fn will be processed inside 'note' processing -->
@@ -6919,7 +6929,7 @@
6919
6929
  <xsl:apply-templates select="../mn:dl"/>
6920
6930
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6921
6931
  <xsl:apply-templates select="../mn:example"/>
6922
- <xsl:apply-templates select="../mn:source"/>
6932
+ <xsl:apply-templates select="../mn:fmt-source"/>
6923
6933
 
6924
6934
  <xsl:variable name="isDisplayRowSeparator">true
6925
6935
  </xsl:variable>
@@ -6969,7 +6979,7 @@
6969
6979
  </xsl:choose>
6970
6980
  </xsl:variable>
6971
6981
  <!-- if there isn't 'thead' and there is a table's title -->
6972
- <xsl:if test="not(ancestor::mn:table/mn:thead) and ancestor::mn:table/mn:name">
6982
+ <xsl:if test="not(ancestor::mn:table/mn:thead) and ancestor::mn:table/mn:fmt-name">
6973
6983
  <fo:table-header>
6974
6984
  <xsl:call-template name="table-header-title">
6975
6985
  <xsl:with-param name="cols-count" select="$cols-count"/>
@@ -6996,7 +7006,7 @@
6996
7006
  <xsl:variable name="title_continued"><xsl:value-of select="$title_continued_in_parenthesis"/>
6997
7007
  </xsl:variable>
6998
7008
 
6999
- <xsl:variable name="title_start" select="ancestor::mn:table[1]/mn:name/node()[1][self::text()]"/>
7009
+ <xsl:variable name="title_start" select="ancestor::mn:table[1]/mn:fmt-name/node()[1][self::text()]"/>
7000
7010
  <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
7001
7011
 
7002
7012
  <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
@@ -7146,7 +7156,12 @@
7146
7156
 
7147
7157
  <xsl:template name="setTableRowAttributes">
7148
7158
 
7149
- <xsl:call-template name="setColors"/>
7159
+ <xsl:for-each select="ancestor::mn:table[1]">
7160
+ <xsl:call-template name="setTableStyles">
7161
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
7162
+ </xsl:call-template>
7163
+ </xsl:for-each>
7164
+ <xsl:call-template name="setTableStyles"/>
7150
7165
 
7151
7166
  </xsl:template> <!-- setTableRowAttributes -->
7152
7167
  <!-- ===================== -->
@@ -7199,7 +7214,13 @@
7199
7214
  </xsl:attribute>
7200
7215
  </xsl:if>
7201
7216
  <xsl:call-template name="display-align"/>
7202
- <xsl:call-template name="setColors"/>
7217
+
7218
+ <xsl:for-each select="ancestor::mn:table[1]">
7219
+ <xsl:call-template name="setTableStyles">
7220
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
7221
+ </xsl:call-template>
7222
+ </xsl:for-each>
7223
+ <xsl:call-template name="setTableStyles"/>
7203
7224
  </xsl:template>
7204
7225
 
7205
7226
  <xsl:template name="display-align">
@@ -7215,7 +7236,8 @@
7215
7236
  </xsl:if>
7216
7237
  </xsl:template>
7217
7238
 
7218
- <xsl:template name="setColors">
7239
+ <xsl:template name="setTableStyles">
7240
+ <xsl:param name="scope">cell</xsl:param>
7219
7241
  <xsl:variable name="styles__">
7220
7242
  <xsl:call-template name="split">
7221
7243
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -7224,19 +7246,35 @@
7224
7246
  </xsl:variable>
7225
7247
  <xsl:variable name="quot">"</xsl:variable>
7226
7248
  <xsl:variable name="styles_">
7249
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
7250
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
7251
+ <style name="border-top">none</style>
7252
+ <style name="border-right">none</style>
7253
+ <style name="border-left">none</style>
7254
+ <style name="border-bottom">none</style>
7255
+ <style name="color">inherit</style>
7256
+ <style name="background-color">transparent</style>
7257
+ </xsl:if>
7258
+
7227
7259
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
7228
7260
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7229
7261
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
7230
- <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
7262
+ <xsl:if test="($key = 'color' and ($scope = 'cell' or $scope = 'table')) or ($key = 'background-color' and ($scope = 'cell' or $scope = 'ancestor_table')) or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
7231
7263
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
7232
7264
  </xsl:if>
7265
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
7266
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
7267
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
7268
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
7269
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
7270
+ </xsl:if>
7233
7271
  </xsl:for-each>
7234
7272
  </xsl:variable>
7235
7273
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
7236
7274
  <xsl:for-each select="$styles/style">
7237
7275
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7238
7276
  </xsl:for-each>
7239
- </xsl:template> <!-- setColors -->
7277
+ </xsl:template> <!-- setTableStyles -->
7240
7278
 
7241
7279
  <!-- cell in table body, footer -->
7242
7280
  <xsl:template match="*[local-name()='td']" name="td">
@@ -7300,11 +7338,11 @@
7300
7338
 
7301
7339
  <xsl:call-template name="refine_table-note-name-style"/>
7302
7340
 
7303
- <xsl:apply-templates select="mn:name"/>
7341
+ <xsl:apply-templates select="mn:fmt-name"/>
7304
7342
 
7305
7343
  </fo:inline>
7306
7344
 
7307
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7345
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7308
7346
  </fo:block>
7309
7347
  </xsl:template> <!-- table/note -->
7310
7348
 
@@ -7443,7 +7481,7 @@
7443
7481
 
7444
7482
  <!-- footnotes for table's name rendering -->
7445
7483
  <xsl:template name="table_name_fn_display">
7446
- <xsl:for-each select="mn:name//mn:fn">
7484
+ <xsl:for-each select="mn:fmt-name//mn:fn">
7447
7485
  <xsl:variable name="reference" select="@reference"/>
7448
7486
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
7449
7487
  <fo:block margin-bottom="12pt">
@@ -8100,7 +8138,7 @@
8100
8138
  </xsl:if> -->
8101
8139
 
8102
8140
  <xsl:variable name="words">
8103
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
8141
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
8104
8142
  <word>
8105
8143
  <xsl:copy-of select="."/>
8106
8144
  </word>
@@ -8159,7 +8197,7 @@
8159
8197
  </xsl:copy>
8160
8198
  </xsl:template>
8161
8199
 
8162
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
8200
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
8163
8201
 
8164
8202
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
8165
8203
  <xsl:variable name="formatting_tags">
@@ -8194,7 +8232,7 @@
8194
8232
  </xsl:call-template>
8195
8233
  </xsl:template>
8196
8234
 
8197
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
8235
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
8198
8236
  <xsl:variable name="link">
8199
8237
  <link_updated>
8200
8238
  <xsl:variable name="target_text">
@@ -8410,7 +8448,7 @@
8410
8448
 
8411
8449
  <xsl:call-template name="refine_multicomponent_block_style"/>
8412
8450
 
8413
- <xsl:apply-templates select="mn:name">
8451
+ <xsl:apply-templates select="mn:fmt-name">
8414
8452
  <xsl:with-param name="process">true</xsl:with-param>
8415
8453
  </xsl:apply-templates>
8416
8454
 
@@ -8595,7 +8633,7 @@
8595
8633
  </xsl:template> <!-- refine_multicomponent_block_style -->
8596
8634
 
8597
8635
  <!-- dl/name -->
8598
- <xsl:template match="mn:dl/mn:name">
8636
+ <xsl:template match="mn:dl/mn:fmt-name">
8599
8637
  <xsl:param name="process">false</xsl:param>
8600
8638
  <xsl:if test="$process = 'true'">
8601
8639
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -9011,12 +9049,12 @@
9011
9049
  <xsl:template match="mn:appendix">
9012
9050
  <xsl:call-template name="setNamedDestination"/>
9013
9051
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
9014
- <xsl:apply-templates select="mn:title"/>
9052
+ <xsl:apply-templates select="mn:fmt-title"/>
9015
9053
  </fo:block>
9016
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
9054
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
9017
9055
  </xsl:template>
9018
9056
 
9019
- <xsl:template match="mn:appendix/mn:title" priority="2">
9057
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
9020
9058
  <xsl:variable name="level">
9021
9059
  <xsl:call-template name="getLevel"/>
9022
9060
  </xsl:variable>
@@ -9029,15 +9067,15 @@
9029
9067
  <xsl:template match="mn:appendix//mn:example" priority="2">
9030
9068
  <xsl:call-template name="setNamedDestination"/>
9031
9069
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
9032
- <xsl:apply-templates select="mn:name"/>
9070
+ <xsl:apply-templates select="mn:fmt-name"/>
9033
9071
  </fo:block>
9034
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
9072
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9035
9073
  </xsl:template>
9036
9074
 
9037
9075
  <xsl:attribute-set name="xref-style">
9038
9076
  </xsl:attribute-set>
9039
9077
 
9040
- <xsl:template match="mn:xref">
9078
+ <xsl:template match="mn:fmt-xref">
9041
9079
  <xsl:call-template name="insert_basic_link">
9042
9080
  <xsl:with-param name="element">
9043
9081
  <xsl:variable name="alt_text">
@@ -9057,7 +9095,7 @@
9057
9095
  </xsl:template> <!-- xref -->
9058
9096
 
9059
9097
  <!-- command between two xref points to non-standard bibitem -->
9060
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']]]"><xsl:value-of select="."/>
9098
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
9061
9099
  </xsl:template>
9062
9100
 
9063
9101
  <xsl:attribute-set name="eref-style">
@@ -9088,7 +9126,7 @@
9088
9126
  <!-- ====== -->
9089
9127
  <!-- eref -->
9090
9128
  <!-- ====== -->
9091
- <xsl:template match="mn:eref" name="eref">
9129
+ <xsl:template match="mn:fmt-eref" name="eref">
9092
9130
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
9093
9131
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
9094
9132
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -9212,7 +9250,10 @@
9212
9250
 
9213
9251
  <xsl:call-template name="setNamedDestination"/>
9214
9252
 
9215
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9253
+ <fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
9254
+ <xsl:if test="not(parent::mn:references)">
9255
+ <xsl:copy-of select="@id"/>
9256
+ </xsl:if>
9216
9257
 
9217
9258
  <xsl:call-template name="setBlockSpanAll"/>
9218
9259
 
@@ -9225,28 +9266,28 @@
9225
9266
 
9226
9267
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9227
9268
 
9228
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
9269
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
9229
9270
 
9230
9271
  <xsl:call-template name="refine_note-name-style"/>
9231
9272
 
9232
9273
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9233
9274
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9234
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9275
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9235
9276
  <xsl:call-template name="append_add-style"/>
9236
9277
  </xsl:if>
9237
9278
 
9238
9279
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9239
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
9240
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9280
+ <xsl:if test="count(*[not(self::mn:fmt-name)]) = 1 and *[not(self::mn:fmt-name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
9281
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9241
9282
  <xsl:with-param name="skip">false</xsl:with-param>
9242
9283
  </xsl:apply-templates>
9243
9284
  </xsl:if>
9244
9285
 
9245
- <xsl:apply-templates select="mn:name"/>
9286
+ <xsl:apply-templates select="mn:fmt-name"/>
9246
9287
 
9247
9288
  </fo:inline>
9248
9289
 
9249
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9290
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9250
9291
  </fo:block>
9251
9292
  </fo:block-container>
9252
9293
  </fo:block-container>
@@ -9285,19 +9326,19 @@
9285
9326
 
9286
9327
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9287
9328
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9288
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9329
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9289
9330
  <xsl:call-template name="append_add-style"/>
9290
9331
  </xsl:if>
9291
9332
 
9292
- <xsl:apply-templates select="mn:name"/>
9333
+ <xsl:apply-templates select="mn:fmt-name"/>
9293
9334
 
9294
9335
  </fo:inline>
9295
9336
 
9296
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9337
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9297
9338
  </fo:block>
9298
9339
  </xsl:template>
9299
9340
 
9300
- <xsl:template match="mn:note/mn:name">
9341
+ <xsl:template match="mn:note/mn:fmt-name">
9301
9342
  <xsl:param name="sfx"/>
9302
9343
  <xsl:variable name="suffix">
9303
9344
  <xsl:choose>
@@ -9324,7 +9365,7 @@
9324
9365
  </xsl:if>
9325
9366
  </xsl:template>
9326
9367
 
9327
- <xsl:template match="mn:termnote/mn:name">
9368
+ <xsl:template match="mn:termnote/mn:fmt-name">
9328
9369
  <xsl:param name="sfx"/>
9329
9370
  <xsl:variable name="suffix">
9330
9371
  <xsl:choose>
@@ -9409,15 +9450,15 @@
9409
9450
 
9410
9451
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9411
9452
  <fo:block role="BlockQuote">
9412
- <xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
9453
+ <xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:fmt-source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
9413
9454
  </fo:block>
9414
9455
  </fo:block-container>
9415
9456
  </fo:block-container>
9416
- <xsl:if test="mn:author or mn:source or mn:attribution">
9457
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
9417
9458
  <fo:block xsl:use-attribute-sets="quote-source-style">
9418
9459
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9419
9460
  <xsl:apply-templates select="mn:author"/>
9420
- <xsl:apply-templates select="mn:source"/>
9461
+ <xsl:apply-templates select="mn:fmt-source"/>
9421
9462
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
9422
9463
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
9423
9464
  </fo:block>
@@ -9427,17 +9468,32 @@
9427
9468
  </fo:block-container>
9428
9469
  </xsl:template>
9429
9470
 
9430
- <xsl:template match="mn:source">
9471
+ <xsl:template match="mn:fmt-source">
9431
9472
  <xsl:if test="../mn:author">
9432
9473
  <xsl:text>, </xsl:text>
9433
9474
  </xsl:if>
9434
- <xsl:call-template name="insert_basic_link">
9435
- <xsl:with-param name="element">
9436
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9437
- <xsl:apply-templates/>
9438
- </fo:basic-link>
9439
- </xsl:with-param>
9440
- </xsl:call-template>
9475
+ <xsl:choose>
9476
+ <xsl:when test="not(parent::quote)">
9477
+ <fo:block>
9478
+ <xsl:call-template name="insert_basic_link">
9479
+ <xsl:with-param name="element">
9480
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9481
+ <xsl:apply-templates/>
9482
+ </fo:basic-link>
9483
+ </xsl:with-param>
9484
+ </xsl:call-template>
9485
+ </fo:block>
9486
+ </xsl:when>
9487
+ <xsl:otherwise>
9488
+ <xsl:call-template name="insert_basic_link">
9489
+ <xsl:with-param name="element">
9490
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9491
+ <xsl:apply-templates/>
9492
+ </fo:basic-link>
9493
+ </xsl:with-param>
9494
+ </xsl:call-template>
9495
+ </xsl:otherwise>
9496
+ </xsl:choose>
9441
9497
  </xsl:template>
9442
9498
 
9443
9499
  <xsl:template match="mn:author">
@@ -9517,7 +9573,7 @@
9517
9573
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
9518
9574
  <xsl:choose>
9519
9575
  <!-- skip figure/name/fn -->
9520
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9576
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9521
9577
  <xsl:otherwise>
9522
9578
  <xsl:element name="figure" namespace="{$namespace_full}">
9523
9579
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -9716,17 +9772,17 @@
9716
9772
 
9717
9773
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9718
9774
 
9719
- <xsl:for-each select="mn:name"> <!-- set context -->
9775
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
9720
9776
  <xsl:call-template name="setIDforNamedDestination"/>
9721
9777
  </xsl:for-each>
9722
9778
 
9723
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
9779
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
9724
9780
  </fo:block>
9725
9781
 
9726
9782
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9727
9783
  <xsl:call-template name="showFigureKey"/>
9728
9784
  </xsl:if>
9729
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
9785
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9730
9786
 
9731
9787
  </fo:block-container>
9732
9788
  </xsl:template>
@@ -9752,9 +9808,9 @@
9752
9808
  <xsl:template match="mn:figure[@class = 'pseudocode']">
9753
9809
  <xsl:call-template name="setNamedDestination"/>
9754
9810
  <fo:block id="{@id}">
9755
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9811
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9756
9812
  </fo:block>
9757
- <xsl:apply-templates select="mn:name"/>
9813
+ <xsl:apply-templates select="mn:fmt-name"/>
9758
9814
  </xsl:template>
9759
9815
 
9760
9816
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -9765,7 +9821,7 @@
9765
9821
 
9766
9822
  <!-- SOURCE: ... -->
9767
9823
  <!-- figure/source -->
9768
- <xsl:template match="mn:figure/mn:source" priority="2">
9824
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
9769
9825
  <fo:block xsl:use-attribute-sets="figure-source-style">
9770
9826
  <xsl:apply-templates/>
9771
9827
  </fo:block>
@@ -9778,7 +9834,7 @@
9778
9834
  <xsl:variable name="isAdded" select="../@added"/>
9779
9835
  <xsl:variable name="isDeleted" select="../@deleted"/>
9780
9836
  <xsl:choose>
9781
- <xsl:when test="ancestor::mn:title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
9837
+ <xsl:when test="ancestor::mn:fmt-title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
9782
9838
  <fo:inline padding-left="1mm" padding-right="1mm">
9783
9839
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
9784
9840
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -9799,13 +9855,26 @@
9799
9855
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
9800
9856
 
9801
9857
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
9802
- <xsl:attribute name="width">100%</xsl:attribute>
9858
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9859
+ <xsl:choose>
9860
+ <xsl:when test="@width and not(@height)">
9861
+ <xsl:attribute name="width">100%</xsl:attribute>
9862
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9863
+ </xsl:when>
9864
+ <xsl:when test="@height and not(@width)">
9865
+ <xsl:attribute name="height">100%</xsl:attribute>
9866
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
9867
+ </xsl:when>
9868
+ <xsl:when test="not(@width) and not(@height)">
9869
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9870
+ </xsl:when>
9871
+ </xsl:choose>
9872
+
9803
9873
  <xsl:if test="normalize-space($logo_width) != ''">
9804
9874
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
9805
9875
  </xsl:if>
9806
- <xsl:attribute name="content-height">100%</xsl:attribute>
9807
9876
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9808
- <xsl:attribute name="scaling">uniform</xsl:attribute>
9877
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
9809
9878
  </xsl:if>
9810
9879
 
9811
9880
  <xsl:variable name="width">
@@ -10094,7 +10163,7 @@
10094
10163
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
10095
10164
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
10096
10165
 
10097
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
10166
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
10098
10167
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
10099
10168
  <xsl:param name="name"/>
10100
10169
 
@@ -10104,8 +10173,8 @@
10104
10173
 
10105
10174
  <xsl:variable name="alt-text">
10106
10175
  <xsl:choose>
10107
- <xsl:when test="normalize-space(../mn:name) != ''">
10108
- <xsl:value-of select="../mn:name"/>
10176
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
10177
+ <xsl:value-of select="../mn:fmt-name"/>
10109
10178
  </xsl:when>
10110
10179
  <xsl:when test="normalize-space($name) != ''">
10111
10180
  <xsl:value-of select="$name"/>
@@ -10114,7 +10183,7 @@
10114
10183
  </xsl:choose>
10115
10184
  </xsl:variable>
10116
10185
 
10117
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
10186
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
10118
10187
 
10119
10188
  <xsl:choose>
10120
10189
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -10163,9 +10232,9 @@
10163
10232
  <fo:table-cell column-number="2">
10164
10233
  <fo:block>
10165
10234
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
10166
- <xsl:if test="../mn:name/mn:bookmark">
10235
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
10167
10236
  <fo:block line-height="0" font-size="0">
10168
- <xsl:for-each select="../mn:name/mn:bookmark">
10237
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
10169
10238
  <xsl:call-template name="bookmark"/>
10170
10239
  </xsl:for-each>
10171
10240
  </fo:block>
@@ -10405,7 +10474,7 @@
10405
10474
 
10406
10475
  <!-- image with svg and emf -->
10407
10476
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
10408
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10477
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10409
10478
  <xsl:for-each select="*[local-name() = 'svg']">
10410
10479
  <xsl:call-template name="image_svg">
10411
10480
  <xsl:with-param name="name" select="$name"/>
@@ -10422,7 +10491,7 @@
10422
10491
 
10423
10492
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
10424
10493
  <xsl:variable name="svg_content" select="document(@src)"/>
10425
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10494
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10426
10495
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
10427
10496
  <xsl:call-template name="image_svg">
10428
10497
  <xsl:with-param name="name" select="$name"/>
@@ -10545,7 +10614,7 @@
10545
10614
  <xsl:template match="mn:emf"/>
10546
10615
 
10547
10616
  <!-- figure/name -->
10548
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
10617
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
10549
10618
  <xsl:if test="normalize-space() != ''">
10550
10619
  <fo:block xsl:use-attribute-sets="figure-name-style">
10551
10620
 
@@ -10619,25 +10688,25 @@
10619
10688
  <fo:block-container margin-left="0mm" role="SKIP">
10620
10689
  <xsl:call-template name="setNamedDestination"/>
10621
10690
  <fo:block id="{@id}">
10622
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
10691
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
10623
10692
  </fo:block>
10624
10693
  </fo:block-container>
10625
10694
  </fo:block-container>
10626
10695
  </xsl:template>
10627
10696
 
10628
- <xsl:template match="mn:formula/mn:dt/mn:stem">
10697
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
10629
10698
  <fo:inline>
10630
10699
  <xsl:apply-templates/>
10631
10700
  </fo:inline>
10632
10701
  </xsl:template>
10633
10702
 
10634
- <xsl:template match="mn:admitted/mn:stem">
10703
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
10635
10704
  <fo:inline>
10636
10705
  <xsl:apply-templates/>
10637
10706
  </fo:inline>
10638
10707
  </xsl:template>
10639
10708
 
10640
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
10709
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
10641
10710
  <!-- https://github.com/metanorma/isodoc/issues/607
10642
10711
  <xsl:if test="normalize-space() != ''">
10643
10712
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -10646,7 +10715,7 @@
10646
10715
  </xsl:template>
10647
10716
 
10648
10717
  <!-- stem inside formula with name (with formula's number) -->
10649
- <xsl:template match="mn:formula[mn:name]/mn:stem">
10718
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
10650
10719
  <fo:block xsl:use-attribute-sets="formula-style">
10651
10720
 
10652
10721
  <fo:table table-layout="fixed" width="100%">
@@ -10666,13 +10735,13 @@
10666
10735
 
10667
10736
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
10668
10737
 
10669
- <xsl:for-each select="../mn:name">
10738
+ <xsl:for-each select="../mn:fmt-name">
10670
10739
  <xsl:call-template name="setIDforNamedDestination"/>
10671
10740
  </xsl:for-each>
10672
10741
 
10673
10742
  <xsl:call-template name="refine_formula-stem-number-style"/>
10674
10743
 
10675
- <xsl:apply-templates select="../mn:name"/>
10744
+ <xsl:apply-templates select="../mn:fmt-name"/>
10676
10745
  </fo:block>
10677
10746
  </fo:table-cell>
10678
10747
  </fo:table-row>
@@ -10682,7 +10751,7 @@
10682
10751
  </xsl:template>
10683
10752
 
10684
10753
  <!-- stem inside formula without name (without formula's number) -->
10685
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
10754
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
10686
10755
  <fo:block xsl:use-attribute-sets="formula-style">
10687
10756
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
10688
10757
  <xsl:apply-templates/>
@@ -11036,7 +11105,7 @@
11036
11105
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
11037
11106
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
11038
11107
  -->
11039
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
11108
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
11040
11109
  <fo:inline xsl:use-attribute-sets="mathml-style">
11041
11110
 
11042
11111
  <xsl:call-template name="refine_mathml-style"/>
@@ -11305,7 +11374,7 @@
11305
11374
 
11306
11375
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
11307
11376
 
11308
- <xsl:apply-templates select="mn:name">
11377
+ <xsl:apply-templates select="mn:fmt-name">
11309
11378
  <xsl:with-param name="process">true</xsl:with-param>
11310
11379
  </xsl:apply-templates>
11311
11380
 
@@ -11351,7 +11420,7 @@
11351
11420
 
11352
11421
  <xsl:call-template name="refine_list-style"/>
11353
11422
 
11354
- <xsl:if test="mn:name">
11423
+ <xsl:if test="mn:fmt-name">
11355
11424
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
11356
11425
  </xsl:if>
11357
11426
 
@@ -11369,7 +11438,7 @@
11369
11438
  </xsl:if>
11370
11439
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11371
11440
 
11372
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
11441
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
11373
11442
  <xsl:param name="process">false</xsl:param>
11374
11443
  <xsl:if test="$process = 'true'">
11375
11444
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -11500,7 +11569,7 @@
11500
11569
  -->
11501
11570
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
11502
11571
  <!-- fn in text -->
11503
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
11572
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
11504
11573
  <xsl:param name="footnote_body_from_table">false</xsl:param>
11505
11574
 
11506
11575
  <!-- list of unique footnotes -->
@@ -11624,7 +11693,7 @@
11624
11693
  <!-- commented:
11625
11694
  .//mn:bibitem[ancestor::mn:references]/mn:note |
11626
11695
  because 'fn' there is in biblio-tag -->
11627
- <xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
11696
+ <xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
11628
11697
  <!-- copy unique fn -->
11629
11698
  <fn gen_id="{generate-id(.)}">
11630
11699
  <xsl:copy-of select="@*"/>
@@ -11701,7 +11770,7 @@
11701
11770
  <!-- <xsl:with-param name="sep"> – </xsl:with-param>
11702
11771
  </xsl:call-template> -->
11703
11772
  </fo:inline>
11704
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
11773
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
11705
11774
  </fo:block>
11706
11775
 
11707
11776
  </fo:block-container>
@@ -11727,7 +11796,7 @@
11727
11796
  </xsl:otherwise>
11728
11797
  </xsl:choose> -->
11729
11798
  <xsl:variable name="name">
11730
- <xsl:apply-templates select="mn:name"/>
11799
+ <xsl:apply-templates select="mn:fmt-name"/>
11731
11800
  </xsl:variable>
11732
11801
  <xsl:copy-of select="$name"/>
11733
11802
  <xsl:if test="normalize-space($name) != ''">
@@ -11735,7 +11804,7 @@
11735
11804
  </xsl:if>
11736
11805
  </xsl:template>
11737
11806
 
11738
- <xsl:template match="mn:admonition/mn:name">
11807
+ <xsl:template match="mn:admonition/mn:fmt-name">
11739
11808
  <xsl:apply-templates/>
11740
11809
  </xsl:template>
11741
11810
 
@@ -11864,10 +11933,10 @@
11864
11933
  <xsl:call-template name="setNamedDestination"/>
11865
11934
  <fo:block id="{@id}"/>
11866
11935
 
11867
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
11936
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
11868
11937
 
11869
11938
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
11870
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
11939
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
11871
11940
  </fo:block>
11872
11941
  <!-- horizontal line -->
11873
11942
  <fo:block-container text-align="center" margin-top="10mm">
@@ -11890,8 +11959,8 @@
11890
11959
  </xsl:template> <!-- bibitem -->
11891
11960
 
11892
11961
  <!-- Bibliography (non-normative references) -->
11893
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
11894
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11962
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
11963
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11895
11964
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11896
11965
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11897
11966
  <xsl:call-template name="setNamedDestination"/>
@@ -11943,7 +12012,7 @@
11943
12012
  </fo:list-item>
11944
12013
  </xsl:otherwise>
11945
12014
  </xsl:choose>
11946
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
12015
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
11947
12016
  <xsl:with-param name="skip">false</xsl:with-param>
11948
12017
  </xsl:apply-templates>
11949
12018
  </xsl:template>
@@ -11960,8 +12029,26 @@
11960
12029
  </xsl:apply-templates>
11961
12030
  <xsl:apply-templates select="mn:formattedref"/>
11962
12031
  <!-- end bibitem processing -->
12032
+
12033
+ <xsl:call-template name="processBibliographyNote"/>
11963
12034
  </xsl:template> <!-- processBibitem (bibitem) -->
11964
12035
 
12036
+ <xsl:template name="processBibliographyNote">
12037
+ <xsl:if test="self::mn:note">
12038
+ <xsl:variable name="note_node">
12039
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
12040
+ <xsl:copy> <!-- skip @id -->
12041
+ <xsl:copy-of select="node()"/>
12042
+ </xsl:copy>
12043
+ </xsl:element>
12044
+ </xsl:variable>
12045
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
12046
+ <xsl:call-template name="note"/>
12047
+ </xsl:for-each> -->
12048
+ <xsl:call-template name="note"/>
12049
+ </xsl:if>
12050
+ </xsl:template>
12051
+
11965
12052
  <xsl:template match="mn:title" mode="title">
11966
12053
  <fo:inline><xsl:apply-templates/></fo:inline>
11967
12054
  </xsl:template>
@@ -12193,7 +12280,8 @@
12193
12280
  </xsl:copy>
12194
12281
  </xsl:template>
12195
12282
 
12196
- <xsl:template match="mn:xref" mode="index_add_id">
12283
+ <xsl:template match="mn:xref" mode="index_add_id"/>
12284
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
12197
12285
  <xsl:param name="docid"/>
12198
12286
  <xsl:variable name="id">
12199
12287
  <xsl:call-template name="generateIndexXrefId">
@@ -12235,7 +12323,7 @@
12235
12323
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
12236
12324
  <xsl:copy>
12237
12325
  <xsl:apply-templates select="@*" mode="index_update"/>
12238
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
12326
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12239
12327
  </xsl:copy>
12240
12328
  </xsl:template>
12241
12329
 
@@ -12256,11 +12344,11 @@
12256
12344
  <xsl:value-of select="."/>
12257
12345
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
12258
12346
  </xsl:when>
12259
- <xsl:when test="self::* and local-name(.) = 'xref'">
12347
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
12260
12348
  <xsl:variable name="id" select="@id"/>
12261
12349
 
12262
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
12263
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
12350
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
12351
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
12264
12352
 
12265
12353
  <xsl:variable name="pages_">
12266
12354
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -12356,18 +12444,18 @@
12356
12444
  <xsl:variable name="item_number">
12357
12445
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
12358
12446
  </xsl:variable>
12359
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
12447
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
12360
12448
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
12361
12449
  </xsl:template>
12362
12450
 
12363
- <xsl:template match="mn:indexsect/mn:title" priority="4">
12451
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
12364
12452
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
12365
12453
  <!-- Index -->
12366
12454
  <xsl:apply-templates/>
12367
12455
  </fo:block>
12368
12456
  </xsl:template>
12369
12457
 
12370
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
12458
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
12371
12459
  <!-- Letter A, B, C, ... -->
12372
12460
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
12373
12461
  <xsl:apply-templates/>
@@ -12408,12 +12496,12 @@
12408
12496
  <fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
12409
12497
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
12410
12498
  <fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
12411
- <xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-review-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-review-end][@source = $bookmark_id]">
12499
+ <xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]">
12412
12500
  <!-- skip here, see the template 'fmt-review-start' -->
12413
12501
  </xsl:when>
12414
12502
  <xsl:otherwise>
12415
12503
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12416
- <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-review-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-review-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
12504
+ <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
12417
12505
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12418
12506
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12419
12507
  </xsl:otherwise>
@@ -12512,6 +12600,89 @@
12512
12600
  <!-- End Form's elements processing -->
12513
12601
  <!-- =================== -->
12514
12602
 
12603
+ <xsl:attribute-set name="toc-style">
12604
+ </xsl:attribute-set>
12605
+
12606
+ <xsl:template name="refine_toc-style">
12607
+ </xsl:template>
12608
+
12609
+ <xsl:attribute-set name="toc-title-style">
12610
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
12611
+ <xsl:attribute name="text-align">center</xsl:attribute>
12612
+ <xsl:attribute name="margin-bottom">22pt</xsl:attribute>
12613
+ </xsl:attribute-set>
12614
+
12615
+ <xsl:attribute-set name="toc-title-page-style">
12616
+ </xsl:attribute-set> <!-- toc-title-page-style -->
12617
+
12618
+ <xsl:attribute-set name="toc-item-block-style">
12619
+ </xsl:attribute-set>
12620
+
12621
+ <xsl:template name="refine_toc-item-block-style">
12622
+ </xsl:template>
12623
+
12624
+ <xsl:attribute-set name="toc-item-style">
12625
+ <xsl:attribute name="role">TOCI</xsl:attribute>
12626
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12627
+ </xsl:attribute-set> <!-- END: toc-item-style -->
12628
+
12629
+ <xsl:template name="refine_toc-item-style">
12630
+ <xsl:if test="@level = 1">
12631
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
12632
+ </xsl:if>
12633
+ <xsl:if test="@level = 2">
12634
+ <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
12635
+ </xsl:if>
12636
+ <xsl:if test="@level &gt;= 3">
12637
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
12638
+ </xsl:if>
12639
+ <xsl:if test="@type = 'indexsect'">
12640
+ <xsl:attribute name="space-before">16pt</xsl:attribute>
12641
+ </xsl:if>
12642
+ <xsl:if test="@type = 'references'">
12643
+ <xsl:attribute name="space-before">5pt</xsl:attribute>
12644
+ </xsl:if>
12645
+ <xsl:attribute name="margin-left">
12646
+ <xsl:choose>
12647
+ <xsl:when test="mnx:title/@variant-title = 'true'">0mm</xsl:when>
12648
+ <xsl:when test="@level = 2">8mm</xsl:when>
12649
+ <xsl:when test="@level &gt;= 3"><xsl:value-of select="(@level - 2) * 23"/>mm</xsl:when>
12650
+ <xsl:otherwise>0mm</xsl:otherwise>
12651
+ </xsl:choose>
12652
+ </xsl:attribute>
12653
+ <xsl:attribute name="provisional-distance-between-starts">
12654
+ <xsl:choose>
12655
+ <xsl:when test="@section = ''">0mm</xsl:when>
12656
+ <xsl:when test="@level = 1">8mm</xsl:when>
12657
+ <xsl:when test="@level = 2">15mm</xsl:when>
12658
+ <xsl:when test="@level &gt;= 3"><xsl:value-of select="(@level - 2) * 19"/>mm</xsl:when>
12659
+ <xsl:otherwise>0mm</xsl:otherwise>
12660
+ </xsl:choose>
12661
+ </xsl:attribute>
12662
+ </xsl:template> <!-- END: refine_toc-item-style -->
12663
+
12664
+ <xsl:attribute-set name="toc-leader-style">
12665
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
12666
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
12667
+
12668
+ <xsl:attribute-set name="toc-pagenumber-style">
12669
+ </xsl:attribute-set>
12670
+
12671
+ <!-- List of Figures, Tables -->
12672
+ <xsl:attribute-set name="toc-listof-title-style">
12673
+ </xsl:attribute-set>
12674
+
12675
+ <xsl:attribute-set name="toc-listof-item-block-style">
12676
+ </xsl:attribute-set>
12677
+
12678
+ <xsl:attribute-set name="toc-listof-item-style">
12679
+ <xsl:attribute name="role">TOCI</xsl:attribute>
12680
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
12681
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
12682
+ <xsl:attribute name="margin-left">8mm</xsl:attribute>
12683
+ <xsl:attribute name="text-indent">-8mm</xsl:attribute>
12684
+ </xsl:attribute-set>
12685
+
12515
12686
  <xsl:template name="processPrefaceSectionsDefault_Contents">
12516
12687
  <xsl:variable name="nodes_preface_">
12517
12688
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -12577,7 +12748,7 @@
12577
12748
 
12578
12749
  <xsl:template name="processTables_Contents">
12579
12750
  <mnx:tables>
12580
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
12751
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
12581
12752
  <xsl:choose>
12582
12753
  <xsl:when test="mn:fmt-name">
12583
12754
  <xsl:variable name="fmt_name">
@@ -12599,7 +12770,7 @@
12599
12770
 
12600
12771
  <xsl:template name="processFigures_Contents">
12601
12772
  <mnx:figures>
12602
- <xsl:for-each select="//mn:figure[@id and mn:name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
12773
+ <xsl:for-each select="//mn:figure[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
12603
12774
  <xsl:choose>
12604
12775
  <xsl:when test="mn:fmt-name">
12605
12776
  <xsl:variable name="fmt_name">
@@ -12628,7 +12799,7 @@
12628
12799
 
12629
12800
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12630
12801
 
12631
- <xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name | mn:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name" mode="contents">
12802
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
12632
12803
  <xsl:apply-templates mode="contents"/>
12633
12804
  <xsl:text> </xsl:text>
12634
12805
  </xsl:template>
@@ -12640,7 +12811,7 @@
12640
12811
  </xsl:if>
12641
12812
  </xsl:template>
12642
12813
 
12643
- <xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name | mn:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name" mode="bookmarks">
12814
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
12644
12815
  <xsl:apply-templates mode="bookmarks"/>
12645
12816
  <xsl:text> </xsl:text>
12646
12817
  </xsl:template>
@@ -12651,7 +12822,7 @@
12651
12822
  </xsl:if>
12652
12823
  </xsl:template>
12653
12824
 
12654
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
12825
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
12655
12826
  <xsl:value-of select="."/>
12656
12827
  </xsl:template>
12657
12828
 
@@ -12661,7 +12832,7 @@
12661
12832
  </xsl:if>
12662
12833
  </xsl:template>
12663
12834
 
12664
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
12835
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
12665
12836
  <xsl:value-of select="."/>
12666
12837
  </xsl:template>
12667
12838
 
@@ -13131,7 +13302,7 @@
13131
13302
  <xsl:value-of select="."/>
13132
13303
  </xsl:template>
13133
13304
 
13134
- <xsl:template match="mn:review" mode="contents_item"/>
13305
+ <xsl:template match="mn:annotation" mode="contents_item"/>
13135
13306
 
13136
13307
  <xsl:template match="mn:tab" mode="contents_item">
13137
13308
  <xsl:text> </xsl:text>
@@ -13286,7 +13457,7 @@
13286
13457
  <xsl:apply-templates/>
13287
13458
  </xsl:template>
13288
13459
 
13289
- <xsl:template match="mn:toc//mn:xref" priority="3">
13460
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
13290
13461
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13291
13462
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13292
13463
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -13354,8 +13525,8 @@
13354
13525
  <xsl:apply-templates mode="toc_table_width"/>
13355
13526
  </xsl:template>
13356
13527
 
13357
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
13358
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
13528
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
13529
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
13359
13530
 
13360
13531
  <xsl:template match="mn:li" mode="toc_table_width">
13361
13532
  <mn:tr>
@@ -13363,7 +13534,7 @@
13363
13534
  </mn:tr>
13364
13535
  </xsl:template>
13365
13536
 
13366
- <xsl:template match="mn:xref" mode="toc_table_width">
13537
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
13367
13538
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13368
13539
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13369
13540
  <xsl:for-each select="mn:tab">
@@ -13443,10 +13614,10 @@
13443
13614
 
13444
13615
  </xsl:template> <!-- tab -->
13445
13616
 
13446
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
13447
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
13617
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
13618
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
13448
13619
 
13449
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
13620
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
13450
13621
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
13451
13622
  </xsl:template>
13452
13623
 
@@ -13461,13 +13632,13 @@
13461
13632
  </xsl:template>
13462
13633
 
13463
13634
  <xsl:variable name="reviews_">
13464
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
13635
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
13465
13636
  <xsl:copy>
13466
13637
  <xsl:copy-of select="@from"/>
13467
13638
  <xsl:copy-of select="@id"/>
13468
13639
  </xsl:copy>
13469
13640
  </xsl:for-each>
13470
- <xsl:for-each select="//mn:fmt-review-start[@source]">
13641
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
13471
13642
  <xsl:copy>
13472
13643
  <xsl:copy-of select="@source"/>
13473
13644
  <xsl:copy-of select="@id"/>
@@ -13481,7 +13652,7 @@
13481
13652
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
13482
13653
  <xsl:variable name="curr_id" select="@id"/>
13483
13654
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
13484
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13655
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13485
13656
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
13486
13657
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
13487
13658
  <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
@@ -13496,7 +13667,7 @@
13496
13667
 
13497
13668
  <!-- document text (not figures, or tables) footnotes -->
13498
13669
  <xsl:variable name="reviews_container_">
13499
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
13670
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
13500
13671
  <xsl:variable name="update_xml_step1">
13501
13672
  <xsl:apply-templates select="." mode="update_xml_step1"/>
13502
13673
  </xsl:variable>
@@ -13505,10 +13676,10 @@
13505
13676
  </xsl:variable>
13506
13677
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
13507
13678
 
13508
- <xsl:template match="mn:review-container"/>
13679
+ <xsl:template match="mn:annotation-container"/>
13509
13680
 
13510
13681
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
13511
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13682
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13512
13683
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
13513
13684
  <xsl:if test="$isGenerateTableIF = 'false'">
13514
13685
  <xsl:choose>
@@ -13528,7 +13699,7 @@
13528
13699
  </xsl:template>
13529
13700
 
13530
13701
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
13531
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13702
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13532
13703
  <!-- comment 2019-11-29 -->
13533
13704
  <!-- <fo:block font-weight="bold">Review:</fo:block>
13534
13705
  <xsl:apply-templates /> -->
@@ -13584,7 +13755,7 @@
13584
13755
  </xsl:template>
13585
13756
 
13586
13757
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
13587
- <xsl:template match="mn:review[@type = 'other']"/>
13758
+ <xsl:template match="mn:annotation[@type = 'other']"/>
13588
13759
 
13589
13760
  <!-- ============ -->
13590
13761
  <!-- errata -->
@@ -13977,9 +14148,12 @@
13977
14148
  <xsl:choose>
13978
14149
  <xsl:when test="mn:fmt-title">
13979
14150
  <xsl:variable name="fmt_title_section">
13980
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
14151
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
13981
14152
  </xsl:variable>
13982
14153
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
14154
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
14155
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
14156
+ </xsl:if>
13983
14157
  </xsl:when>
13984
14158
  <xsl:otherwise>
13985
14159
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -13992,6 +14166,9 @@
13992
14166
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
13993
14167
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
13994
14168
  </xsl:when>
14169
+ <xsl:when test="mn:fmt-title/mn:tab">
14170
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
14171
+ </xsl:when>
13995
14172
  <xsl:when test="mn:fmt-title">
13996
14173
  <xsl:copy-of select="mn:fmt-title/node()"/>
13997
14174
  </xsl:when>
@@ -14129,10 +14306,10 @@
14129
14306
 
14130
14307
  </fo:block>
14131
14308
 
14132
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
14309
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
14133
14310
 
14134
14311
  <fo:block>
14135
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
14312
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
14136
14313
  </fo:block>
14137
14314
  </xsl:otherwise>
14138
14315
  </xsl:choose>
@@ -14141,7 +14318,7 @@
14141
14318
  <xsl:template name="refine_annex_style">
14142
14319
  </xsl:template>
14143
14320
 
14144
- <xsl:template match="mn:name/text()">
14321
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
14145
14322
  <!-- 0xA0 to space replacement -->
14146
14323
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
14147
14324
  </xsl:template>
@@ -14197,28 +14374,28 @@
14197
14374
  <xsl:template match="mn:amend"/>
14198
14375
 
14199
14376
  <!-- fmt-title renamed to title in update_xml_step1 -->
14200
- <xsl:template match="mn:fmt-title"/>
14377
+ <!-- <xsl:template match="mn:fmt-title" /> -->
14201
14378
 
14202
14379
  <!-- fmt-name renamed to name in update_xml_step1 -->
14203
- <xsl:template match="mn:fmt-name"/>
14380
+ <!-- <xsl:template match="mn:fmt-name" /> -->
14204
14381
 
14205
14382
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
14206
- <xsl:template match="mn:fmt-preferred"/>
14383
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
14207
14384
 
14208
14385
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
14209
- <xsl:template match="mn:fmt-admitted"/>
14386
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
14210
14387
 
14211
14388
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
14212
- <xsl:template match="mn:fmt-deprecates"/>
14389
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
14213
14390
 
14214
14391
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
14215
- <xsl:template match="mn:fmt-definition"/>
14392
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
14216
14393
 
14217
14394
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
14218
- <xsl:template match="mn:fmt-termsource"/>
14395
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
14219
14396
 
14220
14397
  <!-- fmt-source renamed to source in update_xml_step1 -->
14221
- <xsl:template match="mn:fmt-source"/>
14398
+ <!-- <xsl:template match="mn:fmt-source" /> -->
14222
14399
 
14223
14400
  <xsl:template match="mn:semx">
14224
14401
  <xsl:apply-templates/>
@@ -14687,12 +14864,12 @@
14687
14864
  <xsl:when test="ancestor::mn:preface">
14688
14865
  <xsl:value-of select="$level_total - 2"/>
14689
14866
  </xsl:when>
14690
- <xsl:when test="ancestor::mn:sections and self::mn:title">
14867
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
14691
14868
  <!-- determine 'depth' depends on upper clause with title/@depth -->
14692
14869
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
14693
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
14870
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
14694
14871
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
14695
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
14872
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
14696
14873
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
14697
14874
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
14698
14875
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -14708,8 +14885,8 @@
14708
14885
  </xsl:otherwise>
14709
14886
  </xsl:choose>
14710
14887
  </xsl:when>
14711
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
14712
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
14888
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
14889
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
14713
14890
  <xsl:choose>
14714
14891
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
14715
14892
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -14720,7 +14897,7 @@
14720
14897
  </xsl:choose>
14721
14898
  </xsl:when>
14722
14899
  <xsl:when test="ancestor::mn:sections">
14723
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
14900
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
14724
14901
  <xsl:choose>
14725
14902
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14726
14903
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14736,8 +14913,8 @@
14736
14913
  <xsl:when test="parent::mn:annex">
14737
14914
  <xsl:value-of select="$level_total - 1"/>
14738
14915
  </xsl:when>
14739
- <xsl:when test="ancestor::mn:annex and self::mn:title">
14740
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
14916
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
14917
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
14741
14918
  <xsl:choose>
14742
14919
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14743
14920
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14770,7 +14947,7 @@
14770
14947
  </xsl:when>
14771
14948
  <xsl:otherwise>
14772
14949
  <xsl:variable name="title_level_">
14773
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
14950
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
14774
14951
  <xsl:call-template name="getLevel"/>
14775
14952
  </xsl:for-each>
14776
14953
  </xsl:variable>
@@ -14847,15 +15024,17 @@
14847
15024
  </xsl:template>
14848
15025
 
14849
15026
  <xsl:template name="setNamedDestination">
14850
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14851
- <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
14852
- <fox:destination internal-destination="{@id}"/>
14853
- </xsl:if>
14854
- <xsl:for-each select=". | mn:title | mn:name">
14855
- <xsl:if test="@named_dest">
14856
- <fox:destination internal-destination="{@named_dest}"/>
15027
+ <xsl:if test="$isGenerateTableIF = 'false'">
15028
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15029
+ <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
15030
+ <fox:destination internal-destination="{@id}"/>
14857
15031
  </xsl:if>
14858
- </xsl:for-each>
15032
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
15033
+ <xsl:if test="@named_dest">
15034
+ <fox:destination internal-destination="{@named_dest}"/>
15035
+ </xsl:if>
15036
+ </xsl:for-each>
15037
+ </xsl:if>
14859
15038
  </xsl:template>
14860
15039
 
14861
15040
  <xsl:template name="add-letter-spacing">
@@ -15203,7 +15382,7 @@
15203
15382
  </xsl:when>
15204
15383
  <xsl:otherwise>
15205
15384
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
15206
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15385
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15207
15386
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
15208
15387
  </xsl:if>
15209
15388
  <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
@@ -15237,7 +15416,7 @@
15237
15416
  </fo:block>
15238
15417
  </fo:block-container>
15239
15418
  </fo:inline-container>
15240
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
15419
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
15241
15420
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
15242
15421
  </xsl:if>
15243
15422
  </xsl:otherwise>