metanorma-ogc 2.6.12 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/html/_coverpage.css +132 -91
- data/lib/isodoc/ogc/html/_coverpage.scss +2 -0
- data/lib/isodoc/ogc/html/htmlstyle.css +772 -580
- data/lib/isodoc/ogc/html/htmlstyle.scss +3 -3
- data/lib/isodoc/ogc/html/ogc.css +272 -205
- data/lib/isodoc/ogc/html/ogc_wp.css +244 -181
- data/lib/isodoc/ogc/html/wordstyle.css +480 -411
- data/lib/isodoc/ogc/html/wordstyle_wp.css +404 -344
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +369 -101
- data/lib/isodoc/ogc/ogc.best-practice.xsl +369 -101
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +369 -101
- data/lib/isodoc/ogc/ogc.community-practice.xsl +369 -101
- data/lib/isodoc/ogc/ogc.community-standard.xsl +369 -101
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +369 -101
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +369 -101
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +369 -101
- data/lib/isodoc/ogc/ogc.other.xsl +369 -101
- data/lib/isodoc/ogc/ogc.policy.xsl +369 -101
- data/lib/isodoc/ogc/ogc.reference-model.xsl +369 -101
- data/lib/isodoc/ogc/ogc.release-notes.xsl +369 -101
- data/lib/isodoc/ogc/ogc.standard.xsl +369 -101
- data/lib/isodoc/ogc/ogc.test-suite.xsl +369 -101
- data/lib/isodoc/ogc/ogc.user-guide.xsl +369 -101
- data/lib/isodoc/ogc/ogc.white-paper.xsl +346 -78
- data/lib/isodoc/ogc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/ogc/sections.rb +4 -0
- data/lib/metanorma/ogc/basicdoc.rng +37 -32
- data/lib/metanorma/ogc/converter.rb +2 -2
- data/lib/metanorma/ogc/isodoc.rng +35 -23
- data/lib/metanorma/ogc/ogc.rng +28 -30
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +4 -3
- metadata +26 -12
@@ -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:ogc="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:ogc="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:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" 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
|
|
@@ -6,8 +6,8 @@
|
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
9
|
-
<xsl:variable name="docnumber" select="java:toUpperCase(java:java.lang.String.new(/ogc:
|
10
|
-
<xsl:variable name="doctitle" select="/ogc:
|
9
|
+
<xsl:variable name="docnumber" select="java:toUpperCase(java:java.lang.String.new(/ogc:metanorma/ogc:bibdata/ogc:docnumber))"/>
|
10
|
+
<xsl:variable name="doctitle" select="/ogc:metanorma/ogc:bibdata/ogc:title[@language = 'en']"/>
|
11
11
|
|
12
12
|
<!-- <xsl:variable name="docLatestDate_">
|
13
13
|
<xsl:for-each select="/*/ogc:bibdata/ogc:date[normalize-space(ogc:on) != '']">
|
@@ -35,13 +35,13 @@
|
|
35
35
|
|
36
36
|
<xsl:variable name="doctype">
|
37
37
|
<xsl:call-template name="capitalizeWords">
|
38
|
-
<xsl:with-param name="str" select="/ogc:
|
38
|
+
<xsl:with-param name="str" select="/ogc:metanorma/ogc:bibdata/ogc:ext/ogc:doctype"/>
|
39
39
|
</xsl:call-template>
|
40
40
|
</xsl:variable>
|
41
41
|
|
42
|
-
<xsl:variable name="copyright-owner" select="java:toUpperCase(java:java.lang.String.new(/ogc:
|
42
|
+
<xsl:variable name="copyright-owner" select="java:toUpperCase(java:java.lang.String.new(/ogc:metanorma/ogc:bibdata/ogc:copyright/ogc:owner/ogc:organization/ogc:name))"/>
|
43
43
|
|
44
|
-
<xsl:variable name="presentation_metadata_color_text" select="normalize-space(/ogc:
|
44
|
+
<xsl:variable name="presentation_metadata_color_text" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text']/ogc:value)"/>
|
45
45
|
<xsl:variable name="color_main">
|
46
46
|
<xsl:choose>
|
47
47
|
<xsl:when test="$presentation_metadata_color_text != ''"><xsl:value-of select="$presentation_metadata_color_text"/></xsl:when>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
</xsl:choose>
|
50
50
|
</xsl:variable>
|
51
51
|
|
52
|
-
<xsl:variable name="presentation_metadata_color_secondary_shade_1" select="normalize-space(/ogc:
|
52
|
+
<xsl:variable name="presentation_metadata_color_secondary_shade_1" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-secondary-shade-1']/ogc:value)"/>
|
53
53
|
<xsl:variable name="color_design">
|
54
54
|
<xsl:choose>
|
55
55
|
<xsl:when test="$presentation_metadata_color_secondary_shade_1 != ''"><xsl:value-of select="$presentation_metadata_color_secondary_shade_1"/></xsl:when>
|
@@ -58,7 +58,7 @@
|
|
58
58
|
</xsl:choose>
|
59
59
|
</xsl:variable>
|
60
60
|
|
61
|
-
<xsl:variable name="presentation_metadata_color_secondary_shade_2" select="normalize-space(/ogc:
|
61
|
+
<xsl:variable name="presentation_metadata_color_secondary_shade_2" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-secondary-shade-2']/ogc:value)"/>
|
62
62
|
<xsl:variable name="color_design_light">
|
63
63
|
<xsl:choose>
|
64
64
|
<xsl:when test="$presentation_metadata_color_secondary_shade_2 != ''"><xsl:value-of select="$presentation_metadata_color_secondary_shade_2"/></xsl:when>
|
@@ -67,7 +67,7 @@
|
|
67
67
|
</xsl:choose>
|
68
68
|
</xsl:variable>
|
69
69
|
|
70
|
-
<xsl:variable name="presentation_metadata_color_background_definition_term" select="normalize-space(/ogc:
|
70
|
+
<xsl:variable name="presentation_metadata_color_background_definition_term" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-definition-term']/ogc:value)"/>
|
71
71
|
<xsl:variable name="color_dl_dt">
|
72
72
|
<xsl:choose>
|
73
73
|
<xsl:when test="$presentation_metadata_color_background_definition_term != ''"><xsl:value-of select="$presentation_metadata_color_background_definition_term"/></xsl:when>
|
@@ -75,7 +75,7 @@
|
|
75
75
|
</xsl:choose>
|
76
76
|
</xsl:variable>
|
77
77
|
|
78
|
-
<xsl:variable name="presentation_metadata_color_background_definition_description" select="normalize-space(/ogc:
|
78
|
+
<xsl:variable name="presentation_metadata_color_background_definition_description" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-definition-description']/ogc:value)"/>
|
79
79
|
<xsl:variable name="color_dl_dd">
|
80
80
|
<xsl:choose>
|
81
81
|
<xsl:when test="$presentation_metadata_color_background_definition_description != ''"><xsl:value-of select="$presentation_metadata_color_background_definition_description"/></xsl:when>
|
@@ -83,7 +83,7 @@
|
|
83
83
|
</xsl:choose>
|
84
84
|
</xsl:variable>
|
85
85
|
|
86
|
-
<xsl:variable name="presentation_metadata_color_text_title" select="normalize-space(/ogc:
|
86
|
+
<xsl:variable name="presentation_metadata_color_text_title" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text-title']/ogc:value)"/>
|
87
87
|
<xsl:variable name="color_text_title">
|
88
88
|
<xsl:choose>
|
89
89
|
<xsl:when test="$presentation_metadata_color_text_title != ''"><xsl:value-of select="$presentation_metadata_color_text_title"/></xsl:when>
|
@@ -91,7 +91,7 @@
|
|
91
91
|
</xsl:choose>
|
92
92
|
</xsl:variable>
|
93
93
|
|
94
|
-
<xsl:variable name="presentation_metadata_color_background_page" select="normalize-space(/ogc:
|
94
|
+
<xsl:variable name="presentation_metadata_color_background_page" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-page']/ogc:value)"/>
|
95
95
|
<xsl:variable name="color-background-page">
|
96
96
|
<xsl:choose>
|
97
97
|
<xsl:when test="$presentation_metadata_color_background_page != ''"><xsl:value-of select="$presentation_metadata_color_background_page"/></xsl:when>
|
@@ -99,7 +99,7 @@
|
|
99
99
|
</xsl:choose>
|
100
100
|
</xsl:variable>
|
101
101
|
|
102
|
-
<xsl:variable name="presentation_metadata_color_background_text_label_legacy" select="normalize-space(/ogc:
|
102
|
+
<xsl:variable name="presentation_metadata_color_background_text_label_legacy" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-text-label-legacy']/ogc:value)"/>
|
103
103
|
<xsl:variable name="color_background_blue">
|
104
104
|
<xsl:choose>
|
105
105
|
<xsl:when test="$presentation_metadata_color_background_text_label_legacy != ''"><xsl:value-of select="$presentation_metadata_color_background_text_label_legacy"/></xsl:when>
|
@@ -107,7 +107,7 @@
|
|
107
107
|
</xsl:choose>
|
108
108
|
</xsl:variable>
|
109
109
|
|
110
|
-
<xsl:variable name="presentation_metadata_color_background_term_preferred_label" select="normalize-space(/ogc:
|
110
|
+
<xsl:variable name="presentation_metadata_color_background_term_preferred_label" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-term-preferred-label']/ogc:value)"/>
|
111
111
|
<xsl:variable name="color_term_preferred">
|
112
112
|
<xsl:choose>
|
113
113
|
<xsl:when test="$presentation_metadata_color_background_term_preferred_label != ''"><xsl:value-of select="$presentation_metadata_color_background_term_preferred_label"/></xsl:when>
|
@@ -115,7 +115,7 @@
|
|
115
115
|
</xsl:choose>
|
116
116
|
</xsl:variable>
|
117
117
|
|
118
|
-
<xsl:variable name="presentation_metadata_color_background_term_deprecated_label" select="normalize-space(/ogc:
|
118
|
+
<xsl:variable name="presentation_metadata_color_background_term_deprecated_label" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-term-deprecated-label']/ogc:value)"/>
|
119
119
|
<xsl:variable name="color_term_deprecated">
|
120
120
|
<xsl:choose>
|
121
121
|
<xsl:when test="$presentation_metadata_color_background_term_deprecated_label != ''"><xsl:value-of select="$presentation_metadata_color_background_term_deprecated_label"/></xsl:when>
|
@@ -123,7 +123,7 @@
|
|
123
123
|
</xsl:choose>
|
124
124
|
</xsl:variable>
|
125
125
|
|
126
|
-
<xsl:variable name="presentation_metadata_color_background_term_admitted_label" select="normalize-space(/ogc:
|
126
|
+
<xsl:variable name="presentation_metadata_color_background_term_admitted_label" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-term-admitted-label']/ogc:value)"/>
|
127
127
|
<xsl:variable name="color_term_admitted">
|
128
128
|
<xsl:choose>
|
129
129
|
<xsl:when test="$presentation_metadata_color_background_term_admitted_label != ''"><xsl:value-of select="$presentation_metadata_color_background_term_admitted_label"/></xsl:when>
|
@@ -131,7 +131,7 @@
|
|
131
131
|
</xsl:choose>
|
132
132
|
</xsl:variable>
|
133
133
|
|
134
|
-
<xsl:variable name="presentation_metadata_color_background_table_header" select="normalize-space(/ogc:
|
134
|
+
<xsl:variable name="presentation_metadata_color_background_table_header" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-header']/ogc:value)"/>
|
135
135
|
<xsl:variable name="color_table_header_row">
|
136
136
|
<xsl:choose>
|
137
137
|
<xsl:when test="$presentation_metadata_color_background_table_header != ''"><xsl:value-of select="$presentation_metadata_color_background_table_header"/></xsl:when>
|
@@ -139,7 +139,7 @@
|
|
139
139
|
</xsl:choose>
|
140
140
|
</xsl:variable>
|
141
141
|
|
142
|
-
<xsl:variable name="presentation_metadata_color_background_table_row_even" select="normalize-space(/ogc:
|
142
|
+
<xsl:variable name="presentation_metadata_color_background_table_row_even" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-row-even']/ogc:value)"/>
|
143
143
|
<xsl:variable name="color_table_row_even">
|
144
144
|
<xsl:choose>
|
145
145
|
<xsl:when test="$presentation_metadata_color_background_table_row_even != ''"><xsl:value-of select="$presentation_metadata_color_background_table_row_even"/></xsl:when>
|
@@ -147,7 +147,7 @@
|
|
147
147
|
</xsl:choose>
|
148
148
|
</xsl:variable>
|
149
149
|
|
150
|
-
<xsl:variable name="presentation_metadata_color_background_table_row_odd" select="normalize-space(/ogc:
|
150
|
+
<xsl:variable name="presentation_metadata_color_background_table_row_odd" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-row-odd']/ogc:value)"/>
|
151
151
|
<xsl:variable name="color_table_row_odd">
|
152
152
|
<xsl:choose>
|
153
153
|
<xsl:when test="$presentation_metadata_color_background_table_row_odd != ''"><xsl:value-of select="$presentation_metadata_color_background_table_row_odd"/></xsl:when>
|
@@ -357,8 +357,8 @@
|
|
357
357
|
|
358
358
|
<fo:flow flow-name="xsl-region-body" color="white">
|
359
359
|
|
360
|
-
<xsl:variable name="curr_lang" select="/ogc:
|
361
|
-
<xsl:variable name="stage" select="/ogc:
|
360
|
+
<xsl:variable name="curr_lang" select="/ogc:metanorma/ogc:bibdata/ogc:language[@current = 'true']"/>
|
361
|
+
<xsl:variable name="stage" select="/ogc:metanorma/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang] | /ogc:metanorma/ogc:bibdata/ogc:status/ogc:stage[not(@language)]"/>
|
362
362
|
<xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
|
363
363
|
|
364
364
|
<!-- background image -->
|
@@ -389,7 +389,7 @@
|
|
389
389
|
<xsl:with-param name="letter-spacing" select="0.3"/>
|
390
390
|
</xsl:call-template>
|
391
391
|
</fo:block>
|
392
|
-
<xsl:variable name="ogc_external" select="/ogc:
|
392
|
+
<xsl:variable name="ogc_external" select="/ogc:metanorma/ogc:bibdata/ogc:docidentifier[@type='ogc-external']"/>
|
393
393
|
<xsl:if test="normalize-space($ogc_external) != ''">
|
394
394
|
<fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
|
395
395
|
</xsl:if>
|
@@ -434,7 +434,7 @@
|
|
434
434
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
|
435
435
|
</xsl:call-template>
|
436
436
|
<xsl:value-of select="$linebreak"/>
|
437
|
-
<xsl:variable name="docsubtype" select="normalize-space(/ogc:
|
437
|
+
<xsl:variable name="docsubtype" select="normalize-space(/ogc:metanorma/ogc:bibdata/ogc:ext/ogc:subdoctype)"/>
|
438
438
|
<xsl:variable name="docsubtype_str">
|
439
439
|
<xsl:choose>
|
440
440
|
<xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
|
@@ -484,7 +484,7 @@
|
|
484
484
|
|
485
485
|
<fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
|
486
486
|
<fo:block line-height="140%">
|
487
|
-
<xsl:apply-templates select="/ogc:
|
487
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:bibdata/ogc:edition[normalize-space(@language) = '']"/>
|
488
488
|
<fo:block>
|
489
489
|
<fo:inline font-weight="bold">
|
490
490
|
<!-- Submission Date: -->
|
@@ -493,8 +493,8 @@
|
|
493
493
|
</xsl:call-template><xsl:text>: </xsl:text>
|
494
494
|
</fo:inline>
|
495
495
|
<xsl:choose>
|
496
|
-
<xsl:when test="/ogc:
|
497
|
-
<xsl:value-of select="/ogc:
|
496
|
+
<xsl:when test="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'received']/ogc:on">
|
497
|
+
<xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'received']/ogc:on"/>
|
498
498
|
</xsl:when>
|
499
499
|
<xsl:otherwise>XXX</xsl:otherwise>
|
500
500
|
</xsl:choose>
|
@@ -507,8 +507,8 @@
|
|
507
507
|
</xsl:call-template><xsl:text>: </xsl:text>
|
508
508
|
</fo:inline>
|
509
509
|
<xsl:choose>
|
510
|
-
<xsl:when test="/ogc:
|
511
|
-
<xsl:value-of select="/ogc:
|
510
|
+
<xsl:when test="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on">
|
511
|
+
<xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on"/>
|
512
512
|
</xsl:when>
|
513
513
|
<xsl:otherwise>XXX</xsl:otherwise>
|
514
514
|
</xsl:choose>
|
@@ -520,11 +520,11 @@
|
|
520
520
|
<xsl:with-param name="key">publication_date</xsl:with-param>
|
521
521
|
</xsl:call-template><xsl:text>: </xsl:text>
|
522
522
|
</fo:inline>
|
523
|
-
<xsl:value-of select="/ogc:
|
523
|
+
<xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'published']/ogc:on"/>
|
524
524
|
</fo:block>
|
525
525
|
|
526
526
|
<fo:block margin-bottom="12pt">
|
527
|
-
<xsl:if test="/ogc:
|
527
|
+
<xsl:if test="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
|
528
528
|
<fo:block>
|
529
529
|
<fo:inline font-weight="bold">
|
530
530
|
<!-- Author: -->
|
@@ -532,13 +532,13 @@
|
|
532
532
|
<xsl:with-param name="key">author</xsl:with-param>
|
533
533
|
</xsl:call-template><xsl:text>: </xsl:text>
|
534
534
|
</fo:inline>
|
535
|
-
<xsl:for-each select="/ogc:
|
535
|
+
<xsl:for-each select="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
|
536
536
|
<xsl:value-of select="."/>
|
537
537
|
<xsl:if test="position() != last()">, </xsl:if>
|
538
538
|
</xsl:for-each>
|
539
539
|
</fo:block>
|
540
540
|
</xsl:if>
|
541
|
-
<xsl:if test="/ogc:
|
541
|
+
<xsl:if test="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
542
542
|
<fo:block>
|
543
543
|
<fo:inline font-weight="bold">
|
544
544
|
<!-- Editor: -->
|
@@ -546,13 +546,13 @@
|
|
546
546
|
<xsl:with-param name="key">editor_full</xsl:with-param>
|
547
547
|
</xsl:call-template><xsl:text>: </xsl:text>
|
548
548
|
</fo:inline>
|
549
|
-
<xsl:for-each select="/ogc:
|
549
|
+
<xsl:for-each select="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
550
550
|
<xsl:value-of select="."/>
|
551
551
|
<xsl:if test="position() != last()">, </xsl:if>
|
552
552
|
</xsl:for-each>
|
553
553
|
</fo:block>
|
554
554
|
</xsl:if>
|
555
|
-
<xsl:if test="/ogc:
|
555
|
+
<xsl:if test="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
|
556
556
|
<fo:block>
|
557
557
|
<fo:inline font-weight="bold">
|
558
558
|
<!-- Contributor: -->
|
@@ -560,7 +560,7 @@
|
|
560
560
|
<xsl:with-param name="key">contributor</xsl:with-param>
|
561
561
|
</xsl:call-template><xsl:text>: </xsl:text>
|
562
562
|
</fo:inline>
|
563
|
-
<xsl:for-each select="/ogc:
|
563
|
+
<xsl:for-each select="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
|
564
564
|
<xsl:value-of select="."/>
|
565
565
|
<xsl:if test="position() != last()">, </xsl:if>
|
566
566
|
</xsl:for-each>
|
@@ -576,7 +576,7 @@
|
|
576
576
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
577
577
|
<fo:block>
|
578
578
|
<xsl:variable name="legal_statement">
|
579
|
-
<xsl:apply-templates select="/ogc:
|
579
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:legal-statement" mode="update_xml_step1"/>
|
580
580
|
</xsl:variable>
|
581
581
|
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
|
582
582
|
<xsl:with-param name="isLegacy" select="$isLegacy"/>
|
@@ -588,7 +588,7 @@
|
|
588
588
|
</xsl:when>
|
589
589
|
<xsl:otherwise>
|
590
590
|
<xsl:variable name="legal_statement">
|
591
|
-
<xsl:apply-templates select="/ogc:
|
591
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:legal-statement" mode="update_xml_step1"/>
|
592
592
|
</xsl:variable>
|
593
593
|
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
|
594
594
|
</xsl:otherwise>
|
@@ -628,18 +628,18 @@
|
|
628
628
|
<xsl:call-template name="insertLogoPreface"/>
|
629
629
|
|
630
630
|
<xsl:variable name="license_statement">
|
631
|
-
<xsl:apply-templates select="/ogc:
|
631
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:license-statement" mode="update_xml_step1"/>
|
632
632
|
</xsl:variable>
|
633
633
|
<xsl:apply-templates select="xalan:nodeset($license_statement)/*"/>
|
634
634
|
|
635
635
|
<xsl:variable name="feedback_statement">
|
636
|
-
<xsl:apply-templates select="/ogc:
|
636
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:feedback-statement" mode="update_xml_step1"/>
|
637
637
|
</xsl:variable>
|
638
638
|
<xsl:apply-templates select="xalan:nodeset($feedback_statement)/*"/>
|
639
639
|
|
640
640
|
<!-- Copyright notice -->
|
641
641
|
<xsl:variable name="copyright_statement">
|
642
|
-
<xsl:apply-templates select="/ogc:
|
642
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:copyright-statement" mode="update_xml_step1"/>
|
643
643
|
</xsl:variable>
|
644
644
|
<xsl:apply-templates select="xalan:nodeset($copyright_statement)/*"/>
|
645
645
|
|
@@ -787,8 +787,8 @@
|
|
787
787
|
|
788
788
|
<xsl:element name="boilerplate" namespace="{$namespace_full}"> <!-- save context element -->
|
789
789
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
790
|
-
<xsl:apply-templates select="/ogc:
|
791
|
-
<xsl:apply-templates select="/ogc:
|
790
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:license-statement" mode="update_xml_step_move_pagebreak"/>
|
791
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:feedback-statement" mode="update_xml_step_move_pagebreak"/>
|
792
792
|
</xsl:element>
|
793
793
|
</xsl:element>
|
794
794
|
|
@@ -1250,14 +1250,14 @@
|
|
1250
1250
|
<!-- ============================= -->
|
1251
1251
|
<!-- ============================= -->
|
1252
1252
|
|
1253
|
-
<xsl:template match="/ogc:
|
1253
|
+
<xsl:template match="/ogc:metanorma/ogc:bibdata/ogc:uri[not(@type)]">
|
1254
1254
|
<fo:block margin-bottom="12pt">
|
1255
1255
|
<xsl:text>URL for this OGC® document: </xsl:text>
|
1256
1256
|
<xsl:value-of select="."/><xsl:text> </xsl:text>
|
1257
1257
|
</fo:block>
|
1258
1258
|
</xsl:template>
|
1259
1259
|
|
1260
|
-
<xsl:template match="/ogc:
|
1260
|
+
<xsl:template match="/ogc:metanorma/ogc:bibdata/ogc:edition">
|
1261
1261
|
<fo:block>
|
1262
1262
|
<xsl:variable name="title-version">
|
1263
1263
|
<xsl:call-template name="capitalize">
|
@@ -1978,21 +1978,21 @@
|
|
1978
1978
|
|
1979
1979
|
<xsl:variable name="namespace_full_">
|
1980
1980
|
<xsl:choose>
|
1981
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
1982
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
1981
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
1982
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
1983
1983
|
</xsl:choose>
|
1984
1984
|
</xsl:variable>
|
1985
1985
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
1986
1986
|
|
1987
1987
|
<xsl:variable name="root_element_">
|
1988
1988
|
<xsl:choose>
|
1989
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
1990
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
1989
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
1990
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
1991
1991
|
</xsl:choose>
|
1992
1992
|
</xsl:variable>
|
1993
1993
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
1994
1994
|
|
1995
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
1995
|
+
<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'])"/>
|
1996
1996
|
|
1997
1997
|
<!-- external parameters -->
|
1998
1998
|
|
@@ -2093,7 +2093,7 @@
|
|
2093
2093
|
</metanorma-extension>
|
2094
2094
|
-->
|
2095
2095
|
|
2096
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
2096
|
+
<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'])))"/>
|
2097
2097
|
<xsl:variable name="papersize_width_">
|
2098
2098
|
<xsl:choose>
|
2099
2099
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -2155,7 +2155,7 @@
|
|
2155
2155
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
2156
2156
|
|
2157
2157
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
2158
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
2158
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
2159
2159
|
<xsl:variable name="layout_columns">
|
2160
2160
|
<xsl:choose>
|
2161
2161
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -2216,7 +2216,7 @@
|
|
2216
2216
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2217
2217
|
|
2218
2218
|
<xsl:variable name="title-list-tables">
|
2219
|
-
<xsl:variable name="toc_table_title" select="//*[
|
2219
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2220
2220
|
<xsl:value-of select="$toc_table_title"/>
|
2221
2221
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2222
2222
|
<xsl:call-template name="getLocalizedString">
|
@@ -2226,7 +2226,7 @@
|
|
2226
2226
|
</xsl:variable>
|
2227
2227
|
|
2228
2228
|
<xsl:variable name="title-list-figures">
|
2229
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
2229
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2230
2230
|
<xsl:value-of select="$toc_figure_title"/>
|
2231
2231
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2232
2232
|
<xsl:call-template name="getLocalizedString">
|
@@ -2236,7 +2236,7 @@
|
|
2236
2236
|
</xsl:variable>
|
2237
2237
|
|
2238
2238
|
<xsl:variable name="title-list-recommendations">
|
2239
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
2239
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2240
2240
|
<xsl:value-of select="$toc_requirement_title"/>
|
2241
2241
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2242
2242
|
<xsl:call-template name="getLocalizedString">
|
@@ -2246,8 +2246,8 @@
|
|
2246
2246
|
</xsl:variable>
|
2247
2247
|
|
2248
2248
|
<xsl:variable name="bibdata">
|
2249
|
-
<xsl:copy-of select="//*[
|
2250
|
-
<xsl:copy-of select="//*[
|
2249
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
2250
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
2251
2251
|
</xsl:variable>
|
2252
2252
|
|
2253
2253
|
<!-- Characters -->
|
@@ -2313,7 +2313,7 @@
|
|
2313
2313
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
2314
2314
|
|
2315
2315
|
<xsl:variable name="additional_fonts_">
|
2316
|
-
<xsl:for-each select="//*[
|
2316
|
+
<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']">
|
2317
2317
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
2318
2318
|
</xsl:for-each>
|
2319
2319
|
</xsl:variable>
|
@@ -3774,10 +3774,10 @@
|
|
3774
3774
|
|
3775
3775
|
<xsl:template name="processTablesFigures_Contents">
|
3776
3776
|
<xsl:param name="always"/>
|
3777
|
-
<xsl:if test="(//*[
|
3777
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3778
3778
|
<xsl:call-template name="processTables_Contents"/>
|
3779
3779
|
</xsl:if>
|
3780
|
-
<xsl:if test="(//*[
|
3780
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3781
3781
|
<xsl:call-template name="processFigures_Contents"/>
|
3782
3782
|
</xsl:if>
|
3783
3783
|
</xsl:template>
|
@@ -3857,7 +3857,7 @@
|
|
3857
3857
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
3858
3858
|
|
3859
3859
|
<!-- Example:
|
3860
|
-
<
|
3860
|
+
<metanorma>
|
3861
3861
|
<preface>
|
3862
3862
|
<page_sequence>
|
3863
3863
|
<clause...
|
@@ -3880,7 +3880,7 @@
|
|
3880
3880
|
<page_sequence>
|
3881
3881
|
<annex ..
|
3882
3882
|
</page_sequence>
|
3883
|
-
</
|
3883
|
+
</metanorma>
|
3884
3884
|
-->
|
3885
3885
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
3886
3886
|
|
@@ -3923,15 +3923,8 @@
|
|
3923
3923
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
3924
3924
|
|
3925
3925
|
<xsl:template name="insertMainSectionsPageSequences">
|
3926
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3927
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3928
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3929
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
3930
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3931
3926
|
|
3932
|
-
|
3933
|
-
</xsl:element>
|
3934
|
-
</xsl:element>
|
3927
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
3935
3928
|
|
3936
3929
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3937
3930
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -3950,6 +3943,18 @@
|
|
3950
3943
|
</xsl:element>
|
3951
3944
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
3952
3945
|
|
3946
|
+
<xsl:template name="insertSectionsInPageSequence">
|
3947
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3948
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3949
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3950
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3951
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3952
|
+
|
3953
|
+
</xsl:for-each>
|
3954
|
+
</xsl:element>
|
3955
|
+
</xsl:element>
|
3956
|
+
</xsl:template>
|
3957
|
+
|
3953
3958
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
3954
3959
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3955
3960
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -5482,7 +5487,7 @@
|
|
5482
5487
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
5483
5488
|
|
5484
5489
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
5485
|
-
<xsl:variable name="lang" select="ancestor::*[
|
5490
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
5486
5491
|
<xsl:variable name="reference_">
|
5487
5492
|
<xsl:value-of select="@reference"/>
|
5488
5493
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -5603,13 +5608,13 @@
|
|
5603
5608
|
footnotes in bibliography
|
5604
5609
|
footnotes in document's body (except table's head/body/foot and figure text)
|
5605
5610
|
-->
|
5606
|
-
<xsl:for-each select="ancestor::*[
|
5611
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
5607
5612
|
<fn gen_id="{generate-id(.)}">
|
5608
5613
|
<xsl:copy-of select="@*"/>
|
5609
5614
|
<xsl:copy-of select="node()"/>
|
5610
5615
|
</fn>
|
5611
5616
|
</xsl:for-each>
|
5612
|
-
<xsl:for-each select="ancestor::*[
|
5617
|
+
<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']/*">
|
5613
5618
|
<xsl:sort select="@displayorder" data-type="number"/>
|
5614
5619
|
<!-- commented:
|
5615
5620
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -7991,6 +7996,8 @@
|
|
7991
7996
|
<!-- ======================================= -->
|
7992
7997
|
<!-- math -->
|
7993
7998
|
<!-- ======================================= -->
|
7999
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
8000
|
+
|
7994
8001
|
<xsl:template match="mathml:math">
|
7995
8002
|
<xsl:variable name="isAdded" select="@added"/>
|
7996
8003
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -8350,10 +8357,10 @@
|
|
8350
8357
|
<xsl:template match="*[local-name()='localityStack']"/>
|
8351
8358
|
|
8352
8359
|
<xsl:variable name="pdfAttachmentsList_">
|
8353
|
-
<xsl:for-each select="//*[
|
8360
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
8354
8361
|
<attachment filename="{@name}"/>
|
8355
8362
|
</xsl:for-each>
|
8356
|
-
<xsl:if test="not(//*[
|
8363
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8357
8364
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8358
8365
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8359
8366
|
<attachment filename="{$attachment_path}"/>
|
@@ -9825,7 +9832,9 @@
|
|
9825
9832
|
<xsl:apply-templates mode="bookmarks"/>
|
9826
9833
|
</xsl:template>
|
9827
9834
|
|
9828
|
-
<xsl:template match="*[local-name() = '
|
9835
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
9836
|
+
|
9837
|
+
<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">
|
9829
9838
|
<xsl:apply-templates select="."/>
|
9830
9839
|
</xsl:template>
|
9831
9840
|
|
@@ -9842,7 +9851,15 @@
|
|
9842
9851
|
<xsl:apply-templates mode="contents"/>
|
9843
9852
|
</xsl:template>
|
9844
9853
|
|
9845
|
-
<xsl:template match="*[local-name() = '
|
9854
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
9855
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
9856
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
9857
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
9858
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
9859
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
9860
|
+
|
9861
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
9862
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
9846
9863
|
<xsl:apply-templates mode="bookmarks"/>
|
9847
9864
|
</xsl:template>
|
9848
9865
|
|
@@ -9855,6 +9872,13 @@
|
|
9855
9872
|
<xsl:apply-templates mode="bookmarks"/>
|
9856
9873
|
</xsl:template>
|
9857
9874
|
|
9875
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
9876
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
9877
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
9878
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
9879
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
9880
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
9881
|
+
|
9858
9882
|
<!-- Bookmarks -->
|
9859
9883
|
<xsl:template name="addBookmarks">
|
9860
9884
|
<xsl:param name="contents"/>
|
@@ -10105,6 +10129,13 @@
|
|
10105
10129
|
|
10106
10130
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
10107
10131
|
|
10132
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
10133
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
10134
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
10135
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
10136
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
10137
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
10138
|
+
|
10108
10139
|
<xsl:template name="getSection">
|
10109
10140
|
<xsl:choose>
|
10110
10141
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -10224,7 +10255,8 @@
|
|
10224
10255
|
</xsl:copy>
|
10225
10256
|
</xsl:template>
|
10226
10257
|
|
10227
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
10258
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
10259
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
10228
10260
|
<xsl:copy-of select="."/>
|
10229
10261
|
</xsl:template>
|
10230
10262
|
|
@@ -10288,7 +10320,7 @@
|
|
10288
10320
|
<!-- sourcecode -->
|
10289
10321
|
<!-- =============== -->
|
10290
10322
|
|
10291
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
10323
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
10292
10324
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10293
10325
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10294
10326
|
|
@@ -11777,7 +11809,7 @@
|
|
11777
11809
|
|
11778
11810
|
</xsl:template> <!-- sections_element_style -->
|
11779
11811
|
|
11780
|
-
<xsl:template match="//*[
|
11812
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
11781
11813
|
|
11782
11814
|
<fo:block break-after="page"/>
|
11783
11815
|
|
@@ -11881,7 +11913,7 @@
|
|
11881
11913
|
<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>
|
11882
11914
|
</xsl:when>
|
11883
11915
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
11884
|
-
<xsl:when test="ancestor::*[
|
11916
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
11885
11917
|
<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>
|
11886
11918
|
</xsl:when>
|
11887
11919
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -12997,7 +13029,7 @@
|
|
12997
13029
|
|
12998
13030
|
<xsl:call-template name="setBlockSpanAll"/>
|
12999
13031
|
|
13000
|
-
<xsl:variable name="admonition_color" select="normalize-space(/ogc:
|
13032
|
+
<xsl:variable name="admonition_color" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = concat('color-admonition-', @type)]/ogc:value)"/>
|
13001
13033
|
<xsl:if test="$admonition_color != ''">
|
13002
13034
|
<xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
|
13003
13035
|
<xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
|
@@ -13223,7 +13255,7 @@
|
|
13223
13255
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
13224
13256
|
|
13225
13257
|
<!-- move section 'Normative references' inside 'sections' -->
|
13226
|
-
<xsl:for-each select="* | ancestor::*[
|
13258
|
+
<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']]">
|
13227
13259
|
<xsl:sort select="@displayorder" data-type="number"/>
|
13228
13260
|
|
13229
13261
|
<!-- process Section's title -->
|
@@ -13284,10 +13316,126 @@
|
|
13284
13316
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
13285
13317
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
13286
13318
|
|
13287
|
-
<xsl:template match="*[local-name() = 'stem']
|
13319
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
13320
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
13321
|
+
|
13322
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
13323
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
13324
|
+
<xsl:copy-of select="@*"/>
|
13325
|
+
<xsl:choose>
|
13326
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13327
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13328
|
+
</xsl:when>
|
13329
|
+
<xsl:otherwise>
|
13330
|
+
<xsl:copy-of select="node()"/>
|
13331
|
+
</xsl:otherwise>
|
13332
|
+
</xsl:choose>
|
13333
|
+
</xsl:element>
|
13334
|
+
</xsl:template>
|
13335
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
13336
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
13337
|
+
<xsl:copy-of select="@*"/>
|
13338
|
+
<xsl:choose>
|
13339
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13340
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13341
|
+
</xsl:when>
|
13342
|
+
<xsl:otherwise>
|
13343
|
+
<xsl:copy-of select="node()"/>
|
13344
|
+
</xsl:otherwise>
|
13345
|
+
</xsl:choose>
|
13346
|
+
</xsl:element>
|
13347
|
+
</xsl:template>
|
13348
|
+
|
13349
|
+
<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">
|
13288
13350
|
<xsl:copy-of select="."/>
|
13289
13351
|
</xsl:template>
|
13290
13352
|
|
13353
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
13354
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
13355
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
13356
|
+
<xsl:copy>
|
13357
|
+
<xsl:copy-of select="@*"/>
|
13358
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
13359
|
+
<xsl:choose>
|
13360
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
13361
|
+
<xsl:choose>
|
13362
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
13363
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
13364
|
+
</xsl:when>
|
13365
|
+
<xsl:otherwise>
|
13366
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
13367
|
+
</xsl:otherwise>
|
13368
|
+
</xsl:choose>
|
13369
|
+
</xsl:when>
|
13370
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
13371
|
+
<xsl:choose>
|
13372
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
13373
|
+
<xsl:copy-of select="node()"/>
|
13374
|
+
</xsl:when>
|
13375
|
+
<xsl:otherwise>
|
13376
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
13377
|
+
</xsl:otherwise>
|
13378
|
+
</xsl:choose>
|
13379
|
+
</xsl:otherwise>
|
13380
|
+
</xsl:choose>
|
13381
|
+
</xsl:copy>
|
13382
|
+
</xsl:template>
|
13383
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
13384
|
+
<xsl:copy>
|
13385
|
+
<xsl:copy-of select="@*"/>
|
13386
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
13387
|
+
<xsl:choose>
|
13388
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
13389
|
+
<xsl:choose>
|
13390
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
13391
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
13392
|
+
</xsl:when>
|
13393
|
+
<xsl:otherwise>
|
13394
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
13395
|
+
</xsl:otherwise>
|
13396
|
+
</xsl:choose>
|
13397
|
+
</xsl:when>
|
13398
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
13399
|
+
<xsl:choose>
|
13400
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
13401
|
+
<xsl:copy-of select="node()"/>
|
13402
|
+
</xsl:when>
|
13403
|
+
<xsl:otherwise>
|
13404
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
13405
|
+
</xsl:otherwise>
|
13406
|
+
</xsl:choose>
|
13407
|
+
</xsl:otherwise>
|
13408
|
+
</xsl:choose>
|
13409
|
+
</xsl:copy>
|
13410
|
+
</xsl:template>
|
13411
|
+
|
13412
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
13413
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
13414
|
+
<xsl:copy>
|
13415
|
+
<xsl:copy-of select="@*"/>
|
13416
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
13417
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
13418
|
+
</xsl:copy>
|
13419
|
+
</xsl:template>
|
13420
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
13421
|
+
<xsl:copy>
|
13422
|
+
<xsl:copy-of select="@*"/>
|
13423
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
13424
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
13425
|
+
</xsl:copy>
|
13426
|
+
</xsl:template>
|
13427
|
+
|
13428
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
13429
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
13430
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
13431
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
13432
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
13433
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
13434
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
13435
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
13436
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
13437
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
13438
|
+
|
13291
13439
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
13292
13440
|
<xsl:copy>
|
13293
13441
|
<xsl:copy-of select="@*"/>
|
@@ -13318,7 +13466,7 @@
|
|
13318
13466
|
<!-- add @id - first element with @id plus '_element_name' -->
|
13319
13467
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
13320
13468
|
<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>
|
13321
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
13469
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
13322
13470
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
13323
13471
|
</xsl:if>
|
13324
13472
|
</xsl:template>
|
@@ -13568,6 +13716,126 @@
|
|
13568
13716
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
13569
13717
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
13570
13718
|
|
13719
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
13720
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13721
|
+
</xsl:template>
|
13722
|
+
|
13723
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
13724
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13725
|
+
</xsl:template>
|
13726
|
+
|
13727
|
+
<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"/>
|
13728
|
+
|
13729
|
+
<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"/>
|
13730
|
+
|
13731
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
13732
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13733
|
+
</xsl:template>
|
13734
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
13735
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13736
|
+
</xsl:template>
|
13737
|
+
|
13738
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
13739
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
13740
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
13741
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
13742
|
+
<xsl:copy-of select="@*"/>
|
13743
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13744
|
+
</xsl:element>
|
13745
|
+
</xsl:template>
|
13746
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
13747
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
13748
|
+
<xsl:copy-of select="@*"/>
|
13749
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13750
|
+
</xsl:element>
|
13751
|
+
</xsl:template>
|
13752
|
+
|
13753
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
13754
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
13755
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
13756
|
+
|
13757
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
13758
|
+
<xsl:apply-templates/>
|
13759
|
+
</xsl:template>
|
13760
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
13761
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13762
|
+
</xsl:template>
|
13763
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
13764
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13765
|
+
</xsl:template>
|
13766
|
+
|
13767
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
13768
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
13769
|
+
|
13770
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
13771
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
13772
|
+
<xsl:copy-of select="@*"/>
|
13773
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13774
|
+
</xsl:element>
|
13775
|
+
</xsl:template>
|
13776
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
13777
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
13778
|
+
<xsl:copy-of select="@*"/>
|
13779
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13780
|
+
</xsl:element>
|
13781
|
+
</xsl:template>
|
13782
|
+
|
13783
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
13784
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
13785
|
+
|
13786
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
13787
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
13788
|
+
<xsl:copy-of select="@*"/>
|
13789
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13790
|
+
</xsl:element>
|
13791
|
+
</xsl:template>
|
13792
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
13793
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
13794
|
+
<xsl:copy-of select="@*"/>
|
13795
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13796
|
+
</xsl:element>
|
13797
|
+
</xsl:template>
|
13798
|
+
|
13799
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
13800
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
13801
|
+
|
13802
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
13803
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
13804
|
+
<xsl:copy-of select="@*"/>
|
13805
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13806
|
+
</xsl:element>
|
13807
|
+
</xsl:template>
|
13808
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
13809
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
13810
|
+
<xsl:copy-of select="@*"/>
|
13811
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13812
|
+
</xsl:element>
|
13813
|
+
</xsl:template>
|
13814
|
+
|
13815
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
13816
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
13817
|
+
|
13818
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
13819
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
13820
|
+
<xsl:copy-of select="@*"/>
|
13821
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13822
|
+
</xsl:element>
|
13823
|
+
</xsl:template>
|
13824
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
13825
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
13826
|
+
<xsl:copy-of select="@*"/>
|
13827
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13828
|
+
</xsl:element>
|
13829
|
+
</xsl:template>
|
13830
|
+
|
13831
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
13832
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
13833
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
13834
|
+
|
13835
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
13836
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
13837
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
13838
|
+
|
13571
13839
|
<!-- END: update new Presentation XML -->
|
13572
13840
|
|
13573
13841
|
<!-- =========================================================================== -->
|
@@ -13640,7 +13908,7 @@
|
|
13640
13908
|
|
13641
13909
|
<xsl:choose>
|
13642
13910
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
13643
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
13911
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
13644
13912
|
<element pos="{position()}">
|
13645
13913
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
13646
13914
|
<xsl:value-of select="name()"/>
|
@@ -14068,7 +14336,7 @@
|
|
14068
14336
|
</xsl:when>
|
14069
14337
|
<xsl:when test="contains($text, $replace)">
|
14070
14338
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
14071
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
14339
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
14072
14340
|
<xsl:call-template name="replaceChar">
|
14073
14341
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
14074
14342
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -14105,7 +14373,7 @@
|
|
14105
14373
|
</xsl:variable>
|
14106
14374
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
14107
14375
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
14108
|
-
<xsl:variable name="lang" select="ancestor::*[
|
14376
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
14109
14377
|
<xsl:variable name="reference" select="@reference"/>
|
14110
14378
|
<!-- fn sequence number in document -->
|
14111
14379
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -14150,7 +14418,7 @@
|
|
14150
14418
|
</xsl:template>
|
14151
14419
|
|
14152
14420
|
<xsl:template name="printEdition">
|
14153
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
14421
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
14154
14422
|
|
14155
14423
|
<xsl:choose>
|
14156
14424
|
<xsl:when test="$edition_i18n != ''">
|
@@ -14160,7 +14428,7 @@
|
|
14160
14428
|
</xsl:call-template>
|
14161
14429
|
</xsl:when>
|
14162
14430
|
<xsl:otherwise>
|
14163
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
14431
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
14164
14432
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
14165
14433
|
<xsl:call-template name="capitalize">
|
14166
14434
|
<xsl:with-param name="str">
|
@@ -14294,7 +14562,7 @@
|
|
14294
14562
|
<xsl:param name="charDelim" select="', '"/>
|
14295
14563
|
<xsl:choose>
|
14296
14564
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
14297
|
-
<xsl:for-each select="//*[
|
14565
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
14298
14566
|
<xsl:sort data-type="text" order="ascending"/>
|
14299
14567
|
<xsl:call-template name="insertKeyword">
|
14300
14568
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -14304,7 +14572,7 @@
|
|
14304
14572
|
</xsl:for-each>
|
14305
14573
|
</xsl:when>
|
14306
14574
|
<xsl:otherwise>
|
14307
|
-
<xsl:for-each select="//*[
|
14575
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
14308
14576
|
<xsl:call-template name="insertKeyword">
|
14309
14577
|
<xsl:with-param name="meta" select="$meta"/>
|
14310
14578
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -14379,7 +14647,7 @@
|
|
14379
14647
|
<!-- Dublin Core properties go here -->
|
14380
14648
|
<dc:title>
|
14381
14649
|
<xsl:variable name="title">
|
14382
|
-
<xsl:for-each select="(//*[
|
14650
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
14383
14651
|
|
14384
14652
|
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
14385
14653
|
|
@@ -14399,7 +14667,7 @@
|
|
14399
14667
|
</rdf:Alt>
|
14400
14668
|
</dc:title>
|
14401
14669
|
<xsl:variable name="dc_creator">
|
14402
|
-
<xsl:for-each select="(//*[
|
14670
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
14403
14671
|
|
14404
14672
|
<rdf:Seq>
|
14405
14673
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -14421,7 +14689,7 @@
|
|
14421
14689
|
<xsl:variable name="dc_description">
|
14422
14690
|
<xsl:variable name="abstract">
|
14423
14691
|
|
14424
|
-
<xsl:copy-of select="//*[
|
14692
|
+
<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'])]"/>
|
14425
14693
|
|
14426
14694
|
</xsl:variable>
|
14427
14695
|
<rdf:Alt>
|
@@ -14449,7 +14717,7 @@
|
|
14449
14717
|
</rdf:RDF>
|
14450
14718
|
</x:xmpmeta>
|
14451
14719
|
<!-- add attachments -->
|
14452
|
-
<xsl:for-each select="//*[
|
14720
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
14453
14721
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
14454
14722
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
14455
14723
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -14483,7 +14751,7 @@
|
|
14483
14751
|
</pdf:embedded-file>
|
14484
14752
|
</xsl:for-each>
|
14485
14753
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
14486
|
-
<xsl:if test="not(//*[
|
14754
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
14487
14755
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
14488
14756
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
14489
14757
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -14687,9 +14955,9 @@
|
|
14687
14955
|
<xsl:value-of select="document('')//*/namespace::ogc"/>
|
14688
14956
|
|
14689
14957
|
</xsl:variable>
|
14690
|
-
<xsl:if test="$documentNS != $XSLNS">
|
14958
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
14691
14959
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
14692
|
-
</xsl:if>
|
14960
|
+
</xsl:if> -->
|
14693
14961
|
</xsl:template> <!-- namespaceCheck -->
|
14694
14962
|
|
14695
14963
|
<xsl:template name="getLanguage">
|
@@ -14768,10 +15036,10 @@
|
|
14768
15036
|
|
14769
15037
|
<xsl:variable name="data_value">
|
14770
15038
|
<xsl:choose>
|
14771
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
15039
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
14772
15040
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14773
15041
|
</xsl:when>
|
14774
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
15042
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
14775
15043
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14776
15044
|
</xsl:when>
|
14777
15045
|
<xsl:when test="$formatted = 'true'">
|
@@ -14909,7 +15177,7 @@
|
|
14909
15177
|
<!-- background image -->
|
14910
15178
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14911
15179
|
<fo:block>
|
14912
|
-
<xsl:for-each select="/*[
|
15180
|
+
<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]">
|
14913
15181
|
<xsl:choose>
|
14914
15182
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14915
15183
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|