metanorma-iso 2.9.6 → 3.0.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:iso="https://www.metanorma.org/ns/iso" 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:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" 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:iso="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:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -11,9 +11,9 @@
11
11
 
12
12
  <xsl:variable name="column_gap">8.5mm</xsl:variable>
13
13
 
14
- <xsl:variable name="docidentifier_iso" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
14
+ <xsl:variable name="docidentifier_iso" select="/iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
15
15
 
16
- <xsl:variable name="docidentifier_undated_" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-undated'])"/>
16
+ <xsl:variable name="docidentifier_undated_" select="normalize-space(/iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'iso-undated'])"/>
17
17
  <xsl:variable name="docidentifier_undated"><xsl:value-of select="$docidentifier_undated_"/><xsl:if test="$docidentifier_undated_ = ''"><xsl:value-of select="$docidentifier_iso"/></xsl:if></xsl:variable>
18
18
  <xsl:variable name="docidentifierISO_undated_">
19
19
  <xsl:if test="not($stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM')">
@@ -31,7 +31,7 @@
31
31
  <xsl:variable name="docidentifierISO_with_break" select="java:replaceAll(java:java.lang.String.new($docidentifierISO),'^([^\d]+) (\d)', concat('$1', $linebreak, '$2'))"/> <!-- add line break before 1st sequence 'space digit' -->
32
32
 
33
33
  <xsl:variable name="docidentifier_another_">
34
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type != '' and @type != 'ISO' and not(starts-with(@type, 'iso-')) and @type != 'URN']">
34
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:docidentifier[@type != '' and @type != 'ISO' and not(starts-with(@type, 'iso-')) and @type != 'URN']">
35
35
  <xsl:value-of select="."/>
36
36
  <xsl:if test="position() != last()"><xsl:value-of select="$linebreak"/></xsl:if>
37
37
  </xsl:for-each>
@@ -44,9 +44,9 @@
44
44
  </xsl:if>
45
45
  </xsl:variable>
46
46
 
47
- <xsl:variable name="copyrightYear" select="/iso:iso-standard/iso:bibdata/iso:copyright/iso:from"/>
47
+ <xsl:variable name="copyrightYear" select="/iso:metanorma/iso:bibdata/iso:copyright/iso:from"/>
48
48
  <xsl:variable name="copyrightAbbr__">
49
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:copyright/iso:owner/iso:organization[normalize-space(iso:abbreviation) != 'IEEE']">
49
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:copyright/iso:owner/iso:organization[normalize-space(iso:abbreviation) != 'IEEE']">
50
50
  <abbr>
51
51
  <xsl:choose>
52
52
  <xsl:when test="iso:abbreviation"><xsl:value-of select="iso:abbreviation"/></xsl:when>
@@ -67,7 +67,7 @@
67
67
  </xsl:for-each>
68
68
  </xsl:variable>
69
69
  <xsl:variable name="copyrightAbbr" select="normalize-space($copyrightAbbr_)"/>
70
- <xsl:variable name="copyrightAbbrIEEE" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:copyright/iso:owner/iso:organization/iso:abbreviation[. = 'IEEE'])"/>
70
+ <xsl:variable name="copyrightAbbrIEEE" select="normalize-space(/iso:metanorma/iso:bibdata/iso:copyright/iso:owner/iso:organization/iso:abbreviation[. = 'IEEE'])"/>
71
71
  <xsl:variable name="copyrightText">
72
72
  <xsl:value-of select="concat('© ', $copyrightAbbr, ' ', $copyrightYear ,' – ', $i18n_all_rights_reserved)"/>
73
73
  <xsl:if test="$copyrightAbbrIEEE != ''">
@@ -86,17 +86,17 @@
86
86
  <xsl:value-of select="$i18n_all_rights_reserved"/>
87
87
  </xsl:variable>
88
88
 
89
- <xsl:variable name="docidentifier_iso_with_lang_" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-with-lang'])"/>
89
+ <xsl:variable name="docidentifier_iso_with_lang_" select="normalize-space(/iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'iso-with-lang'])"/>
90
90
  <xsl:variable name="docidentifier_iso_with_lang"><xsl:value-of select="$docidentifier_iso_with_lang_"/><xsl:if test="$docidentifier_iso_with_lang_ = ''"><xsl:value-of select="$docidentifier_iso"/></xsl:if></xsl:variable>
91
91
 
92
92
  <xsl:variable name="lang-1st-letter_tmp" select="substring-before(substring-after($docidentifier_iso_with_lang, '('), ')')"/>
93
93
  <xsl:variable name="lang-1st-letter" select="concat('(', $lang-1st-letter_tmp , ')')"/>
94
94
 
95
- <xsl:variable name="iso_reference_" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-reference'])"/>
95
+ <xsl:variable name="iso_reference_" select="normalize-space(/iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'iso-reference'])"/>
96
96
  <xsl:variable name="iso_reference"><xsl:value-of select="$iso_reference_"/><xsl:if test="$iso_reference_ = ''"><xsl:value-of select="$docidentifier_iso"/></xsl:if></xsl:variable>
97
97
  <xsl:variable name="anotherNumbers">
98
98
  <xsl:variable name="year_iso_reference" select="concat(':',substring-after($iso_reference,':'))"/>
99
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type != '' and @type != 'ISO' and not(starts-with(@type, 'iso-')) and @type != 'URN']">
99
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:docidentifier[@type != '' and @type != 'ISO' and not(starts-with(@type, 'iso-')) and @type != 'URN']">
100
100
  <xsl:value-of select="$linebreak"/><xsl:value-of select="concat(., $year_iso_reference)"/>
101
101
  </xsl:for-each>
102
102
  </xsl:variable>
@@ -133,10 +133,10 @@
133
133
  <xsl:value-of select="$anotherNumbers"/>
134
134
  </xsl:variable>
135
135
 
136
- <xsl:variable name="part" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@part)"/>
136
+ <xsl:variable name="part" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@part)"/>
137
137
 
138
- <xsl:variable name="doctype" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype"/>
139
- <xsl:variable name="doctype_localized_" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype[@language = $lang]"/>
138
+ <xsl:variable name="doctype" select="/iso:metanorma/iso:bibdata/iso:ext/iso:doctype"/>
139
+ <xsl:variable name="doctype_localized_" select="/iso:metanorma/iso:bibdata/iso:ext/iso:doctype[@language = $lang]"/>
140
140
  <xsl:variable name="doctype_localized">
141
141
  <xsl:choose>
142
142
  <xsl:when test="$doctype_localized_ != ''">
@@ -150,12 +150,12 @@
150
150
 
151
151
  <xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new($doctype_localized))"/>
152
152
 
153
- <xsl:variable name="stage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:stage)"/>
154
- <xsl:variable name="substage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:substage)"/>
155
- <xsl:variable name="stagename" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:stagename)"/>
156
- <xsl:variable name="stagename_abbreviation" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:stagename/@abbreviation)"/>
157
- <xsl:variable name="stagename_localized" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:status/iso:stage[@language = $lang])"/>
158
- <xsl:variable name="abbreviation" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:status/iso:stage/@abbreviation)"/>
153
+ <xsl:variable name="stage" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:stage)"/>
154
+ <xsl:variable name="substage" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:substage)"/>
155
+ <xsl:variable name="stagename" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:stagename)"/>
156
+ <xsl:variable name="stagename_abbreviation" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:stagename/@abbreviation)"/>
157
+ <xsl:variable name="stagename_localized" select="normalize-space(/iso:metanorma/iso:bibdata/iso:status/iso:stage[@language = $lang])"/>
158
+ <xsl:variable name="abbreviation" select="normalize-space(/iso:metanorma/iso:bibdata/iso:status/iso:stage/@abbreviation)"/>
159
159
  <xsl:variable name="abbreviation_uppercased" select="java:toUpperCase(java:java.lang.String.new($abbreviation))"/>
160
160
 
161
161
  <xsl:variable name="stage-abbreviation">
@@ -269,7 +269,7 @@
269
269
  <xsl:variable name="proof-text">PROOF/ÉPREUVE</xsl:variable>
270
270
 
271
271
  <xsl:variable name="docnumber_with_prefix">
272
- <xsl:if test="$doctype = 'recommendation'">R </xsl:if><xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:docnumber"/>
272
+ <xsl:if test="$doctype = 'recommendation'">R </xsl:if><xsl:value-of select="/iso:metanorma/iso:bibdata/iso:docnumber"/>
273
273
  </xsl:variable>
274
274
 
275
275
  <xsl:variable name="ISO_title_en">INTERNATIONAL ORGANIZATION FOR STANDARDIZATION</xsl:variable>
@@ -293,6 +293,9 @@
293
293
  <xsl:variable name="i18n_locality_part"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">locality.part</xsl:with-param></xsl:call-template></xsl:variable>
294
294
  <xsl:variable name="i18n_secretariat"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">secretariat</xsl:with-param></xsl:call-template></xsl:variable>
295
295
  <xsl:variable name="i18n_classification_UDC"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">classification-UDC</xsl:with-param></xsl:call-template></xsl:variable>
296
+ <xsl:variable name="i18n_draft_comment_1"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">draft_comment_1</xsl:with-param></xsl:call-template></xsl:variable>
297
+ <xsl:variable name="i18n_draft_comment_2"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">draft_comment_2</xsl:with-param></xsl:call-template></xsl:variable>
298
+ <xsl:variable name="i18n_draft_comment_3"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">draft_comment_3</xsl:with-param></xsl:call-template></xsl:variable>
296
299
 
297
300
  <!-- Example:
298
301
  <item level="1" id="Foreword" display="true">Foreword</item>
@@ -311,7 +314,7 @@
311
314
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
312
315
 
313
316
  <xsl:variable name="lang_other">
314
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:title[@language != $lang]">
317
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:title[@language != $lang]">
315
318
  <xsl:if test="not(preceding-sibling::iso:title[@language = current()/@language])">
316
319
  <lang><xsl:value-of select="@language"/></lang>
317
320
  </xsl:if>
@@ -321,7 +324,7 @@
321
324
  <xsl:variable name="editorialgroup_">
322
325
  <!-- Example: ISO/TC 46/SC 2 -->
323
326
  <!-- ISO/SG SMART/SG TS/AG 1 -->
324
- <xsl:variable name="approvalgroup" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:approvalgroup/@identifier)"/>
327
+ <xsl:variable name="approvalgroup" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:approvalgroup/@identifier)"/>
325
328
  <xsl:variable name="parts_by_slash">
326
329
  <xsl:call-template name="split">
327
330
  <xsl:with-param name="pText" select="$approvalgroup"/>
@@ -365,7 +368,7 @@
365
368
  <xsl:variable name="editorialgroup" select="xalan:nodeset($editorialgroup_)"/>
366
369
 
367
370
  <xsl:variable name="secretariat_">
368
- <xsl:variable name="value" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:editorialgroup/iso:secretariat)"/>
371
+ <xsl:variable name="value" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:editorialgroup/iso:secretariat)"/>
369
372
  <xsl:if test="$value != ''">
370
373
  <xsl:value-of select="concat($i18n_secretariat, ': ')"/>
371
374
  <fo:inline font-weight="bold"><xsl:value-of select="$value"/></fo:inline>
@@ -374,7 +377,7 @@
374
377
  <xsl:variable name="secretariat" select="xalan:nodeset($secretariat_)"/>
375
378
 
376
379
  <xsl:variable name="ics_">
377
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
380
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:ext/iso:ics/iso:code">
378
381
  <xsl:if test="position() = 1"><fo:inline>ICS: </fo:inline></xsl:if>
379
382
  <xsl:value-of select="."/>
380
383
  <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
@@ -382,7 +385,7 @@
382
385
  </xsl:variable>
383
386
  <xsl:variable name="ics" select="xalan:nodeset($ics_)"/>
384
387
  <xsl:variable name="udc">
385
- <xsl:variable name="classification_udc" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:classification[@type = 'UDC'])"/>
388
+ <xsl:variable name="classification_udc" select="normalize-space(/iso:metanorma/iso:bibdata/iso:classification[@type = 'UDC'])"/>
386
389
  <xsl:choose>
387
390
  <xsl:when test="$classification_udc != ''">
388
391
  <xsl:value-of select="concat($i18n_classification_UDC, ' ')"/>
@@ -392,7 +395,7 @@
392
395
  </xsl:choose>
393
396
  </xsl:variable>
394
397
 
395
- <xsl:variable name="revision_date" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date)"/>
398
+ <xsl:variable name="revision_date" select="normalize-space(/iso:metanorma/iso:bibdata/iso:version/iso:revision-date)"/>
396
399
  <xsl:variable name="revision_date_num" select="number(translate($revision_date,'-',''))"/>
397
400
 
398
401
  <xsl:variable name="layoutVersion_">
@@ -455,7 +458,7 @@
455
458
  <xsl:attribute name="color">rgb(35,31,32)</xsl:attribute>
456
459
  </xsl:if>
457
460
 
458
- <xsl:if test="/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata/iso:linenumbers = 'true'">
461
+ <xsl:if test="/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:linenumbers = 'true'">
459
462
  <xsl:processing-instruction name="add_line_numbers">true</xsl:processing-instruction>
460
463
  </xsl:if>
461
464
 
@@ -844,6 +847,9 @@
844
847
  </xsl:variable>
845
848
 
846
849
  <xsl:if test="$debug = 'true'">
850
+ <redirect:write file="updated_xml.xml">
851
+ <xsl:copy-of select="$updated_xml"/>
852
+ </redirect:write>
847
853
  <xsl:message>End updated_xml</xsl:message>
848
854
  <xsl:message>DEBUG: processing time <xsl:value-of select="java:getTime(java:java.util.Date.new()) - $startTime0"/> msec.</xsl:message>
849
855
  </xsl:if>
@@ -923,7 +929,7 @@
923
929
  </fo:inline>
924
930
  </fo:block>
925
931
 
926
- <xsl:if test="/iso:iso-standard/iso:bibdata/iso:keyword">
932
+ <xsl:if test="/iso:metanorma/iso:bibdata/iso:keyword">
927
933
  <fo:block margin-top="6pt">
928
934
  <fo:inline font-weight="bold"><xsl:value-of select="$i18n_descriptors"/> : </fo:inline>
929
935
  <xsl:call-template name="insertKeywords">
@@ -938,7 +944,7 @@
938
944
  <fo:table-row>
939
945
  <fo:table-cell>
940
946
  <fo:block>
941
- <xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
947
+ <xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:copyright-statement"/>
942
948
  </fo:block>
943
949
  </fo:table-cell>
944
950
  <fo:table-cell display-align="after" text-align="right">
@@ -982,10 +988,10 @@
982
988
  <xsl:text>/</xsl:text>
983
989
  <xsl:value-of select="$doctype_localized"/>
984
990
  <xsl:text> </xsl:text>
985
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
991
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
986
992
  </xsl:when>
987
993
  <xsl:otherwise>
988
- <xsl:value-of select="$doctype_uppercased"/> <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:docnumber"/>
994
+ <xsl:value-of select="$doctype_uppercased"/> <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:docnumber"/>
989
995
  </xsl:otherwise>
990
996
  </xsl:choose>
991
997
  </fo:block>
@@ -993,7 +999,7 @@
993
999
  </fo:table-row>
994
1000
  <fo:table-row display-align="after">
995
1001
  <fo:table-cell>
996
- <fo:block margin-bottom="-1mm">Published <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/></fo:block>
1002
+ <fo:block margin-bottom="-1mm">Published <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:date[@type = 'published']"/></fo:block>
997
1003
  </fo:table-cell>
998
1004
  </fo:table-row>
999
1005
  </fo:table-body>
@@ -1011,7 +1017,7 @@
1011
1017
  <xsl:call-template name="printAddendumTitle"/>
1012
1018
  </fo:block>
1013
1019
 
1014
- <xsl:apply-templates select="/iso:iso-standard/iso:preface/iso:clause[@type = 'provenance']">
1020
+ <xsl:apply-templates select="/iso:metanorma/iso:preface/iso:clause[@type = 'provenance']">
1015
1021
  <xsl:with-param name="process">true</xsl:with-param>
1016
1022
  </xsl:apply-templates>
1017
1023
 
@@ -1044,7 +1050,7 @@
1044
1050
  <xsl:otherwise>
1045
1051
 
1046
1052
  <xsl:variable name="copyright-statement">
1047
- <xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
1053
+ <xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:copyright-statement"/>
1048
1054
  </xsl:variable>
1049
1055
 
1050
1056
  <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
@@ -1133,7 +1139,7 @@
1133
1139
  <xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num &lt;= 19981231)"><!-- copyright renders in the footer footer-preface-first_1987-1998--></xsl:when>
1134
1140
  <xsl:otherwise>
1135
1141
 
1136
- <!-- <xsl:if test="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"> -->
1142
+ <!-- <xsl:if test="/iso:metanorma/iso:boilerplate/iso:copyright-statement"> -->
1137
1143
  <xsl:if test="normalize-space($copyright-statement) != ''">
1138
1144
 
1139
1145
  <fo:block-container height="252mm" display-align="after" role="SKIP">
@@ -1155,12 +1161,12 @@
1155
1161
  <!-- <xsl:if test="$layoutVersion = '2024'">
1156
1162
  <xsl:attribute name="font-size">8.6pt</xsl:attribute>
1157
1163
  </xsl:if> -->
1158
- <!-- <xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/> -->
1164
+ <!-- <xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:copyright-statement"/> -->
1159
1165
  <xsl:copy-of select="$copyright-statement"/>
1160
1166
  </fo:block>
1161
1167
  </fo:block>
1162
1168
  </fo:block-container>
1163
- <!-- <xsl:if test="/iso:iso-standard/iso:preface/*"> -->
1169
+ <!-- <xsl:if test="/iso:metanorma/iso:preface/*"> -->
1164
1170
  <!-- <xsl:copy-of select="."/> -->
1165
1171
 
1166
1172
  <xsl:if test="//iso:preface/*">
@@ -1248,21 +1254,21 @@
1248
1254
 
1249
1255
  <fo:block role="SKIP">
1250
1256
 
1251
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
1257
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
1252
1258
 
1253
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
1259
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
1254
1260
 
1255
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
1261
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
1256
1262
  <xsl:with-param name="isMainLang">true</xsl:with-param>
1257
1263
  <xsl:with-param name="isMainBody">true</xsl:with-param>
1258
1264
  </xsl:apply-templates>
1259
1265
 
1260
1266
  </fo:block>
1261
1267
  <fo:block role="SKIP">
1262
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
1268
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
1263
1269
  </fo:block>
1264
1270
 
1265
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
1271
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
1266
1272
  <xsl:with-param name="isMainLang">true</xsl:with-param>
1267
1273
  <xsl:with-param name="isMainBody">true</xsl:with-param>
1268
1274
  </xsl:apply-templates>
@@ -1324,7 +1330,7 @@
1324
1330
  <xsl:choose>
1325
1331
  <xsl:when test="$doctype = 'amendment'">
1326
1332
  <xsl:variable name="flatxml">
1327
- <xsl:apply-templates select="/iso:iso-standard/iso:sections/*" mode="flatxml"/>
1333
+ <xsl:apply-templates select="/iso:metanorma/iso:sections/*" mode="flatxml"/>
1328
1334
  </xsl:variable>
1329
1335
  <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
1330
1336
  </xsl:when>
@@ -1336,7 +1342,7 @@
1336
1342
  <xsl:otherwise>
1337
1343
  <xsl:choose>
1338
1344
  <xsl:when test="$doctype = 'amendment'">
1339
- <xsl:apply-templates select="/iso:iso-standard/iso:sections/*"/>
1345
+ <xsl:apply-templates select="/iso:metanorma/iso:sections/*"/>
1340
1346
  </xsl:when>
1341
1347
  <xsl:otherwise> -->
1342
1348
  <!-- <xsl:call-template name="processMainSectionsDefault"/> -->
@@ -1419,9 +1425,9 @@
1419
1425
  <xsl:template name="printAddendumTitle">
1420
1426
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
1421
1427
  <xsl:text> </xsl:text>
1422
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
1428
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
1423
1429
  <xsl:text> : </xsl:text>
1424
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:title[@type = 'title-add']"/>
1430
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:title[@type = 'title-add']"/>
1425
1431
  </xsl:template>
1426
1432
 
1427
1433
  <xsl:template match="iso:preface/iso:clause[@type = 'provenance']" priority="5">
@@ -1531,7 +1537,7 @@
1531
1537
  <fo:static-content flow-name="cover-page-footer" font-size="9.5pt">
1532
1538
  <fo:block text-align="center">
1533
1539
  <!-- COPYRIGHT RESERVED -->
1534
- <xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
1540
+ <xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:copyright-statement"/>
1535
1541
  </fo:block>
1536
1542
  </fo:static-content>
1537
1543
  <fo:flow flow-name="xsl-region-body">
@@ -1547,7 +1553,7 @@
1547
1553
  <xsl:choose>
1548
1554
  <xsl:when test="$lang = 'fr'"><xsl:value-of select="java:toUpperCase(java:java.lang.String.new('Organisation Internationale de Normalisation'))"/></xsl:when>
1549
1555
  <xsl:otherwise>
1550
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iso:iso-standard/iso:bibdata/iso:copyright/iso:owner/iso:organization/iso:name))"/>
1556
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iso:metanorma/iso:bibdata/iso:copyright/iso:owner/iso:organization/iso:name))"/>
1551
1557
  </xsl:otherwise>
1552
1558
  </xsl:choose>
1553
1559
  </xsl:with-param>
@@ -1572,10 +1578,10 @@
1572
1578
  <xsl:attribute name="font-size">14pt</xsl:attribute>
1573
1579
  </xsl:if>
1574
1580
 
1575
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
1576
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
1581
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
1582
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
1577
1583
  <fo:block font-size="11pt" text-transform="uppercase" margin-top="2mm">
1578
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
1584
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
1579
1585
  </fo:block>
1580
1586
 
1581
1587
  </fo:block>
@@ -1583,17 +1589,17 @@
1583
1589
 
1584
1590
  <fo:block-container margin-top="8.5mm" font-size="10pt"> <!-- height="40mm" display-align="center" -->
1585
1591
  <!-- Example: 1st EDITION -->
1586
- <!-- <fo:block><xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:edition[@language != '']" /></fo:block> -->
1587
- <fo:block><xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:edition[@language != '']"/></fo:block> <!-- font-weight="bold" -->
1592
+ <!-- <fo:block><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:edition[@language != '']" /></fo:block> -->
1593
+ <fo:block><xsl:value-of select="/iso:metanorma/iso:bibdata/iso:edition[@language != '']"/></fo:block> <!-- font-weight="bold" -->
1588
1594
  <!-- <fo:block>&#xa0;</fo:block> -->
1589
1595
  <!-- Example: October 1971 -->
1590
1596
  <fo:block margin-top="2mm" font-size="9pt">
1591
1597
  <xsl:call-template name="convertDate">
1592
- <xsl:with-param name="date" select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/>
1598
+ <xsl:with-param name="date" select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
1593
1599
  </xsl:call-template>
1594
1600
  </fo:block>
1595
1601
  <fo:block margin-top="14mm">
1596
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:ext/iso:edn-replacement"/>
1602
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:ext/iso:edn-replacement"/>
1597
1603
  </fo:block>
1598
1604
  </fo:block-container>
1599
1605
  </fo:block>
@@ -1615,7 +1621,7 @@
1615
1621
  </fo:inline>
1616
1622
  </fo:block>
1617
1623
 
1618
- <xsl:if test="/iso:iso-standard/iso:bibdata/iso:keyword">
1624
+ <xsl:if test="/iso:metanorma/iso:bibdata/iso:keyword">
1619
1625
  <fo:block margin-top="10pt">
1620
1626
  <fo:inline font-weight="bold"><xsl:value-of select="$i18n_descriptors"/> : </fo:inline>
1621
1627
  <xsl:call-template name="insertKeywords">
@@ -1644,7 +1650,7 @@
1644
1650
  </fo:static-content>
1645
1651
  <fo:flow flow-name="xsl-region-body">
1646
1652
  <xsl:variable name="docnumber">
1647
- <xsl:variable name="value" select="/iso:iso-standard/iso:bibdata/iso:docnumber"/>
1653
+ <xsl:variable name="value" select="/iso:metanorma/iso:bibdata/iso:docnumber"/>
1648
1654
  <xsl:value-of select="$value"/>
1649
1655
  <xsl:if test="$part != ''">/<xsl:value-of select="$part"/></xsl:if>
1650
1656
  </xsl:variable>
@@ -1734,7 +1740,7 @@
1734
1740
  <fo:block margin-top="6mm" font-weight="bold">
1735
1741
  <xsl:call-template name="printEdition"/>
1736
1742
  <xsl:text> — </xsl:text>
1737
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/>
1743
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
1738
1744
  </fo:block>
1739
1745
 
1740
1746
  </fo:flow>
@@ -1753,7 +1759,7 @@
1753
1759
  <fo:block line-height="1">
1754
1760
  <xsl:call-template name="printEdition"/>
1755
1761
  <xsl:value-of select="$linebreak"/>
1756
- <xsl:text> </xsl:text><xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/>
1762
+ <xsl:text> </xsl:text><xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
1757
1763
  </fo:block>
1758
1764
  </fo:block-container>
1759
1765
  </fo:block-container>
@@ -1845,7 +1851,7 @@
1845
1851
  <fo:block-container height="46mm" role="SKIP">
1846
1852
  <fo:block font-size="20pt" font-weight="bold" line-height="1.25" margin-top="3mm">
1847
1853
 
1848
- <xsl:variable name="updates-document-type" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type"/>
1854
+ <xsl:variable name="updates-document-type" select="/iso:metanorma/iso:bibdata/iso:ext/iso:updates-document-type"/>
1849
1855
  <xsl:variable name="updates-document-type_localized">
1850
1856
  <xsl:call-template name="getLocalizedString">
1851
1857
  <xsl:with-param name="key" select="concat('doctype_dict.',$updates-document-type)"/>
@@ -1865,6 +1871,12 @@
1865
1871
  <xsl:choose>
1866
1872
  <xsl:when test="$stage-abbreviation = 'DIS'"> <!-- or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM' -->
1867
1873
  <xsl:choose>
1874
+ <xsl:when test="$stagename_localized != '' and contains($stagename_localized, ' ')">
1875
+ <!-- Draft International Standard to DRAFT -->
1876
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring-before($stagename_localized, ' ')))"/>
1877
+ <xsl:value-of select="$linebreak"/>
1878
+ <xsl:value-of select="substring-after($stagename_localized, ' ')"/>
1879
+ </xsl:when>
1868
1880
  <xsl:when test="contains($stagename, ' ')">
1869
1881
  <!-- Draft International Standard to DRAFT -->
1870
1882
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring-before($stagename, ' ')))"/>
@@ -1885,7 +1897,7 @@
1885
1897
  <xsl:value-of select="$stagename-header-coverpage"/>
1886
1898
 
1887
1899
  <!-- if there is iteration number, then print it -->
1888
- <xsl:variable name="iteration" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:iteration)"/>
1900
+ <xsl:variable name="iteration" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:iteration)"/>
1889
1901
  <xsl:if test="number($iteration) = $iteration and ($stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD')">
1890
1902
  <xsl:text> </xsl:text><xsl:value-of select="$iteration"/>
1891
1903
  </xsl:if>
@@ -1923,7 +1935,16 @@
1923
1935
  <xsl:if test="$stage &gt;=60 and $substage != 0">
1924
1936
  <xsl:attribute name="color"><xsl:value-of select="$color_red"/></xsl:attribute>
1925
1937
  </xsl:if>
1926
- <xsl:value-of select="$docidentifierISO"/>
1938
+ <xsl:choose>
1939
+ <xsl:when test="contains($docidentifierISO, ' ')">
1940
+ <xsl:value-of select="substring-before($docidentifierISO, ' ')"/>
1941
+ <xsl:text>  </xsl:text>
1942
+ <xsl:value-of select="substring-after($docidentifierISO, ' ')"/>
1943
+ </xsl:when>
1944
+ <xsl:otherwise>
1945
+ <xsl:value-of select="$docidentifierISO"/>
1946
+ </xsl:otherwise>
1947
+ </xsl:choose>
1927
1948
  </fo:block>
1928
1949
  </fo:table-cell>
1929
1950
  </fo:table-row>
@@ -1987,7 +2008,7 @@
1987
2008
  <fo:block font-size="15pt" font-weight="bold" margin-bottom="3mm">
1988
2009
  <xsl:value-of select="$doctype_uppercased"/>
1989
2010
  <xsl:text> </xsl:text>
1990
- <xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
2011
+ <xsl:variable name="amendment-number" select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
1991
2012
  <xsl:if test="normalize-space($amendment-number) != ''">
1992
2013
  <xsl:value-of select="$amendment-number"/><xsl:text> </xsl:text>
1993
2014
  </xsl:if>
@@ -1995,14 +2016,14 @@
1995
2016
  <!-- </xsl:if>
1996
2017
 
1997
2018
  <xsl:if test="$doctype = 'amendment' and not($stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM')"> -->
1998
- <xsl:if test="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']">
2019
+ <xsl:if test="/iso:metanorma/iso:bibdata/iso:date[@type = 'updated']">
1999
2020
  <fo:block font-size="18pt" font-weight="bold" margin-bottom="3mm">
2000
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']"/>
2021
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:date[@type = 'updated']"/>
2001
2022
  </fo:block>
2002
2023
  </xsl:if>
2003
2024
  </xsl:if>
2004
2025
 
2005
- <xsl:variable name="date_corrected" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:date[@type = 'corrected'])"/>
2026
+ <xsl:variable name="date_corrected" select="normalize-space(/iso:metanorma/iso:bibdata/iso:date[@type = 'corrected'])"/>
2006
2027
  <xsl:if test="$date_corrected != ''">
2007
2028
  <fo:block font-size="18pt" font-weight="bold" margin-bottom="3mm">
2008
2029
  <xsl:value-of select="$i18n_corrected_version"/>
@@ -2030,7 +2051,21 @@
2030
2051
  <!-- Voting begins on: -->
2031
2052
  <xsl:value-of select="concat($i18n_voting_begins_on, ':')"/>
2032
2053
  <fo:block font-weight="bold">
2033
- <xsl:call-template name="insertVoteStarted"/>
2054
+ <xsl:variable name="v_date">
2055
+ <xsl:call-template name="split">
2056
+ <xsl:with-param name="pText">
2057
+ <xsl:call-template name="insertVoteStarted"/>
2058
+ </xsl:with-param>
2059
+ <xsl:with-param name="sep" select="'-'"/>
2060
+ <xsl:with-param name="keep_sep">true</xsl:with-param>
2061
+ </xsl:call-template>
2062
+ </xsl:variable>
2063
+ <xsl:for-each select="xalan:nodeset($v_date)/item">
2064
+ <xsl:choose>
2065
+ <xsl:when test=". = '-'"><fo:inline font-weight="normal"><xsl:value-of select="."/></fo:inline></xsl:when>
2066
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
2067
+ </xsl:choose>
2068
+ </xsl:for-each>
2034
2069
  </fo:block>
2035
2070
  </fo:block>
2036
2071
 
@@ -2038,7 +2073,21 @@
2038
2073
  <!-- Voting terminates on: -->
2039
2074
  <xsl:value-of select="concat($i18n_voting_terminates_on, ':')"/>
2040
2075
  <fo:block font-weight="bold">
2041
- <xsl:call-template name="insertVoteEnded"/>
2076
+ <xsl:variable name="v_date">
2077
+ <xsl:call-template name="split">
2078
+ <xsl:with-param name="pText">
2079
+ <xsl:call-template name="insertVoteEnded"/>
2080
+ </xsl:with-param>
2081
+ <xsl:with-param name="sep" select="'-'"/>
2082
+ <xsl:with-param name="keep_sep">true</xsl:with-param>
2083
+ </xsl:call-template>
2084
+ </xsl:variable>
2085
+ <xsl:for-each select="xalan:nodeset($v_date)/item">
2086
+ <xsl:choose>
2087
+ <xsl:when test=". = '-'"><fo:inline font-weight="normal"><xsl:value-of select="."/></fo:inline></xsl:when>
2088
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
2089
+ </xsl:choose>
2090
+ </xsl:for-each>
2042
2091
  </fo:block>
2043
2092
  </fo:block>
2044
2093
  </xsl:if>
@@ -2054,7 +2103,7 @@
2054
2103
  <xsl:call-template name="insertCoverPageAdditionalNotes"/>
2055
2104
  </xsl:variable>
2056
2105
 
2057
- <xsl:variable name="feedback_link" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:semantic-metadata/iso:feedback-link)"/>
2106
+ <xsl:variable name="feedback_link" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:semantic-metadata/iso:feedback-link)"/>
2058
2107
 
2059
2108
  <xsl:if test="normalize-space($additionalNotes) != ''"> <!-- or $stage-abbreviation = 'PRF' -->
2060
2109
  <xsl:attribute name="display-align">center</xsl:attribute>
@@ -2115,8 +2164,11 @@
2115
2164
  </xsl:if>
2116
2165
  </fo:block>
2117
2166
  </fo:table-cell>
2118
- <fo:table-cell number-columns-spanned="2" padding-left="6mm" display-align="after">
2119
- <fo:block font-size="6.5pt" margin-right="15mm">
2167
+ <fo:table-cell number-columns-spanned="2" padding-top="-3mm" padding-left="5mm" display-align="after">
2168
+ <xsl:if test="$lang = 'fr'">
2169
+ <xsl:attribute name="padding-top">-18mm</xsl:attribute>
2170
+ </xsl:if>
2171
+ <fo:block font-size="7pt" margin-right="20mm" font-family="Cambria">
2120
2172
  <xsl:call-template name="insertDraftComments"/>
2121
2173
  </fo:block>
2122
2174
  </fo:table-cell>
@@ -2174,12 +2226,12 @@
2174
2226
  <fo:table-cell display-align="after" padding-bottom="3mm" role="SKIP">
2175
2227
  <fo:block-container height="22.5mm" display-align="center" role="SKIP">
2176
2228
 
2177
- <xsl:variable name="iso-fast-track" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:fast-track)"/>
2229
+ <xsl:variable name="iso-fast-track" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:fast-track)"/>
2178
2230
  <xsl:if test="normalize-space($iso-fast-track) = 'true'">
2179
2231
  <xsl:attribute name="height">28mm</xsl:attribute>
2180
2232
  </xsl:if>
2181
2233
 
2182
- <xsl:variable name="iso-cen-parallel" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:iso-cen-parallel)"/>
2234
+ <xsl:variable name="iso-cen-parallel" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:iso-cen-parallel)"/>
2183
2235
  <xsl:if test="normalize-space($iso-cen-parallel) = 'true'">
2184
2236
  <xsl:attribute name="height">35mm</xsl:attribute>
2185
2237
  </xsl:if>
@@ -2207,7 +2259,7 @@
2207
2259
  <xsl:attribute name="margin-top">0</xsl:attribute>
2208
2260
  </xsl:if>
2209
2261
 
2210
- <!-- <xsl:variable name="docid" select="substring-before(/iso:iso-standard/iso:bibdata/iso:docidentifier, ' ')"/>
2262
+ <!-- <xsl:variable name="docid" select="substring-before(/iso:metanorma/iso:bibdata/iso:docidentifier, ' ')"/>
2211
2263
  <xsl:for-each select="xalan:tokenize($docid, '/')"> -->
2212
2264
  <xsl:variable name="content-height">
2213
2265
  <xsl:choose>
@@ -2216,7 +2268,7 @@
2216
2268
  </xsl:choose>
2217
2269
  </xsl:variable>
2218
2270
 
2219
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:copyright/iso:owner/iso:organization">
2271
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:copyright/iso:owner/iso:organization">
2220
2272
  <xsl:choose>
2221
2273
  <xsl:when test="iso:abbreviation = 'ISO'">
2222
2274
  <xsl:choose>
@@ -2413,7 +2465,7 @@
2413
2465
  <xsl:value-of select="translate($stagename-header-coverpage, ' ', $linebreak)"/>
2414
2466
 
2415
2467
  <!-- if there is iteration number, then print it -->
2416
- <xsl:variable name="iteration" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:iteration)"/>
2468
+ <xsl:variable name="iteration" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:iteration)"/>
2417
2469
 
2418
2470
  <xsl:if test="number($iteration) = $iteration and ($stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD')">
2419
2471
  <xsl:text> </xsl:text><xsl:value-of select="$iteration"/>
@@ -2436,7 +2488,7 @@
2436
2488
  <xsl:choose>
2437
2489
  <xsl:when test="$stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM'"><xsl:value-of select="$doctype_uppercased"/></xsl:when>
2438
2490
  <xsl:when test="$doctype = 'amendment'">
2439
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
2491
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:metanorma/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
2440
2492
  </xsl:when>
2441
2493
  <xsl:otherwise>
2442
2494
  <xsl:if test="$font-size != ''">
@@ -2484,20 +2536,20 @@
2484
2536
  <xsl:call-template name="insertEditionAndDate"/>
2485
2537
  </fo:block>
2486
2538
  <!-- <xsl:value-of select="$linebreak"/>
2487
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
2539
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/> -->
2488
2540
  <xsl:if test="$doctype = 'addendum'">
2489
2541
  <fo:block text-align="right" margin-right="0.5mm" role="SKIP">
2490
2542
  <fo:block font-weight="bold" margin-top="16pt">
2491
2543
  <xsl:value-of select="$doctype_uppercased"/>
2492
2544
  <xsl:text> </xsl:text>
2493
- <xsl:variable name="addendum-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
2545
+ <xsl:variable name="addendum-number" select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
2494
2546
  <xsl:if test="normalize-space($addendum-number) != ''">
2495
2547
  <xsl:value-of select="$addendum-number"/><xsl:text> </xsl:text>
2496
2548
  </xsl:if>
2497
2549
  </fo:block>
2498
2550
  <fo:block>
2499
- <xsl:if test="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']">
2500
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']"/>
2551
+ <xsl:if test="/iso:metanorma/iso:bibdata/iso:date[@type = 'updated']">
2552
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:date[@type = 'updated']"/>
2501
2553
  </xsl:if>
2502
2554
  </fo:block>
2503
2555
  </fo:block>
@@ -2507,19 +2559,19 @@
2507
2559
  <fo:block font-weight="bold" margin-top="4pt" role="H1">
2508
2560
  <xsl:value-of select="$doctype_uppercased"/>
2509
2561
  <xsl:text> </xsl:text>
2510
- <xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
2562
+ <xsl:variable name="amendment-number" select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
2511
2563
  <xsl:if test="normalize-space($amendment-number) != ''">
2512
2564
  <xsl:value-of select="$amendment-number"/><xsl:text> </xsl:text>
2513
2565
  </xsl:if>
2514
2566
  </fo:block>
2515
2567
  <fo:block>
2516
- <xsl:if test="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']">
2517
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']"/>
2568
+ <xsl:if test="/iso:metanorma/iso:bibdata/iso:date[@type = 'updated']">
2569
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:date[@type = 'updated']"/>
2518
2570
  </xsl:if>
2519
2571
  </fo:block>
2520
2572
  </fo:block>
2521
2573
  </xsl:if>
2522
- <xsl:variable name="date_corrected" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:date[@type = 'corrected'])"/>
2574
+ <xsl:variable name="date_corrected" select="normalize-space(/iso:metanorma/iso:bibdata/iso:date[@type = 'corrected'])"/>
2523
2575
  <xsl:if test="$date_corrected != ''">
2524
2576
  <fo:block text-align="right" font-size="9.5pt">
2525
2577
  <xsl:value-of select="$linebreak"/>
@@ -2618,11 +2670,11 @@
2618
2670
  <fo:block font-size="{$font_size}" margin-top="6pt" role="H2">
2619
2671
  <xsl:value-of select="$doctype_uppercased"/>
2620
2672
  <xsl:text> </xsl:text>
2621
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
2673
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@addendum"/>
2622
2674
  <xsl:text>:</xsl:text>
2623
2675
  </fo:block>
2624
2676
  <fo:block font-size="{$font_size}" font-weight="bold" margin-top="6pt" role="H2">
2625
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-add']/node()"/>
2677
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-add']/node()"/>
2626
2678
  </fo:block>
2627
2679
  </xsl:when>
2628
2680
  <xsl:otherwise>
@@ -2740,7 +2792,7 @@
2740
2792
  <fo:block text-align="right">
2741
2793
  <xsl:call-template name="printEdition"/>
2742
2794
  <xsl:value-of select="$linebreak"/>
2743
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/></fo:block>
2795
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/></fo:block>
2744
2796
  </fo:table-cell>
2745
2797
  </fo:table-row>
2746
2798
  </fo:table-body>
@@ -2788,25 +2840,25 @@
2788
2840
  <fo:flow flow-name="xsl-region-body">
2789
2841
  <fo:block-container text-align="right" role="SKIP">
2790
2842
  <xsl:choose>
2791
- <xsl:when test="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-tc']">
2843
+ <xsl:when test="/iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'iso-tc']">
2792
2844
  <!-- 17301 -->
2793
2845
  <fo:block font-size="14pt" font-weight="bold" margin-bottom="12pt">
2794
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-tc']"/>
2846
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:docidentifier[@type = 'iso-tc']"/>
2795
2847
  </fo:block>
2796
2848
  <!-- Date: 2016-05-01 -->
2797
2849
  <fo:block margin-bottom="12pt">
2798
- <xsl:text>Date: </xsl:text><xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/>
2850
+ <xsl:text>Date: </xsl:text><xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
2799
2851
  </fo:block>
2800
2852
 
2801
2853
  <!-- ISO/CD 17301-1(E) -->
2802
2854
  <fo:block margin-bottom="12pt">
2803
- <xsl:value-of select="concat(/iso:iso-standard/iso:bibdata/iso:docidentifier, $lang-1st-letter)"/>
2855
+ <xsl:value-of select="concat(/iso:metanorma/iso:bibdata/iso:docidentifier, $lang-1st-letter)"/>
2804
2856
  </fo:block>
2805
2857
  </xsl:when>
2806
2858
  <xsl:otherwise>
2807
2859
  <fo:block font-size="14pt" font-weight="bold" margin-bottom="12pt">
2808
2860
  <!-- ISO/WD 24229(E) -->
2809
- <xsl:value-of select="concat(/iso:iso-standard/iso:bibdata/iso:docidentifier, $lang-1st-letter)"/>
2861
+ <xsl:value-of select="concat(/iso:metanorma/iso:bibdata/iso:docidentifier, $lang-1st-letter)"/>
2810
2862
  </fo:block>
2811
2863
 
2812
2864
  </xsl:otherwise>
@@ -2861,10 +2913,10 @@
2861
2913
  </fo:block-container>
2862
2914
  <fo:block role="SKIP"><xsl:value-of select="$linebreak"/></fo:block>
2863
2915
 
2864
- <xsl:if test="/iso:iso-standard/iso:boilerplate/iso:license-statement">
2916
+ <xsl:if test="/iso:metanorma/iso:boilerplate/iso:license-statement">
2865
2917
  <fo:block-container font-size="10pt" margin-top="12pt" margin-bottom="6pt" border="0.5pt solid black" role="SKIP">
2866
2918
  <fo:block padding-top="1mm">
2867
- <xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:license-statement"/>
2919
+ <xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:license-statement"/>
2868
2920
  </fo:block>
2869
2921
  </fo:block-container>
2870
2922
  </xsl:if>
@@ -2913,7 +2965,7 @@
2913
2965
  </xsl:template>
2914
2966
 
2915
2967
  <!-- transform NOTE to Note for smallcaps feature working -->
2916
- <xsl:template match="iso:note/iso:name/text() | iso:example/iso:name/text()" mode="update_xml_step1" priority="3">
2968
+ <xsl:template match="iso:note/iso:name/text() | iso:example/iso:name/text() | iso:note/iso:fmt-name/text() | iso:example/iso:fmt-name/text()" mode="update_xml_step1" priority="3">
2917
2969
  <xsl:choose>
2918
2970
  <xsl:when test="$layoutVersion = '1951'"> <!-- and $revision_date_num &lt; 19680101 -->
2919
2971
  <xsl:value-of select="substring(., 1, 1)"/>
@@ -2927,7 +2979,7 @@
2927
2979
 
2928
2980
  <xsl:template name="insertLogoImages2024">
2929
2981
  <xsl:variable name="content-height">20</xsl:variable>
2930
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:copyright/iso:owner/iso:organization">
2982
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:copyright/iso:owner/iso:organization">
2931
2983
  <xsl:choose>
2932
2984
  <xsl:when test="iso:abbreviation = 'ISO'">
2933
2985
  <fo:instream-foreign-object content-height="{$content-height}mm" fox:alt-text="Image ISO Logo">
@@ -2957,24 +3009,24 @@
2957
3009
  </xsl:template>
2958
3010
 
2959
3011
  <xsl:template name="insertTitlesLangMain">
2960
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
2961
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
2962
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
3012
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
3013
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
3014
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
2963
3015
  <xsl:with-param name="isMainLang">true</xsl:with-param>
2964
3016
  </xsl:apply-templates>
2965
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
3017
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
2966
3018
  <xsl:with-param name="isMainLang">true</xsl:with-param>
2967
3019
  </xsl:apply-templates>
2968
3020
  </xsl:template>
2969
3021
 
2970
3022
  <xsl:template name="insertTitlesLangOther">
2971
3023
  <xsl:param name="lang_other"/>
2972
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
2973
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
2974
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
3024
+ <xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
3025
+ <xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
3026
+ <xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
2975
3027
  <xsl:with-param name="curr_lang" select="$lang_other"/>
2976
3028
  </xsl:apply-templates>
2977
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
3029
+ <xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
2978
3030
  <xsl:with-param name="curr_lang" select="$lang_other"/>
2979
3031
  </xsl:apply-templates>
2980
3032
  </xsl:template>
@@ -2996,17 +3048,17 @@
2996
3048
  <xsl:value-of select="$edition"/>
2997
3049
  <xsl:variable name="date">
2998
3050
  <xsl:choose>
2999
- <xsl:when test="($stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'FDIS' or $stagename_abbreviation = 'FDIS') and /iso:iso-standard/iso:bibdata/iso:version/iso:revision-date">
3000
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/>
3051
+ <xsl:when test="($stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'FDIS' or $stagename_abbreviation = 'FDIS') and /iso:metanorma/iso:bibdata/iso:version/iso:revision-date">
3052
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
3001
3053
  </xsl:when>
3002
- <xsl:when test="$stage-abbreviation = 'IS' and /iso:iso-standard/iso:bibdata/iso:date[@type = 'published']">
3003
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/>
3054
+ <xsl:when test="$stage-abbreviation = 'IS' and /iso:metanorma/iso:bibdata/iso:date[@type = 'published']">
3055
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:date[@type = 'published']"/>
3004
3056
  </xsl:when>
3005
- <xsl:when test="($stage-abbreviation = 'IS' or $stage-abbreviation = 'D') and /iso:iso-standard/iso:bibdata/iso:date[@type = 'created']">
3006
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'created']"/>
3057
+ <xsl:when test="($stage-abbreviation = 'IS' or $stage-abbreviation = 'D') and /iso:metanorma/iso:bibdata/iso:date[@type = 'created']">
3058
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:date[@type = 'created']"/>
3007
3059
  </xsl:when>
3008
3060
  <xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published' or $stage-abbreviation = 'PRF'">
3009
- <xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
3061
+ <xsl:value-of select="substring(/iso:metanorma/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
3010
3062
  </xsl:when>
3011
3063
  </xsl:choose>
3012
3064
  </xsl:variable>
@@ -3028,32 +3080,35 @@
3028
3080
  <xsl:template name="insertDraftComments">
3029
3081
  <xsl:if test="$stagename_abbreviation = 'DIS' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM' or $stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD'">
3030
3082
  <fo:block margin-bottom="1.5mm">
3031
- <xsl:text>THIS DOCUMENT IS A DRAFT CIRCULATED FOR COMMENT AND APPROVAL. IT IS THEREFORE SUBJECT TO CHANGE AND MAY NOT BE REFERRED TO AS AN INTERNATIONAL STANDARD UNTIL PUBLISHED AS SUCH.</xsl:text>
3083
+ <!-- <xsl:text>THIS DOCUMENT IS A DRAFT CIRCULATED FOR COMMENT AND APPROVAL. IT IS THEREFORE SUBJECT TO CHANGE AND MAY NOT BE REFERRED TO AS AN INTERNATIONAL STANDARD UNTIL PUBLISHED AS SUCH.</xsl:text> -->
3084
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($i18n_draft_comment_1))"/>
3032
3085
  </fo:block>
3033
3086
  </xsl:if>
3034
3087
  <xsl:if test="$stagename_abbreviation = 'DIS' or $stagename_abbreviation = 'FDIS' or $stage-abbreviation = 'FDIS' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM' or $stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD'">
3035
3088
  <fo:block margin-bottom="1.5mm">
3036
- <xsl:text>RECIPIENTS OF THIS DRAFT ARE INVITED TO
3089
+ <!-- <xsl:text>RECIPIENTS OF THIS DRAFT ARE INVITED TO
3037
3090
  SUBMIT, WITH THEIR COMMENTS, NOTIFICATION
3038
3091
  OF ANY RELEVANT PATENT RIGHTS OF WHICH
3039
3092
  THEY ARE AWARE AND TO PROVIDE SUPPORTING
3040
- DOCUMENTATION.</xsl:text>
3093
+ DOCUMENTATION.</xsl:text> -->
3094
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($i18n_draft_comment_2))"/>
3041
3095
  </fo:block>
3042
3096
  <fo:block>
3043
- <xsl:text>IN ADDITION TO THEIR EVALUATION AS
3097
+ <!-- <xsl:text>IN ADDITION TO THEIR EVALUATION AS
3044
3098
  BEING ACCEPTABLE FOR INDUSTRIAL, TECHNOLOGICAL,
3045
3099
  COMMERCIAL AND USER PURPOSES,
3046
3100
  DRAFT INTERNATIONAL STANDARDS MAY ON
3047
3101
  OCCASION HAVE TO BE CONSIDERED IN THE
3048
3102
  LIGHT OF THEIR POTENTIAL TO BECOME STANDARDS
3049
3103
  TO WHICH REFERENCE MAY BE MADE IN
3050
- NATIONAL REGULATIONS.</xsl:text>
3104
+ NATIONAL REGULATIONS.</xsl:text> -->
3105
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($i18n_draft_comment_3))"/>
3051
3106
  </fo:block>
3052
3107
  </xsl:if>
3053
3108
  </xsl:template>
3054
3109
 
3055
3110
  <xsl:template name="insertVoteStarted">
3056
- <xsl:variable name="vote_started" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:date[@type = 'vote-started']/iso:on)"/>
3111
+ <xsl:variable name="vote_started" select="normalize-space(/iso:metanorma/iso:bibdata/iso:date[@type = 'vote-started']/iso:on)"/>
3057
3112
  <xsl:choose>
3058
3113
  <xsl:when test="$vote_started != ''">
3059
3114
  <xsl:value-of select="$vote_started"/>
@@ -3062,7 +3117,7 @@
3062
3117
  </xsl:choose>
3063
3118
  </xsl:template>
3064
3119
  <xsl:template name="insertVoteEnded">
3065
- <xsl:variable name="vote_ended" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:date[@type = 'vote-ended']/iso:on)"/>
3120
+ <xsl:variable name="vote_ended" select="normalize-space(/iso:metanorma/iso:bibdata/iso:date[@type = 'vote-ended']/iso:on)"/>
3066
3121
  <xsl:choose>
3067
3122
  <xsl:when test="$vote_ended != ''">
3068
3123
  <xsl:value-of select="$vote_ended"/>
@@ -3074,7 +3129,7 @@
3074
3129
  <xsl:template name="insertCoverPageAdditionalNotes">
3075
3130
  <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'FCD' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'FDIS' or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM' or $stagename_abbreviation = 'DIS' or $stagename_abbreviation = 'FDIS'">
3076
3131
  <xsl:variable name="text">
3077
- <xsl:for-each select="/iso:iso-standard/iso:preface/iso:note[@coverpage='true']/iso:p">
3132
+ <xsl:for-each select="/iso:metanorma/iso:preface/iso:note[@coverpage='true']/iso:p">
3078
3133
  <fo:block>
3079
3134
  <xsl:apply-templates/>
3080
3135
  </fo:block>
@@ -3094,7 +3149,7 @@
3094
3149
  </fo:block-container>
3095
3150
  </xsl:if>
3096
3151
 
3097
- <xsl:variable name="iso-fast-track" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:fast-track)"/>
3152
+ <xsl:variable name="iso-fast-track" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:fast-track)"/>
3098
3153
 
3099
3154
  <xsl:if test="normalize-space($iso-fast-track) = 'true'">
3100
3155
  <fo:block-container space-before="2mm" role="SKIP">
@@ -3116,7 +3171,7 @@
3116
3171
  </fo:block-container>
3117
3172
  </xsl:if>
3118
3173
 
3119
- <xsl:variable name="iso-cen-parallel" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:iso-cen-parallel)"/>
3174
+ <xsl:variable name="iso-cen-parallel" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:iso-cen-parallel)"/>
3120
3175
 
3121
3176
  <xsl:if test="normalize-space($iso-cen-parallel) = 'true'">
3122
3177
  <fo:block-container space-before="4mm" role="SKIP">
@@ -3133,7 +3188,10 @@
3133
3188
  </xsl:if>
3134
3189
  <fo:block>
3135
3190
  <!-- <xsl:text>ISO/CEN PARALLEL PROCESSING</xsl:text> -->
3136
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($i18n_iso_cen_parallel))"/>
3191
+ <xsl:call-template name="add-letter-spacing">
3192
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($i18n_iso_cen_parallel))"/>
3193
+ <xsl:with-param name="letter-spacing" select="0.13"/>
3194
+ </xsl:call-template>
3137
3195
  </fo:block>
3138
3196
  </fo:block-container>
3139
3197
  </fo:block>
@@ -3516,7 +3574,7 @@
3516
3574
  <xsl:when test="$isMainLang = 'false' and $curr_lang = 'fr'">AMENDEMENT</xsl:when>
3517
3575
  <xsl:otherwise><xsl:value-of select="$doctype_uppercased"/></xsl:otherwise>
3518
3576
  </xsl:choose>
3519
- <xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
3577
+ <xsl:variable name="amendment-number" select="/iso:metanorma/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
3520
3578
  <xsl:if test="normalize-space($amendment-number) != ''">
3521
3579
  <xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
3522
3580
  </xsl:if>
@@ -3546,17 +3604,17 @@
3546
3604
 
3547
3605
  <xsl:choose>
3548
3606
  <xsl:when test="$revision_date_num &gt;= 19680101">
3549
- <fo:block font-weight="normal"><xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/></fo:block>
3550
- <fo:block space-before="24pt"><xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/></fo:block>
3607
+ <fo:block font-weight="normal"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/></fo:block>
3608
+ <fo:block space-before="24pt"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/></fo:block>
3551
3609
  </xsl:when>
3552
3610
  <xsl:otherwise>
3553
3611
 
3554
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
3555
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']">
3612
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
3613
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']">
3556
3614
  <xsl:with-param name="body">true</xsl:with-param>
3557
3615
  </xsl:apply-templates>
3558
3616
  <fo:block font-size="11pt" text-transform="uppercase" margin-top="2mm">
3559
- <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
3617
+ <xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
3560
3618
  </fo:block>
3561
3619
 
3562
3620
  <!-- <xsl:apply-templates/> -->
@@ -4938,7 +4996,7 @@
4938
4996
  <xsl:attribute name="margin-bottom">5mm</xsl:attribute>
4939
4997
  </xsl:if>
4940
4998
  <fo:block font-size="8pt" text-align="justify" role="SKIP">
4941
- <xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
4999
+ <xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:copyright-statement"/>
4942
5000
  </fo:block>
4943
5001
  </fo:block>
4944
5002
 
@@ -5094,15 +5152,15 @@
5094
5152
  <fo:table-row>
5095
5153
  <fo:table-cell font-size="8pt">
5096
5154
  <fo:block line-height="1" margin-top="2mm">
5097
- <!-- <xsl:variable name="date_first_printing" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata/iso:first-printing-date)"/> -->
5098
- <xsl:variable name="number_printing" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata[iso:printing-date][1]/iso:printing-date)"/>
5099
- <xsl:variable name="date_printing" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata[iso:printing-date][last()]/iso:printing-date)"/>
5155
+ <!-- <xsl:variable name="date_first_printing" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:first-printing-date)"/> -->
5156
+ <xsl:variable name="number_printing" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata[iso:printing-date][1]/iso:printing-date)"/>
5157
+ <xsl:variable name="date_printing" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata[iso:printing-date][last()]/iso:printing-date)"/>
5100
5158
  <xsl:if test="$insert_footer_last = 'true' and $date_printing != ''">
5101
5159
  <xsl:variable name="date_number_printing">
5102
5160
  <xsl:choose>
5103
5161
  <xsl:when test="$number_printing != $date_printing">
5104
5162
  <!-- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($i18n_date_printing), '%', $number_printing)"/> -->
5105
- <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:ext/iso:date-printing"/>
5163
+ <xsl:value-of select="/iso:metanorma/iso:bibdata/iso:ext/iso:date-printing"/>
5106
5164
  </xsl:when>
5107
5165
  <xsl:otherwise>
5108
5166
  <xsl:value-of select="$i18n_date_first_printing"/>
@@ -5128,7 +5186,7 @@
5128
5186
  </fo:table-cell>
5129
5187
  <fo:table-cell>
5130
5188
  <fo:block font-size="8.5pt" text-align="right" font-weight="bold">
5131
- <xsl:variable name="price_" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata/iso:price)"/>
5189
+ <xsl:variable name="price_" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:price)"/>
5132
5190
  <xsl:variable name="price" select="java:replaceAll(java:java.lang.String.new($price_), '-{2}', $em_dash)"/>
5133
5191
  <xsl:if test="$insert_footer_last = 'true'">
5134
5192
 
@@ -5284,7 +5342,7 @@
5284
5342
  <xsl:value-of select="$udc"/>
5285
5343
  </fo:block>
5286
5344
  </xsl:if>
5287
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
5345
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:ext/iso:ics/iso:code">
5288
5346
  <xsl:if test="position() = 1"><fo:inline>ICS  </fo:inline></xsl:if>
5289
5347
  <xsl:value-of select="."/>
5290
5348
  <xsl:if test="position() != last()">
@@ -5301,7 +5359,7 @@
5301
5359
  <xsl:otherwise>ICS&#xA0;&#xA0;67.060</xsl:otherwise>
5302
5360
  </xsl:choose> -->
5303
5361
  </fo:block>
5304
- <xsl:if test="/iso:iso-standard/iso:bibdata/iso:keyword">
5362
+ <xsl:if test="/iso:metanorma/iso:bibdata/iso:keyword">
5305
5363
  <fo:block font-size="{$font-size_footer_copyright}" margin-bottom="6pt">
5306
5364
  <fo:inline font-weight="bold"><xsl:value-of select="$i18n_descriptors"/>: </fo:inline>
5307
5365
  <xsl:call-template name="insertKeywords">
@@ -5365,7 +5423,7 @@
5365
5423
  <fo:table-row height="182mm"> <!-- 174 -->
5366
5424
  <fo:table-cell number-columns-spanned="2" display-align="after" border-right="{$cover_page_border}">
5367
5425
  <fo:block font-size="12pt" font-weight="bold">
5368
- <xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
5426
+ <xsl:for-each select="/iso:metanorma/iso:bibdata/iso:ext/iso:ics/iso:code">
5369
5427
  <xsl:if test="position() = 1"><fo:inline>ICS  </fo:inline></xsl:if>
5370
5428
  <xsl:value-of select="."/>
5371
5429
  <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
@@ -5595,21 +5653,21 @@
5595
5653
 
5596
5654
  <xsl:variable name="namespace_full_">
5597
5655
  <xsl:choose>
5598
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
5599
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
5656
+ <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
5657
+ <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
5600
5658
  </xsl:choose>
5601
5659
  </xsl:variable>
5602
5660
  <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
5603
5661
 
5604
5662
  <xsl:variable name="root_element_">
5605
5663
  <xsl:choose>
5606
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
5607
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
5664
+ <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
5665
+ <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
5608
5666
  </xsl:choose>
5609
5667
  </xsl:variable>
5610
5668
  <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
5611
5669
 
5612
- <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'])"/>
5670
+ <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'])"/>
5613
5671
 
5614
5672
  <!-- external parameters -->
5615
5673
 
@@ -5710,7 +5768,7 @@
5710
5768
  </metanorma-extension>
5711
5769
  -->
5712
5770
 
5713
- <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'])))"/>
5771
+ <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'])))"/>
5714
5772
  <xsl:variable name="papersize_width_">
5715
5773
  <xsl:choose>
5716
5774
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -5795,7 +5853,7 @@
5795
5853
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
5796
5854
 
5797
5855
  <xsl:variable name="layout_columns_default">1</xsl:variable>
5798
- <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'])"/>
5856
+ <xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
5799
5857
  <xsl:variable name="layout_columns">
5800
5858
  <xsl:choose>
5801
5859
  <xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
@@ -5862,7 +5920,7 @@
5862
5920
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
5863
5921
 
5864
5922
  <xsl:variable name="title-list-tables">
5865
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
5923
+ <xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
5866
5924
  <xsl:value-of select="$toc_table_title"/>
5867
5925
  <xsl:if test="normalize-space($toc_table_title) = ''">
5868
5926
  <xsl:call-template name="getLocalizedString">
@@ -5872,7 +5930,7 @@
5872
5930
  </xsl:variable>
5873
5931
 
5874
5932
  <xsl:variable name="title-list-figures">
5875
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
5933
+ <xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
5876
5934
  <xsl:value-of select="$toc_figure_title"/>
5877
5935
  <xsl:if test="normalize-space($toc_figure_title) = ''">
5878
5936
  <xsl:call-template name="getLocalizedString">
@@ -5882,7 +5940,7 @@
5882
5940
  </xsl:variable>
5883
5941
 
5884
5942
  <xsl:variable name="title-list-recommendations">
5885
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
5943
+ <xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
5886
5944
  <xsl:value-of select="$toc_requirement_title"/>
5887
5945
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
5888
5946
  <xsl:call-template name="getLocalizedString">
@@ -5892,8 +5950,8 @@
5892
5950
  </xsl:variable>
5893
5951
 
5894
5952
  <xsl:variable name="bibdata">
5895
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
5896
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
5953
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
5954
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
5897
5955
  </xsl:variable>
5898
5956
 
5899
5957
  <!-- Characters -->
@@ -5958,7 +6016,7 @@
5958
6016
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
5959
6017
 
5960
6018
  <xsl:variable name="additional_fonts_">
5961
- <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']">
6019
+ <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']">
5962
6020
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
5963
6021
  </xsl:for-each>
5964
6022
  </xsl:variable>
@@ -7528,10 +7586,10 @@
7528
7586
 
7529
7587
  <xsl:template name="processTablesFigures_Contents">
7530
7588
  <xsl:param name="always"/>
7531
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
7589
+ <xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
7532
7590
  <xsl:call-template name="processTables_Contents"/>
7533
7591
  </xsl:if>
7534
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
7592
+ <xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
7535
7593
  <xsl:call-template name="processFigures_Contents"/>
7536
7594
  </xsl:if>
7537
7595
  </xsl:template>
@@ -7611,7 +7669,7 @@
7611
7669
  </xsl:template><!-- END: processMainSectionsDefault -->
7612
7670
 
7613
7671
  <!-- Example:
7614
- <iso-standard>
7672
+ <metanorma>
7615
7673
  <preface>
7616
7674
  <page_sequence>
7617
7675
  <clause...
@@ -7634,7 +7692,7 @@
7634
7692
  <page_sequence>
7635
7693
  <annex ..
7636
7694
  </page_sequence>
7637
- </iso-standard>
7695
+ </metanorma>
7638
7696
  -->
7639
7697
  <xsl:template name="processPrefaceAndMainSectionsDefault_items">
7640
7698
 
@@ -7677,15 +7735,8 @@
7677
7735
  </xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
7678
7736
 
7679
7737
  <xsl:template name="insertMainSectionsPageSequences">
7680
- <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
7681
- <xsl:element name="page_sequence" namespace="{$namespace_full}">
7682
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
7683
- <xsl:sort select="@displayorder" data-type="number"/>
7684
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
7685
7738
 
7686
- </xsl:for-each>
7687
- </xsl:element>
7688
- </xsl:element>
7739
+ <xsl:call-template name="insertSectionsInPageSequence"/>
7689
7740
 
7690
7741
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
7691
7742
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -7704,6 +7755,18 @@
7704
7755
  </xsl:element>
7705
7756
  </xsl:template> <!-- END: insertMainSectionsPageSequences -->
7706
7757
 
7758
+ <xsl:template name="insertSectionsInPageSequence">
7759
+ <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
7760
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
7761
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
7762
+ <xsl:sort select="@displayorder" data-type="number"/>
7763
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
7764
+
7765
+ </xsl:for-each>
7766
+ </xsl:element>
7767
+ </xsl:element>
7768
+ </xsl:template>
7769
+
7707
7770
  <xsl:template name="insertMainSectionsInSeparatePageSequences">
7708
7771
  <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
7709
7772
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
@@ -9295,7 +9358,7 @@
9295
9358
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
9296
9359
 
9297
9360
  <xsl:variable name="gen_id" select="generate-id(.)"/>
9298
- <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
9361
+ <xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
9299
9362
  <xsl:variable name="reference_">
9300
9363
  <xsl:value-of select="@reference"/>
9301
9364
  <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
@@ -9429,13 +9492,13 @@
9429
9492
  footnotes in bibliography
9430
9493
  footnotes in document's body (except table's head/body/foot and figure text)
9431
9494
  -->
9432
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
9495
+ <xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
9433
9496
  <fn gen_id="{generate-id(.)}">
9434
9497
  <xsl:copy-of select="@*"/>
9435
9498
  <xsl:copy-of select="node()"/>
9436
9499
  </fn>
9437
9500
  </xsl:for-each>
9438
- <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']/*">
9501
+ <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']/*">
9439
9502
  <xsl:sort select="@displayorder" data-type="number"/>
9440
9503
  <!-- commented:
9441
9504
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
@@ -11897,6 +11960,8 @@
11897
11960
  <!-- ======================================= -->
11898
11961
  <!-- math -->
11899
11962
  <!-- ======================================= -->
11963
+ <xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
11964
+
11900
11965
  <xsl:template match="mathml:math">
11901
11966
  <xsl:variable name="isAdded" select="@added"/>
11902
11967
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -12263,10 +12328,10 @@
12263
12328
  <xsl:template match="*[local-name()='localityStack']"/>
12264
12329
 
12265
12330
  <xsl:variable name="pdfAttachmentsList_">
12266
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
12331
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
12267
12332
  <attachment filename="{@name}"/>
12268
12333
  </xsl:for-each>
12269
- <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
12334
+ <xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
12270
12335
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
12271
12336
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
12272
12337
  <attachment filename="{$attachment_path}"/>
@@ -13763,7 +13828,9 @@
13763
13828
  <xsl:apply-templates mode="bookmarks"/>
13764
13829
  </xsl:template>
13765
13830
 
13766
- <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">
13831
+ <xsl:template match="*[local-name() = 'stem']" mode="contents"/>
13832
+
13833
+ <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">
13767
13834
  <xsl:apply-templates select="."/>
13768
13835
  </xsl:template>
13769
13836
 
@@ -13780,7 +13847,15 @@
13780
13847
  <xsl:apply-templates mode="contents"/>
13781
13848
  </xsl:template>
13782
13849
 
13783
- <xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
13850
+ <xsl:template match="*[local-name() = 'concept']" mode="contents"/>
13851
+ <xsl:template match="*[local-name() = 'eref']" mode="contents"/>
13852
+ <xsl:template match="*[local-name() = 'xref']" mode="contents"/>
13853
+ <xsl:template match="*[local-name() = 'link']" mode="contents"/>
13854
+ <xsl:template match="*[local-name() = 'origin']" mode="contents"/>
13855
+ <xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
13856
+
13857
+ <xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
13858
+ <xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
13784
13859
  <xsl:apply-templates mode="bookmarks"/>
13785
13860
  </xsl:template>
13786
13861
 
@@ -13793,6 +13868,13 @@
13793
13868
  <xsl:apply-templates mode="bookmarks"/>
13794
13869
  </xsl:template>
13795
13870
 
13871
+ <xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
13872
+ <xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
13873
+ <xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
13874
+ <xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
13875
+ <xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
13876
+ <xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
13877
+
13796
13878
  <!-- Bookmarks -->
13797
13879
  <xsl:template name="addBookmarks">
13798
13880
  <xsl:param name="contents"/>
@@ -14077,6 +14159,13 @@
14077
14159
 
14078
14160
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
14079
14161
 
14162
+ <xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
14163
+ <xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
14164
+ <xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
14165
+ <xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
14166
+ <xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
14167
+ <xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
14168
+
14080
14169
  <xsl:template name="getSection">
14081
14170
  <xsl:choose>
14082
14171
  <xsl:when test="*[local-name() = 'fmt-title']">
@@ -14196,7 +14285,8 @@
14196
14285
  </xsl:copy>
14197
14286
  </xsl:template>
14198
14287
 
14199
- <xsl:template match="*[local-name() = 'stem']" mode="contents_item">
14288
+ <xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
14289
+ <xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
14200
14290
  <xsl:copy-of select="."/>
14201
14291
  </xsl:template>
14202
14292
 
@@ -14260,7 +14350,7 @@
14260
14350
  <!-- sourcecode -->
14261
14351
  <!-- =============== -->
14262
14352
 
14263
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
14353
+ <xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
14264
14354
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
14265
14355
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
14266
14356
 
@@ -15735,7 +15825,7 @@
15735
15825
 
15736
15826
  </xsl:template> <!-- sections_element_style -->
15737
15827
 
15738
- <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
15828
+ <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
15739
15829
 
15740
15830
  <xsl:choose>
15741
15831
  <xsl:when test="$layoutVersion = '1951' and (local-name() = 'clause' or local-name() = 'introduction')"/>
@@ -15845,7 +15935,7 @@
15845
15935
  <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>
15846
15936
  </xsl:when>
15847
15937
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
15848
- <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
15938
+ <xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
15849
15939
  <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>
15850
15940
  </xsl:when>
15851
15941
  <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
@@ -17236,7 +17326,7 @@
17236
17326
  <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
17237
17327
 
17238
17328
  <!-- move section 'Normative references' inside 'sections' -->
17239
- <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']]">
17329
+ <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']]">
17240
17330
  <xsl:sort select="@displayorder" data-type="number"/>
17241
17331
 
17242
17332
  <!-- process Section's title -->
@@ -17297,10 +17387,126 @@
17297
17387
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
17298
17388
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
17299
17389
 
17300
- <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">
17390
+ <xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
17391
+ <xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
17392
+
17393
+ <xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
17394
+ <xsl:element name="stem" namespace="{$namespace_full}">
17395
+ <xsl:copy-of select="@*"/>
17396
+ <xsl:choose>
17397
+ <xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
17398
+ <xsl:copy-of select="*[local-name() = 'semx']/node()"/>
17399
+ </xsl:when>
17400
+ <xsl:otherwise>
17401
+ <xsl:copy-of select="node()"/>
17402
+ </xsl:otherwise>
17403
+ </xsl:choose>
17404
+ </xsl:element>
17405
+ </xsl:template>
17406
+ <xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
17407
+ <xsl:element name="stem" namespace="{$namespace_full}">
17408
+ <xsl:copy-of select="@*"/>
17409
+ <xsl:choose>
17410
+ <xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
17411
+ <xsl:copy-of select="*[local-name() = 'semx']/node()"/>
17412
+ </xsl:when>
17413
+ <xsl:otherwise>
17414
+ <xsl:copy-of select="node()"/>
17415
+ </xsl:otherwise>
17416
+ </xsl:choose>
17417
+ </xsl:element>
17418
+ </xsl:template>
17419
+
17420
+ <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">
17301
17421
  <xsl:copy-of select="."/>
17302
17422
  </xsl:template>
17303
17423
 
17424
+ <!-- https://github.com/metanorma/isodoc/issues/651 -->
17425
+ <!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
17426
+ <xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
17427
+ <xsl:copy>
17428
+ <xsl:copy-of select="@*"/>
17429
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
17430
+ <xsl:choose>
17431
+ <xsl:when test="*[local-name() = 'fmt-sourcecode']">
17432
+ <xsl:choose>
17433
+ <xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
17434
+ <xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
17435
+ </xsl:when>
17436
+ <xsl:otherwise>
17437
+ <xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
17438
+ </xsl:otherwise>
17439
+ </xsl:choose>
17440
+ </xsl:when>
17441
+ <xsl:otherwise> <!-- If fmt-sourcecode is not present -->
17442
+ <xsl:choose>
17443
+ <xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
17444
+ <xsl:copy-of select="node()"/>
17445
+ </xsl:when>
17446
+ <xsl:otherwise>
17447
+ <xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
17448
+ </xsl:otherwise>
17449
+ </xsl:choose>
17450
+ </xsl:otherwise>
17451
+ </xsl:choose>
17452
+ </xsl:copy>
17453
+ </xsl:template>
17454
+ <xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
17455
+ <xsl:copy>
17456
+ <xsl:copy-of select="@*"/>
17457
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
17458
+ <xsl:choose>
17459
+ <xsl:when test="*[local-name() = 'fmt-sourcecode']">
17460
+ <xsl:choose>
17461
+ <xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
17462
+ <xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
17463
+ </xsl:when>
17464
+ <xsl:otherwise>
17465
+ <xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
17466
+ </xsl:otherwise>
17467
+ </xsl:choose>
17468
+ </xsl:when>
17469
+ <xsl:otherwise> <!-- If fmt-sourcecode is not present -->
17470
+ <xsl:choose>
17471
+ <xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
17472
+ <xsl:copy-of select="node()"/>
17473
+ </xsl:when>
17474
+ <xsl:otherwise>
17475
+ <xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
17476
+ </xsl:otherwise>
17477
+ </xsl:choose>
17478
+ </xsl:otherwise>
17479
+ </xsl:choose>
17480
+ </xsl:copy>
17481
+ </xsl:template>
17482
+
17483
+ <!-- https://github.com/metanorma/isodoc/issues/651 -->
17484
+ <xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
17485
+ <xsl:copy>
17486
+ <xsl:copy-of select="@*"/>
17487
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
17488
+ <xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
17489
+ </xsl:copy>
17490
+ </xsl:template>
17491
+ <xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
17492
+ <xsl:copy>
17493
+ <xsl:copy-of select="@*"/>
17494
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
17495
+ <xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
17496
+ </xsl:copy>
17497
+ </xsl:template>
17498
+
17499
+ <!-- https://github.com/metanorma/isodoc/issues/652 -->
17500
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
17501
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
17502
+ <xsl:template match="*[local-name() = 'amend']"/>
17503
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
17504
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
17505
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
17506
+ <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
17507
+ <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
17508
+ <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
17509
+
17304
17510
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
17305
17511
  <xsl:copy>
17306
17512
  <xsl:copy-of select="@*"/>
@@ -17331,7 +17537,7 @@
17331
17537
  <!-- add @id - first element with @id plus '_element_name' -->
17332
17538
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
17333
17539
  <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>
17334
- <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
17540
+ <xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
17335
17541
  <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
17336
17542
  </xsl:if>
17337
17543
  </xsl:template>
@@ -17581,6 +17787,126 @@
17581
17787
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
17582
17788
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
17583
17789
 
17790
+ <xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
17791
+ <xsl:apply-templates mode="update_xml_step1"/>
17792
+ </xsl:template>
17793
+
17794
+ <xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
17795
+ <xsl:apply-templates mode="update_xml_pres"/>
17796
+ </xsl:template>
17797
+
17798
+ <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"/>
17799
+
17800
+ <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"/>
17801
+
17802
+ <xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
17803
+ <xsl:apply-templates mode="update_xml_step1"/>
17804
+ </xsl:template>
17805
+ <xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
17806
+ <xsl:apply-templates mode="update_xml_pres"/>
17807
+ </xsl:template>
17808
+
17809
+ <xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
17810
+ <xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
17811
+ <xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
17812
+ <xsl:element name="identifier" namespace="{$namespace_full}">
17813
+ <xsl:copy-of select="@*"/>
17814
+ <xsl:apply-templates mode="update_xml_step1"/>
17815
+ </xsl:element>
17816
+ </xsl:template>
17817
+ <xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
17818
+ <xsl:element name="identifier" namespace="{$namespace_full}">
17819
+ <xsl:copy-of select="@*"/>
17820
+ <xsl:apply-templates mode="update_xml_pres"/>
17821
+ </xsl:element>
17822
+ </xsl:template>
17823
+
17824
+ <xsl:template match="*[local-name() = 'concept']"/>
17825
+ <xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
17826
+ <xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
17827
+
17828
+ <xsl:template match="*[local-name() = 'fmt-concept']">
17829
+ <xsl:apply-templates/>
17830
+ </xsl:template>
17831
+ <xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
17832
+ <xsl:apply-templates mode="update_xml_step1"/>
17833
+ </xsl:template>
17834
+ <xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
17835
+ <xsl:apply-templates mode="update_xml_pres"/>
17836
+ </xsl:template>
17837
+
17838
+ <xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
17839
+ <xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
17840
+
17841
+ <xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
17842
+ <xsl:element name="eref" namespace="{$namespace_full}">
17843
+ <xsl:copy-of select="@*"/>
17844
+ <xsl:apply-templates mode="update_xml_step1"/>
17845
+ </xsl:element>
17846
+ </xsl:template>
17847
+ <xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
17848
+ <xsl:element name="eref" namespace="{$namespace_full}">
17849
+ <xsl:copy-of select="@*"/>
17850
+ <xsl:apply-templates mode="update_xml_pres"/>
17851
+ </xsl:element>
17852
+ </xsl:template>
17853
+
17854
+ <xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
17855
+ <xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
17856
+
17857
+ <xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
17858
+ <xsl:element name="xref" namespace="{$namespace_full}">
17859
+ <xsl:copy-of select="@*"/>
17860
+ <xsl:apply-templates mode="update_xml_step1"/>
17861
+ </xsl:element>
17862
+ </xsl:template>
17863
+ <xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
17864
+ <xsl:element name="xref" namespace="{$namespace_full}">
17865
+ <xsl:copy-of select="@*"/>
17866
+ <xsl:apply-templates mode="update_xml_pres"/>
17867
+ </xsl:element>
17868
+ </xsl:template>
17869
+
17870
+ <xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
17871
+ <xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
17872
+
17873
+ <xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
17874
+ <xsl:element name="link" namespace="{$namespace_full}">
17875
+ <xsl:copy-of select="@*"/>
17876
+ <xsl:apply-templates mode="update_xml_step1"/>
17877
+ </xsl:element>
17878
+ </xsl:template>
17879
+ <xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
17880
+ <xsl:element name="link" namespace="{$namespace_full}">
17881
+ <xsl:copy-of select="@*"/>
17882
+ <xsl:apply-templates mode="update_xml_pres"/>
17883
+ </xsl:element>
17884
+ </xsl:template>
17885
+
17886
+ <xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
17887
+ <xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
17888
+
17889
+ <xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
17890
+ <xsl:element name="origin" namespace="{$namespace_full}">
17891
+ <xsl:copy-of select="@*"/>
17892
+ <xsl:apply-templates mode="update_xml_step1"/>
17893
+ </xsl:element>
17894
+ </xsl:template>
17895
+ <xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
17896
+ <xsl:element name="origin" namespace="{$namespace_full}">
17897
+ <xsl:copy-of select="@*"/>
17898
+ <xsl:apply-templates mode="update_xml_pres"/>
17899
+ </xsl:element>
17900
+ </xsl:template>
17901
+
17902
+ <xsl:template match="*[local-name() = 'erefstack']"/>
17903
+ <xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
17904
+ <xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
17905
+
17906
+ <xsl:template match="*[local-name() = 'svgmap']"/>
17907
+ <xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
17908
+ <xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
17909
+
17584
17910
  <!-- END: update new Presentation XML -->
17585
17911
 
17586
17912
  <!-- =========================================================================== -->
@@ -17653,7 +17979,7 @@
17653
17979
 
17654
17980
  <xsl:choose>
17655
17981
  <xsl:when test="$page_sequence_at_top = 'true'">
17656
- <xsl:for-each select="ancestor::*[ancestor::*[contains(local-name(), '-standard')]]">
17982
+ <xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
17657
17983
  <element pos="{position()}">
17658
17984
  <xsl:copy-of select="@*[local-name() != 'id']"/>
17659
17985
  <xsl:value-of select="name()"/>
@@ -18204,7 +18530,7 @@
18204
18530
  </xsl:when>
18205
18531
  <xsl:when test="contains($text, $replace)">
18206
18532
  <xsl:value-of select="substring-before($text,$replace)"/>
18207
- <xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/jis"><xsl:value-of select="$by"/></xsl:element>
18533
+ <xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
18208
18534
  <xsl:call-template name="replaceChar">
18209
18535
  <xsl:with-param name="text" select="substring-after($text,$replace)"/>
18210
18536
  <xsl:with-param name="replace" select="$replace"/>
@@ -18241,7 +18567,7 @@
18241
18567
  </xsl:variable>
18242
18568
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
18243
18569
  <xsl:variable name="gen_id" select="generate-id(.)"/>
18244
- <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
18570
+ <xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
18245
18571
  <xsl:variable name="reference" select="@reference"/>
18246
18572
  <!-- fn sequence number in document -->
18247
18573
  <xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
@@ -18286,7 +18612,7 @@
18286
18612
  </xsl:template>
18287
18613
 
18288
18614
  <xsl:template name="printEdition">
18289
- <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
18615
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
18290
18616
 
18291
18617
  <xsl:if test="$layoutVersion != '1972' and $layoutVersion != '1979' and $layoutVersion != '2024'">
18292
18618
  <xsl:text> </xsl:text>
@@ -18300,7 +18626,7 @@
18300
18626
  </xsl:call-template>
18301
18627
  </xsl:when>
18302
18628
  <xsl:otherwise>
18303
- <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
18629
+ <xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
18304
18630
  <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
18305
18631
  <xsl:call-template name="capitalize">
18306
18632
  <xsl:with-param name="str">
@@ -18434,7 +18760,7 @@
18434
18760
  <xsl:param name="charDelim" select="', '"/>
18435
18761
  <xsl:choose>
18436
18762
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
18437
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
18763
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
18438
18764
  <xsl:sort data-type="text" order="ascending"/>
18439
18765
  <xsl:call-template name="insertKeyword">
18440
18766
  <xsl:with-param name="meta" select="$meta"/>
@@ -18444,7 +18770,7 @@
18444
18770
  </xsl:for-each>
18445
18771
  </xsl:when>
18446
18772
  <xsl:otherwise>
18447
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
18773
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
18448
18774
  <xsl:call-template name="insertKeyword">
18449
18775
  <xsl:with-param name="meta" select="$meta"/>
18450
18776
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -18519,7 +18845,7 @@
18519
18845
  <!-- Dublin Core properties go here -->
18520
18846
  <dc:title>
18521
18847
  <xsl:variable name="title">
18522
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
18848
+ <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
18523
18849
 
18524
18850
  <xsl:choose>
18525
18851
  <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
@@ -18546,7 +18872,7 @@
18546
18872
  </rdf:Alt>
18547
18873
  </dc:title>
18548
18874
  <xsl:variable name="dc_creator">
18549
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
18875
+ <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
18550
18876
 
18551
18877
  <rdf:Seq>
18552
18878
  <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
@@ -18568,7 +18894,7 @@
18568
18894
  <xsl:variable name="dc_description">
18569
18895
  <xsl:variable name="abstract">
18570
18896
 
18571
- <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'])]"/>
18897
+ <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'])]"/>
18572
18898
 
18573
18899
  </xsl:variable>
18574
18900
  <rdf:Alt>
@@ -18596,7 +18922,7 @@
18596
18922
  </rdf:RDF>
18597
18923
  </x:xmpmeta>
18598
18924
  <!-- add attachments -->
18599
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
18925
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
18600
18926
  <xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
18601
18927
  <xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
18602
18928
  <xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
@@ -18630,7 +18956,7 @@
18630
18956
  </pdf:embedded-file>
18631
18957
  </xsl:for-each>
18632
18958
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
18633
- <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
18959
+ <xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
18634
18960
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
18635
18961
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
18636
18962
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
@@ -18834,9 +19160,9 @@
18834
19160
  <xsl:value-of select="document('')//*/namespace::iso"/>
18835
19161
 
18836
19162
  </xsl:variable>
18837
- <xsl:if test="$documentNS != $XSLNS">
19163
+ <!-- <xsl:if test="$documentNS != $XSLNS">
18838
19164
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
18839
- </xsl:if>
19165
+ </xsl:if> -->
18840
19166
  </xsl:template> <!-- namespaceCheck -->
18841
19167
 
18842
19168
  <xsl:template name="getLanguage">
@@ -18915,10 +19241,10 @@
18915
19241
 
18916
19242
  <xsl:variable name="data_value">
18917
19243
  <xsl:choose>
18918
- <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
19244
+ <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
18919
19245
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18920
19246
  </xsl:when>
18921
- <xsl:when test="string-length($bibdata_updated) != ''">
19247
+ <xsl:when test="string-length($bibdata_updated) != 0">
18922
19248
  <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18923
19249
  </xsl:when>
18924
19250
  <xsl:when test="$formatted = 'true'">
@@ -19056,7 +19382,7 @@
19056
19382
  <!-- background image -->
19057
19383
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
19058
19384
  <fo:block>
19059
- <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]">
19385
+ <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]">
19060
19386
  <xsl:choose>
19061
19387
  <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
19062
19388
  <fo:instream-foreign-object fox:alt-text="Image Front">