metanorma-ogc 2.6.11 → 2.7.0
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/ogc.abstract-specification-topic.xsl +405 -115
- data/lib/isodoc/ogc/ogc.best-practice.xsl +405 -115
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +405 -115
- data/lib/isodoc/ogc/ogc.community-practice.xsl +405 -115
- data/lib/isodoc/ogc/ogc.community-standard.xsl +405 -115
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +405 -115
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +405 -115
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +405 -115
- data/lib/isodoc/ogc/ogc.other.xsl +405 -115
- data/lib/isodoc/ogc/ogc.policy.xsl +405 -115
- data/lib/isodoc/ogc/ogc.reference-model.xsl +405 -115
- data/lib/isodoc/ogc/ogc.release-notes.xsl +405 -115
- data/lib/isodoc/ogc/ogc.standard.xsl +405 -115
- data/lib/isodoc/ogc/ogc.test-suite.xsl +405 -115
- data/lib/isodoc/ogc/ogc.user-guide.xsl +405 -115
- data/lib/isodoc/ogc/ogc.white-paper.xsl +377 -87
- data/lib/isodoc/ogc/sections.rb +4 -0
- data/lib/metanorma/ogc/biblio.rng +2 -0
- data/lib/metanorma/ogc/converter.rb +2 -2
- data/lib/metanorma/ogc/isodoc.rng +12 -6
- data/lib/metanorma/ogc/ogc.rng +28 -30
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
@@ -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>
|
@@ -158,23 +158,23 @@
|
|
158
158
|
<xsl:variable name="toc_recommendations_">
|
159
159
|
<xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
|
160
160
|
<xsl:variable name="table_id" select="@id"/>
|
161
|
-
<recommendation alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]
|
161
|
+
<recommendation alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]}">
|
162
162
|
<xsl:copy-of select="@id"/>
|
163
163
|
<xsl:variable name="title">
|
164
|
-
<xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node()"/>
|
164
|
+
<xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/ogc:fmt-name/node()"/>
|
165
165
|
<xsl:if test=".//ogc:p[@class = 'RecommendationLabel'][ancestor::ogc:table[1][@id= $table_id]]/node()">
|
166
166
|
<xsl:text>: </xsl:text>
|
167
167
|
<xsl:variable name="recommendationLabel">
|
168
|
-
<tt><xsl:copy-of select=".//ogc:p[@class = 'RecommendationLabel'][ancestor::ogc:table[1][@id= $table_id]]/node()"/></tt>
|
168
|
+
<tt><xsl:copy-of select=".//ogc:p[@class = 'RecommendationLabel'][ancestor::ogc:table[1][@id= $table_id]]/ogc:fmt-name/node()"/></tt>
|
169
169
|
</xsl:variable>
|
170
170
|
<xsl:apply-templates select="xalan:nodeset($recommendationLabel)/node()"/>
|
171
171
|
</xsl:if>
|
172
172
|
</xsl:variable>
|
173
173
|
<xsl:variable name="bookmark">
|
174
|
-
<xsl:value-of select="normalize-space(.//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/
|
174
|
+
<xsl:value-of select="normalize-space(.//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/ogc:fmt-name)"/>
|
175
175
|
<xsl:if test=".//ogc:p[@class = 'RecommendationLabel'][ancestor::ogc:table[1][@id= $table_id]]/node()">
|
176
176
|
<xsl:text>: </xsl:text>
|
177
|
-
<xsl:value-of select="normalize-space(.//ogc:p[@class = 'RecommendationLabel'][ancestor::ogc:table[1][@id= $table_id]]/
|
177
|
+
<xsl:value-of select="normalize-space(.//ogc:p[@class = 'RecommendationLabel'][ancestor::ogc:table[1][@id= $table_id]]/ogc:fmt-name)"/>
|
178
178
|
</xsl:if>
|
179
179
|
</xsl:variable>
|
180
180
|
<xsl:variable name="regex_str" select="'^([^0-9]+) (\d+).*'"/>
|
@@ -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'] |
|
@@ -7368,9 +7373,14 @@
|
|
7368
7373
|
|
7369
7374
|
<xsl:variable name="simple-table">
|
7370
7375
|
|
7376
|
+
<xsl:variable name="table_without_semantic_elements">
|
7377
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
7378
|
+
</xsl:variable>
|
7379
|
+
|
7371
7380
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
7372
7381
|
<xsl:variable name="table_without_br">
|
7373
|
-
<xsl:apply-templates mode="table-without-br"/>
|
7382
|
+
<!-- <xsl:apply-templates mode="table-without-br"/> -->
|
7383
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
|
7374
7384
|
</xsl:variable>
|
7375
7385
|
|
7376
7386
|
<!-- Step 1. colspan processing -->
|
@@ -7986,6 +7996,8 @@
|
|
7986
7996
|
<!-- ======================================= -->
|
7987
7997
|
<!-- math -->
|
7988
7998
|
<!-- ======================================= -->
|
7999
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
8000
|
+
|
7989
8001
|
<xsl:template match="mathml:math">
|
7990
8002
|
<xsl:variable name="isAdded" select="@added"/>
|
7991
8003
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -8345,10 +8357,10 @@
|
|
8345
8357
|
<xsl:template match="*[local-name()='localityStack']"/>
|
8346
8358
|
|
8347
8359
|
<xsl:variable name="pdfAttachmentsList_">
|
8348
|
-
<xsl:for-each select="//*[
|
8360
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
8349
8361
|
<attachment filename="{@name}"/>
|
8350
8362
|
</xsl:for-each>
|
8351
|
-
<xsl:if test="not(//*[
|
8363
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8352
8364
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8353
8365
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8354
8366
|
<attachment filename="{$attachment_path}"/>
|
@@ -9820,7 +9832,9 @@
|
|
9820
9832
|
<xsl:apply-templates mode="bookmarks"/>
|
9821
9833
|
</xsl:template>
|
9822
9834
|
|
9823
|
-
<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">
|
9824
9838
|
<xsl:apply-templates select="."/>
|
9825
9839
|
</xsl:template>
|
9826
9840
|
|
@@ -9837,7 +9851,15 @@
|
|
9837
9851
|
<xsl:apply-templates mode="contents"/>
|
9838
9852
|
</xsl:template>
|
9839
9853
|
|
9840
|
-
<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">
|
9841
9863
|
<xsl:apply-templates mode="bookmarks"/>
|
9842
9864
|
</xsl:template>
|
9843
9865
|
|
@@ -9850,6 +9872,13 @@
|
|
9850
9872
|
<xsl:apply-templates mode="bookmarks"/>
|
9851
9873
|
</xsl:template>
|
9852
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
|
+
|
9853
9882
|
<!-- Bookmarks -->
|
9854
9883
|
<xsl:template name="addBookmarks">
|
9855
9884
|
<xsl:param name="contents"/>
|
@@ -10100,6 +10129,13 @@
|
|
10100
10129
|
|
10101
10130
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
10102
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
|
+
|
10103
10139
|
<xsl:template name="getSection">
|
10104
10140
|
<xsl:choose>
|
10105
10141
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -10219,7 +10255,8 @@
|
|
10219
10255
|
</xsl:copy>
|
10220
10256
|
</xsl:template>
|
10221
10257
|
|
10222
|
-
<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">
|
10223
10260
|
<xsl:copy-of select="."/>
|
10224
10261
|
</xsl:template>
|
10225
10262
|
|
@@ -10283,7 +10320,7 @@
|
|
10283
10320
|
<!-- sourcecode -->
|
10284
10321
|
<!-- =============== -->
|
10285
10322
|
|
10286
|
-
<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']"/>
|
10287
10324
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10288
10325
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10289
10326
|
|
@@ -11772,7 +11809,7 @@
|
|
11772
11809
|
|
11773
11810
|
</xsl:template> <!-- sections_element_style -->
|
11774
11811
|
|
11775
|
-
<xsl:template match="//*[
|
11812
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
11776
11813
|
|
11777
11814
|
<fo:block break-after="page"/>
|
11778
11815
|
|
@@ -11876,7 +11913,7 @@
|
|
11876
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>
|
11877
11914
|
</xsl:when>
|
11878
11915
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
11879
|
-
<xsl:when test="ancestor::*[
|
11916
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
11880
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>
|
11881
11918
|
</xsl:when>
|
11882
11919
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -12992,7 +13029,7 @@
|
|
12992
13029
|
|
12993
13030
|
<xsl:call-template name="setBlockSpanAll"/>
|
12994
13031
|
|
12995
|
-
<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)"/>
|
12996
13033
|
<xsl:if test="$admonition_color != ''">
|
12997
13034
|
<xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
|
12998
13035
|
<xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
|
@@ -13218,7 +13255,7 @@
|
|
13218
13255
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
13219
13256
|
|
13220
13257
|
<!-- move section 'Normative references' inside 'sections' -->
|
13221
|
-
<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']]">
|
13222
13259
|
<xsl:sort select="@displayorder" data-type="number"/>
|
13223
13260
|
|
13224
13261
|
<!-- process Section's title -->
|
@@ -13279,10 +13316,126 @@
|
|
13279
13316
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
13280
13317
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
13281
13318
|
|
13282
|
-
<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">
|
13283
13350
|
<xsl:copy-of select="."/>
|
13284
13351
|
</xsl:template>
|
13285
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
|
+
|
13286
13439
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
13287
13440
|
<xsl:copy>
|
13288
13441
|
<xsl:copy-of select="@*"/>
|
@@ -13313,7 +13466,7 @@
|
|
13313
13466
|
<!-- add @id - first element with @id plus '_element_name' -->
|
13314
13467
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
13315
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>
|
13316
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
13469
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
13317
13470
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
13318
13471
|
</xsl:if>
|
13319
13472
|
</xsl:template>
|
@@ -13428,16 +13581,30 @@
|
|
13428
13581
|
|
13429
13582
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13430
13583
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13431
|
-
<xsl:
|
13432
|
-
<xsl:
|
13433
|
-
|
13434
|
-
|
13584
|
+
<xsl:choose>
|
13585
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
13586
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13587
|
+
</xsl:when>
|
13588
|
+
<xsl:otherwise>
|
13589
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
13590
|
+
<xsl:copy-of select="@*"/>
|
13591
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13592
|
+
</xsl:element>
|
13593
|
+
</xsl:otherwise>
|
13594
|
+
</xsl:choose>
|
13435
13595
|
</xsl:template>
|
13436
13596
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
13437
|
-
<xsl:
|
13438
|
-
<xsl:
|
13439
|
-
|
13440
|
-
|
13597
|
+
<xsl:choose>
|
13598
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
13599
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13600
|
+
</xsl:when>
|
13601
|
+
<xsl:otherwise>
|
13602
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
13603
|
+
<xsl:copy-of select="@*"/>
|
13604
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13605
|
+
</xsl:element>
|
13606
|
+
</xsl:otherwise>
|
13607
|
+
</xsl:choose>
|
13441
13608
|
</xsl:template>
|
13442
13609
|
|
13443
13610
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
@@ -13535,6 +13702,9 @@
|
|
13535
13702
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13536
13703
|
</xsl:template>
|
13537
13704
|
|
13705
|
+
<xsl:template match="*[local-name() = 'semx']">
|
13706
|
+
<xsl:apply-templates/>
|
13707
|
+
</xsl:template>
|
13538
13708
|
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
13539
13709
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13540
13710
|
</xsl:template>
|
@@ -13546,6 +13716,126 @@
|
|
13546
13716
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
13547
13717
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
13548
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
|
+
|
13549
13839
|
<!-- END: update new Presentation XML -->
|
13550
13840
|
|
13551
13841
|
<!-- =========================================================================== -->
|
@@ -13618,7 +13908,7 @@
|
|
13618
13908
|
|
13619
13909
|
<xsl:choose>
|
13620
13910
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
13621
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
13911
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
13622
13912
|
<element pos="{position()}">
|
13623
13913
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
13624
13914
|
<xsl:value-of select="name()"/>
|
@@ -14046,7 +14336,7 @@
|
|
14046
14336
|
</xsl:when>
|
14047
14337
|
<xsl:when test="contains($text, $replace)">
|
14048
14338
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
14049
|
-
<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>
|
14050
14340
|
<xsl:call-template name="replaceChar">
|
14051
14341
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
14052
14342
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -14083,7 +14373,7 @@
|
|
14083
14373
|
</xsl:variable>
|
14084
14374
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
14085
14375
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
14086
|
-
<xsl:variable name="lang" select="ancestor::*[
|
14376
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
14087
14377
|
<xsl:variable name="reference" select="@reference"/>
|
14088
14378
|
<!-- fn sequence number in document -->
|
14089
14379
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -14128,7 +14418,7 @@
|
|
14128
14418
|
</xsl:template>
|
14129
14419
|
|
14130
14420
|
<xsl:template name="printEdition">
|
14131
|
-
<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) != ''])"/>
|
14132
14422
|
|
14133
14423
|
<xsl:choose>
|
14134
14424
|
<xsl:when test="$edition_i18n != ''">
|
@@ -14138,7 +14428,7 @@
|
|
14138
14428
|
</xsl:call-template>
|
14139
14429
|
</xsl:when>
|
14140
14430
|
<xsl:otherwise>
|
14141
|
-
<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'])"/>
|
14142
14432
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
14143
14433
|
<xsl:call-template name="capitalize">
|
14144
14434
|
<xsl:with-param name="str">
|
@@ -14272,7 +14562,7 @@
|
|
14272
14562
|
<xsl:param name="charDelim" select="', '"/>
|
14273
14563
|
<xsl:choose>
|
14274
14564
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
14275
|
-
<xsl:for-each select="//*[
|
14565
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
14276
14566
|
<xsl:sort data-type="text" order="ascending"/>
|
14277
14567
|
<xsl:call-template name="insertKeyword">
|
14278
14568
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -14282,7 +14572,7 @@
|
|
14282
14572
|
</xsl:for-each>
|
14283
14573
|
</xsl:when>
|
14284
14574
|
<xsl:otherwise>
|
14285
|
-
<xsl:for-each select="//*[
|
14575
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
14286
14576
|
<xsl:call-template name="insertKeyword">
|
14287
14577
|
<xsl:with-param name="meta" select="$meta"/>
|
14288
14578
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -14357,7 +14647,7 @@
|
|
14357
14647
|
<!-- Dublin Core properties go here -->
|
14358
14648
|
<dc:title>
|
14359
14649
|
<xsl:variable name="title">
|
14360
|
-
<xsl:for-each select="(//*[
|
14650
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
14361
14651
|
|
14362
14652
|
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
14363
14653
|
|
@@ -14377,7 +14667,7 @@
|
|
14377
14667
|
</rdf:Alt>
|
14378
14668
|
</dc:title>
|
14379
14669
|
<xsl:variable name="dc_creator">
|
14380
|
-
<xsl:for-each select="(//*[
|
14670
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
14381
14671
|
|
14382
14672
|
<rdf:Seq>
|
14383
14673
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -14399,7 +14689,7 @@
|
|
14399
14689
|
<xsl:variable name="dc_description">
|
14400
14690
|
<xsl:variable name="abstract">
|
14401
14691
|
|
14402
|
-
<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'])]"/>
|
14403
14693
|
|
14404
14694
|
</xsl:variable>
|
14405
14695
|
<rdf:Alt>
|
@@ -14427,7 +14717,7 @@
|
|
14427
14717
|
</rdf:RDF>
|
14428
14718
|
</x:xmpmeta>
|
14429
14719
|
<!-- add attachments -->
|
14430
|
-
<xsl:for-each select="//*[
|
14720
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
14431
14721
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
14432
14722
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
14433
14723
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -14461,7 +14751,7 @@
|
|
14461
14751
|
</pdf:embedded-file>
|
14462
14752
|
</xsl:for-each>
|
14463
14753
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
14464
|
-
<xsl:if test="not(//*[
|
14754
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
14465
14755
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
14466
14756
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
14467
14757
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -14665,9 +14955,9 @@
|
|
14665
14955
|
<xsl:value-of select="document('')//*/namespace::ogc"/>
|
14666
14956
|
|
14667
14957
|
</xsl:variable>
|
14668
|
-
<xsl:if test="$documentNS != $XSLNS">
|
14958
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
14669
14959
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
14670
|
-
</xsl:if>
|
14960
|
+
</xsl:if> -->
|
14671
14961
|
</xsl:template> <!-- namespaceCheck -->
|
14672
14962
|
|
14673
14963
|
<xsl:template name="getLanguage">
|
@@ -14746,10 +15036,10 @@
|
|
14746
15036
|
|
14747
15037
|
<xsl:variable name="data_value">
|
14748
15038
|
<xsl:choose>
|
14749
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
15039
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
14750
15040
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14751
15041
|
</xsl:when>
|
14752
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
15042
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
14753
15043
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14754
15044
|
</xsl:when>
|
14755
15045
|
<xsl:when test="$formatted = 'true'">
|
@@ -14887,7 +15177,7 @@
|
|
14887
15177
|
<!-- background image -->
|
14888
15178
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14889
15179
|
<fo:block>
|
14890
|
-
<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]">
|
14891
15181
|
<xsl:choose>
|
14892
15182
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14893
15183
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|