metanorma-bipm 2.5.12 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/base_convert.rb +4 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +415 -145
- data/lib/isodoc/bipm/bipm.guide.xsl +415 -145
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +415 -145
- data/lib/isodoc/bipm/bipm.rapport.xsl +415 -145
- data/lib/isodoc/bipm/jcgm.standard.xsl +477 -117
- data/lib/isodoc/bipm/presentation_xml_convert.rb +7 -6
- data/lib/metanorma/bipm/bipm.rng +31 -34
- data/lib/metanorma/bipm/isodoc.rng +12 -6
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -2
- metadata +6 -6
@@ -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:bipm="https://www.metanorma.org/ns/
|
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:bipm="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:java="http://xml.apache.org/xalan/java" 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 version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -18,9 +18,9 @@
|
|
18
18
|
|
19
19
|
<xsl:variable name="debug">false</xsl:variable>
|
20
20
|
|
21
|
-
<xsl:variable name="copyrightYear" select="//bipm:
|
21
|
+
<xsl:variable name="copyrightYear" select="//bipm:metanorma/bipm:bibdata/bipm:copyright/bipm:from"/>
|
22
22
|
|
23
|
-
<xsl:variable name="doc_first_language" select="(//bipm:
|
23
|
+
<xsl:variable name="doc_first_language" select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:language[@current = 'true']"/>
|
24
24
|
|
25
25
|
<xsl:variable name="root-element" select="local-name(/*)"/>
|
26
26
|
|
@@ -29,9 +29,9 @@
|
|
29
29
|
<xsl:when test="$root-element = 'metanorma-collection'">
|
30
30
|
<xsl:choose>
|
31
31
|
<xsl:when test="$doc_split_by_language = ''"><!-- all documents -->
|
32
|
-
<xsl:for-each select="//bipm:
|
32
|
+
<xsl:for-each select="//bipm:metanorma">
|
33
33
|
<xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
|
34
|
-
<xsl:variable name="num"><xsl:number level="any" count="bipm:
|
34
|
+
<xsl:variable name="num"><xsl:number level="any" count="bipm:metanorma"/></xsl:variable>
|
35
35
|
<xsl:variable name="title-part"><xsl:value-of select="bipm:bibdata/bipm:title[@type = 'title-part']"/></xsl:variable>
|
36
36
|
<xsl:variable name="current_document">
|
37
37
|
<xsl:copy-of select="."/>
|
@@ -47,9 +47,9 @@
|
|
47
47
|
</xsl:for-each>
|
48
48
|
</xsl:when>
|
49
49
|
<xsl:otherwise>
|
50
|
-
<xsl:for-each select="(//bipm:
|
50
|
+
<xsl:for-each select="(//bipm:metanorma)[*[local-name()='bibdata']/*[local-name()='language'][@current = 'true'] = $doc_split_by_language]">
|
51
51
|
<xsl:variable name="lang" select="*[local-name()='bibdata']/*[local-name()='language'][@current = 'true']"/>
|
52
|
-
<xsl:variable name="num"><xsl:number level="any" count="bipm:
|
52
|
+
<xsl:variable name="num"><xsl:number level="any" count="bipm:metanorma"/></xsl:variable>
|
53
53
|
<xsl:variable name="current_document">
|
54
54
|
<xsl:copy-of select="."/>
|
55
55
|
</xsl:variable>
|
@@ -81,7 +81,7 @@
|
|
81
81
|
<xsl:variable name="indexes">
|
82
82
|
<xsl:choose>
|
83
83
|
<xsl:when test="$doc_split_by_language = ''"><!-- all documents -->
|
84
|
-
<xsl:for-each select="//bipm:
|
84
|
+
<xsl:for-each select="//bipm:metanorma">
|
85
85
|
|
86
86
|
<!-- <xsl:variable name="current_document">
|
87
87
|
<xsl:copy-of select="."/>
|
@@ -120,7 +120,7 @@
|
|
120
120
|
</xsl:for-each>
|
121
121
|
</xsl:when>
|
122
122
|
<xsl:otherwise>
|
123
|
-
<xsl:for-each select="(//bipm:
|
123
|
+
<xsl:for-each select="(//bipm:metanorma)[*[local-name()='bibdata']/*[local-name()='language'][@current = 'true'] = $doc_split_by_language]">
|
124
124
|
|
125
125
|
<!-- <xsl:variable name="current_document">
|
126
126
|
<xsl:copy-of select="."/>
|
@@ -169,9 +169,9 @@
|
|
169
169
|
</xsl:for-each>
|
170
170
|
</xsl:variable>
|
171
171
|
|
172
|
-
<xsl:variable name="independentAppendix" select="normalize-space((//bipm:
|
172
|
+
<xsl:variable name="independentAppendix" select="normalize-space((//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix)"/>
|
173
173
|
|
174
|
-
<xsl:variable name="doctype" select="//bipm:
|
174
|
+
<xsl:variable name="doctype" select="//bipm:metanorma/bipm:bibdata/bipm:ext/bipm:doctype"/>
|
175
175
|
|
176
176
|
<xsl:template name="generateContents">
|
177
177
|
<contents>
|
@@ -195,11 +195,13 @@
|
|
195
195
|
|
196
196
|
<xsl:variable name="mathml_attachments">
|
197
197
|
<xsl:if test="$add_math_as_attachment = 'true' and $final_transform = 'true'">
|
198
|
-
<xsl:for-each select="//mathml:math">
|
198
|
+
<xsl:for-each select="//mathml:math[ancestor::*[local-name() = 'fmt-stem']]">
|
199
199
|
|
200
|
-
<xsl:variable name="sequence_number"><xsl:number level="any" format="00001"/></xsl:variable>
|
200
|
+
<xsl:variable name="sequence_number"><xsl:number level="any" format="00001" count="mathml:math[ancestor::*[local-name() = 'fmt-stem']]"/></xsl:variable>
|
201
201
|
|
202
|
-
<xsl:variable name="clause_title_number" select="ancestor-or-self::bipm:clause[bipm:title[bipm:tab]][1]/bipm:title/node()[1]"/>
|
202
|
+
<!-- <xsl:variable name="clause_title_number" select="ancestor-or-self::bipm:clause[bipm:title[bipm:tab]][1]/bipm:title/node()[1]"/> -->
|
203
|
+
<!-- <fmt-title depth="1"><span class="fmt-caption-label"><semx element="autonum" source="_introduction">1</semx><span class="fmt-autonum-delim">.</span></span> -->
|
204
|
+
<xsl:variable name="clause_title_number" select="normalize-space(ancestor-or-self::bipm:clause[bipm:fmt-title[bipm:span[@class = 'fmt-caption-label']]][1]/bipm:fmt-title/bipm:span[@class = 'fmt-caption-label'][1])"/>
|
203
205
|
|
204
206
|
<xsl:variable name="mathml_filename">
|
205
207
|
<xsl:text>math</xsl:text>
|
@@ -423,9 +425,9 @@
|
|
423
425
|
|
424
426
|
<xsl:choose>
|
425
427
|
<xsl:when test="$doc_split_by_language = ''"><!-- all documents -->
|
426
|
-
<xsl:for-each select="//bipm:
|
428
|
+
<xsl:for-each select="//bipm:metanorma">
|
427
429
|
<xsl:variable name="lang" select="*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
428
|
-
<xsl:variable name="num"><xsl:number level="any" count="bipm:
|
430
|
+
<xsl:variable name="num"><xsl:number level="any" count="bipm:metanorma"/></xsl:variable>
|
429
431
|
|
430
432
|
<!-- <xsl:variable name="title_eref">
|
431
433
|
<xsl:apply-templates select="." mode="title_eref"/>
|
@@ -474,9 +476,9 @@
|
|
474
476
|
</xsl:for-each>
|
475
477
|
</xsl:when>
|
476
478
|
<xsl:otherwise>
|
477
|
-
<xsl:for-each select="(//bipm:
|
479
|
+
<xsl:for-each select="(//bipm:metanorma)[*[local-name()='bibdata']/*[local-name()='language'][@current = 'true'] = $doc_split_by_language]">
|
478
480
|
<xsl:variable name="lang" select="*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
479
|
-
<xsl:variable name="num"><xsl:number level="any" count="bipm:
|
481
|
+
<xsl:variable name="num"><xsl:number level="any" count="bipm:metanorma"/></xsl:variable>
|
480
482
|
|
481
483
|
<!-- <xsl:variable name="title_eref">
|
482
484
|
<xsl:apply-templates select="." mode="title_eref"/>
|
@@ -513,7 +515,7 @@
|
|
513
515
|
<xsl:apply-templates select="xalan:nodeset($flatxml_)" mode="pagebreak"/>
|
514
516
|
</xsl:variable>
|
515
517
|
|
516
|
-
<xsl:apply-templates select="xalan:nodeset($flatxml)/bipm:
|
518
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/bipm:metanorma" mode="bipm-standard">
|
517
519
|
<xsl:with-param name="curr_docnum" select="$num"/>
|
518
520
|
</xsl:apply-templates>
|
519
521
|
|
@@ -570,7 +572,7 @@
|
|
570
572
|
</redirect:write>
|
571
573
|
</xsl:if>
|
572
574
|
|
573
|
-
<xsl:apply-templates select="xalan:nodeset($flatxml)/bipm:
|
575
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/bipm:metanorma" mode="bipm-standard">
|
574
576
|
<xsl:with-param name="curr_docnum" select="1"/>
|
575
577
|
</xsl:apply-templates>
|
576
578
|
</xsl:otherwise>
|
@@ -602,14 +604,14 @@
|
|
602
604
|
<!-- ================================= -->
|
603
605
|
|
604
606
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres" priority="2">
|
605
|
-
<xsl:element name="title" namespace="https://www.metanorma.org/ns/
|
607
|
+
<xsl:element name="title" namespace="https://www.metanorma.org/ns/standoc">
|
606
608
|
<xsl:copy-of select="@*"/>
|
607
609
|
<xsl:apply-templates mode="update_xml_pres"/>
|
608
610
|
</xsl:element>
|
609
611
|
</xsl:template>
|
610
612
|
|
611
613
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres" priority="2">
|
612
|
-
<xsl:element name="name" namespace="https://www.metanorma.org/ns/
|
614
|
+
<xsl:element name="name" namespace="https://www.metanorma.org/ns/standoc">
|
613
615
|
<xsl:copy-of select="@*"/>
|
614
616
|
<xsl:apply-templates mode="update_xml_pres"/>
|
615
617
|
</xsl:element>
|
@@ -663,7 +665,7 @@
|
|
663
665
|
<xsl:choose>
|
664
666
|
|
665
667
|
<xsl:when test="$pos_first_clause > 0">
|
666
|
-
<xsl:element name="clause" namespace="https://www.metanorma.org/ns/
|
668
|
+
<xsl:element name="clause" namespace="https://www.metanorma.org/ns/standoc">
|
667
669
|
<xsl:attribute name="id"><xsl:value-of select="concat(@id,'_clause')"/></xsl:attribute>
|
668
670
|
<xsl:for-each select="*[position() > 0 and position() <= $pos_first_clause]">
|
669
671
|
<xsl:apply-templates select="." mode="flatxml"/>
|
@@ -748,7 +750,7 @@
|
|
748
750
|
</xsl:choose>
|
749
751
|
</xsl:variable>
|
750
752
|
<!-- <xsl:copy> -->
|
751
|
-
<xsl:element name="{$element}" namespace="https://www.metanorma.org/ns/
|
753
|
+
<xsl:element name="{$element}" namespace="https://www.metanorma.org/ns/standoc">
|
752
754
|
<xsl:if test="ancestor::bipm:quote">
|
753
755
|
<xsl:attribute name="parent-type">quote</xsl:attribute>
|
754
756
|
</xsl:if>
|
@@ -794,7 +796,7 @@
|
|
794
796
|
</xsl:template>
|
795
797
|
|
796
798
|
<xsl:template match="bipm:fn" mode="fn_to_xref">
|
797
|
-
<xsl:element name="xref" namespace="https://www.metanorma.org/ns/
|
799
|
+
<xsl:element name="xref" namespace="https://www.metanorma.org/ns/standoc">
|
798
800
|
|
799
801
|
<xsl:attribute name="target">
|
800
802
|
<xsl:call-template name="fn_reference_to_xref_target"/>
|
@@ -814,7 +816,7 @@
|
|
814
816
|
</xsl:choose>
|
815
817
|
</xsl:variable>
|
816
818
|
|
817
|
-
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/
|
819
|
+
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/standoc">
|
818
820
|
<xsl:value-of select="concat('(',$number,')')"/>
|
819
821
|
</xsl:element>
|
820
822
|
|
@@ -822,7 +824,7 @@
|
|
822
824
|
</xsl:template>
|
823
825
|
|
824
826
|
<xsl:template name="fn_reference_to_xref_target">
|
825
|
-
<xsl:variable name="lang" select="ancestor::bipm:
|
827
|
+
<xsl:variable name="lang" select="ancestor::bipm:metanorma/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
826
828
|
<xsl:variable name="gen_id" select="generate-id()"/>
|
827
829
|
<xsl:variable name="curr_clause_id" select="ancestor::bipm:clause[1]/@id"/>
|
828
830
|
<xsl:variable name="number">
|
@@ -928,7 +930,7 @@
|
|
928
930
|
</xsl:template>
|
929
931
|
|
930
932
|
<xsl:template name="fn_to_note_side">
|
931
|
-
<xsl:element name="note_side" namespace="https://www.metanorma.org/ns/
|
933
|
+
<xsl:element name="note_side" namespace="https://www.metanorma.org/ns/standoc">
|
932
934
|
|
933
935
|
<xsl:attribute name="id">
|
934
936
|
<xsl:call-template name="fn_reference_to_xref_target"/>
|
@@ -948,7 +950,7 @@
|
|
948
950
|
</xsl:choose>
|
949
951
|
</xsl:variable>
|
950
952
|
|
951
|
-
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/
|
953
|
+
<xsl:element name="sup_fn" namespace="https://www.metanorma.org/ns/standoc">
|
952
954
|
<xsl:value-of select="concat('(',$number,')')"/>
|
953
955
|
</xsl:element>
|
954
956
|
<xsl:text> </xsl:text>
|
@@ -1002,7 +1004,7 @@
|
|
1002
1004
|
<xsl:variable name="pagebreak_previous_orientation" select="preceding-sibling::bipm:pagebreak[@orientation][1]/@orientation"/>
|
1003
1005
|
|
1004
1006
|
<!-- copy elements before page break -->
|
1005
|
-
<xsl:element name="{$element_name}" namespace="https://www.metanorma.org/ns/
|
1007
|
+
<xsl:element name="{$element_name}" namespace="https://www.metanorma.org/ns/standoc">
|
1006
1008
|
<xsl:if test="not(preceding-sibling::bipm:pagebreak[@orientation])">
|
1007
1009
|
<xsl:apply-templates select="../@*" mode="pagebreak"/>
|
1008
1010
|
</xsl:if>
|
@@ -1015,7 +1017,7 @@
|
|
1015
1017
|
|
1016
1018
|
<!-- copy elements after last page break -->
|
1017
1019
|
<xsl:if test="position() = last() and following-sibling::node()">
|
1018
|
-
<xsl:element name="{$element_name}" namespace="https://www.metanorma.org/ns/
|
1020
|
+
<xsl:element name="{$element_name}" namespace="https://www.metanorma.org/ns/standoc">
|
1019
1021
|
<xsl:attribute name="orientation"><xsl:value-of select="@orientation"/></xsl:attribute>
|
1020
1022
|
<xsl:apply-templates select="following-sibling::node()" mode="pagebreak"/>
|
1021
1023
|
</xsl:element>
|
@@ -1029,8 +1031,8 @@
|
|
1029
1031
|
<!-- END: Page breaks processing -->
|
1030
1032
|
<!-- ================================= -->
|
1031
1033
|
|
1032
|
-
<xsl:template match="bipm:
|
1033
|
-
<xsl:template match="bipm:
|
1034
|
+
<xsl:template match="bipm:metanorma"/>
|
1035
|
+
<xsl:template match="bipm:metanorma" mode="bipm-standard">
|
1034
1036
|
<xsl:param name="curr_docnum"/>
|
1035
1037
|
<xsl:variable name="curr_xml">
|
1036
1038
|
<xsl:copy-of select="."/>
|
@@ -1083,7 +1085,7 @@
|
|
1083
1085
|
|
1084
1086
|
<fo:block-container font-size="18pt" font-weight="bold" text-align="center">
|
1085
1087
|
<fo:block role="H1">
|
1086
|
-
<xsl:value-of select="//bipm:
|
1088
|
+
<xsl:value-of select="//bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-cover']"/>
|
1087
1089
|
</fo:block>
|
1088
1090
|
</fo:block-container>
|
1089
1091
|
|
@@ -1176,7 +1178,7 @@
|
|
1176
1178
|
<fo:block-container margin-left="-14mm" margin-right="0mm">
|
1177
1179
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
1178
1180
|
<fo:block font-family="Arial" font-size="16pt" font-weight="bold" text-align-last="justify" margin-bottom="82pt" role="H1">
|
1179
|
-
<fo:inline><xsl:value-of select="//bipm:
|
1181
|
+
<fo:inline><xsl:value-of select="//bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-main']"/></fo:inline>
|
1180
1182
|
<fo:inline keep-together.within-line="always">
|
1181
1183
|
<fo:leader leader-pattern="space"/>
|
1182
1184
|
<fo:inline>
|
@@ -1267,7 +1269,7 @@
|
|
1267
1269
|
|
1268
1270
|
<!-- Index -->
|
1269
1271
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
|
1270
|
-
<xsl:with-param name="isDraft" select="normalize-space(//bipm:
|
1272
|
+
<xsl:with-param name="isDraft" select="normalize-space(//bipm:metanorma/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
|
1271
1273
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1272
1274
|
</xsl:apply-templates>
|
1273
1275
|
|
@@ -1315,20 +1317,20 @@
|
|
1315
1317
|
|
1316
1318
|
<xsl:choose>
|
1317
1319
|
<xsl:when test="$independentAppendix != ''">
|
1318
|
-
<xsl:apply-templates select="//bipm:
|
1320
|
+
<xsl:apply-templates select="//bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-appendix']" mode="title"/>
|
1319
1321
|
<fo:block>
|
1320
|
-
<xsl:apply-templates select="//bipm:
|
1322
|
+
<xsl:apply-templates select="//bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-annex']" mode="title"/>
|
1321
1323
|
</fo:block>
|
1322
1324
|
</xsl:when>
|
1323
1325
|
<xsl:otherwise> <!-- doctype = 'guide' -->
|
1324
|
-
<xsl:apply-templates select="//bipm:
|
1326
|
+
<xsl:apply-templates select="//bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type='title-main']" mode="title"/>
|
1325
1327
|
</xsl:otherwise>
|
1326
1328
|
</xsl:choose>
|
1327
1329
|
|
1328
1330
|
</fo:block>
|
1329
1331
|
|
1330
|
-
<!-- <xsl:variable name="part_num" select="normalize-space(/bipm:
|
1331
|
-
<xsl:if test="/bipm:
|
1332
|
+
<!-- <xsl:variable name="part_num" select="normalize-space(/bipm:metanorma/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/> -->
|
1333
|
+
<xsl:if test="/bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-part-with-numbering']">
|
1332
1334
|
<fo:block role="H2">
|
1333
1335
|
<!-- <xsl:if test="$part_num != ''">
|
1334
1336
|
<xsl:call-template name="getLocalizedString">
|
@@ -1339,23 +1341,23 @@
|
|
1339
1341
|
<xsl:value-of select="$part_num"/>
|
1340
1342
|
</xsl:if>
|
1341
1343
|
<xsl:text>: </xsl:text> -->
|
1342
|
-
<xsl:apply-templates select="/bipm:
|
1344
|
+
<xsl:apply-templates select="/bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-part-with-numbering']" mode="title"/>
|
1343
1345
|
</fo:block>
|
1344
1346
|
</xsl:if>
|
1345
|
-
<!-- <xsl:variable name="subpart_num" select="normalize-space(/bipm:
|
1346
|
-
<xsl:if test="/bipm:
|
1347
|
+
<!-- <xsl:variable name="subpart_num" select="normalize-space(/bipm:metanorma/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/> -->
|
1348
|
+
<xsl:if test="/bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-subpart-with-numbering']">
|
1347
1349
|
<fo:block role="H3">
|
1348
1350
|
<!-- <xsl:if test="$subpart_num != ''">
|
1349
1351
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang=$curr_lang]),'#',$subpart_num)"/>
|
1350
1352
|
</xsl:if>
|
1351
1353
|
<xsl:text>: </xsl:text> -->
|
1352
|
-
<xsl:apply-templates select="/bipm:
|
1354
|
+
<xsl:apply-templates select="/bipm:metanorma/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'title-subpart-with-numbering']" mode="title"/>
|
1353
1355
|
</fo:block>
|
1354
1356
|
</xsl:if>
|
1355
1357
|
|
1356
1358
|
<fo:block> </fo:block>
|
1357
1359
|
<fo:block font-size="9pt">
|
1358
|
-
<xsl:value-of select="/bipm:
|
1360
|
+
<xsl:value-of select="/bipm:metanorma/bipm:bibdata/bipm:ext/bipm:editorialgroup/bipm:committee/bipm:variant[@language = $curr_lang]"/>
|
1359
1361
|
</fo:block>
|
1360
1362
|
</fo:block-container>
|
1361
1363
|
|
@@ -1379,18 +1381,18 @@
|
|
1379
1381
|
<fo:block text-align="right"><xsl:value-of select="bipm:bibdata/bipm:version/bipm:draft"/></fo:block>
|
1380
1382
|
<fo:block text-align-last="justify">
|
1381
1383
|
<fo:inline>
|
1382
|
-
<xsl:if test="/bipm:
|
1384
|
+
<xsl:if test="/bipm:metanorma/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix">
|
1383
1385
|
<xsl:choose>
|
1384
1386
|
<xsl:when test="$lang = 'fr'">Annexe </xsl:when>
|
1385
1387
|
<xsl:otherwise>Appendix </xsl:otherwise>
|
1386
1388
|
</xsl:choose>
|
1387
|
-
<xsl:value-of select="/bipm:
|
1389
|
+
<xsl:value-of select="/bipm:metanorma/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix"/>
|
1388
1390
|
</xsl:if>
|
1389
1391
|
</fo:inline>
|
1390
1392
|
<fo:inline keep-together.within-line="always">
|
1391
1393
|
<fo:leader leader-pattern="space"/>
|
1392
1394
|
<xsl:call-template name="printRevisionDate">
|
1393
|
-
<xsl:with-param name="date" select="/bipm:
|
1395
|
+
<xsl:with-param name="date" select="/bipm:metanorma/bipm:bibdata/bipm:version/bipm:revision-date"/>
|
1394
1396
|
<xsl:with-param name="lang" select="$lang"/>
|
1395
1397
|
<xsl:with-param name="variant" select="'true'"/>
|
1396
1398
|
</xsl:call-template>
|
@@ -1422,7 +1424,7 @@
|
|
1422
1424
|
|
1423
1425
|
<!-- Index -->
|
1424
1426
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
|
1425
|
-
<xsl:with-param name="isDraft" select="normalize-space(//bipm:
|
1427
|
+
<xsl:with-param name="isDraft" select="normalize-space(//bipm:metanorma/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
|
1426
1428
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1427
1429
|
</xsl:apply-templates>
|
1428
1430
|
|
@@ -1449,13 +1451,13 @@
|
|
1449
1451
|
<xsl:call-template name="getLanguages"/>
|
1450
1452
|
</xsl:variable>
|
1451
1453
|
<xsl:variable name="editionFO">
|
1452
|
-
<xsl:apply-templates select="(//bipm:
|
1454
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:edition[normalize-space(@language) = '']">
|
1453
1455
|
<xsl:with-param name="curr_lang" select="xalan:nodeset($languages)/lang[1]"/>
|
1454
1456
|
</xsl:apply-templates>
|
1455
1457
|
</xsl:variable>
|
1456
1458
|
|
1457
1459
|
<xsl:variable name="titles">
|
1458
|
-
<xsl:for-each select="(//bipm:
|
1460
|
+
<xsl:for-each select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title">
|
1459
1461
|
<xsl:copy-of select="."/>
|
1460
1462
|
</xsl:for-each>
|
1461
1463
|
</xsl:variable>
|
@@ -1522,40 +1524,40 @@
|
|
1522
1524
|
|
1523
1525
|
<fo:block-container absolute-position="fixed" left="12.5mm" top="60mm">
|
1524
1526
|
|
1525
|
-
<fo:block font-size="22.2pt" font-weight="{$weight-normal}" role="H1"><xsl:value-of select="(//bipm:
|
1526
|
-
<fo:block font-size="22.2pt" font-weight="{$weight-bold}" margin-top="1mm" role="H1"><xsl:value-of select="(//bipm:
|
1527
|
+
<fo:block font-size="22.2pt" font-weight="{$weight-normal}" role="H1"><xsl:value-of select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-main']"/></fo:block>
|
1528
|
+
<fo:block font-size="22.2pt" font-weight="{$weight-bold}" margin-top="1mm" role="H1"><xsl:value-of select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-main']"/></fo:block>
|
1527
1529
|
|
1528
1530
|
<xsl:variable name="edition_str">édition</xsl:variable>
|
1529
1531
|
|
1530
|
-
<fo:block font-size="14pt" font-weight="{$weight-bold}" margin-top="4mm"><xsl:value-of select="concat((//bipm:
|
1532
|
+
<fo:block font-size="14pt" font-weight="{$weight-bold}" margin-top="4mm"><xsl:value-of select="concat((//bipm:metanorma)[1]/bipm:bibdata/bipm:edition[normalize-space(@language) = ''], ' ', $edition_str, ' ', $copyrightYear)"/></fo:block>
|
1531
1533
|
</fo:block-container>
|
1532
1534
|
|
1533
1535
|
<fo:block-container absolute-position="fixed" left="12.5mm" top="92mm" height="170mm" width="144mm" display-align="center">
|
1534
1536
|
<fo:block role="H1">
|
1535
1537
|
|
1536
1538
|
<xsl:variable name="title_appendix_fr">
|
1537
|
-
<xsl:apply-templates select="(//bipm:
|
1539
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-appendix']" mode="title"/>
|
1538
1540
|
</xsl:variable>
|
1539
1541
|
<xsl:variable name="title_appendix_en">
|
1540
|
-
<xsl:apply-templates select="(//bipm:
|
1542
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-appendix']" mode="title"/>
|
1541
1543
|
</xsl:variable>
|
1542
1544
|
<xsl:variable name="title_annex_fr">
|
1543
|
-
<xsl:apply-templates select="(//bipm:
|
1545
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-annex']" mode="title"/>
|
1544
1546
|
</xsl:variable>
|
1545
1547
|
<xsl:variable name="title_annex_en">
|
1546
|
-
<xsl:apply-templates select="(//bipm:
|
1548
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-annex']" mode="title"/>
|
1547
1549
|
</xsl:variable>
|
1548
1550
|
<xsl:variable name="title_part_fr">
|
1549
|
-
<xsl:apply-templates select="(//bipm:
|
1551
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-part']" mode="title"/>
|
1550
1552
|
</xsl:variable>
|
1551
1553
|
<xsl:variable name="title_part_en">
|
1552
|
-
<xsl:apply-templates select="(//bipm:
|
1554
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-part']" mode="title"/>
|
1553
1555
|
</xsl:variable>
|
1554
1556
|
<xsl:variable name="title_subpart_fr">
|
1555
|
-
<xsl:apply-templates select="(//bipm:
|
1557
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'title-subpart']" mode="title"/>
|
1556
1558
|
</xsl:variable>
|
1557
1559
|
<xsl:variable name="title_subpart_en">
|
1558
|
-
<xsl:apply-templates select="(//bipm:
|
1560
|
+
<xsl:apply-templates select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'title-subpart']" mode="title"/>
|
1559
1561
|
</xsl:variable>
|
1560
1562
|
|
1561
1563
|
<xsl:variable name="titles_length" select="string-length($title_appendix_fr) + string-length($title_appendix_en) + string-length($title_annex_fr) + string-length($title_annex_en) + string-length($title_part_fr) + string-length($title_part_en) + string-length($title_subpart_fr) + string-length($title_subpart_fr)"/>
|
@@ -1587,13 +1589,13 @@
|
|
1587
1589
|
</xsl:variable>
|
1588
1590
|
|
1589
1591
|
<!-- Appendix titles processing -->
|
1590
|
-
<xsl:variable name="appendix_num" select="normalize-space((//bipm:
|
1592
|
+
<xsl:variable name="appendix_num" select="normalize-space((//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix)"/>
|
1591
1593
|
<xsl:if test="$appendix_num != ''">
|
1592
1594
|
<fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}">Annexe <xsl:value-of select="$appendix_num"/></fo:block>
|
1593
1595
|
<fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}">Appendix <xsl:value-of select="$appendix_num"/></fo:block>
|
1594
1596
|
</xsl:if>
|
1595
1597
|
|
1596
|
-
<xsl:if test="(//bipm:
|
1598
|
+
<xsl:if test="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@type = 'title-appendix']">
|
1597
1599
|
<fo:block font-size="{$font-size-factor * 30.4}pt">
|
1598
1600
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
1599
1601
|
<fo:block font-weight="{$weight-normal}"><xsl:copy-of select="$title_appendix_fr"/></fo:block>
|
@@ -1606,8 +1608,8 @@
|
|
1606
1608
|
<!-- End Appendix titles processing -->
|
1607
1609
|
|
1608
1610
|
<!-- Annex title processing -->
|
1609
|
-
<xsl:if test="(//bipm:
|
1610
|
-
<xsl:variable name="annex_num" select="normalize-space((//bipm:
|
1611
|
+
<xsl:if test="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@type = 'title-annex']">
|
1612
|
+
<xsl:variable name="annex_num" select="normalize-space((//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:annexid)"/>
|
1611
1613
|
<xsl:if test="$annex_num != ''">
|
1612
1614
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
1613
1615
|
<!-- Annexe -->
|
@@ -1634,8 +1636,8 @@
|
|
1634
1636
|
<!-- End Annex titles processing -->
|
1635
1637
|
|
1636
1638
|
<!-- Part titles processing -->
|
1637
|
-
<xsl:if test="(//bipm:
|
1638
|
-
<xsl:variable name="part_num" select="normalize-space((//bipm:
|
1639
|
+
<xsl:if test="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@type = 'title-part']">
|
1640
|
+
<xsl:variable name="part_num" select="normalize-space((//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
|
1639
1641
|
<xsl:if test="$part_num != ''">
|
1640
1642
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
1641
1643
|
<!-- Part -->
|
@@ -1666,8 +1668,8 @@
|
|
1666
1668
|
<!-- End Part titles processing -->
|
1667
1669
|
|
1668
1670
|
<!-- Sub-part titles processing -->
|
1669
|
-
<xsl:if test="(//bipm:
|
1670
|
-
<xsl:variable name="subpart_num" select="normalize-space((//bipm:
|
1671
|
+
<xsl:if test="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@type = 'title-subpart']">
|
1672
|
+
<xsl:variable name="subpart_num" select="normalize-space((//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
|
1671
1673
|
<xsl:if test="$subpart_num != ''">
|
1672
1674
|
<fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
|
1673
1675
|
<!-- Sub-part -->
|
@@ -1699,19 +1701,19 @@
|
|
1699
1701
|
|
1700
1702
|
<fo:block-container absolute-position="fixed" left="12mm" top="242mm" height="42mm" width="140mm" display-align="after">
|
1701
1703
|
<fo:block font-size="12pt">
|
1702
|
-
<fo:block><xsl:value-of select="(//bipm:
|
1703
|
-
<fo:block><xsl:value-of select="(//bipm:
|
1704
|
+
<fo:block><xsl:value-of select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:editorialgroup/bipm:committee/bipm:variant[@language = 'fr']"/></fo:block>
|
1705
|
+
<fo:block><xsl:value-of select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:ext/bipm:editorialgroup/bipm:committee/bipm:variant[@language = 'en']"/></fo:block>
|
1704
1706
|
<fo:block> </fo:block>
|
1705
1707
|
|
1706
1708
|
<fo:block>
|
1707
1709
|
<xsl:call-template name="printRevisionDate">
|
1708
|
-
<xsl:with-param name="date" select="(//bipm:
|
1710
|
+
<xsl:with-param name="date" select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:version/bipm:revision-date"/>
|
1709
1711
|
<xsl:with-param name="lang" select="'en'"/>
|
1710
1712
|
</xsl:call-template>
|
1711
1713
|
</fo:block>
|
1712
1714
|
<fo:block>
|
1713
1715
|
<xsl:call-template name="printRevisionDate">
|
1714
|
-
<xsl:with-param name="date" select="(//bipm:
|
1716
|
+
<xsl:with-param name="date" select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:version/bipm:revision-date"/>
|
1715
1717
|
<xsl:with-param name="lang" select="'fr'"/>
|
1716
1718
|
</xsl:call-template>
|
1717
1719
|
</fo:block>
|
@@ -1758,7 +1760,7 @@
|
|
1758
1760
|
|
1759
1761
|
<xsl:template name="insertInnerCoverPage">
|
1760
1762
|
|
1761
|
-
<xsl:if test="(//bipm:
|
1763
|
+
<xsl:if test="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title[@type='title-cover']">
|
1762
1764
|
|
1763
1765
|
<fo:page-sequence master-reference="title-page" format="1" initial-page-number="1" force-page-count="even">
|
1764
1766
|
|
@@ -1771,7 +1773,7 @@
|
|
1771
1773
|
</xsl:variable>
|
1772
1774
|
|
1773
1775
|
<xsl:variable name="titles">
|
1774
|
-
<xsl:for-each select="(//bipm:
|
1776
|
+
<xsl:for-each select="(//bipm:metanorma)[1]/bipm:bibdata/bipm:title">
|
1775
1777
|
<xsl:copy-of select="."/>
|
1776
1778
|
</xsl:for-each>
|
1777
1779
|
</xsl:variable>
|
@@ -1827,7 +1829,7 @@
|
|
1827
1829
|
</xsl:template>
|
1828
1830
|
<!-- End Cover Pages -->
|
1829
1831
|
|
1830
|
-
<xsl:template match="bipm:
|
1832
|
+
<xsl:template match="bipm:metanorma/bipm:bibdata/bipm:title[@language = 'en']/text()" priority="3">
|
1831
1833
|
<xsl:variable name="mep_text" select="'Mise en pratique'"/>
|
1832
1834
|
<xsl:choose>
|
1833
1835
|
<xsl:when test="contains(., $mep_text)">
|
@@ -1859,7 +1861,7 @@
|
|
1859
1861
|
<xsl:template name="getLanguages">
|
1860
1862
|
<xsl:choose>
|
1861
1863
|
<xsl:when test="$doc_split_by_language = ''"><!-- all documents -->
|
1862
|
-
<xsl:for-each select="//bipm:
|
1864
|
+
<xsl:for-each select="//bipm:metanorma/bipm:bibdata">
|
1863
1865
|
<lang><xsl:value-of select="bipm:language[@current = 'true']"/></lang>
|
1864
1866
|
</xsl:for-each>
|
1865
1867
|
</xsl:when>
|
@@ -2171,14 +2173,14 @@
|
|
2171
2173
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
2172
2174
|
<xsl:call-template name="insertFootnoteSeparator"/>
|
2173
2175
|
|
2174
|
-
<xsl:variable name="curr_lang" select="/bipm:
|
2176
|
+
<xsl:variable name="curr_lang" select="/bipm:metanorma/bipm:bibdata/bipm:language[@current = 'true']"/>
|
2175
2177
|
|
2176
2178
|
<xsl:variable name="header-title">
|
2177
2179
|
<xsl:choose>
|
2178
2180
|
<xsl:when test="$lang = 'fr'">Annexe </xsl:when>
|
2179
2181
|
<xsl:otherwise>Appendix </xsl:otherwise>
|
2180
2182
|
</xsl:choose>
|
2181
|
-
<xsl:value-of select="/bipm:
|
2183
|
+
<xsl:value-of select="/bipm:metanorma/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix"/>
|
2182
2184
|
</xsl:variable>
|
2183
2185
|
<xsl:call-template name="insertHeaderFooter">
|
2184
2186
|
<xsl:with-param name="header-title" select="$header-title"/>
|
@@ -2195,7 +2197,7 @@
|
|
2195
2197
|
</fo:page-sequence>
|
2196
2198
|
</xsl:template>
|
2197
2199
|
|
2198
|
-
<xsl:template match="bipm:
|
2200
|
+
<xsl:template match="bipm:metanorma/bipm:bibdata/bipm:edition">
|
2199
2201
|
<xsl:param name="font-size" select="'65%'"/>
|
2200
2202
|
<xsl:param name="baseline-shift" select="'30%'"/>
|
2201
2203
|
<xsl:param name="curr_lang" select="'fr'"/>
|
@@ -3053,12 +3055,12 @@
|
|
3053
3055
|
<xsl:text>, </xsl:text>
|
3054
3056
|
<xsl:variable name="nosee" select="normalize-space(@nosee)"/>
|
3055
3057
|
<xsl:if test="$nosee != 'true'">
|
3056
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:
|
3058
|
+
<xsl:variable name="curr_lang" select="ancestor::bipm:metanorma/bipm:bibdata/bipm:language[@current = 'true']"/>
|
3057
3059
|
<fo:inline>
|
3058
3060
|
<xsl:if test="ancestor::bipm:note_side">
|
3059
3061
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
3060
3062
|
</xsl:if>
|
3061
|
-
<xsl:value-of select="ancestor::bipm:
|
3063
|
+
<xsl:value-of select="ancestor::bipm:metanorma/bipm:localized-strings/bipm:localized-string[@key='see' and @language=$curr_lang]"/>
|
3062
3064
|
</fo:inline>
|
3063
3065
|
<xsl:text> </xsl:text>
|
3064
3066
|
</xsl:if>
|
@@ -3091,7 +3093,7 @@
|
|
3091
3093
|
<xsl:template match="bipm:note[not(ancestor::bipm:preface)]/bipm:name" priority="2">
|
3092
3094
|
<xsl:choose>
|
3093
3095
|
<xsl:when test="not(../preceding-sibling::bipm:note) and not((../following-sibling::bipm:note))">
|
3094
|
-
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:
|
3096
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:metanorma/bipm:bibdata/bipm:language[@current = 'true']"/>
|
3095
3097
|
<xsl:choose>
|
3096
3098
|
<xsl:when test="$curr_lang = 'fr'">
|
3097
3099
|
<xsl:choose>
|
@@ -3476,7 +3478,7 @@
|
|
3476
3478
|
<xsl:template name="insertDraftWatermark">
|
3477
3479
|
<xsl:param name="isDraft"/>
|
3478
3480
|
<xsl:param name="lang"/>
|
3479
|
-
<xsl:if test="$isDraft = 'true' or normalize-space(//bipm:
|
3481
|
+
<xsl:if test="$isDraft = 'true' or normalize-space(//bipm:metanorma/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'projet')) = 'true'">
|
3480
3482
|
<!-- DRAFT -->
|
3481
3483
|
<xsl:variable name="draft_label">
|
3482
3484
|
<xsl:choose>
|
@@ -3520,7 +3522,7 @@
|
|
3520
3522
|
</xsl:template>
|
3521
3523
|
|
3522
3524
|
<xsl:template name="insertHeaderDraftWatermark">
|
3523
|
-
<xsl:variable name="isDraft" select="normalize-space(//bipm:
|
3525
|
+
<xsl:variable name="isDraft" select="normalize-space(//bipm:metanorma/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:metanorma/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
|
3524
3526
|
<xsl:variable name="curr_lang" select="$doc_split_by_language"/>
|
3525
3527
|
<xsl:if test="$isDraft = 'true'">
|
3526
3528
|
<fo:static-content flow-name="header-blank" role="artifact">
|
@@ -3654,7 +3656,7 @@
|
|
3654
3656
|
</xsl:variable>
|
3655
3657
|
|
3656
3658
|
<xsl:variable name="Image-Logo-SI">
|
3657
|
-
<xsl:variable name="si-aspect" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//bipm:
|
3659
|
+
<xsl:variable name="si-aspect" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//bipm:metanorma/bipm:bibdata//bipm:si-aspect)))"/>
|
3658
3660
|
<xsl:choose>
|
3659
3661
|
<xsl:when test="$si-aspect = 'a_e_deltanu'">
|
3660
3662
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" id="svg85" version="1.2" viewBox="0 0 595.28 595.28" height="595.28pt" width="595.28pt">
|
@@ -3985,21 +3987,21 @@
|
|
3985
3987
|
|
3986
3988
|
<xsl:variable name="namespace_full_">
|
3987
3989
|
<xsl:choose>
|
3988
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
3989
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
3990
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
3991
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
3990
3992
|
</xsl:choose>
|
3991
3993
|
</xsl:variable>
|
3992
3994
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
3993
3995
|
|
3994
3996
|
<xsl:variable name="root_element_">
|
3995
3997
|
<xsl:choose>
|
3996
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
3997
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
3998
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
3999
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
3998
4000
|
</xsl:choose>
|
3999
4001
|
</xsl:variable>
|
4000
4002
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
4001
4003
|
|
4002
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
4004
|
+
<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'])"/>
|
4003
4005
|
|
4004
4006
|
<!-- external parameters -->
|
4005
4007
|
|
@@ -4100,7 +4102,7 @@
|
|
4100
4102
|
</metanorma-extension>
|
4101
4103
|
-->
|
4102
4104
|
|
4103
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
4105
|
+
<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'])))"/>
|
4104
4106
|
<xsl:variable name="papersize_width_">
|
4105
4107
|
<xsl:choose>
|
4106
4108
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -4162,7 +4164,7 @@
|
|
4162
4164
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
4163
4165
|
|
4164
4166
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
4165
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
4167
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
4166
4168
|
<xsl:variable name="layout_columns">
|
4167
4169
|
<xsl:choose>
|
4168
4170
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -4227,7 +4229,7 @@
|
|
4227
4229
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4228
4230
|
|
4229
4231
|
<xsl:variable name="title-list-tables">
|
4230
|
-
<xsl:variable name="toc_table_title" select="//*[
|
4232
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4231
4233
|
<xsl:value-of select="$toc_table_title"/>
|
4232
4234
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4233
4235
|
<xsl:call-template name="getLocalizedString">
|
@@ -4237,7 +4239,7 @@
|
|
4237
4239
|
</xsl:variable>
|
4238
4240
|
|
4239
4241
|
<xsl:variable name="title-list-figures">
|
4240
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
4242
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4241
4243
|
<xsl:value-of select="$toc_figure_title"/>
|
4242
4244
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4243
4245
|
<xsl:call-template name="getLocalizedString">
|
@@ -4247,7 +4249,7 @@
|
|
4247
4249
|
</xsl:variable>
|
4248
4250
|
|
4249
4251
|
<xsl:variable name="title-list-recommendations">
|
4250
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
4252
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4251
4253
|
<xsl:value-of select="$toc_requirement_title"/>
|
4252
4254
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4253
4255
|
<xsl:call-template name="getLocalizedString">
|
@@ -4257,8 +4259,8 @@
|
|
4257
4259
|
</xsl:variable>
|
4258
4260
|
|
4259
4261
|
<xsl:variable name="bibdata">
|
4260
|
-
<xsl:copy-of select="//*[
|
4261
|
-
<xsl:copy-of select="//*[
|
4262
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
4263
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
4262
4264
|
</xsl:variable>
|
4263
4265
|
|
4264
4266
|
<!-- Characters -->
|
@@ -4323,7 +4325,7 @@
|
|
4323
4325
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4324
4326
|
|
4325
4327
|
<xsl:variable name="additional_fonts_">
|
4326
|
-
<xsl:for-each select="//*[
|
4328
|
+
<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']">
|
4327
4329
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4328
4330
|
</xsl:for-each>
|
4329
4331
|
</xsl:variable>
|
@@ -5693,10 +5695,10 @@
|
|
5693
5695
|
|
5694
5696
|
<xsl:template name="processTablesFigures_Contents">
|
5695
5697
|
<xsl:param name="always"/>
|
5696
|
-
<xsl:if test="(//*[
|
5698
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5697
5699
|
<xsl:call-template name="processTables_Contents"/>
|
5698
5700
|
</xsl:if>
|
5699
|
-
<xsl:if test="(//*[
|
5701
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5700
5702
|
<xsl:call-template name="processFigures_Contents"/>
|
5701
5703
|
</xsl:if>
|
5702
5704
|
</xsl:template>
|
@@ -5776,7 +5778,7 @@
|
|
5776
5778
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
5777
5779
|
|
5778
5780
|
<!-- Example:
|
5779
|
-
<
|
5781
|
+
<metanorma>
|
5780
5782
|
<preface>
|
5781
5783
|
<page_sequence>
|
5782
5784
|
<clause...
|
@@ -5799,7 +5801,7 @@
|
|
5799
5801
|
<page_sequence>
|
5800
5802
|
<annex ..
|
5801
5803
|
</page_sequence>
|
5802
|
-
</
|
5804
|
+
</metanorma>
|
5803
5805
|
-->
|
5804
5806
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
5805
5807
|
|
@@ -5842,15 +5844,8 @@
|
|
5842
5844
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
5843
5845
|
|
5844
5846
|
<xsl:template name="insertMainSectionsPageSequences">
|
5845
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
5846
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5847
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
5848
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
5849
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5850
5847
|
|
5851
|
-
|
5852
|
-
</xsl:element>
|
5853
|
-
</xsl:element>
|
5848
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
5854
5849
|
|
5855
5850
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5856
5851
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -5869,6 +5864,18 @@
|
|
5869
5864
|
</xsl:element>
|
5870
5865
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
5871
5866
|
|
5867
|
+
<xsl:template name="insertSectionsInPageSequence">
|
5868
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
5869
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5870
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
5871
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5872
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5873
|
+
|
5874
|
+
</xsl:for-each>
|
5875
|
+
</xsl:element>
|
5876
|
+
</xsl:element>
|
5877
|
+
</xsl:template>
|
5878
|
+
|
5872
5879
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
5873
5880
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
5874
5881
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -7047,7 +7054,7 @@
|
|
7047
7054
|
|
7048
7055
|
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note'][not(@type = 'units')]) > 1">
|
7049
7056
|
<fo:block font-weight="bold" role="SKIP">
|
7050
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:
|
7057
|
+
<xsl:variable name="curr_lang" select="ancestor::bipm:metanorma/bipm:bibdata/bipm:language"/>
|
7051
7058
|
<xsl:choose>
|
7052
7059
|
<xsl:when test="$curr_lang = 'fr'">Remarques</xsl:when>
|
7053
7060
|
<xsl:otherwise>Notes</xsl:otherwise>
|
@@ -7428,7 +7435,7 @@
|
|
7428
7435
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
7429
7436
|
|
7430
7437
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
7431
|
-
<xsl:variable name="lang" select="ancestor::*[
|
7438
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
7432
7439
|
<xsl:variable name="reference_">
|
7433
7440
|
<xsl:value-of select="@reference"/>
|
7434
7441
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -7549,13 +7556,13 @@
|
|
7549
7556
|
footnotes in bibliography
|
7550
7557
|
footnotes in document's body (except table's head/body/foot and figure text)
|
7551
7558
|
-->
|
7552
|
-
<xsl:for-each select="ancestor::*[
|
7559
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
7553
7560
|
<fn gen_id="{generate-id(.)}">
|
7554
7561
|
<xsl:copy-of select="@*"/>
|
7555
7562
|
<xsl:copy-of select="node()"/>
|
7556
7563
|
</fn>
|
7557
7564
|
</xsl:for-each>
|
7558
|
-
<xsl:for-each select="ancestor::*[
|
7565
|
+
<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']/*">
|
7559
7566
|
<xsl:sort select="@displayorder" data-type="number"/>
|
7560
7567
|
<!-- commented:
|
7561
7568
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -9923,6 +9930,8 @@
|
|
9923
9930
|
<!-- ======================================= -->
|
9924
9931
|
<!-- math -->
|
9925
9932
|
<!-- ======================================= -->
|
9933
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
9934
|
+
|
9926
9935
|
<xsl:template match="mathml:math">
|
9927
9936
|
<xsl:variable name="isAdded" select="@added"/>
|
9928
9937
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -10314,10 +10323,10 @@
|
|
10314
10323
|
<xsl:template match="*[local-name()='localityStack']"/>
|
10315
10324
|
|
10316
10325
|
<xsl:variable name="pdfAttachmentsList_">
|
10317
|
-
<xsl:for-each select="//*[
|
10326
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
10318
10327
|
<attachment filename="{@name}"/>
|
10319
10328
|
</xsl:for-each>
|
10320
|
-
<xsl:if test="not(//*[
|
10329
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
10321
10330
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
10322
10331
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
10323
10332
|
<attachment filename="{$attachment_path}"/>
|
@@ -11804,7 +11813,9 @@
|
|
11804
11813
|
<xsl:apply-templates mode="bookmarks"/>
|
11805
11814
|
</xsl:template>
|
11806
11815
|
|
11807
|
-
<xsl:template match="*[local-name() = '
|
11816
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
11817
|
+
|
11818
|
+
<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">
|
11808
11819
|
<xsl:apply-templates select="."/>
|
11809
11820
|
</xsl:template>
|
11810
11821
|
|
@@ -11821,7 +11832,15 @@
|
|
11821
11832
|
<xsl:apply-templates mode="contents"/>
|
11822
11833
|
</xsl:template>
|
11823
11834
|
|
11824
|
-
<xsl:template match="*[local-name() = '
|
11835
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
11836
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
11837
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
11838
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
11839
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
11840
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
11841
|
+
|
11842
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
11843
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
11825
11844
|
<xsl:apply-templates mode="bookmarks"/>
|
11826
11845
|
</xsl:template>
|
11827
11846
|
|
@@ -11834,6 +11853,13 @@
|
|
11834
11853
|
<xsl:apply-templates mode="bookmarks"/>
|
11835
11854
|
</xsl:template>
|
11836
11855
|
|
11856
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
11857
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
11858
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
11859
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
11860
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
11861
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
11862
|
+
|
11837
11863
|
<!-- Bookmarks -->
|
11838
11864
|
<xsl:template name="addBookmarks">
|
11839
11865
|
<xsl:param name="contents"/>
|
@@ -12132,6 +12158,13 @@
|
|
12132
12158
|
|
12133
12159
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
12134
12160
|
|
12161
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
12162
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
12163
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
12164
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
12165
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
12166
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
12167
|
+
|
12135
12168
|
<xsl:template name="getSection">
|
12136
12169
|
<xsl:choose>
|
12137
12170
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -12251,7 +12284,8 @@
|
|
12251
12284
|
</xsl:copy>
|
12252
12285
|
</xsl:template>
|
12253
12286
|
|
12254
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
12287
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
12288
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
12255
12289
|
<xsl:copy-of select="."/>
|
12256
12290
|
</xsl:template>
|
12257
12291
|
|
@@ -12315,7 +12349,7 @@
|
|
12315
12349
|
<!-- sourcecode -->
|
12316
12350
|
<!-- =============== -->
|
12317
12351
|
|
12318
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
12352
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
12319
12353
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
12320
12354
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
12321
12355
|
|
@@ -13772,7 +13806,7 @@
|
|
13772
13806
|
|
13773
13807
|
</xsl:template> <!-- sections_element_style -->
|
13774
13808
|
|
13775
|
-
<xsl:template match="//*[
|
13809
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
13776
13810
|
|
13777
13811
|
<fo:block break-after="page"/>
|
13778
13812
|
|
@@ -13878,7 +13912,7 @@
|
|
13878
13912
|
<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>
|
13879
13913
|
</xsl:when>
|
13880
13914
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
13881
|
-
<xsl:when test="ancestor::*[
|
13915
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
13882
13916
|
<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>
|
13883
13917
|
</xsl:when>
|
13884
13918
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -15216,7 +15250,7 @@
|
|
15216
15250
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
15217
15251
|
|
15218
15252
|
<!-- move section 'Normative references' inside 'sections' -->
|
15219
|
-
<xsl:for-each select="* | ancestor::*[
|
15253
|
+
<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']]">
|
15220
15254
|
<xsl:sort select="@displayorder" data-type="number"/>
|
15221
15255
|
|
15222
15256
|
<!-- process Section's title -->
|
@@ -15277,10 +15311,126 @@
|
|
15277
15311
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
15278
15312
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
15279
15313
|
|
15280
|
-
<xsl:template match="*[local-name() = 'stem']
|
15314
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
15315
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
15316
|
+
|
15317
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
15318
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
15319
|
+
<xsl:copy-of select="@*"/>
|
15320
|
+
<xsl:choose>
|
15321
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
15322
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
15323
|
+
</xsl:when>
|
15324
|
+
<xsl:otherwise>
|
15325
|
+
<xsl:copy-of select="node()"/>
|
15326
|
+
</xsl:otherwise>
|
15327
|
+
</xsl:choose>
|
15328
|
+
</xsl:element>
|
15329
|
+
</xsl:template>
|
15330
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
15331
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
15332
|
+
<xsl:copy-of select="@*"/>
|
15333
|
+
<xsl:choose>
|
15334
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
15335
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
15336
|
+
</xsl:when>
|
15337
|
+
<xsl:otherwise>
|
15338
|
+
<xsl:copy-of select="node()"/>
|
15339
|
+
</xsl:otherwise>
|
15340
|
+
</xsl:choose>
|
15341
|
+
</xsl:element>
|
15342
|
+
</xsl:template>
|
15343
|
+
|
15344
|
+
<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">
|
15281
15345
|
<xsl:copy-of select="."/>
|
15282
15346
|
</xsl:template>
|
15283
15347
|
|
15348
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
15349
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
15350
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
15351
|
+
<xsl:copy>
|
15352
|
+
<xsl:copy-of select="@*"/>
|
15353
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
15354
|
+
<xsl:choose>
|
15355
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
15356
|
+
<xsl:choose>
|
15357
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
15358
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
15359
|
+
</xsl:when>
|
15360
|
+
<xsl:otherwise>
|
15361
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
15362
|
+
</xsl:otherwise>
|
15363
|
+
</xsl:choose>
|
15364
|
+
</xsl:when>
|
15365
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
15366
|
+
<xsl:choose>
|
15367
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
15368
|
+
<xsl:copy-of select="node()"/>
|
15369
|
+
</xsl:when>
|
15370
|
+
<xsl:otherwise>
|
15371
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
15372
|
+
</xsl:otherwise>
|
15373
|
+
</xsl:choose>
|
15374
|
+
</xsl:otherwise>
|
15375
|
+
</xsl:choose>
|
15376
|
+
</xsl:copy>
|
15377
|
+
</xsl:template>
|
15378
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
15379
|
+
<xsl:copy>
|
15380
|
+
<xsl:copy-of select="@*"/>
|
15381
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
15382
|
+
<xsl:choose>
|
15383
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
15384
|
+
<xsl:choose>
|
15385
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
15386
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
15387
|
+
</xsl:when>
|
15388
|
+
<xsl:otherwise>
|
15389
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
15390
|
+
</xsl:otherwise>
|
15391
|
+
</xsl:choose>
|
15392
|
+
</xsl:when>
|
15393
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
15394
|
+
<xsl:choose>
|
15395
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
15396
|
+
<xsl:copy-of select="node()"/>
|
15397
|
+
</xsl:when>
|
15398
|
+
<xsl:otherwise>
|
15399
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
15400
|
+
</xsl:otherwise>
|
15401
|
+
</xsl:choose>
|
15402
|
+
</xsl:otherwise>
|
15403
|
+
</xsl:choose>
|
15404
|
+
</xsl:copy>
|
15405
|
+
</xsl:template>
|
15406
|
+
|
15407
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
15408
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
15409
|
+
<xsl:copy>
|
15410
|
+
<xsl:copy-of select="@*"/>
|
15411
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
15412
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
15413
|
+
</xsl:copy>
|
15414
|
+
</xsl:template>
|
15415
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
15416
|
+
<xsl:copy>
|
15417
|
+
<xsl:copy-of select="@*"/>
|
15418
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
15419
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
15420
|
+
</xsl:copy>
|
15421
|
+
</xsl:template>
|
15422
|
+
|
15423
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
15424
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
15425
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
15426
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
15427
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
15428
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
15429
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
15430
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
15431
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
15432
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
15433
|
+
|
15284
15434
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
15285
15435
|
<xsl:copy>
|
15286
15436
|
<xsl:copy-of select="@*"/>
|
@@ -15311,7 +15461,7 @@
|
|
15311
15461
|
<!-- add @id - first element with @id plus '_element_name' -->
|
15312
15462
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
15313
15463
|
<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>
|
15314
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
15464
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
15315
15465
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
15316
15466
|
</xsl:if>
|
15317
15467
|
</xsl:template>
|
@@ -15561,6 +15711,126 @@
|
|
15561
15711
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
15562
15712
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
15563
15713
|
|
15714
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
15715
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15716
|
+
</xsl:template>
|
15717
|
+
|
15718
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
15719
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15720
|
+
</xsl:template>
|
15721
|
+
|
15722
|
+
<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"/>
|
15723
|
+
|
15724
|
+
<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"/>
|
15725
|
+
|
15726
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
15727
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15728
|
+
</xsl:template>
|
15729
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
15730
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15731
|
+
</xsl:template>
|
15732
|
+
|
15733
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
15734
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
15735
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
15736
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
15737
|
+
<xsl:copy-of select="@*"/>
|
15738
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15739
|
+
</xsl:element>
|
15740
|
+
</xsl:template>
|
15741
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
15742
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
15743
|
+
<xsl:copy-of select="@*"/>
|
15744
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15745
|
+
</xsl:element>
|
15746
|
+
</xsl:template>
|
15747
|
+
|
15748
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
15749
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
15750
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
15751
|
+
|
15752
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
15753
|
+
<xsl:apply-templates/>
|
15754
|
+
</xsl:template>
|
15755
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
15756
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15757
|
+
</xsl:template>
|
15758
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
15759
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15760
|
+
</xsl:template>
|
15761
|
+
|
15762
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
15763
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
15764
|
+
|
15765
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
15766
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
15767
|
+
<xsl:copy-of select="@*"/>
|
15768
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15769
|
+
</xsl:element>
|
15770
|
+
</xsl:template>
|
15771
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
15772
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
15773
|
+
<xsl:copy-of select="@*"/>
|
15774
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15775
|
+
</xsl:element>
|
15776
|
+
</xsl:template>
|
15777
|
+
|
15778
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
15779
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
15780
|
+
|
15781
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
15782
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
15783
|
+
<xsl:copy-of select="@*"/>
|
15784
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15785
|
+
</xsl:element>
|
15786
|
+
</xsl:template>
|
15787
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
15788
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
15789
|
+
<xsl:copy-of select="@*"/>
|
15790
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15791
|
+
</xsl:element>
|
15792
|
+
</xsl:template>
|
15793
|
+
|
15794
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
15795
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
15796
|
+
|
15797
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
15798
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
15799
|
+
<xsl:copy-of select="@*"/>
|
15800
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15801
|
+
</xsl:element>
|
15802
|
+
</xsl:template>
|
15803
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
15804
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
15805
|
+
<xsl:copy-of select="@*"/>
|
15806
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15807
|
+
</xsl:element>
|
15808
|
+
</xsl:template>
|
15809
|
+
|
15810
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
15811
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
15812
|
+
|
15813
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
15814
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
15815
|
+
<xsl:copy-of select="@*"/>
|
15816
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15817
|
+
</xsl:element>
|
15818
|
+
</xsl:template>
|
15819
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
15820
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
15821
|
+
<xsl:copy-of select="@*"/>
|
15822
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15823
|
+
</xsl:element>
|
15824
|
+
</xsl:template>
|
15825
|
+
|
15826
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
15827
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
15828
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
15829
|
+
|
15830
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
15831
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
15832
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
15833
|
+
|
15564
15834
|
<!-- END: update new Presentation XML -->
|
15565
15835
|
|
15566
15836
|
<!-- =========================================================================== -->
|
@@ -15633,7 +15903,7 @@
|
|
15633
15903
|
|
15634
15904
|
<xsl:choose>
|
15635
15905
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
15636
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
15906
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
15637
15907
|
<element pos="{position()}">
|
15638
15908
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
15639
15909
|
<xsl:value-of select="name()"/>
|
@@ -16061,7 +16331,7 @@
|
|
16061
16331
|
</xsl:when>
|
16062
16332
|
<xsl:when test="contains($text, $replace)">
|
16063
16333
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
16064
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
16334
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
16065
16335
|
<xsl:call-template name="replaceChar">
|
16066
16336
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
16067
16337
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -16098,7 +16368,7 @@
|
|
16098
16368
|
</xsl:variable>
|
16099
16369
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
16100
16370
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
16101
|
-
<xsl:variable name="lang" select="ancestor::*[
|
16371
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
16102
16372
|
<xsl:variable name="reference" select="@reference"/>
|
16103
16373
|
<!-- fn sequence number in document -->
|
16104
16374
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -16143,7 +16413,7 @@
|
|
16143
16413
|
</xsl:template>
|
16144
16414
|
|
16145
16415
|
<xsl:template name="printEdition">
|
16146
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
16416
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
16147
16417
|
|
16148
16418
|
<xsl:choose>
|
16149
16419
|
<xsl:when test="$edition_i18n != ''">
|
@@ -16153,7 +16423,7 @@
|
|
16153
16423
|
</xsl:call-template>
|
16154
16424
|
</xsl:when>
|
16155
16425
|
<xsl:otherwise>
|
16156
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
16426
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
16157
16427
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
16158
16428
|
<xsl:call-template name="capitalize">
|
16159
16429
|
<xsl:with-param name="str">
|
@@ -16287,7 +16557,7 @@
|
|
16287
16557
|
<xsl:param name="charDelim" select="', '"/>
|
16288
16558
|
<xsl:choose>
|
16289
16559
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
16290
|
-
<xsl:for-each select="//*[
|
16560
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
16291
16561
|
<xsl:sort data-type="text" order="ascending"/>
|
16292
16562
|
<xsl:call-template name="insertKeyword">
|
16293
16563
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -16297,7 +16567,7 @@
|
|
16297
16567
|
</xsl:for-each>
|
16298
16568
|
</xsl:when>
|
16299
16569
|
<xsl:otherwise>
|
16300
|
-
<xsl:for-each select="//*[
|
16570
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
16301
16571
|
<xsl:call-template name="insertKeyword">
|
16302
16572
|
<xsl:with-param name="meta" select="$meta"/>
|
16303
16573
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -16372,7 +16642,7 @@
|
|
16372
16642
|
<!-- Dublin Core properties go here -->
|
16373
16643
|
<dc:title>
|
16374
16644
|
<xsl:variable name="title">
|
16375
|
-
<xsl:for-each select="(//*[
|
16645
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
16376
16646
|
|
16377
16647
|
<xsl:choose>
|
16378
16648
|
<xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
|
@@ -16399,7 +16669,7 @@
|
|
16399
16669
|
</rdf:Alt>
|
16400
16670
|
</dc:title>
|
16401
16671
|
<xsl:variable name="dc_creator">
|
16402
|
-
<xsl:for-each select="(//*[
|
16672
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
16403
16673
|
|
16404
16674
|
<rdf:Seq>
|
16405
16675
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -16421,7 +16691,7 @@
|
|
16421
16691
|
<xsl:variable name="dc_description">
|
16422
16692
|
<xsl:variable name="abstract">
|
16423
16693
|
|
16424
|
-
<xsl:copy-of select="//*[
|
16694
|
+
<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'])]"/>
|
16425
16695
|
|
16426
16696
|
</xsl:variable>
|
16427
16697
|
<rdf:Alt>
|
@@ -16449,7 +16719,7 @@
|
|
16449
16719
|
</rdf:RDF>
|
16450
16720
|
</x:xmpmeta>
|
16451
16721
|
<!-- add attachments -->
|
16452
|
-
<xsl:for-each select="//*[
|
16722
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
16453
16723
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
16454
16724
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
16455
16725
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -16483,7 +16753,7 @@
|
|
16483
16753
|
</pdf:embedded-file>
|
16484
16754
|
</xsl:for-each>
|
16485
16755
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
16486
|
-
<xsl:if test="not(//*[
|
16756
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
16487
16757
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
16488
16758
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
16489
16759
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -16687,9 +16957,9 @@
|
|
16687
16957
|
<xsl:value-of select="document('')//*/namespace::bipm"/>
|
16688
16958
|
|
16689
16959
|
</xsl:variable>
|
16690
|
-
<xsl:if test="$documentNS != $XSLNS">
|
16960
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
16691
16961
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
16692
|
-
</xsl:if>
|
16962
|
+
</xsl:if> -->
|
16693
16963
|
</xsl:template> <!-- namespaceCheck -->
|
16694
16964
|
|
16695
16965
|
<xsl:template name="getLanguage">
|
@@ -16768,10 +17038,10 @@
|
|
16768
17038
|
|
16769
17039
|
<xsl:variable name="data_value">
|
16770
17040
|
<xsl:choose>
|
16771
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
17041
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
16772
17042
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16773
17043
|
</xsl:when>
|
16774
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
17044
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
16775
17045
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16776
17046
|
</xsl:when>
|
16777
17047
|
<xsl:when test="$formatted = 'true'">
|
@@ -16909,7 +17179,7 @@
|
|
16909
17179
|
<!-- background image -->
|
16910
17180
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
16911
17181
|
<fo:block>
|
16912
|
-
<xsl:for-each select="/*[
|
17182
|
+
<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]">
|
16913
17183
|
<xsl:choose>
|
16914
17184
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
16915
17185
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|