metanorma-iec 2.5.12 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java xalan" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:iec="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java xalan" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -15,27 +15,27 @@
15
15
  <xsl:variable name="debug">false</xsl:variable>
16
16
 
17
17
  <xsl:variable name="SDO">
18
- <xsl:for-each select="(//iec:iec-standard)[1]/iec:bibdata/iec:copyright/iec:owner/iec:organization/iec:abbreviation">
18
+ <xsl:for-each select="(//iec:metanorma)[1]/iec:bibdata/iec:copyright/iec:owner/iec:organization/iec:abbreviation">
19
19
  <xsl:value-of select="."/><xsl:if test="position() != last()">/</xsl:if>
20
20
  </xsl:for-each>
21
21
  </xsl:variable>
22
22
 
23
23
  <xsl:variable name="copyrightSDO">
24
24
  <xsl:text> </xsl:text>
25
- <xsl:variable name="value" select="concat('© ', $SDO, ' ', //iec:iec-standard/iec:bibdata/iec:copyright/iec:from)"/>
25
+ <xsl:variable name="value" select="concat('© ', $SDO, ' ', //iec:metanorma/iec:bibdata/iec:copyright/iec:from)"/>
26
26
  <fo:inline keep-together.within-line="always"><xsl:value-of select="$value"/></fo:inline>
27
27
  </xsl:variable>
28
28
 
29
- <xsl:variable name="ISOname" select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso' or @type='ISO']"/>
29
+ <xsl:variable name="ISOname" select="//iec:metanorma/iec:bibdata/iec:docidentifier[@type='iso' or @type='ISO']"/>
30
30
 
31
- <xsl:variable name="part" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number/@part"/>
31
+ <xsl:variable name="part" select="//iec:metanorma/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number/@part"/>
32
32
 
33
- <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:doctype[@language = $lang]))"/>
33
+ <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:ext/iec:doctype[@language = $lang]))"/>
34
34
 
35
- <xsl:variable name="stage" select="number(//iec:iec-standard/iec:bibdata/iec:status/iec:stage)"/>
36
- <xsl:variable name="substage" select="number(//iec:iec-standard/iec:bibdata/iec:status/iec:substage)"/>
37
- <xsl:variable name="stagename" select="normalize-space(//iec:iec-standard/iec:bibdata/iec:ext/iec:stagename)"/>
38
- <xsl:variable name="abbreviation" select="normalize-space(//iec:iec-standard/iec:bibdata/iec:status/iec:stage/@abbreviation)"/>
35
+ <xsl:variable name="stage" select="number(//iec:metanorma/iec:bibdata/iec:status/iec:stage)"/>
36
+ <xsl:variable name="substage" select="number(//iec:metanorma/iec:bibdata/iec:status/iec:substage)"/>
37
+ <xsl:variable name="stagename" select="normalize-space(//iec:metanorma/iec:bibdata/iec:ext/iec:stagename)"/>
38
+ <xsl:variable name="abbreviation" select="normalize-space(//iec:metanorma/iec:bibdata/iec:status/iec:stage/@abbreviation)"/>
39
39
 
40
40
  <xsl:variable name="stage-abbreviation">
41
41
  <xsl:choose>
@@ -81,7 +81,7 @@
81
81
  -->
82
82
  <xsl:variable name="contents_">
83
83
 
84
- <xsl:for-each select="//iec:iec-standard">
84
+ <xsl:for-each select="//iec:metanorma">
85
85
  <xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
86
86
  <xsl:variable name="current_document">
87
87
  <xsl:copy-of select="."/>
@@ -113,7 +113,7 @@
113
113
  <xsl:variable name="color_blue">rgb(0, 90, 162)</xsl:variable>
114
114
  <xsl:variable name="color_gray">rgb(157, 158, 160)</xsl:variable>
115
115
 
116
- <xsl:variable name="isIEV" select="normalize-space((//iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-main'] = 'International Electrotechnical Vocabulary') and 1 = 1)"/>
116
+ <xsl:variable name="isIEV" select="normalize-space((//iec:metanorma/iec:bibdata/iec:title[@language = 'en' and @type = 'title-main'] = 'International Electrotechnical Vocabulary') and 1 = 1)"/>
117
117
 
118
118
  <xsl:template match="/">
119
119
  <xsl:call-template name="namespaceCheck"/>
@@ -235,7 +235,7 @@
235
235
  <fo:static-content flow-name="left-region">
236
236
  <fo:block-container reference-orientation="90">
237
237
  <fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
238
- <xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-revdate']"/>
238
+ <xsl:value-of select="(//iec:metanorma)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-revdate']"/>
239
239
  </fo:block>
240
240
  </fo:block-container>
241
241
  </fo:static-content>
@@ -270,7 +270,7 @@
270
270
  <fo:block margin-bottom="3pt">THIS PUBLICATION IS COPYRIGHT PROTECTED</fo:block>
271
271
  <fo:block margin-bottom="10pt">
272
272
  <!-- Example: Copyright © 2014 IEC, Geneva, Switzerland -->
273
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-year')]"/>
273
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-year')]"/>
274
274
  </fo:block>
275
275
  </fo:table-cell>
276
276
  </fo:table-row>
@@ -283,7 +283,7 @@
283
283
  either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
284
284
  copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
285
285
  your local IEC member National Committee for further information. -->
286
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
286
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
287
287
  </fo:block>
288
288
  <!-- Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
289
289
  ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
@@ -291,10 +291,10 @@
291
291
  questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
292
292
  les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence. -->
293
293
  <fo:block margin-bottom="8pt" text-align="justify">
294
- <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
294
+ <xsl:apply-templates select="(//iec:metanorma)[2]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-message')]"/>
295
295
  </fo:block>
296
296
 
297
- <xsl:variable name="telpos" select="count((//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
297
+ <xsl:variable name="telpos" select="count((//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
298
298
  <fo:table table-layout="fixed" width="100%">
299
299
  <fo:table-column column-width="59mm"/>
300
300
  <fo:table-column column-width="90mm"/>
@@ -306,13 +306,13 @@
306
306
  3, rue de Varembé
307
307
  CH-1211 Geneva 20
308
308
  Switzerland -->
309
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-name')]" mode="coverpage"/>
309
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-name')]" mode="coverpage"/>
310
310
  <xsl:choose>
311
311
  <xsl:when test="$telpos != 0">
312
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &lt; $telpos]" mode="coverpage"/>
312
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &lt; $telpos]" mode="coverpage"/>
313
313
  </xsl:when>
314
314
  <xsl:otherwise>
315
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
315
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
316
316
  </xsl:otherwise>
317
317
  </xsl:choose>
318
318
  </fo:block>
@@ -325,7 +325,7 @@
325
325
  www.iec.ch -->
326
326
  <xsl:choose>
327
327
  <xsl:when test="$telpos != 0">
328
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &gt; $telpos]" mode="coverpage"/>
328
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &gt; $telpos]" mode="coverpage"/>
329
329
  </xsl:when>
330
330
  <xsl:otherwise> </xsl:otherwise>
331
331
  </xsl:choose>
@@ -341,7 +341,7 @@
341
341
  </fo:block-container>
342
342
  </fo:block>
343
343
 
344
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement"/> <!-- //iec:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
344
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:feedback-statement"/> <!-- //iec:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
345
345
  <fo:block span="all" border-bottom="0.5pt solid black"/>
346
346
  <!-- About the IEC
347
347
  The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
@@ -351,15 +351,15 @@
351
351
  latest edition, a corrigenda or an amendment might have been published.
352
352
  ...
353
353
  -->
354
- <xsl:if test="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement">
355
- <xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement"/>
354
+ <xsl:if test="(//iec:metanorma)[2]/iec:boilerplate/iec:feedback-statement">
355
+ <xsl:apply-templates select="(//iec:metanorma)[2]/iec:boilerplate/iec:feedback-statement"/>
356
356
  <fo:block span="all"/>
357
357
  </xsl:if>
358
358
 
359
359
  </fo:flow>
360
360
  </fo:page-sequence> <!-- END: 2nd Cover Page -->
361
361
  </xsl:if>
362
- <xsl:variable name="lang_second" select="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']"/>
362
+ <xsl:variable name="lang_second" select="(//iec:metanorma)[2]/iec:bibdata/iec:language[@current = 'true']"/>
363
363
  <!-- For 'Published' documents insert 3rd Cover Page
364
364
  OR insert first Cover Page for FDIS -->
365
365
  <xsl:if test="$stage &gt;= 60 or $stage-abbreviation = 'FDIS'">
@@ -399,7 +399,7 @@
399
399
  </xsl:if>
400
400
  </fo:block-container>
401
401
 
402
- <xsl:variable name="price_code_value" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:price-code"/>
402
+ <xsl:variable name="price_code_value" select="//iec:metanorma/iec:bibdata/iec:ext/iec:price-code"/>
403
403
  <fo:table table-layout="fixed" width="102%" margin-top="-9mm" margin-bottom="2mm" id="__internal_layout__price_code">
404
404
  <fo:table-column column-width="148mm"/>
405
405
  <fo:table-column column-width="16mm"/>
@@ -441,7 +441,7 @@
441
441
  </fo:table-body>
442
442
  </fo:table>
443
443
  <fo:block font-size="8pt" text-align-last="justify">
444
- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:ext/iec:ics">
444
+ <xsl:for-each select="//iec:metanorma/iec:bibdata/iec:ext/iec:ics">
445
445
  <xsl:if test="position() = 1">ICS </xsl:if>
446
446
  <xsl:value-of select="iec:code"/>
447
447
  <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
@@ -449,10 +449,10 @@
449
449
  <xsl:text> </xsl:text>
450
450
  <fo:inline keep-together.within-line="always"><fo:leader leader-pattern="space"/>
451
451
  <xsl:text> </xsl:text>
452
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']">
452
+ <xsl:if test="//iec:metanorma/iec:bibdata/iec:docidentifier[@type='ISBN']">
453
453
  <!-- Example: ISBN 978-2-8322-1532-6 -->
454
454
  <xsl:text>ISBN </xsl:text>
455
- <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='ISBN']"/>
455
+ <xsl:value-of select="//iec:metanorma/iec:bibdata/iec:docidentifier[@type='ISBN']"/>
456
456
  </xsl:if>
457
457
  </fo:inline>
458
458
  </fo:block>
@@ -460,16 +460,16 @@
460
460
  <fo:block-container margin-left="0mm">
461
461
  <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">
462
462
  <fo:block margin-left="1mm">Warning! Make sure that you obtained this publication from an authorized distributor.</fo:block>
463
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
463
+ <xsl:if test="//iec:metanorma/iec:bibdata/iec:title[@language = 'fr']">
464
464
  <fo:block margin-left="1mm" margin-top="3pt">Attention! Veuillez vous assurer que vous avez obtenu cette publication via un distributeur agréé.</fo:block>
465
465
  </xsl:if>
466
466
  </fo:block-container>
467
467
  </fo:block-container>
468
468
  </fo:block-container>
469
469
  <fo:block font-size="6pt" margin-top="6mm" margin-left="1mm">
470
- <xsl:if test="count((//iec:iec-standard)[1]/iec:bibdata/iec:copyright) = 1">
470
+ <xsl:if test="count((//iec:metanorma)[1]/iec:bibdata/iec:copyright) = 1">
471
471
  <fo:block>® Registered trademark of the International Electrotechnical Commission</fo:block>
472
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
472
+ <xsl:if test="//iec:metanorma/iec:bibdata/iec:title[@language = 'fr']">
473
473
  <fo:block margin-left="2mm">Marque déposée de la Commission Electrotechnique Internationale</fo:block>
474
474
  </xsl:if>
475
475
  </xsl:if>
@@ -487,7 +487,7 @@
487
487
  <fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
488
488
  <fo:block font-size="8pt" margin-bottom="6pt">
489
489
 
490
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[not(@id)]"/>
490
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[not(@id)]"/>
491
491
 
492
492
  </fo:block>
493
493
  </fo:block-container>
@@ -502,7 +502,7 @@
502
502
  </xsl:if>
503
503
  <fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
504
504
  <!-- Ex: 34D/1511/FDIS -->
505
- <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso-tc']"/>
505
+ <xsl:value-of select="//iec:metanorma/iec:bibdata/iec:docidentifier[@type='iso-tc']"/>
506
506
  <xsl:text> </xsl:text>
507
507
  </fo:inline>
508
508
  </fo:block>
@@ -528,7 +528,7 @@
528
528
  </fo:block>
529
529
  <fo:block font-size="9pt" font-weight="bold">
530
530
  <xsl:call-template name="addLetterSpacing">
531
- <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number"/></xsl:with-param>
531
+ <xsl:with-param name="text"><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number"/></xsl:with-param>
532
532
  </xsl:call-template>
533
533
  </fo:block>
534
534
  </fo:table-cell>
@@ -542,7 +542,7 @@
542
542
  </fo:block>
543
543
  <fo:block font-size="9pt" font-weight="bold">
544
544
  <xsl:call-template name="addLetterSpacing">
545
- <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type ='circulated']/iec:on"/></xsl:with-param>
545
+ <xsl:with-param name="text"><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:date[@type ='circulated']/iec:on"/></xsl:with-param>
546
546
  </xsl:call-template>
547
547
  </fo:block>
548
548
  </fo:table-cell>
@@ -555,7 +555,7 @@
555
555
  <fo:block font-size="9pt" font-weight="bold">
556
556
  <xsl:call-template name="addLetterSpacing">
557
557
  <!-- 2019-12-06 -->
558
- <xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='vote-ended']/iec:on"/></xsl:with-param>
558
+ <xsl:with-param name="text"><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:date[@type='vote-ended']/iec:on"/></xsl:with-param>
559
559
  </xsl:call-template>
560
560
  </fo:block>
561
561
  </fo:table-cell>
@@ -569,8 +569,8 @@
569
569
  </fo:block>
570
570
  <fo:block font-size="9pt" font-weight="bold">
571
571
  <xsl:variable name="supersedes_documents">
572
- <!-- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber"> -->
573
- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='obsoletes']/iec:bibitem/iec:docidentifier">
572
+ <!-- <xsl:for-each select="//iec:metanorma/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber"> -->
573
+ <xsl:for-each select="//iec:metanorma/iec:bibdata/iec:relation[@type='obsoletes']/iec:bibitem/iec:docidentifier">
574
574
  <xsl:value-of select="."/>
575
575
  <xsl:if test="position() != last()">,</xsl:if>
576
576
  </xsl:for-each>
@@ -599,19 +599,19 @@
599
599
  <!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
600
600
  else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
601
601
  <xsl:choose>
602
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
602
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
603
603
  <fo:block font-size="6.5pt">
604
- <fo:inline font-size="8pt">IEC SC <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee/@number"/> : </fo:inline>
604
+ <fo:inline font-size="8pt">IEC SC <xsl:value-of select="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee/@number"/> : </fo:inline>
605
605
  <xsl:call-template name="addLetterSpacingSmallCaps">
606
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
606
+ <xsl:with-param name="text" select="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
607
607
  </xsl:call-template>
608
608
  </fo:block>
609
609
  </xsl:when>
610
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
610
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
611
611
  <fo:block font-size="6.5pt">
612
- <fo:inline font-size="8pt">IEC TC <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee/@number"/> : </fo:inline>
612
+ <fo:inline font-size="8pt">IEC TC <xsl:value-of select="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee/@number"/> : </fo:inline>
613
613
  <xsl:call-template name="addLetterSpacingSmallCaps">
614
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
614
+ <xsl:with-param name="text" select="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
615
615
  </xsl:call-template>
616
616
  </fo:block>
617
617
  </xsl:when>
@@ -628,7 +628,7 @@
628
628
  </fo:block>
629
629
  <fo:block font-size="9pt">
630
630
  <xsl:call-template name="addLetterSpacing">
631
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:secretariat"/>
631
+ <xsl:with-param name="text" select="//iec:metanorma/iec:bibdata/iec:ext/iec:editorialgroup/iec:secretariat"/>
632
632
  </xsl:call-template>
633
633
  </fo:block>
634
634
  </fo:table-cell>
@@ -641,7 +641,7 @@
641
641
  <fo:block font-size="9pt">
642
642
  <!-- Example: Ms Shanti Conn -->
643
643
  <xsl:call-template name="addLetterSpacing">
644
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:secretary"/>
644
+ <xsl:with-param name="text" select="//iec:metanorma/iec:bibdata/iec:ext/iec:secretary"/>
645
645
  </xsl:call-template>
646
646
  </fo:block>
647
647
  </fo:table-cell>
@@ -658,7 +658,7 @@
658
658
  </fo:block>
659
659
  <fo:block font-size="9pt">
660
660
  <xsl:call-template name="addLetterSpacing">
661
- <xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:interest-to-committees"/>
661
+ <xsl:with-param name="text" select="//iec:metanorma/iec:bibdata/iec:ext/iec:interest-to-committees"/>
662
662
  </xsl:call-template>
663
663
  </fo:block>
664
664
  </fo:table-cell>
@@ -678,7 +678,7 @@
678
678
  </fo:block>
679
679
  <fo:block>
680
680
  <xsl:choose>
681
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
681
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:horizontal = 'true'">
682
682
  <xsl:call-template name="insertCheckBoxOn"/>
683
683
  </xsl:when>
684
684
  <xsl:otherwise>
@@ -713,7 +713,7 @@
713
713
  <!-- function: { emc | safety | environment | quality-assurance } -->
714
714
  <fo:block font-size="6.5pt">
715
715
  <xsl:choose>
716
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'emc'">
716
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:function = 'emc'">
717
717
  <xsl:call-template name="insertCheckBoxOn"/>
718
718
  </xsl:when>
719
719
  <xsl:otherwise>
@@ -725,7 +725,7 @@
725
725
  </xsl:call-template>
726
726
  <fo:inline padding-right="33mm"> </fo:inline>
727
727
  <xsl:choose>
728
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'environment'">
728
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:function = 'environment'">
729
729
  <xsl:call-template name="insertCheckBoxOn"/>
730
730
  </xsl:when>
731
731
  <xsl:otherwise>
@@ -741,7 +741,7 @@
741
741
  <fo:block font-size="6.5pt" margin-bottom="6pt"> </fo:block>
742
742
  <fo:block font-size="6.5pt">
743
743
  <xsl:choose>
744
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'quality-assurance'">
744
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:function = 'quality-assurance'">
745
745
  <xsl:call-template name="insertCheckBoxOn"/>
746
746
  </xsl:when>
747
747
  <xsl:otherwise>
@@ -753,7 +753,7 @@
753
753
  </xsl:call-template>
754
754
  <fo:inline padding-right="13mm"> </fo:inline>
755
755
  <xsl:choose>
756
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:function = 'safety'">
756
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:function = 'safety'">
757
757
  <xsl:call-template name="insertCheckBoxOn"/>
758
758
  </xsl:when>
759
759
  <xsl:otherwise>
@@ -774,7 +774,7 @@
774
774
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
775
775
  <fo:block font-size="6.5pt" margin-bottom="12pt">
776
776
  <xsl:choose>
777
- <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
777
+ <xsl:when test="/iec:metanorma/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
778
778
  <xsl:call-template name="insertCheckBoxOn"/>
779
779
  </xsl:when>
780
780
  <xsl:otherwise>
@@ -786,13 +786,13 @@
786
786
  </xsl:call-template>
787
787
  </fo:block>
788
788
 
789
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']"/>
789
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']"/>
790
790
 
791
791
  </fo:table-cell>
792
792
  <fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
793
793
  <fo:block font-size="6.5pt" margin-bottom="6pt">
794
794
  <xsl:choose>
795
- <xsl:when test="/iec:iec-standard/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
795
+ <xsl:when test="/iec:metanorma/iec:bibdata/iec:ext/iec:cen-processing = 'true'">
796
796
  <xsl:call-template name="insertCheckBoxOff"/>
797
797
  </xsl:when>
798
798
  <xsl:otherwise>
@@ -813,7 +813,7 @@
813
813
 
814
814
  <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">
815
815
  <fo:block>
816
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:license-statement" mode="cover-page-internal"/>
816
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:license-statement" mode="cover-page-internal"/>
817
817
  </fo:block>
818
818
  </fo:block-container>
819
819
 
@@ -831,7 +831,7 @@
831
831
  </fo:block>
832
832
  <fo:block font-size="9pt" font-weight="bold">
833
833
  <xsl:call-template name="addLetterSpacing">
834
- <xsl:with-param name="text"><xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:title[@language = $lang and @type = 'main']"/></xsl:with-param>
834
+ <xsl:with-param name="text"><xsl:value-of select="(//iec:metanorma)[1]/iec:bibdata/iec:title[@language = $lang and @type = 'main']"/></xsl:with-param>
835
835
  </xsl:call-template>
836
836
  </fo:block>
837
837
  </fo:block-container>
@@ -849,7 +849,7 @@
849
849
  </xsl:with-param>
850
850
  </xsl:call-template>
851
851
  <!-- 2023 -->
852
- <fo:inline font-size="9pt"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='unchanged']/iec:on"/></fo:inline>
852
+ <fo:inline font-size="9pt"><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:date[@type='unchanged']/iec:on"/></fo:inline>
853
853
  </fo:block>
854
854
  </fo:block-container>
855
855
  </xsl:if>
@@ -867,20 +867,20 @@
867
867
  </xsl:call-template>
868
868
  </fo:block>
869
869
  <!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
870
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:tc-sc-officers-note"/>
870
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:bibdata/iec:ext/iec:tc-sc-officers-note"/>
871
871
  </fo:block-container>
872
872
 
873
873
  </fo:flow>
874
874
  </fo:page-sequence> <!-- END: cover-FDIS -->
875
875
  </xsl:if>
876
876
 
877
- <xsl:for-each select="//iec:iec-standard">
877
+ <xsl:for-each select="//iec:metanorma">
878
878
  <xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
879
879
  <xsl:variable name="current_document">
880
880
  <xsl:copy-of select="."/>
881
881
  </xsl:variable>
882
882
 
883
- <xsl:variable name="num"><xsl:number count="iec:iec-standard" level="any"/></xsl:variable>
883
+ <xsl:variable name="num"><xsl:number count="iec:metanorma" level="any"/></xsl:variable>
884
884
 
885
885
  <xsl:variable name="updated_xml">
886
886
  <xsl:for-each select="xalan:nodeset($current_document)">
@@ -929,7 +929,7 @@
929
929
  <fo:block font-size="11pt" color="{$color_blue}" margin-bottom="12pt" line-height="150%">
930
930
  <fo:block-container width="42mm">
931
931
  <fo:block>
932
- <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:contributor[iec:role/@type = 'publisher']/iec:organization/iec:name))"/>
932
+ <xsl:variable name="publisher" select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:contributor[iec:role/@type = 'publisher']/iec:organization/iec:name))"/>
933
933
  <xsl:value-of select="$publisher"/>
934
934
  </fo:block>
935
935
  </fo:block-container>
@@ -945,16 +945,16 @@
945
945
  Fax: + 41 22 919 03 00
946
946
  info@iec.ch
947
947
  www.iec.ch -->
948
- <xsl:variable name="telpos" select="count((//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
948
+ <xsl:variable name="telpos" select="count((//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/text()[contains(., 'Tel.')]/preceding-sibling::node())"/>
949
949
  <xsl:choose>
950
950
  <xsl:when test="$telpos != 0">
951
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &lt;= $telpos]" mode="coverpage"/>
952
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &gt;= $telpos]" mode="coverpage">
951
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &lt;= $telpos]" mode="coverpage"/>
952
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]/node()[position() &gt;= $telpos]" mode="coverpage">
953
953
  <xsl:with-param name="lastpage">true</xsl:with-param>
954
954
  </xsl:apply-templates>
955
955
  </xsl:when>
956
956
  <xsl:otherwise>
957
- <xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
957
+ <xsl:apply-templates select="(//iec:metanorma)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[contains(@id, 'boilerplate-address')]" mode="coverpage"/>
958
958
  </xsl:otherwise>
959
959
  </xsl:choose>
960
960
  </fo:block>
@@ -963,6 +963,16 @@
963
963
  </fo:flow>
964
964
  </fo:page-sequence>
965
965
  </xsl:if>
966
+
967
+ <!-- namespace document doesn't equal to xslt namespace -->
968
+ <xsl:if test="not(//iec:metanorma)">
969
+ <fo:page-sequence master-reference="blank-page">
970
+ <fo:flow flow-name="xsl-region-body">
971
+ <fo:block> </fo:block>
972
+ </fo:flow>
973
+ </fo:page-sequence>
974
+ </xsl:if>
975
+
966
976
  </fo:root>
967
977
  <!-- </xsl:variable> -->
968
978
 
@@ -981,11 +991,11 @@
981
991
  <xsl:template name="insertCoverPart1">
982
992
  <xsl:variable name="lang_second">
983
993
  <xsl:choose>
984
- <xsl:when test="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']">
985
- <xsl:value-of select="(//iec:iec-standard)[2]/iec:bibdata/iec:language[@current = 'true']"/>
994
+ <xsl:when test="(//iec:metanorma)[2]/iec:bibdata/iec:language[@current = 'true']">
995
+ <xsl:value-of select="(//iec:metanorma)[2]/iec:bibdata/iec:language[@current = 'true']"/>
986
996
  </xsl:when>
987
997
  <xsl:otherwise>
988
- <xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:title[@language and @language != $lang]/@language"/>
998
+ <xsl:value-of select="/iec:metanorma/iec:bibdata/iec:title[@language and @language != $lang]/@language"/>
989
999
  </xsl:otherwise>
990
1000
  </xsl:choose>
991
1001
  </xsl:variable>
@@ -993,11 +1003,11 @@
993
1003
  <xsl:call-template name="outputLogo"/>
994
1004
  <fo:inline font-size="8pt" padding-left="0.5mm" color="rgb(88, 88, 90)">
995
1005
  <xsl:choose>
996
- <xsl:when test="count((//iec:iec-standard)[1]/iec:bibdata/iec:copyright) = 1">®</xsl:when>
1006
+ <xsl:when test="count((//iec:metanorma)[1]/iec:bibdata/iec:copyright) = 1">®</xsl:when>
997
1007
  <xsl:otherwise><xsl:attribute name="padding-left">1mm</xsl:attribute> </xsl:otherwise>
998
1008
  </xsl:choose>
999
1009
  </fo:inline>
1000
- <fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso-undated']"/></fo:inline>
1010
+ <fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:docidentifier[@type = 'iso-undated']"/></fo:inline>
1001
1011
  </fo:block>
1002
1012
  <fo:block font-size="10.5pt" text-align="right" margin-top="0.5mm">
1003
1013
  <xsl:call-template name="capitalize">
@@ -1009,7 +1019,7 @@
1009
1019
  </xsl:call-template>
1010
1020
  <xsl:text> </xsl:text>
1011
1021
  <fo:inline>
1012
- <xsl:variable name="edition_" select="normalize-space(//iec:iec-standard/iec:bibdata/iec:edition[normalize-space(@language) = ''])"/>
1022
+ <xsl:variable name="edition_" select="normalize-space(//iec:metanorma/iec:bibdata/iec:edition[normalize-space(@language) = ''])"/>
1013
1023
  <xsl:variable name="edition">
1014
1024
  <xsl:choose>
1015
1025
  <xsl:when test="$edition_ = ''">1</xsl:when>
@@ -1021,7 +1031,7 @@
1021
1031
  </fo:inline>
1022
1032
  <fo:inline padding-left="4mm">
1023
1033
  <!-- Example 2014-05 -->
1024
- <xsl:value-of select="substring(//iec:iec-standard/iec:bibdata/iec:version/iec:revision-date, 1, 7)"/>
1034
+ <xsl:value-of select="substring(//iec:metanorma/iec:bibdata/iec:version/iec:revision-date, 1, 7)"/>
1025
1035
  </fo:inline>
1026
1036
  <fo:block> </fo:block>
1027
1037
  </fo:block>
@@ -1037,7 +1047,7 @@
1037
1047
  <xsl:text>PRE-RELEASE VERSION (FDIS)</xsl:text>
1038
1048
  </xsl:when>
1039
1049
  <xsl:when test="$stage &gt;= 60">
1040
- <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new((//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:doctype[@language = $lang]))"/>
1050
+ <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new((//iec:metanorma)[1]/iec:bibdata/iec:ext/iec:doctype[@language = $lang]))"/>
1041
1051
  <xsl:value-of select="$doctype_uppercased"/>
1042
1052
  </xsl:when>
1043
1053
  <xsl:otherwise>
@@ -1048,7 +1058,7 @@
1048
1058
  </fo:block>
1049
1059
  </fo:block-container>
1050
1060
 
1051
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second]">
1061
+ <xsl:if test="//iec:metanorma/iec:bibdata/iec:title[@language = $lang_second]">
1052
1062
  <fo:block-container height="26mm" margin-top="10pt" display-align="after">
1053
1063
  <xsl:if test="$stage &gt;= 60">
1054
1064
  <xsl:attribute name="width">100mm</xsl:attribute>
@@ -1056,7 +1066,7 @@
1056
1066
  <fo:block color="{$color_gray}">
1057
1067
  <xsl:if test="$stage &gt;= 60">
1058
1068
  <!-- <xsl:text>NORME INTERNATIONALE</xsl:text> -->
1059
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:doctype[@language = $lang_second]))"/>
1069
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:ext/iec:doctype[@language = $lang_second]))"/>
1060
1070
  </xsl:if>
1061
1071
  </fo:block>
1062
1072
  </fo:block-container>
@@ -1067,7 +1077,7 @@
1067
1077
  <fo:block-container margin-left="0mm">
1068
1078
  <fo:block-container height="6mm">
1069
1079
  <fo:block text-align="right" margin-top="-4.5mm" margin-right="-1mm">
1070
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:ext/iec:accessibility-color-inside = 'true'">
1080
+ <xsl:if test="//iec:metanorma/iec:bibdata/iec:ext/iec:accessibility-color-inside = 'true'">
1071
1081
  <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Colour-Inside))}" width="19mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/>
1072
1082
  </xsl:if>
1073
1083
  </fo:block>
@@ -1075,11 +1085,11 @@
1075
1085
  <fo:block-container border-bottom="0.5pt solid {$color_gray}" margin-top="4mm" margin-bottom="16pt" height="14mm" display-align="center">
1076
1086
  <fo:block font-size="10pt" color="{$color_blue}" margin-bottom="4pt">
1077
1087
  <xsl:choose>
1078
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
1079
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal[@language = $lang]))"/>
1088
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:horizontal = 'true'">
1089
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:ext/iec:horizontal[@language = $lang]))"/>
1080
1090
  </xsl:when>
1081
1091
  <xsl:otherwise><!-- horizontal is false -->
1082
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:function[@language = $lang]))"/>
1092
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:ext/iec:function[@language = $lang]))"/>
1083
1093
  </xsl:otherwise>
1084
1094
  </xsl:choose>
1085
1095
  <!-- Example: BASIC EMC PUBLICATION -->
@@ -1089,14 +1099,14 @@
1089
1099
  Basic Environment Publication
1090
1100
  Basic Quality Assurance Publication -->
1091
1101
  </fo:block>
1092
- <xsl:if test="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second]">
1102
+ <xsl:if test="//iec:metanorma/iec:bibdata/iec:title[@language = $lang_second]">
1093
1103
  <fo:block font-size="10pt" margin-bottom="10pt">
1094
1104
  <xsl:choose>
1095
- <xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
1096
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal[@language = $lang_second]))"/>
1105
+ <xsl:when test="//iec:metanorma/iec:bibdata/iec:ext/iec:horizontal = 'true'">
1106
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:ext/iec:horizontal[@language = $lang_second]))"/>
1097
1107
  </xsl:when>
1098
1108
  <xsl:otherwise><!-- horizontal is false -->
1099
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:iec-standard/iec:bibdata/iec:ext/iec:function[@language = $lang_second]))"/>
1109
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(//iec:metanorma/iec:bibdata/iec:ext/iec:function[@language = $lang_second]))"/>
1100
1110
  </xsl:otherwise>
1101
1111
  </xsl:choose>
1102
1112
  <!-- Example: PUBLICATION FONDAMENTALE EN CEM -->
@@ -1114,9 +1124,9 @@
1114
1124
  Part 4-5: Testing and measurement techniques – Surge immunity test
1115
1125
  -->
1116
1126
  <xsl:variable name="titles_first_">
1117
- <title-intro><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']"/></title-intro>
1118
- <title-main><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']"/></title-main>
1119
- <title-part><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/></title-part>
1127
+ <title-intro><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']"/></title-intro>
1128
+ <title-main><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']"/></title-main>
1129
+ <title-part><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/></title-part>
1120
1130
  </xsl:variable>
1121
1131
  <xsl:variable name="titles_first" select="xalan:nodeset($titles_first_)"/>
1122
1132
 
@@ -1146,9 +1156,9 @@
1146
1156
  choc -->
1147
1157
 
1148
1158
  <xsl:variable name="titles_second_">
1149
- <title-intro><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-intro']"/></title-intro>
1150
- <title-main><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-main']"/></title-main>
1151
- <title-part><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-part']"/></title-part>
1159
+ <title-intro><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-intro']"/></title-intro>
1160
+ <title-main><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-main']"/></title-main>
1161
+ <title-part><xsl:value-of select="//iec:metanorma/iec:bibdata/iec:title[@language = $lang_second and @type = 'title-part']"/></title-part>
1152
1162
  </xsl:variable>
1153
1163
  <xsl:variable name="titles_second" select="xalan:nodeset($titles_second_)"/>
1154
1164
 
@@ -1191,7 +1201,7 @@
1191
1201
 
1192
1202
  <xsl:template name="outputLogo">
1193
1203
  <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IEC))}" width="18mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/> -->
1194
- <xsl:for-each select="(//iec:iec-standard)[1]/iec:bibdata/iec:copyright/iec:owner/iec:organization/iec:abbreviation">
1204
+ <xsl:for-each select="(//iec:metanorma)[1]/iec:bibdata/iec:copyright/iec:owner/iec:organization/iec:abbreviation">
1195
1205
  <xsl:choose>
1196
1206
  <xsl:when test=". = 'IEC'">
1197
1207
  <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IEC))}" content-height="18mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/> -->
@@ -1496,9 +1506,9 @@
1496
1506
  <xsl:param name="lang"/>
1497
1507
 
1498
1508
  <xsl:variable name="titles_doc_">
1499
- <title-intro><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/></title-intro>
1500
- <title-main><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/></title-main>
1501
- <title-part><xsl:value-of select="/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/></title-part>
1509
+ <title-intro><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:metanorma/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/></title-intro>
1510
+ <title-main><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:metanorma/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/></title-main>
1511
+ <title-part><xsl:value-of select="/iec:metanorma/iec:bibdata/iec:title[@language = $lang and @type = 'title-part']"/></title-part>
1502
1512
  </xsl:variable>
1503
1513
  <xsl:variable name="titles_doc" select="xalan:nodeset($titles_doc_)"/>
1504
1514
 
@@ -1745,7 +1755,7 @@
1745
1755
  </xsl:if>
1746
1756
  </xsl:template>
1747
1757
 
1748
- <xsl:template match="iec:iec-standard/iec:preface//iec:foreword" priority="3">
1758
+ <xsl:template match="iec:metanorma/iec:preface//iec:foreword" priority="3">
1749
1759
  <fo:block id="{@id}" margin-bottom="12pt" font-size="12pt" text-align="center">
1750
1760
  <xsl:call-template name="addLetterSpacing">
1751
1761
  <!-- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(iec:title))"/> -->
@@ -1754,7 +1764,7 @@
1754
1764
  </fo:block>
1755
1765
  <!-- margin-left="6.3mm" -->
1756
1766
  <!-- <fo:block font-size="8.2pt" text-align="justify">
1757
- <xsl:apply-templates select="/iec:iec-standard/iec:boilerplate/iec:legal-statement/*"/>
1767
+ <xsl:apply-templates select="/iec:metanorma/iec:boilerplate/iec:legal-statement/*"/>
1758
1768
  </fo:block> -->
1759
1769
  <fo:block>
1760
1770
  <xsl:apply-templates select="*[not(local-name() = 'title')]"/>
@@ -2174,21 +2184,21 @@
2174
2184
 
2175
2185
  <xsl:variable name="namespace_full_">
2176
2186
  <xsl:choose>
2177
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
2178
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
2187
+ <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
2188
+ <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
2179
2189
  </xsl:choose>
2180
2190
  </xsl:variable>
2181
2191
  <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
2182
2192
 
2183
2193
  <xsl:variable name="root_element_">
2184
2194
  <xsl:choose>
2185
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
2186
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
2195
+ <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
2196
+ <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
2187
2197
  </xsl:choose>
2188
2198
  </xsl:variable>
2189
2199
  <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
2190
2200
 
2191
- <xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
2201
+ <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
2192
2202
 
2193
2203
  <!-- external parameters -->
2194
2204
 
@@ -2289,7 +2299,7 @@
2289
2299
  </metanorma-extension>
2290
2300
  -->
2291
2301
 
2292
- <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2302
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2293
2303
  <xsl:variable name="papersize_width_">
2294
2304
  <xsl:choose>
2295
2305
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -2351,7 +2361,7 @@
2351
2361
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
2352
2362
 
2353
2363
  <xsl:variable name="layout_columns_default">1</xsl:variable>
2354
- <xsl:variable name="layout_columns_" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
2364
+ <xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
2355
2365
  <xsl:variable name="layout_columns">
2356
2366
  <xsl:choose>
2357
2367
  <xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
@@ -2418,7 +2428,7 @@
2418
2428
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2419
2429
 
2420
2430
  <xsl:variable name="title-list-tables">
2421
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2431
+ <xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2422
2432
  <xsl:value-of select="$toc_table_title"/>
2423
2433
  <xsl:if test="normalize-space($toc_table_title) = ''">
2424
2434
  <xsl:call-template name="getLocalizedString">
@@ -2428,7 +2438,7 @@
2428
2438
  </xsl:variable>
2429
2439
 
2430
2440
  <xsl:variable name="title-list-figures">
2431
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2441
+ <xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2432
2442
  <xsl:value-of select="$toc_figure_title"/>
2433
2443
  <xsl:if test="normalize-space($toc_figure_title) = ''">
2434
2444
  <xsl:call-template name="getLocalizedString">
@@ -2438,7 +2448,7 @@
2438
2448
  </xsl:variable>
2439
2449
 
2440
2450
  <xsl:variable name="title-list-recommendations">
2441
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2451
+ <xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2442
2452
  <xsl:value-of select="$toc_requirement_title"/>
2443
2453
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
2444
2454
  <xsl:call-template name="getLocalizedString">
@@ -2448,8 +2458,8 @@
2448
2458
  </xsl:variable>
2449
2459
 
2450
2460
  <xsl:variable name="bibdata">
2451
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
2452
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
2461
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
2462
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
2453
2463
  </xsl:variable>
2454
2464
 
2455
2465
  <!-- Characters -->
@@ -2514,7 +2524,7 @@
2514
2524
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
2515
2525
 
2516
2526
  <xsl:variable name="additional_fonts_">
2517
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2527
+ <xsl:for-each select="//*[local-name() = 'metanorma'][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[local-name() = 'metanorma'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2518
2528
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
2519
2529
  </xsl:for-each>
2520
2530
  </xsl:variable>
@@ -3911,10 +3921,10 @@
3911
3921
 
3912
3922
  <xsl:template name="processTablesFigures_Contents">
3913
3923
  <xsl:param name="always"/>
3914
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3924
+ <xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3915
3925
  <xsl:call-template name="processTables_Contents"/>
3916
3926
  </xsl:if>
3917
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3927
+ <xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3918
3928
  <xsl:call-template name="processFigures_Contents"/>
3919
3929
  </xsl:if>
3920
3930
  </xsl:template>
@@ -3994,7 +4004,7 @@
3994
4004
  </xsl:template><!-- END: processMainSectionsDefault -->
3995
4005
 
3996
4006
  <!-- Example:
3997
- <iso-standard>
4007
+ <metanorma>
3998
4008
  <preface>
3999
4009
  <page_sequence>
4000
4010
  <clause...
@@ -4017,7 +4027,7 @@
4017
4027
  <page_sequence>
4018
4028
  <annex ..
4019
4029
  </page_sequence>
4020
- </iso-standard>
4030
+ </metanorma>
4021
4031
  -->
4022
4032
  <xsl:template name="processPrefaceAndMainSectionsDefault_items">
4023
4033
 
@@ -4060,15 +4070,8 @@
4060
4070
  </xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
4061
4071
 
4062
4072
  <xsl:template name="insertMainSectionsPageSequences">
4063
- <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
4064
- <xsl:element name="page_sequence" namespace="{$namespace_full}">
4065
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
4066
- <xsl:sort select="@displayorder" data-type="number"/>
4067
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
4068
4073
 
4069
- </xsl:for-each>
4070
- </xsl:element>
4071
- </xsl:element>
4074
+ <xsl:call-template name="insertSectionsInPageSequence"/>
4072
4075
 
4073
4076
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
4074
4077
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -4087,6 +4090,18 @@
4087
4090
  </xsl:element>
4088
4091
  </xsl:template> <!-- END: insertMainSectionsPageSequences -->
4089
4092
 
4093
+ <xsl:template name="insertSectionsInPageSequence">
4094
+ <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
4095
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
4096
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
4097
+ <xsl:sort select="@displayorder" data-type="number"/>
4098
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
4099
+
4100
+ </xsl:for-each>
4101
+ </xsl:element>
4102
+ </xsl:element>
4103
+ </xsl:template>
4104
+
4090
4105
  <xsl:template name="insertMainSectionsInSeparatePageSequences">
4091
4106
  <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
4092
4107
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
@@ -5676,7 +5691,7 @@
5676
5691
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
5677
5692
 
5678
5693
  <xsl:variable name="gen_id" select="generate-id(.)"/>
5679
- <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
5694
+ <xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
5680
5695
  <xsl:variable name="reference_">
5681
5696
  <xsl:value-of select="@reference"/>
5682
5697
  <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
@@ -5797,13 +5812,13 @@
5797
5812
  footnotes in bibliography
5798
5813
  footnotes in document's body (except table's head/body/foot and figure text)
5799
5814
  -->
5800
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
5815
+ <xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
5801
5816
  <fn gen_id="{generate-id(.)}">
5802
5817
  <xsl:copy-of select="@*"/>
5803
5818
  <xsl:copy-of select="node()"/>
5804
5819
  </fn>
5805
5820
  </xsl:for-each>
5806
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='bibliography']/*">
5821
+ <xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name()='boilerplate']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='preface']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='sections']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='annex'] | ancestor::*[local-name() = 'metanorma']//*[local-name()='bibliography']/*">
5807
5822
  <xsl:sort select="@displayorder" data-type="number"/>
5808
5823
  <!-- commented:
5809
5824
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
@@ -7626,9 +7641,14 @@
7626
7641
 
7627
7642
  <xsl:variable name="simple-table">
7628
7643
 
7644
+ <xsl:variable name="table_without_semantic_elements">
7645
+ <xsl:apply-templates mode="update_xml_pres"/>
7646
+ </xsl:variable>
7647
+
7629
7648
  <!-- Step 0. replace <br/> to <p>...</p> -->
7630
7649
  <xsl:variable name="table_without_br">
7631
- <xsl:apply-templates mode="table-without-br"/>
7650
+ <!-- <xsl:apply-templates mode="table-without-br"/> -->
7651
+ <xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
7632
7652
  </xsl:variable>
7633
7653
 
7634
7654
  <!-- Step 1. colspan processing -->
@@ -8244,6 +8264,8 @@
8244
8264
  <!-- ======================================= -->
8245
8265
  <!-- math -->
8246
8266
  <!-- ======================================= -->
8267
+ <xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
8268
+
8247
8269
  <xsl:template match="mathml:math">
8248
8270
  <xsl:variable name="isAdded" select="@added"/>
8249
8271
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -8603,10 +8625,10 @@
8603
8625
  <xsl:template match="*[local-name()='localityStack']"/>
8604
8626
 
8605
8627
  <xsl:variable name="pdfAttachmentsList_">
8606
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
8628
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
8607
8629
  <attachment filename="{@name}"/>
8608
8630
  </xsl:for-each>
8609
- <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
8631
+ <xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
8610
8632
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
8611
8633
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
8612
8634
  <attachment filename="{$attachment_path}"/>
@@ -10074,7 +10096,9 @@
10074
10096
  <xsl:apply-templates mode="bookmarks"/>
10075
10097
  </xsl:template>
10076
10098
 
10077
- <xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
10099
+ <xsl:template match="*[local-name() = 'stem']" mode="contents"/>
10100
+
10101
+ <xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'fmt-stem']" mode="contents">
10078
10102
  <xsl:apply-templates select="."/>
10079
10103
  </xsl:template>
10080
10104
 
@@ -10091,7 +10115,15 @@
10091
10115
  <xsl:apply-templates mode="contents"/>
10092
10116
  </xsl:template>
10093
10117
 
10094
- <xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
10118
+ <xsl:template match="*[local-name() = 'concept']" mode="contents"/>
10119
+ <xsl:template match="*[local-name() = 'eref']" mode="contents"/>
10120
+ <xsl:template match="*[local-name() = 'xref']" mode="contents"/>
10121
+ <xsl:template match="*[local-name() = 'link']" mode="contents"/>
10122
+ <xsl:template match="*[local-name() = 'origin']" mode="contents"/>
10123
+ <xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
10124
+
10125
+ <xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
10126
+ <xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
10095
10127
  <xsl:apply-templates mode="bookmarks"/>
10096
10128
  </xsl:template>
10097
10129
 
@@ -10104,6 +10136,13 @@
10104
10136
  <xsl:apply-templates mode="bookmarks"/>
10105
10137
  </xsl:template>
10106
10138
 
10139
+ <xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
10140
+ <xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
10141
+ <xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
10142
+ <xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
10143
+ <xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
10144
+ <xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
10145
+
10107
10146
  <!-- Bookmarks -->
10108
10147
  <xsl:template name="addBookmarks">
10109
10148
  <xsl:param name="contents"/>
@@ -10399,6 +10438,13 @@
10399
10438
 
10400
10439
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
10401
10440
 
10441
+ <xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
10442
+ <xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
10443
+ <xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
10444
+ <xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
10445
+ <xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
10446
+ <xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
10447
+
10402
10448
  <xsl:template name="getSection">
10403
10449
  <xsl:choose>
10404
10450
  <xsl:when test="*[local-name() = 'fmt-title']">
@@ -10518,7 +10564,8 @@
10518
10564
  </xsl:copy>
10519
10565
  </xsl:template>
10520
10566
 
10521
- <xsl:template match="*[local-name() = 'stem']" mode="contents_item">
10567
+ <xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
10568
+ <xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
10522
10569
  <xsl:copy-of select="."/>
10523
10570
  </xsl:template>
10524
10571
 
@@ -10582,7 +10629,7 @@
10582
10629
  <!-- sourcecode -->
10583
10630
  <!-- =============== -->
10584
10631
 
10585
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
10632
+ <xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
10586
10633
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
10587
10634
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
10588
10635
 
@@ -12046,7 +12093,7 @@
12046
12093
 
12047
12094
  </xsl:template> <!-- sections_element_style -->
12048
12095
 
12049
- <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
12096
+ <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
12050
12097
 
12051
12098
  <fo:block break-after="page"/>
12052
12099
 
@@ -12150,7 +12197,7 @@
12150
12197
  <fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12151
12198
  </xsl:when>
12152
12199
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
12153
- <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
12200
+ <xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
12154
12201
  <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12155
12202
  </xsl:when>
12156
12203
  <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
@@ -13496,7 +13543,7 @@
13496
13543
  <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
13497
13544
 
13498
13545
  <!-- move section 'Normative references' inside 'sections' -->
13499
- <xsl:for-each select="* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
13546
+ <xsl:for-each select="* | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
13500
13547
  <xsl:sort select="@displayorder" data-type="number"/>
13501
13548
 
13502
13549
  <!-- process Section's title -->
@@ -13557,10 +13604,126 @@
13557
13604
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
13558
13605
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
13559
13606
 
13560
- <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
13607
+ <xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
13608
+ <xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
13609
+
13610
+ <xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
13611
+ <xsl:element name="stem" namespace="{$namespace_full}">
13612
+ <xsl:copy-of select="@*"/>
13613
+ <xsl:choose>
13614
+ <xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
13615
+ <xsl:copy-of select="*[local-name() = 'semx']/node()"/>
13616
+ </xsl:when>
13617
+ <xsl:otherwise>
13618
+ <xsl:copy-of select="node()"/>
13619
+ </xsl:otherwise>
13620
+ </xsl:choose>
13621
+ </xsl:element>
13622
+ </xsl:template>
13623
+ <xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
13624
+ <xsl:element name="stem" namespace="{$namespace_full}">
13625
+ <xsl:copy-of select="@*"/>
13626
+ <xsl:choose>
13627
+ <xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
13628
+ <xsl:copy-of select="*[local-name() = 'semx']/node()"/>
13629
+ </xsl:when>
13630
+ <xsl:otherwise>
13631
+ <xsl:copy-of select="node()"/>
13632
+ </xsl:otherwise>
13633
+ </xsl:choose>
13634
+ </xsl:element>
13635
+ </xsl:template>
13636
+
13637
+ <xsl:template match="*[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
13561
13638
  <xsl:copy-of select="."/>
13562
13639
  </xsl:template>
13563
13640
 
13641
+ <!-- https://github.com/metanorma/isodoc/issues/651 -->
13642
+ <!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
13643
+ <xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
13644
+ <xsl:copy>
13645
+ <xsl:copy-of select="@*"/>
13646
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
13647
+ <xsl:choose>
13648
+ <xsl:when test="*[local-name() = 'fmt-sourcecode']">
13649
+ <xsl:choose>
13650
+ <xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
13651
+ <xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
13652
+ </xsl:when>
13653
+ <xsl:otherwise>
13654
+ <xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
13655
+ </xsl:otherwise>
13656
+ </xsl:choose>
13657
+ </xsl:when>
13658
+ <xsl:otherwise> <!-- If fmt-sourcecode is not present -->
13659
+ <xsl:choose>
13660
+ <xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
13661
+ <xsl:copy-of select="node()"/>
13662
+ </xsl:when>
13663
+ <xsl:otherwise>
13664
+ <xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
13665
+ </xsl:otherwise>
13666
+ </xsl:choose>
13667
+ </xsl:otherwise>
13668
+ </xsl:choose>
13669
+ </xsl:copy>
13670
+ </xsl:template>
13671
+ <xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
13672
+ <xsl:copy>
13673
+ <xsl:copy-of select="@*"/>
13674
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
13675
+ <xsl:choose>
13676
+ <xsl:when test="*[local-name() = 'fmt-sourcecode']">
13677
+ <xsl:choose>
13678
+ <xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
13679
+ <xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
13680
+ </xsl:when>
13681
+ <xsl:otherwise>
13682
+ <xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
13683
+ </xsl:otherwise>
13684
+ </xsl:choose>
13685
+ </xsl:when>
13686
+ <xsl:otherwise> <!-- If fmt-sourcecode is not present -->
13687
+ <xsl:choose>
13688
+ <xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
13689
+ <xsl:copy-of select="node()"/>
13690
+ </xsl:when>
13691
+ <xsl:otherwise>
13692
+ <xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
13693
+ </xsl:otherwise>
13694
+ </xsl:choose>
13695
+ </xsl:otherwise>
13696
+ </xsl:choose>
13697
+ </xsl:copy>
13698
+ </xsl:template>
13699
+
13700
+ <!-- https://github.com/metanorma/isodoc/issues/651 -->
13701
+ <xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
13702
+ <xsl:copy>
13703
+ <xsl:copy-of select="@*"/>
13704
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
13705
+ <xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
13706
+ </xsl:copy>
13707
+ </xsl:template>
13708
+ <xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
13709
+ <xsl:copy>
13710
+ <xsl:copy-of select="@*"/>
13711
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
13712
+ <xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
13713
+ </xsl:copy>
13714
+ </xsl:template>
13715
+
13716
+ <!-- https://github.com/metanorma/isodoc/issues/652 -->
13717
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
13718
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
13719
+ <xsl:template match="*[local-name() = 'amend']"/>
13720
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
13721
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
13722
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
13723
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13724
+ <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13725
+ <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13726
+
13564
13727
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13565
13728
  <xsl:copy>
13566
13729
  <xsl:copy-of select="@*"/>
@@ -13591,7 +13754,7 @@
13591
13754
  <!-- add @id - first element with @id plus '_element_name' -->
13592
13755
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
13593
13756
  <xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
13594
- <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
13757
+ <xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
13595
13758
  <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
13596
13759
  </xsl:if>
13597
13760
  </xsl:template>
@@ -13706,16 +13869,30 @@
13706
13869
 
13707
13870
  <xsl:template match="*[local-name() = 'fmt-name']"/>
13708
13871
  <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
13709
- <xsl:element name="name" namespace="{$namespace_full}">
13710
- <xsl:copy-of select="@*"/>
13711
- <xsl:apply-templates mode="update_xml_step1"/>
13712
- </xsl:element>
13872
+ <xsl:choose>
13873
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
13874
+ <xsl:apply-templates mode="update_xml_step1"/>
13875
+ </xsl:when>
13876
+ <xsl:otherwise>
13877
+ <xsl:element name="name" namespace="{$namespace_full}">
13878
+ <xsl:copy-of select="@*"/>
13879
+ <xsl:apply-templates mode="update_xml_step1"/>
13880
+ </xsl:element>
13881
+ </xsl:otherwise>
13882
+ </xsl:choose>
13713
13883
  </xsl:template>
13714
13884
  <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
13715
- <xsl:element name="name" namespace="{$namespace_full}">
13716
- <xsl:copy-of select="@*"/>
13717
- <xsl:apply-templates mode="update_xml_pres"/>
13718
- </xsl:element>
13885
+ <xsl:choose>
13886
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
13887
+ <xsl:apply-templates mode="update_xml_step1"/>
13888
+ </xsl:when>
13889
+ <xsl:otherwise>
13890
+ <xsl:element name="name" namespace="{$namespace_full}">
13891
+ <xsl:copy-of select="@*"/>
13892
+ <xsl:apply-templates mode="update_xml_pres"/>
13893
+ </xsl:element>
13894
+ </xsl:otherwise>
13895
+ </xsl:choose>
13719
13896
  </xsl:template>
13720
13897
 
13721
13898
  <xsl:template match="*[local-name() = 'fmt-preferred']"/>
@@ -13813,6 +13990,9 @@
13813
13990
  <xsl:apply-templates mode="update_xml_pres"/>
13814
13991
  </xsl:template>
13815
13992
 
13993
+ <xsl:template match="*[local-name() = 'semx']">
13994
+ <xsl:apply-templates/>
13995
+ </xsl:template>
13816
13996
  <xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
13817
13997
  <xsl:apply-templates mode="update_xml_step1"/>
13818
13998
  </xsl:template>
@@ -13824,6 +14004,126 @@
13824
14004
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
13825
14005
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
13826
14006
 
14007
+ <xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
14008
+ <xsl:apply-templates mode="update_xml_step1"/>
14009
+ </xsl:template>
14010
+
14011
+ <xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
14012
+ <xsl:apply-templates mode="update_xml_pres"/>
14013
+ </xsl:template>
14014
+
14015
+ <xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_step1"/>
14016
+
14017
+ <xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_pres"/>
14018
+
14019
+ <xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
14020
+ <xsl:apply-templates mode="update_xml_step1"/>
14021
+ </xsl:template>
14022
+ <xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
14023
+ <xsl:apply-templates mode="update_xml_pres"/>
14024
+ </xsl:template>
14025
+
14026
+ <xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
14027
+ <xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
14028
+ <xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
14029
+ <xsl:element name="identifier" namespace="{$namespace_full}">
14030
+ <xsl:copy-of select="@*"/>
14031
+ <xsl:apply-templates mode="update_xml_step1"/>
14032
+ </xsl:element>
14033
+ </xsl:template>
14034
+ <xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
14035
+ <xsl:element name="identifier" namespace="{$namespace_full}">
14036
+ <xsl:copy-of select="@*"/>
14037
+ <xsl:apply-templates mode="update_xml_pres"/>
14038
+ </xsl:element>
14039
+ </xsl:template>
14040
+
14041
+ <xsl:template match="*[local-name() = 'concept']"/>
14042
+ <xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
14043
+ <xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
14044
+
14045
+ <xsl:template match="*[local-name() = 'fmt-concept']">
14046
+ <xsl:apply-templates/>
14047
+ </xsl:template>
14048
+ <xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
14049
+ <xsl:apply-templates mode="update_xml_step1"/>
14050
+ </xsl:template>
14051
+ <xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
14052
+ <xsl:apply-templates mode="update_xml_pres"/>
14053
+ </xsl:template>
14054
+
14055
+ <xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
14056
+ <xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
14057
+
14058
+ <xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
14059
+ <xsl:element name="eref" namespace="{$namespace_full}">
14060
+ <xsl:copy-of select="@*"/>
14061
+ <xsl:apply-templates mode="update_xml_step1"/>
14062
+ </xsl:element>
14063
+ </xsl:template>
14064
+ <xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
14065
+ <xsl:element name="eref" namespace="{$namespace_full}">
14066
+ <xsl:copy-of select="@*"/>
14067
+ <xsl:apply-templates mode="update_xml_pres"/>
14068
+ </xsl:element>
14069
+ </xsl:template>
14070
+
14071
+ <xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
14072
+ <xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
14073
+
14074
+ <xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
14075
+ <xsl:element name="xref" namespace="{$namespace_full}">
14076
+ <xsl:copy-of select="@*"/>
14077
+ <xsl:apply-templates mode="update_xml_step1"/>
14078
+ </xsl:element>
14079
+ </xsl:template>
14080
+ <xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
14081
+ <xsl:element name="xref" namespace="{$namespace_full}">
14082
+ <xsl:copy-of select="@*"/>
14083
+ <xsl:apply-templates mode="update_xml_pres"/>
14084
+ </xsl:element>
14085
+ </xsl:template>
14086
+
14087
+ <xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
14088
+ <xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
14089
+
14090
+ <xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
14091
+ <xsl:element name="link" namespace="{$namespace_full}">
14092
+ <xsl:copy-of select="@*"/>
14093
+ <xsl:apply-templates mode="update_xml_step1"/>
14094
+ </xsl:element>
14095
+ </xsl:template>
14096
+ <xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
14097
+ <xsl:element name="link" namespace="{$namespace_full}">
14098
+ <xsl:copy-of select="@*"/>
14099
+ <xsl:apply-templates mode="update_xml_pres"/>
14100
+ </xsl:element>
14101
+ </xsl:template>
14102
+
14103
+ <xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
14104
+ <xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
14105
+
14106
+ <xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
14107
+ <xsl:element name="origin" namespace="{$namespace_full}">
14108
+ <xsl:copy-of select="@*"/>
14109
+ <xsl:apply-templates mode="update_xml_step1"/>
14110
+ </xsl:element>
14111
+ </xsl:template>
14112
+ <xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
14113
+ <xsl:element name="origin" namespace="{$namespace_full}">
14114
+ <xsl:copy-of select="@*"/>
14115
+ <xsl:apply-templates mode="update_xml_pres"/>
14116
+ </xsl:element>
14117
+ </xsl:template>
14118
+
14119
+ <xsl:template match="*[local-name() = 'erefstack']"/>
14120
+ <xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
14121
+ <xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
14122
+
14123
+ <xsl:template match="*[local-name() = 'svgmap']"/>
14124
+ <xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
14125
+ <xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
14126
+
13827
14127
  <!-- END: update new Presentation XML -->
13828
14128
 
13829
14129
  <!-- =========================================================================== -->
@@ -13896,7 +14196,7 @@
13896
14196
 
13897
14197
  <xsl:choose>
13898
14198
  <xsl:when test="$page_sequence_at_top = 'true'">
13899
- <xsl:for-each select="ancestor::*[ancestor::*[contains(local-name(), '-standard')]]">
14199
+ <xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
13900
14200
  <element pos="{position()}">
13901
14201
  <xsl:copy-of select="@*[local-name() != 'id']"/>
13902
14202
  <xsl:value-of select="name()"/>
@@ -14324,7 +14624,7 @@
14324
14624
  </xsl:when>
14325
14625
  <xsl:when test="contains($text, $replace)">
14326
14626
  <xsl:value-of select="substring-before($text,$replace)"/>
14327
- <xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/jis"><xsl:value-of select="$by"/></xsl:element>
14627
+ <xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
14328
14628
  <xsl:call-template name="replaceChar">
14329
14629
  <xsl:with-param name="text" select="substring-after($text,$replace)"/>
14330
14630
  <xsl:with-param name="replace" select="$replace"/>
@@ -14361,7 +14661,7 @@
14361
14661
  </xsl:variable>
14362
14662
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
14363
14663
  <xsl:variable name="gen_id" select="generate-id(.)"/>
14364
- <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
14664
+ <xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
14365
14665
  <xsl:variable name="reference" select="@reference"/>
14366
14666
  <!-- fn sequence number in document -->
14367
14667
  <xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
@@ -14406,7 +14706,7 @@
14406
14706
  </xsl:template>
14407
14707
 
14408
14708
  <xsl:template name="printEdition">
14409
- <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
14709
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
14410
14710
 
14411
14711
  <xsl:choose>
14412
14712
  <xsl:when test="$edition_i18n != ''">
@@ -14416,7 +14716,7 @@
14416
14716
  </xsl:call-template>
14417
14717
  </xsl:when>
14418
14718
  <xsl:otherwise>
14419
- <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
14719
+ <xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
14420
14720
  <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
14421
14721
  <xsl:call-template name="capitalize">
14422
14722
  <xsl:with-param name="str">
@@ -14550,7 +14850,7 @@
14550
14850
  <xsl:param name="charDelim" select="', '"/>
14551
14851
  <xsl:choose>
14552
14852
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
14553
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
14853
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
14554
14854
  <xsl:sort data-type="text" order="ascending"/>
14555
14855
  <xsl:call-template name="insertKeyword">
14556
14856
  <xsl:with-param name="meta" select="$meta"/>
@@ -14560,7 +14860,7 @@
14560
14860
  </xsl:for-each>
14561
14861
  </xsl:when>
14562
14862
  <xsl:otherwise>
14563
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
14863
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
14564
14864
  <xsl:call-template name="insertKeyword">
14565
14865
  <xsl:with-param name="meta" select="$meta"/>
14566
14866
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -14635,7 +14935,7 @@
14635
14935
  <!-- Dublin Core properties go here -->
14636
14936
  <dc:title>
14637
14937
  <xsl:variable name="title">
14638
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
14938
+ <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
14639
14939
 
14640
14940
  <xsl:choose>
14641
14941
  <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
@@ -14662,7 +14962,7 @@
14662
14962
  </rdf:Alt>
14663
14963
  </dc:title>
14664
14964
  <xsl:variable name="dc_creator">
14665
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
14965
+ <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
14666
14966
 
14667
14967
  <rdf:Seq>
14668
14968
  <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
@@ -14684,7 +14984,7 @@
14684
14984
  <xsl:variable name="dc_description">
14685
14985
  <xsl:variable name="abstract">
14686
14986
 
14687
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
14987
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
14688
14988
 
14689
14989
  </xsl:variable>
14690
14990
  <rdf:Alt>
@@ -14712,7 +15012,7 @@
14712
15012
  </rdf:RDF>
14713
15013
  </x:xmpmeta>
14714
15014
  <!-- add attachments -->
14715
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15015
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
14716
15016
  <xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
14717
15017
  <xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
14718
15018
  <xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
@@ -14746,7 +15046,7 @@
14746
15046
  </pdf:embedded-file>
14747
15047
  </xsl:for-each>
14748
15048
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
14749
- <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
15049
+ <xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
14750
15050
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
14751
15051
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
14752
15052
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
@@ -14950,9 +15250,9 @@
14950
15250
  <xsl:value-of select="document('')//*/namespace::iec"/>
14951
15251
 
14952
15252
  </xsl:variable>
14953
- <xsl:if test="$documentNS != $XSLNS">
15253
+ <!-- <xsl:if test="$documentNS != $XSLNS">
14954
15254
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
14955
- </xsl:if>
15255
+ </xsl:if> -->
14956
15256
  </xsl:template> <!-- namespaceCheck -->
14957
15257
 
14958
15258
  <xsl:template name="getLanguage">
@@ -15031,10 +15331,10 @@
15031
15331
 
15032
15332
  <xsl:variable name="data_value">
15033
15333
  <xsl:choose>
15034
- <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
15334
+ <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
15035
15335
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
15036
15336
  </xsl:when>
15037
- <xsl:when test="string-length($bibdata_updated) != ''">
15337
+ <xsl:when test="string-length($bibdata_updated) != 0">
15038
15338
  <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
15039
15339
  </xsl:when>
15040
15340
  <xsl:when test="$formatted = 'true'">
@@ -15172,7 +15472,7 @@
15172
15472
  <!-- background image -->
15173
15473
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
15174
15474
  <fo:block>
15175
- <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
15475
+ <xsl:for-each select="/*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
15176
15476
  <xsl:choose>
15177
15477
  <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
15178
15478
  <fo:instream-foreign-object fox:alt-text="Image Front">