metanorma-ogc 2.3.0 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/base_convert.rb +1 -2
- data/lib/isodoc/ogc/html/htmlstyle.css +42 -10
- data/lib/isodoc/ogc/html/htmlstyle.scss +4 -4
- data/lib/isodoc/ogc/html_convert.rb +15 -6
- data/lib/isodoc/ogc/metadata.rb +3 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +702 -624
- data/lib/isodoc/ogc/ogc.best-practice.xsl +702 -624
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +702 -624
- data/lib/isodoc/ogc/ogc.community-practice.xsl +702 -624
- data/lib/isodoc/ogc/ogc.community-standard.xsl +702 -624
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +702 -624
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +702 -624
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +702 -624
- data/lib/isodoc/ogc/ogc.other.xsl +702 -624
- data/lib/isodoc/ogc/ogc.policy.xsl +702 -624
- data/lib/isodoc/ogc/ogc.reference-model.xsl +702 -624
- data/lib/isodoc/ogc/ogc.release-notes.xsl +702 -624
- data/lib/isodoc/ogc/ogc.standard.xsl +702 -624
- data/lib/isodoc/ogc/ogc.test-suite.xsl +702 -624
- data/lib/isodoc/ogc/ogc.user-guide.xsl +702 -624
- data/lib/isodoc/ogc/ogc.white-paper.xsl +258 -189
- data/lib/isodoc/ogc/presentation_xml_convert.rb +13 -6
- data/lib/metanorma/ogc/boilerplate.xml +60 -126
- data/lib/metanorma/ogc/isodoc.rng +11 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -3
- data/lib/isodoc/ogc/biblio.rb +0 -24
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
-
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
5
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
@@ -128,494 +128,503 @@
|
|
128
128
|
|
129
129
|
<xsl:template match="/">
|
130
130
|
<xsl:call-template name="namespaceCheck"/>
|
131
|
-
<fo:root xml:lang="{$lang}">
|
132
|
-
<xsl:variable name="root-style">
|
133
|
-
<root-style xsl:use-attribute-sets="root-style"/>
|
134
|
-
</xsl:variable>
|
135
|
-
<xsl:call-template name="insertRootStyle">
|
136
|
-
<xsl:with-param name="root-style" select="$root-style"/>
|
137
|
-
</xsl:call-template>
|
138
|
-
<fo:layout-master-set>
|
139
|
-
<!-- Cover page -->
|
140
|
-
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
141
|
-
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
|
142
|
-
<fo:region-before region-name="cover-page-header" extent="16.5mm"/>
|
143
|
-
<fo:region-after extent="10mm"/>
|
144
|
-
<fo:region-start extent="16.5mm"/>
|
145
|
-
<fo:region-end extent="14mm"/>
|
146
|
-
</fo:simple-page-master>
|
147
|
-
|
148
|
-
<!-- Preface pages -->
|
149
|
-
<fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
150
|
-
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
151
|
-
<fo:region-before region-name="header" extent="16.5mm"/>
|
152
|
-
<fo:region-after region-name="footer" extent="22.5mm"/>
|
153
|
-
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
154
|
-
<fo:region-end region-name="right-region" extent="16.5mm"/>
|
155
|
-
</fo:simple-page-master>
|
156
|
-
|
157
|
-
<!-- Document pages -->
|
158
|
-
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
159
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
160
|
-
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
161
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
162
|
-
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
163
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
164
|
-
</fo:simple-page-master>
|
165
|
-
|
166
|
-
</fo:layout-master-set>
|
167
|
-
|
168
|
-
<fo:declarations>
|
169
|
-
<xsl:call-template name="addPDFUAmeta"/>
|
170
|
-
</fo:declarations>
|
171
|
-
|
172
|
-
<xsl:call-template name="addBookmarks">
|
173
|
-
<xsl:with-param name="contents" select="$contents"/>
|
174
|
-
</xsl:call-template>
|
175
131
|
|
176
|
-
|
177
|
-
<
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
</fo:block>
|
182
|
-
</fo:static-content>
|
132
|
+
<xsl:variable name="updated_xml_step1">
|
133
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
134
|
+
</xsl:variable>
|
135
|
+
|
136
|
+
<xsl:for-each select="xalan:nodeset($updated_xml_step1)">
|
183
137
|
|
184
|
-
|
138
|
+
<fo:root xml:lang="{$lang}">
|
139
|
+
<xsl:variable name="root-style">
|
140
|
+
<root-style xsl:use-attribute-sets="root-style"/>
|
141
|
+
</xsl:variable>
|
142
|
+
<xsl:call-template name="insertRootStyle">
|
143
|
+
<xsl:with-param name="root-style" select="$root-style"/>
|
144
|
+
</xsl:call-template>
|
145
|
+
<fo:layout-master-set>
|
146
|
+
<!-- Cover page -->
|
147
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
148
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
|
149
|
+
<fo:region-before region-name="cover-page-header" extent="16.5mm"/>
|
150
|
+
<fo:region-after extent="10mm"/>
|
151
|
+
<fo:region-start extent="16.5mm"/>
|
152
|
+
<fo:region-end extent="14mm"/>
|
153
|
+
</fo:simple-page-master>
|
154
|
+
|
155
|
+
<!-- Preface pages -->
|
156
|
+
<fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
157
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
158
|
+
<fo:region-before region-name="header" extent="16.5mm"/>
|
159
|
+
<fo:region-after region-name="footer" extent="22.5mm"/>
|
160
|
+
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
161
|
+
<fo:region-end region-name="right-region" extent="16.5mm"/>
|
162
|
+
</fo:simple-page-master>
|
163
|
+
|
164
|
+
<!-- Document pages -->
|
165
|
+
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
166
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
167
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
168
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
169
|
+
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
170
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
171
|
+
</fo:simple-page-master>
|
172
|
+
|
173
|
+
</fo:layout-master-set>
|
174
|
+
|
175
|
+
<fo:declarations>
|
176
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
177
|
+
</fo:declarations>
|
178
|
+
|
179
|
+
<xsl:call-template name="addBookmarks">
|
180
|
+
<xsl:with-param name="contents" select="$contents"/>
|
181
|
+
</xsl:call-template>
|
185
182
|
|
186
|
-
|
187
|
-
|
183
|
+
<!-- Cover Page -->
|
184
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
185
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
188
186
|
<fo:block>
|
189
|
-
<fo:
|
187
|
+
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
190
188
|
</fo:block>
|
191
|
-
</fo:
|
189
|
+
</fo:static-content>
|
192
190
|
|
193
|
-
|
194
|
-
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
195
|
-
<fo:block>
|
196
|
-
<fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
|
197
|
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
198
|
-
<rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:rgb(33,55,92);stroke-width:0;fill-opacity:0.85"/>
|
199
|
-
</svg>
|
200
|
-
</fo:instream-foreign-object>
|
201
|
-
</fo:block>
|
202
|
-
</fo:block-container>
|
191
|
+
<fo:flow flow-name="xsl-region-body" color="white">
|
203
192
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
<fo:table-column column-width="25%"/>
|
211
|
-
<fo:table-body>
|
212
|
-
<fo:table-row>
|
213
|
-
<fo:table-cell font-weight="bold">
|
214
|
-
<fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
|
215
|
-
<xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
|
216
|
-
<xsl:call-template name="addLetterSpacing">
|
217
|
-
<xsl:with-param name="text" select="$ogc_document"/>
|
218
|
-
<xsl:with-param name="letter-spacing" select="0.3"/>
|
219
|
-
</xsl:call-template>
|
220
|
-
</fo:block>
|
221
|
-
<xsl:variable name="ogc_external" select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type='ogc-external']"/>
|
222
|
-
<xsl:if test="normalize-space($ogc_external) != ''">
|
223
|
-
<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>
|
224
|
-
</xsl:if>
|
225
|
-
</fo:table-cell>
|
226
|
-
<fo:table-cell text-align="right">
|
227
|
-
<fo:block>
|
228
|
-
<xsl:call-template name="insertLogo"/>
|
229
|
-
</fo:block>
|
230
|
-
</fo:table-cell>
|
231
|
-
</fo:table-row>
|
232
|
-
</fo:table-body>
|
233
|
-
</fo:table>
|
234
|
-
</fo:block>
|
193
|
+
<!-- background image -->
|
194
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
195
|
+
<fo:block>
|
196
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
197
|
+
</fo:block>
|
198
|
+
</fo:block-container>
|
235
199
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
<xsl:when test="$length_title > 170">26</xsl:when>
|
245
|
-
<xsl:when test="$length_title > 155">28</xsl:when>
|
246
|
-
<xsl:when test="$length_title > 130">30</xsl:when>
|
247
|
-
</xsl:choose>
|
248
|
-
</xsl:variable>
|
249
|
-
<xsl:if test="normalize-space($fit_font-size) != ''">
|
250
|
-
<xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
|
251
|
-
</xsl:if>
|
252
|
-
<xsl:call-template name="addLetterSpacing">
|
253
|
-
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
|
254
|
-
<xsl:with-param name="letter-spacing" select="1.1"/>
|
255
|
-
</xsl:call-template>
|
200
|
+
<!-- background color -->
|
201
|
+
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
202
|
+
<fo:block>
|
203
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
|
204
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
205
|
+
<rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:rgb(33,55,92);stroke-width:0;fill-opacity:0.85"/>
|
206
|
+
</svg>
|
207
|
+
</fo:instream-foreign-object>
|
256
208
|
</fo:block>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
<
|
209
|
+
</fo:block-container>
|
210
|
+
|
211
|
+
<xsl:call-template name="insertCrossingLines"/>
|
212
|
+
|
213
|
+
<!-- title and logo -->
|
214
|
+
<fo:block>
|
215
|
+
<fo:table table-layout="fixed" width="100%">
|
216
|
+
<fo:table-column column-width="75%"/>
|
217
|
+
<fo:table-column column-width="25%"/>
|
218
|
+
<fo:table-body>
|
219
|
+
<fo:table-row>
|
220
|
+
<fo:table-cell font-weight="bold">
|
221
|
+
<fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
|
222
|
+
<xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
|
223
|
+
<xsl:call-template name="addLetterSpacing">
|
224
|
+
<xsl:with-param name="text" select="$ogc_document"/>
|
225
|
+
<xsl:with-param name="letter-spacing" select="0.3"/>
|
226
|
+
</xsl:call-template>
|
227
|
+
</fo:block>
|
228
|
+
<xsl:variable name="ogc_external" select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type='ogc-external']"/>
|
229
|
+
<xsl:if test="normalize-space($ogc_external) != ''">
|
230
|
+
<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>
|
231
|
+
</xsl:if>
|
232
|
+
</fo:table-cell>
|
233
|
+
<fo:table-cell text-align="right">
|
234
|
+
<fo:block>
|
235
|
+
<xsl:call-template name="insertLogo"/>
|
236
|
+
</fo:block>
|
237
|
+
</fo:table-cell>
|
238
|
+
</fo:table-row>
|
239
|
+
</fo:table-body>
|
240
|
+
</fo:table>
|
241
|
+
</fo:block>
|
242
|
+
|
243
|
+
<!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
|
244
|
+
<fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
|
245
|
+
<fo:block-container width="155mm" height="99%" display-align="center">
|
246
|
+
<fo:block font-size="33pt" role="H1">
|
247
|
+
<xsl:variable name="length_title" select="string-length($doctitle)"/>
|
248
|
+
<xsl:variable name="fit_font-size">
|
268
249
|
<xsl:choose>
|
269
|
-
<xsl:when test="$
|
270
|
-
<xsl:when test="$
|
271
|
-
<xsl:when test="$
|
272
|
-
<xsl:when test="$
|
273
|
-
<xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
|
274
|
-
<xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
|
275
|
-
<xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
|
276
|
-
<xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
|
277
|
-
<xsl:when test="$docsubtype = 'general'">General</xsl:when>
|
250
|
+
<xsl:when test="$length_title > 230">20</xsl:when>
|
251
|
+
<xsl:when test="$length_title > 170">26</xsl:when>
|
252
|
+
<xsl:when test="$length_title > 155">28</xsl:when>
|
253
|
+
<xsl:when test="$length_title > 130">30</xsl:when>
|
278
254
|
</xsl:choose>
|
279
255
|
</xsl:variable>
|
256
|
+
<xsl:if test="normalize-space($fit_font-size) != ''">
|
257
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
|
258
|
+
</xsl:if>
|
280
259
|
<xsl:call-template name="addLetterSpacing">
|
281
|
-
<xsl:with-param name="text" select="$
|
282
|
-
<xsl:with-param name="letter-spacing" select="
|
260
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
|
261
|
+
<xsl:with-param name="letter-spacing" select="1.1"/>
|
283
262
|
</xsl:call-template>
|
284
263
|
</fo:block>
|
285
|
-
<fo:block
|
286
|
-
<
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
264
|
+
<fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
|
265
|
+
<fo:block margin-top="4pt"> </fo:block>
|
266
|
+
</fo:block-container>
|
267
|
+
<fo:block color="{$color_design}">
|
268
|
+
<fo:block font-size="17pt" margin-bottom="14pt">
|
269
|
+
<xsl:call-template name="addLetterSpacing">
|
270
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
|
271
|
+
</xsl:call-template>
|
272
|
+
<xsl:value-of select="$linebreak"/>
|
273
|
+
<xsl:variable name="docsubtype" select="normalize-space(/ogc:ogc-standard/ogc:bibdata/ogc:ext/ogc:subdoctype)"/>
|
274
|
+
<xsl:variable name="docsubtype_str">
|
275
|
+
<xsl:choose>
|
276
|
+
<xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
|
277
|
+
<xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
|
278
|
+
<xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model & encoding</xsl:when>
|
279
|
+
<xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model & implementation</xsl:when>
|
280
|
+
<xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
|
281
|
+
<xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
|
282
|
+
<xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
|
283
|
+
<xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
|
284
|
+
<xsl:when test="$docsubtype = 'general'">General</xsl:when>
|
285
|
+
</xsl:choose>
|
286
|
+
</xsl:variable>
|
287
|
+
<xsl:call-template name="addLetterSpacing">
|
288
|
+
<xsl:with-param name="text" select="$docsubtype_str"/>
|
289
|
+
<xsl:with-param name="letter-spacing" select="0.25"/>
|
290
|
+
</xsl:call-template>
|
291
|
+
</fo:block>
|
292
|
+
<fo:block font-size="12pt" font-weight="bold">
|
293
|
+
<xsl:variable name="curr_lang" select="/ogc:ogc-standard/ogc:bibdata/ogc:language[@current = 'true']"/>
|
294
|
+
<xsl:variable name="stage" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang]))"/>
|
295
|
+
<xsl:call-template name="addLetterSpacing">
|
296
|
+
<xsl:with-param name="text" select="$stage"/>
|
297
|
+
</xsl:call-template>
|
298
|
+
</fo:block>
|
291
299
|
</fo:block>
|
292
|
-
</fo:block>
|
300
|
+
</fo:block-container>
|
293
301
|
</fo:block-container>
|
294
|
-
</fo:block-container>
|
295
302
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
303
|
+
<fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
|
304
|
+
<fo:block line-height="140%">
|
305
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibdata/ogc:edition[normalize-space(@language) = '']"/>
|
306
|
+
<fo:block>
|
307
|
+
<fo:inline font-weight="bold">Submission Date: </fo:inline>
|
308
|
+
<xsl:choose>
|
309
|
+
<xsl:when test="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'received']/ogc:on">
|
310
|
+
<xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'received']/ogc:on"/>
|
311
|
+
</xsl:when>
|
312
|
+
<xsl:otherwise>XXX</xsl:otherwise>
|
313
|
+
</xsl:choose>
|
314
|
+
</fo:block>
|
315
|
+
<fo:block>
|
316
|
+
<fo:inline font-weight="bold">Approval Date: </fo:inline>
|
317
|
+
<xsl:choose>
|
318
|
+
<xsl:when test="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on">
|
319
|
+
<xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on"/>
|
320
|
+
</xsl:when>
|
321
|
+
<xsl:otherwise>XXX</xsl:otherwise>
|
322
|
+
</xsl:choose>
|
323
|
+
</fo:block>
|
324
|
+
<fo:block>
|
325
|
+
<fo:inline font-weight="bold">Publication Date: </fo:inline>
|
326
|
+
<xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'published']/ogc:on"/>
|
327
|
+
</fo:block>
|
321
328
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
329
|
+
<fo:block margin-bottom="12pt">
|
330
|
+
<xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
|
331
|
+
<fo:block>
|
332
|
+
<fo:inline font-weight="bold">Author: </fo:inline>
|
333
|
+
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
|
334
|
+
<xsl:value-of select="."/>
|
335
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
336
|
+
</xsl:for-each>
|
337
|
+
</fo:block>
|
338
|
+
</xsl:if>
|
339
|
+
<xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
340
|
+
<fo:block>
|
341
|
+
<fo:inline font-weight="bold">Editor: </fo:inline>
|
342
|
+
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
343
|
+
<xsl:value-of select="."/>
|
344
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
345
|
+
</xsl:for-each>
|
346
|
+
</fo:block>
|
347
|
+
</xsl:if>
|
348
|
+
<xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
|
349
|
+
<fo:block>
|
350
|
+
<fo:inline font-weight="bold">Contributor: </fo:inline>
|
351
|
+
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
|
352
|
+
<xsl:value-of select="."/>
|
353
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
354
|
+
</xsl:for-each>
|
355
|
+
</fo:block>
|
356
|
+
</xsl:if>
|
357
|
+
</fo:block>
|
350
358
|
</fo:block>
|
351
|
-
</fo:block>
|
352
359
|
|
353
|
-
|
360
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:legal-statement"/>
|
354
361
|
|
355
|
-
|
362
|
+
</fo:block-container>
|
356
363
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
364
|
+
</fo:flow>
|
365
|
+
</fo:page-sequence>
|
366
|
+
<!-- End Cover Page -->
|
367
|
+
|
368
|
+
<!-- Copyright, Content, Foreword, etc. pages -->
|
369
|
+
<fo:page-sequence master-reference="preface" initial-page-number="2" format="i" force-page-count="no-force">
|
370
|
+
<xsl:call-template name="insertFootnoteSeparator"/>
|
371
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
372
|
+
<fo:flow flow-name="xsl-region-body">
|
373
|
+
|
374
|
+
<xsl:if test="$debug = 'true'">
|
375
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
376
|
+
DEBUG
|
377
|
+
contents=<!-- <xsl:copy-of select="xalan:nodeset($contents)"/> -->
|
378
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
379
|
+
</xsl:if>
|
373
380
|
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
381
|
+
<!-- crossing lines -->
|
382
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
|
383
|
+
<fo:block>
|
384
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
|
385
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
386
|
+
<line x1="230" y1="0" x2="2159" y2="490" stroke="{$color_design_light}"/>
|
387
|
+
<line x1="0" y1="395" x2="820" y2="0" stroke="{$color_design_light}"/>
|
388
|
+
<circle style="fill:{$color_design_light};" cx="614" cy="100" r="15"/>
|
389
|
+
</svg>
|
390
|
+
</fo:instream-foreign-object>
|
391
|
+
</fo:block>
|
392
|
+
</fo:block-container>
|
386
393
|
|
387
|
-
|
394
|
+
<xsl:call-template name="insertLogoPreface"/>
|
388
395
|
|
389
|
-
|
390
|
-
|
396
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:license-statement"/>
|
397
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:feedback-statement"/>
|
391
398
|
|
392
|
-
|
393
|
-
|
399
|
+
<!-- Copyright notice -->
|
400
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:copyright-statement"/>
|
394
401
|
|
395
|
-
|
396
|
-
|
402
|
+
</fo:flow>
|
403
|
+
</fo:page-sequence>
|
397
404
|
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
405
|
+
<!-- Copyright, Content, Foreword, etc. pages -->
|
406
|
+
<fo:page-sequence master-reference="document" format="i" force-page-count="no-force">
|
407
|
+
<xsl:call-template name="insertFootnoteSeparator"/>
|
408
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
409
|
+
<fo:flow flow-name="xsl-region-body">
|
403
410
|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
411
|
+
<!-- crossing lines -->
|
412
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
|
413
|
+
<fo:block>
|
414
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
|
415
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
416
|
+
<line x1="0" y1="545" x2="2084" y2="0" stroke="{$color_design_light}"/>
|
417
|
+
<line x1="0" y1="1374" x2="355" y2="0" stroke="{$color_design_light}"/>
|
418
|
+
<circle style="fill:{$color_design_light};" cx="227" cy="487" r="15"/>
|
419
|
+
</svg>
|
420
|
+
</fo:instream-foreign-object>
|
421
|
+
</fo:block>
|
422
|
+
</fo:block-container>
|
416
423
|
|
417
|
-
|
424
|
+
<fo:block color="{$color_blue}">
|
418
425
|
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
426
|
+
<xsl:variable name="title-toc">
|
427
|
+
<xsl:call-template name="getTitle">
|
428
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
429
|
+
</xsl:call-template>
|
430
|
+
</xsl:variable>
|
424
431
|
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
432
|
+
<fo:block-container margin-left="-18mm">
|
433
|
+
<fo:block-container margin-left="0mm">
|
434
|
+
<fo:block margin-bottom="40pt">
|
435
|
+
<fo:block font-size="33pt" margin-bottom="4pt" role="H1">
|
436
|
+
<xsl:call-template name="addLetterSpacing">
|
437
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
438
|
+
<xsl:with-param name="letter-spacing" select="1.1"/>
|
439
|
+
</xsl:call-template>
|
440
|
+
</fo:block>
|
441
|
+
<fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}">
|
442
|
+
<fo:block margin-top="4pt"> </fo:block>
|
443
|
+
</fo:block-container>
|
433
444
|
</fo:block>
|
434
|
-
|
435
|
-
<fo:block margin-top="4pt"> </fo:block>
|
436
|
-
</fo:block-container>
|
437
|
-
</fo:block>
|
445
|
+
</fo:block-container>
|
438
446
|
</fo:block-container>
|
439
|
-
</fo:block-container>
|
440
447
|
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
<fo:block role="TOCI">
|
446
|
-
<xsl:if test="@level = 1">
|
447
|
-
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
448
|
-
</xsl:if>
|
449
|
-
<xsl:if test="@level = 1 or @parent = 'annex'">
|
450
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
451
|
-
</xsl:if>
|
452
|
-
<xsl:if test="@level >= 2"> <!-- and not(@parent = 'annex') -->
|
453
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
454
|
-
</xsl:if>
|
448
|
+
<fo:block-container line-height="130%">
|
449
|
+
<fo:block role="TOC">
|
450
|
+
<xsl:for-each select="$contents//item[@display = 'true' and normalize-space(@id) != '']">
|
455
451
|
|
456
|
-
<
|
457
|
-
<xsl:
|
458
|
-
<
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
</fo:block>
|
467
|
-
</fo:list-item-label>
|
468
|
-
<fo:list-item-body start-indent="body-start()">
|
469
|
-
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
470
|
-
<fo:basic-link internal-destination="{@id}">
|
471
|
-
<xsl:call-template name="setAltText">
|
472
|
-
<xsl:with-param name="value" select="text()"/>
|
473
|
-
</xsl:call-template>
|
474
|
-
<xsl:variable name="sectionTitle">
|
475
|
-
<xsl:apply-templates select="title"/>
|
476
|
-
</xsl:variable>
|
477
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
|
478
|
-
<xsl:text> </xsl:text>
|
479
|
-
<fo:inline keep-together.within-line="always">
|
480
|
-
<fo:leader leader-pattern="dots"/>
|
481
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
482
|
-
</fo:inline>
|
483
|
-
</fo:basic-link>
|
484
|
-
</fo:block>
|
485
|
-
</fo:list-item-body>
|
486
|
-
</fo:list-item>
|
487
|
-
</fo:list-block>
|
488
|
-
</xsl:when>
|
489
|
-
<xsl:otherwise>
|
490
|
-
<xsl:variable name="margin-left">
|
491
|
-
<xsl:choose>
|
492
|
-
<xsl:when test="number(@level) != 'NaN'"><xsl:value-of select="(@level - 1) * 8"/></xsl:when>
|
493
|
-
<xsl:otherwise>8</xsl:otherwise>
|
494
|
-
</xsl:choose>
|
495
|
-
</xsl:variable>
|
496
|
-
<fo:block text-align-last="justify" margin-left="{$margin-left}mm">
|
497
|
-
<fo:basic-link internal-destination="{@id}">
|
498
|
-
<xsl:call-template name="setAltText">
|
499
|
-
<xsl:with-param name="value" select="text()"/>
|
500
|
-
</xsl:call-template>
|
501
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
502
|
-
<xsl:text> </xsl:text>
|
503
|
-
<xsl:apply-templates select="title"/>
|
504
|
-
<xsl:text> </xsl:text>
|
505
|
-
<fo:inline keep-together.within-line="always">
|
506
|
-
<fo:leader leader-pattern="dots"/>
|
507
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
508
|
-
</fo:inline>
|
509
|
-
</fo:basic-link>
|
510
|
-
</fo:block>
|
511
|
-
</xsl:otherwise>
|
512
|
-
</xsl:choose>
|
452
|
+
<fo:block role="TOCI">
|
453
|
+
<xsl:if test="@level = 1">
|
454
|
+
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
455
|
+
</xsl:if>
|
456
|
+
<xsl:if test="@level = 1 or @parent = 'annex'">
|
457
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
458
|
+
</xsl:if>
|
459
|
+
<xsl:if test="@level >= 2"> <!-- and not(@parent = 'annex') -->
|
460
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
461
|
+
</xsl:if>
|
513
462
|
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
463
|
+
<xsl:choose>
|
464
|
+
<xsl:when test="@level = 1">
|
465
|
+
<fo:list-block provisional-distance-between-starts="8mm">
|
466
|
+
<xsl:if test="@type = 'annex'">
|
467
|
+
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
468
|
+
</xsl:if>
|
469
|
+
<fo:list-item>
|
470
|
+
<fo:list-item-label end-indent="label-end()">
|
471
|
+
<fo:block>
|
472
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
473
|
+
</fo:block>
|
474
|
+
</fo:list-item-label>
|
475
|
+
<fo:list-item-body start-indent="body-start()">
|
476
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
477
|
+
<fo:basic-link internal-destination="{@id}">
|
478
|
+
<xsl:call-template name="setAltText">
|
479
|
+
<xsl:with-param name="value" select="text()"/>
|
480
|
+
</xsl:call-template>
|
481
|
+
<xsl:variable name="sectionTitle">
|
482
|
+
<xsl:apply-templates select="title"/>
|
483
|
+
</xsl:variable>
|
484
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
|
485
|
+
<xsl:text> </xsl:text>
|
486
|
+
<fo:inline keep-together.within-line="always">
|
487
|
+
<fo:leader leader-pattern="dots"/>
|
488
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
489
|
+
</fo:inline>
|
490
|
+
</fo:basic-link>
|
491
|
+
</fo:block>
|
492
|
+
</fo:list-item-body>
|
493
|
+
</fo:list-item>
|
494
|
+
</fo:list-block>
|
495
|
+
</xsl:when>
|
496
|
+
<xsl:otherwise>
|
497
|
+
<xsl:variable name="margin-left">
|
498
|
+
<xsl:choose>
|
499
|
+
<xsl:when test="number(@level) != 'NaN'"><xsl:value-of select="(@level - 1) * 8"/></xsl:when>
|
500
|
+
<xsl:otherwise>8</xsl:otherwise>
|
501
|
+
</xsl:choose>
|
502
|
+
</xsl:variable>
|
503
|
+
<fo:block text-align-last="justify" margin-left="{$margin-left}mm">
|
504
|
+
<fo:basic-link internal-destination="{@id}">
|
505
|
+
<xsl:call-template name="setAltText">
|
506
|
+
<xsl:with-param name="value" select="text()"/>
|
507
|
+
</xsl:call-template>
|
508
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
509
|
+
<xsl:text> </xsl:text>
|
510
|
+
<xsl:apply-templates select="title"/>
|
511
|
+
<xsl:text> </xsl:text>
|
512
|
+
<fo:inline keep-together.within-line="always">
|
513
|
+
<fo:leader leader-pattern="dots"/>
|
514
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
515
|
+
</fo:inline>
|
516
|
+
</fo:basic-link>
|
517
|
+
</fo:block>
|
518
|
+
</xsl:otherwise>
|
519
|
+
</xsl:choose>
|
518
520
|
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
523
|
-
</xsl:call-template>
|
524
|
-
<fo:block-container line-height="130%">
|
525
|
-
<xsl:for-each select="$contents//tables/table">
|
526
|
-
<xsl:call-template name="insertListOf_Item"/>
|
527
|
-
</xsl:for-each>
|
521
|
+
</fo:block>
|
522
|
+
</xsl:for-each>
|
523
|
+
</fo:block>
|
528
524
|
</fo:block-container>
|
529
|
-
</xsl:if>
|
530
525
|
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
526
|
+
<!-- List of Tables -->
|
527
|
+
<xsl:if test="$contents//tables/table">
|
528
|
+
<xsl:call-template name="insertListOf_Title">
|
529
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
530
|
+
</xsl:call-template>
|
531
|
+
<fo:block-container line-height="130%">
|
532
|
+
<xsl:for-each select="$contents//tables/table">
|
533
|
+
<xsl:call-template name="insertListOf_Item"/>
|
534
|
+
</xsl:for-each>
|
535
|
+
</fo:block-container>
|
536
|
+
</xsl:if>
|
542
537
|
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
</xsl:call-template>
|
555
|
-
<xsl:copy-of select="title/node()"/>
|
556
|
-
<xsl:text> </xsl:text>
|
557
|
-
<fo:inline keep-together.within-line="always">
|
558
|
-
<fo:leader leader-pattern="dots"/>
|
559
|
-
<fo:page-number-citation ref-id="{@id}"/>
|
560
|
-
</fo:inline>
|
561
|
-
</fo:basic-link>
|
562
|
-
</fo:block>
|
563
|
-
</xsl:for-each>
|
564
|
-
</fo:block-container>
|
565
|
-
</xsl:if>
|
538
|
+
<!-- List of Figures -->
|
539
|
+
<xsl:if test="$contents//figures/figure">
|
540
|
+
<xsl:call-template name="insertListOf_Title">
|
541
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
542
|
+
</xsl:call-template>
|
543
|
+
<fo:block-container line-height="130%">
|
544
|
+
<xsl:for-each select="$contents//figures/figure">
|
545
|
+
<xsl:call-template name="insertListOf_Item"/>
|
546
|
+
</xsl:for-each>
|
547
|
+
</fo:block-container>
|
548
|
+
</xsl:if>
|
566
549
|
|
567
|
-
|
550
|
+
<!-- List of Recommendations -->
|
551
|
+
<xsl:if test="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
|
552
|
+
<xsl:call-template name="insertListOf_Title">
|
553
|
+
<xsl:with-param name="title" select="$title-list-recommendations"/>
|
554
|
+
</xsl:call-template>
|
555
|
+
<fo:block-container line-height="130%">
|
556
|
+
<xsl:for-each select="xalan:nodeset($toc_recommendations)/*[normalize-space(@id) != '']">
|
557
|
+
<fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
|
558
|
+
<fo:basic-link internal-destination="{@id}">
|
559
|
+
<xsl:call-template name="setAltText">
|
560
|
+
<xsl:with-param name="value" select="@alt-text"/>
|
561
|
+
</xsl:call-template>
|
562
|
+
<xsl:copy-of select="title/node()"/>
|
563
|
+
<xsl:text> </xsl:text>
|
564
|
+
<fo:inline keep-together.within-line="always">
|
565
|
+
<fo:leader leader-pattern="dots"/>
|
566
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
567
|
+
</fo:inline>
|
568
|
+
</fo:basic-link>
|
569
|
+
</fo:block>
|
570
|
+
</xsl:for-each>
|
571
|
+
</fo:block-container>
|
572
|
+
</xsl:if>
|
568
573
|
|
569
|
-
|
574
|
+
</fo:block>
|
570
575
|
|
571
|
-
|
572
|
-
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
|
576
|
+
<fo:block break-after="page"/>
|
573
577
|
|
574
|
-
<
|
575
|
-
|
578
|
+
<fo:block line-height="125%">
|
579
|
+
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
|
576
580
|
|
577
|
-
<xsl:
|
578
|
-
<
|
579
|
-
</xsl:if>
|
581
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
582
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
580
583
|
|
581
|
-
|
582
|
-
|
584
|
+
<xsl:if test="local-name() = 'foreword' or (local-name() = 'clause' and @type = 'security') or (local-name() = 'clause' and @type = 'submitting_orgs') or local-name() = 'introduction'">
|
585
|
+
<fo:block break-after="page"/>
|
586
|
+
</xsl:if>
|
583
587
|
|
584
|
-
|
585
|
-
|
586
|
-
</fo:page-sequence>
|
588
|
+
<xsl:apply-templates select="."/>
|
589
|
+
</xsl:for-each>
|
587
590
|
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
<xsl:choose>
|
592
|
-
<xsl:when test="local-name() = 'clause' and @type='scope'">
|
593
|
-
<xsl:apply-templates select="." mode="sections">
|
594
|
-
<xsl:with-param name="initial-page-number" select="1"/>
|
595
|
-
</xsl:apply-templates>
|
596
|
-
</xsl:when>
|
597
|
-
<xsl:otherwise>
|
598
|
-
<xsl:apply-templates select="." mode="sections"/>
|
599
|
-
</xsl:otherwise>
|
600
|
-
</xsl:choose>
|
601
|
-
</xsl:for-each>
|
591
|
+
</fo:block>
|
592
|
+
</fo:flow>
|
593
|
+
</fo:page-sequence>
|
602
594
|
|
603
|
-
|
604
|
-
<xsl:
|
605
|
-
|
606
|
-
|
595
|
+
<!-- Document Pages -->
|
596
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
597
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
598
|
+
<xsl:choose>
|
599
|
+
<xsl:when test="local-name() = 'clause' and @type='scope'">
|
600
|
+
<xsl:apply-templates select="." mode="sections">
|
601
|
+
<xsl:with-param name="initial-page-number" select="1"/>
|
602
|
+
</xsl:apply-templates>
|
603
|
+
</xsl:when>
|
604
|
+
<xsl:otherwise>
|
605
|
+
<xsl:apply-templates select="." mode="sections"/>
|
606
|
+
</xsl:otherwise>
|
607
|
+
</xsl:choose>
|
608
|
+
</xsl:for-each>
|
607
609
|
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
</xsl:for-each>
|
610
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
611
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
612
|
+
<xsl:apply-templates select="." mode="sections"/>
|
613
|
+
</xsl:for-each>
|
613
614
|
|
614
|
-
|
615
|
+
<!-- Bibliography -->
|
616
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
617
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
618
|
+
<xsl:apply-templates select="." mode="sections"/>
|
619
|
+
</xsl:for-each>
|
615
620
|
|
616
|
-
|
621
|
+
<xsl:apply-templates select="//ogc:indexsect" mode="sections"/>
|
617
622
|
|
618
|
-
|
623
|
+
<!-- End Document Pages -->
|
624
|
+
|
625
|
+
</fo:root>
|
626
|
+
|
627
|
+
</xsl:for-each>
|
619
628
|
</xsl:template>
|
620
629
|
|
621
630
|
<xsl:template name="insertListOf_Title">
|
@@ -1067,10 +1076,10 @@
|
|
1067
1076
|
<xsl:call-template name="getLevelTermName"/>
|
1068
1077
|
</xsl:variable>
|
1069
1078
|
<fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}">
|
1070
|
-
<fo:list-block color="{$color_blue}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3}mm">
|
1079
|
+
<fo:list-block color="{$color_blue}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3.2}mm">
|
1071
1080
|
<fo:list-item>
|
1072
1081
|
<fo:list-item-label end-indent="label-end()">
|
1073
|
-
<fo:block><fo:inline font-size="18pt"
|
1082
|
+
<fo:block><fo:inline font-size="18pt"><xsl:apply-templates/></fo:inline></fo:block> <!-- padding-right="1mm" -->
|
1074
1083
|
</fo:list-item-label>
|
1075
1084
|
<fo:list-item-body start-indent="body-start()">
|
1076
1085
|
<fo:block>
|
@@ -2244,7 +2253,7 @@
|
|
2244
2253
|
<xsl:attribute-set name="note-name-style">
|
2245
2254
|
|
2246
2255
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2247
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2256
|
+
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
2248
2257
|
|
2249
2258
|
</xsl:attribute-set>
|
2250
2259
|
|
@@ -2322,6 +2331,12 @@
|
|
2322
2331
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2323
2332
|
</xsl:attribute-set>
|
2324
2333
|
|
2334
|
+
<xsl:attribute-set name="figure-block-style">
|
2335
|
+
|
2336
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2337
|
+
|
2338
|
+
</xsl:attribute-set>
|
2339
|
+
|
2325
2340
|
<xsl:attribute-set name="figure-style">
|
2326
2341
|
|
2327
2342
|
</xsl:attribute-set>
|
@@ -2331,8 +2346,7 @@
|
|
2331
2346
|
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
2332
2347
|
<!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
|
2333
2348
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2334
|
-
|
2335
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2349
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
2336
2350
|
<!-- <xsl:attribute name="keep-with-next">always</xsl:attribute> -->
|
2337
2351
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2338
2352
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -3762,6 +3776,10 @@
|
|
3762
3776
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3763
3777
|
</xsl:apply-templates>
|
3764
3778
|
|
3779
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
3780
|
+
<fo:block/>
|
3781
|
+
</xsl:if>
|
3782
|
+
|
3765
3783
|
</fo:table-cell>
|
3766
3784
|
</fo:table-row>
|
3767
3785
|
</xsl:template> <!-- table-header-title -->
|
@@ -4129,7 +4147,7 @@
|
|
4129
4147
|
</fn>
|
4130
4148
|
-->
|
4131
4149
|
<!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
|
4132
|
-
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
4150
|
+
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
4133
4151
|
|
4134
4152
|
<!-- list of footnotes to calculate actual footnotes number -->
|
4135
4153
|
<xsl:variable name="p_fn_">
|
@@ -4160,7 +4178,22 @@
|
|
4160
4178
|
|
4161
4179
|
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
4162
4180
|
<xsl:variable name="footnote_inline">
|
4163
|
-
<fo:inline
|
4181
|
+
<fo:inline>
|
4182
|
+
|
4183
|
+
<xsl:variable name="fn_styles">
|
4184
|
+
<xsl:choose>
|
4185
|
+
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
4186
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
|
4187
|
+
</xsl:when>
|
4188
|
+
<xsl:otherwise>
|
4189
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style"/>
|
4190
|
+
</xsl:otherwise>
|
4191
|
+
</xsl:choose>
|
4192
|
+
</xsl:variable>
|
4193
|
+
|
4194
|
+
<xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
|
4195
|
+
<xsl:copy-of select="."/>
|
4196
|
+
</xsl:for-each>
|
4164
4197
|
|
4165
4198
|
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
4166
4199
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
@@ -4171,8 +4204,7 @@
|
|
4171
4204
|
</fo:basic-link>
|
4172
4205
|
</fo:inline>
|
4173
4206
|
</xsl:variable>
|
4174
|
-
|
4175
|
-
gen_id=<xsl:value-of select="$gen_id"/> -->
|
4207
|
+
|
4176
4208
|
<xsl:choose>
|
4177
4209
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
4178
4210
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -4224,7 +4256,10 @@
|
|
4224
4256
|
</xsl:for-each>
|
4225
4257
|
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
4226
4258
|
<xsl:sort select="@displayorder" data-type="number"/>
|
4227
|
-
|
4259
|
+
<!-- commented:
|
4260
|
+
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
4261
|
+
because 'fn' there is in biblio-tag -->
|
4262
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4228
4263
|
<!-- copy unique fn -->
|
4229
4264
|
<fn gen_id="{generate-id(.)}">
|
4230
4265
|
<xsl:copy-of select="@*"/>
|
@@ -5084,7 +5119,7 @@
|
|
5084
5119
|
|
5085
5120
|
<xsl:variable name="_font-size">
|
5086
5121
|
|
5087
|
-
<!--
|
5122
|
+
<!-- inherit -->
|
5088
5123
|
|
5089
5124
|
<xsl:choose>
|
5090
5125
|
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
@@ -6057,6 +6092,33 @@
|
|
6057
6092
|
</xsl:choose>
|
6058
6093
|
</xsl:template>
|
6059
6094
|
|
6095
|
+
<xsl:template name="getLang_fromCurrentNode">
|
6096
|
+
<xsl:variable name="language_current" select="normalize-space(.//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6097
|
+
<xsl:variable name="language">
|
6098
|
+
<xsl:choose>
|
6099
|
+
<xsl:when test="$language_current != ''">
|
6100
|
+
<xsl:value-of select="$language_current"/>
|
6101
|
+
</xsl:when>
|
6102
|
+
<xsl:otherwise>
|
6103
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6104
|
+
<xsl:choose>
|
6105
|
+
<xsl:when test="$language_current_2 != ''">
|
6106
|
+
<xsl:value-of select="$language_current_2"/>
|
6107
|
+
</xsl:when>
|
6108
|
+
<xsl:otherwise>
|
6109
|
+
<xsl:value-of select=".//*[local-name()='bibdata']//*[local-name()='language']"/>
|
6110
|
+
</xsl:otherwise>
|
6111
|
+
</xsl:choose>
|
6112
|
+
</xsl:otherwise>
|
6113
|
+
</xsl:choose>
|
6114
|
+
</xsl:variable>
|
6115
|
+
|
6116
|
+
<xsl:choose>
|
6117
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
6118
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
6119
|
+
</xsl:choose>
|
6120
|
+
</xsl:template>
|
6121
|
+
|
6060
6122
|
<xsl:template name="capitalizeWords">
|
6061
6123
|
<xsl:param name="str"/>
|
6062
6124
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
@@ -6587,8 +6649,6 @@
|
|
6587
6649
|
</xsl:when>
|
6588
6650
|
<xsl:otherwise>
|
6589
6651
|
|
6590
|
-
<xsl:text>:</xsl:text>
|
6591
|
-
|
6592
6652
|
</xsl:otherwise>
|
6593
6653
|
</xsl:choose>
|
6594
6654
|
</xsl:variable>
|
@@ -6681,7 +6741,7 @@
|
|
6681
6741
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
6682
6742
|
<xsl:variable name="isAdded" select="@added"/>
|
6683
6743
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
6684
|
-
<fo:block-container id="{@id}">
|
6744
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
6685
6745
|
|
6686
6746
|
<xsl:call-template name="setTrackChangesStyles">
|
6687
6747
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -6759,7 +6819,9 @@
|
|
6759
6819
|
|
6760
6820
|
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
6761
6821
|
<xsl:if test="number($scale) < 100">
|
6762
|
-
|
6822
|
+
|
6823
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
6824
|
+
|
6763
6825
|
</xsl:if>
|
6764
6826
|
|
6765
6827
|
</xsl:if>
|
@@ -7685,7 +7747,13 @@
|
|
7685
7747
|
</xsl:template>
|
7686
7748
|
|
7687
7749
|
<xsl:template match="text()" mode="contents_item">
|
7688
|
-
<xsl:
|
7750
|
+
<xsl:variable name="text">
|
7751
|
+
<!-- to split by '_' and other chars -->
|
7752
|
+
<text><xsl:call-template name="add-zero-spaces-java"/></text>
|
7753
|
+
</xsl:variable>
|
7754
|
+
<xsl:for-each select="xalan:nodeset($text)/text/text()">
|
7755
|
+
<xsl:call-template name="keep_together_standard_number"/>
|
7756
|
+
</xsl:for-each>
|
7689
7757
|
</xsl:template>
|
7690
7758
|
|
7691
7759
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
@@ -7696,39 +7764,57 @@
|
|
7696
7764
|
<!-- =============== -->
|
7697
7765
|
<!-- sourcecode -->
|
7698
7766
|
<!-- =============== -->
|
7699
|
-
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
7700
7767
|
|
7701
|
-
|
7702
|
-
|
7703
|
-
|
7768
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
|
7769
|
+
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
7770
|
+
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
7704
7771
|
|
7705
|
-
|
7772
|
+
<xsl:template match="*[local-name() = 'property']" mode="css">
|
7773
|
+
<xsl:attribute name="{@name}">
|
7774
|
+
<xsl:value-of select="@value"/>
|
7775
|
+
</xsl:attribute>
|
7776
|
+
</xsl:template>
|
7706
7777
|
|
7707
|
-
|
7708
|
-
|
7709
|
-
|
7778
|
+
<xsl:template name="get_sourcecode_attributes">
|
7779
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
7780
|
+
<xsl:variable name="_font-size">
|
7710
7781
|
|
7711
|
-
|
7712
|
-
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
7713
|
-
<xsl:otherwise>9.5</xsl:otherwise>
|
7714
|
-
</xsl:choose>
|
7782
|
+
<!-- inherit -->
|
7715
7783
|
|
7716
|
-
|
7784
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7785
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
7786
|
+
</xsl:if> -->
|
7717
7787
|
|
7718
|
-
|
7719
|
-
|
7720
|
-
|
7721
|
-
|
7722
|
-
|
7723
|
-
|
7724
|
-
|
7725
|
-
|
7726
|
-
|
7727
|
-
|
7728
|
-
|
7729
|
-
|
7788
|
+
<xsl:choose>
|
7789
|
+
<xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">8.5</xsl:when>
|
7790
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
7791
|
+
</xsl:choose>
|
7792
|
+
|
7793
|
+
</xsl:variable>
|
7794
|
+
|
7795
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
7796
|
+
<xsl:if test="$font-size != ''">
|
7797
|
+
<xsl:attribute name="font-size">
|
7798
|
+
<xsl:choose>
|
7799
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
7800
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
7801
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
7802
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
7803
|
+
</xsl:choose>
|
7804
|
+
</xsl:attribute>
|
7805
|
+
</xsl:if>
|
7806
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = 'sourcecode']" mode="css"/>
|
7807
|
+
</xsl:element>
|
7808
|
+
</xsl:template>
|
7809
|
+
|
7810
|
+
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
7811
|
+
|
7812
|
+
<xsl:variable name="sourcecode_attributes">
|
7813
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
7730
7814
|
</xsl:variable>
|
7731
7815
|
|
7816
|
+
<!-- <xsl:copy-of select="$sourcecode_css"/> -->
|
7817
|
+
|
7732
7818
|
<xsl:choose>
|
7733
7819
|
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
7734
7820
|
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
@@ -7779,6 +7865,12 @@
|
|
7779
7865
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7780
7866
|
</xsl:if>
|
7781
7867
|
|
7868
|
+
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
7869
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
7870
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7871
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7872
|
+
</xsl:if>
|
7873
|
+
|
7782
7874
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7783
7875
|
</fo:block>
|
7784
7876
|
|
@@ -7794,9 +7886,10 @@
|
|
7794
7886
|
</xsl:choose>
|
7795
7887
|
</xsl:template>
|
7796
7888
|
|
7797
|
-
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
7889
|
+
<xsl:template match="*[local-name()='sourcecode']/text() | *[local-name()='sourcecode']//*[local-name()='span']/text()" priority="2">
|
7798
7890
|
<xsl:choose>
|
7799
|
-
|
7891
|
+
<!-- disabled -->
|
7892
|
+
<xsl:when test="1 = 2 and normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
|
7800
7893
|
<xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
|
7801
7894
|
<xsl:choose>
|
7802
7895
|
<xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
|
@@ -7811,8 +7904,76 @@
|
|
7811
7904
|
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
7812
7905
|
</xsl:otherwise>
|
7813
7906
|
</xsl:choose>
|
7907
|
+
</xsl:template>
|
7908
|
+
|
7909
|
+
<!-- add sourcecode highlighting -->
|
7910
|
+
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
7911
|
+
<xsl:variable name="class" select="@class"/>
|
7912
|
+
<xsl:choose>
|
7913
|
+
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
7914
|
+
<fo:inline>
|
7915
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
7916
|
+
<xsl:apply-templates/>
|
7917
|
+
</fo:inline>
|
7918
|
+
</xsl:when>
|
7919
|
+
<xsl:otherwise>
|
7920
|
+
<xsl:apply-templates/>
|
7921
|
+
</xsl:otherwise>
|
7922
|
+
</xsl:choose>
|
7923
|
+
</xsl:template>
|
7924
|
+
|
7925
|
+
<!-- outer table with line numbers for sourcecode -->
|
7926
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
7927
|
+
<fo:block>
|
7928
|
+
<fo:table width="100%" table-layout="fixed">
|
7929
|
+
<xsl:copy-of select="@id"/>
|
7930
|
+
<fo:table-column column-width="8%"/>
|
7931
|
+
<fo:table-column column-width="92%"/>
|
7932
|
+
<fo:table-body>
|
7933
|
+
<xsl:apply-templates/>
|
7934
|
+
</fo:table-body>
|
7935
|
+
</fo:table>
|
7936
|
+
</fo:block>
|
7937
|
+
</xsl:template>
|
7938
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
7939
|
+
<xsl:apply-templates/>
|
7940
|
+
</xsl:template>
|
7941
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
7942
|
+
<fo:table-row>
|
7943
|
+
<xsl:apply-templates/>
|
7944
|
+
</fo:table-row>
|
7945
|
+
</xsl:template>
|
7946
|
+
<!-- first td with line numbers -->
|
7947
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
7948
|
+
<fo:table-cell>
|
7949
|
+
<fo:block>
|
7950
|
+
|
7951
|
+
<!-- set attibutes for line numbers - same as sourcecode -->
|
7952
|
+
<xsl:variable name="sourcecode_attributes">
|
7953
|
+
<xsl:for-each select="following-sibling::*[local-name() = 'td']/*[local-name() = 'sourcecode']">
|
7954
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
7955
|
+
</xsl:for-each>
|
7956
|
+
</xsl:variable>
|
7957
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
7958
|
+
<xsl:attribute name="{local-name()}">
|
7959
|
+
<xsl:value-of select="."/>
|
7960
|
+
</xsl:attribute>
|
7961
|
+
</xsl:for-each>
|
7962
|
+
|
7963
|
+
<xsl:apply-templates/>
|
7964
|
+
</fo:block>
|
7965
|
+
</fo:table-cell>
|
7966
|
+
</xsl:template>
|
7814
7967
|
|
7968
|
+
<!-- second td with sourcecode -->
|
7969
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
7970
|
+
<fo:table-cell>
|
7971
|
+
<fo:block>
|
7972
|
+
<xsl:apply-templates/>
|
7973
|
+
</fo:block>
|
7974
|
+
</fo:table-cell>
|
7815
7975
|
</xsl:template>
|
7976
|
+
<!-- END outer table with line numbers for sourcecode -->
|
7816
7977
|
|
7817
7978
|
<xsl:template name="add_spaces_to_sourcecode">
|
7818
7979
|
<xsl:variable name="text_step1">
|
@@ -8043,7 +8204,25 @@
|
|
8043
8204
|
<xsl:template match="*[local-name()='pre']" name="pre">
|
8044
8205
|
<fo:block xsl:use-attribute-sets="pre-style">
|
8045
8206
|
<xsl:copy-of select="@id"/>
|
8046
|
-
<xsl:
|
8207
|
+
<xsl:choose>
|
8208
|
+
|
8209
|
+
<xsl:when test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name()='td'][1][not(preceding-sibling::*)]"> <!-- pre in the first td in the table with @linenums = 'true' -->
|
8210
|
+
<xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
|
8211
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
8212
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
8213
|
+
</xsl:if>
|
8214
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
8215
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
8216
|
+
<mtext><xsl:value-of select="."/></mtext>
|
8217
|
+
</math>
|
8218
|
+
</fo:instream-foreign-object>
|
8219
|
+
</xsl:when>
|
8220
|
+
|
8221
|
+
<xsl:otherwise>
|
8222
|
+
<xsl:apply-templates/>
|
8223
|
+
</xsl:otherwise>
|
8224
|
+
|
8225
|
+
</xsl:choose>
|
8047
8226
|
</fo:block>
|
8048
8227
|
</xsl:template>
|
8049
8228
|
<!-- =============== -->
|
@@ -8747,6 +8926,7 @@
|
|
8747
8926
|
<xsl:variable name="padding">
|
8748
8927
|
|
8749
8928
|
<xsl:choose>
|
8929
|
+
<xsl:when test="ancestor::*[local-name() = 'note'] and ancestor::*[local-name() = 'name']">1</xsl:when>
|
8750
8930
|
<xsl:when test="$depth = 2">2</xsl:when>
|
8751
8931
|
<xsl:otherwise>1</xsl:otherwise>
|
8752
8932
|
</xsl:choose>
|
@@ -9514,14 +9694,17 @@
|
|
9514
9694
|
<fo:block>
|
9515
9695
|
<fo:inline>
|
9516
9696
|
|
9517
|
-
|
9518
|
-
|
9697
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
9698
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
9699
|
+
</xsl:apply-templates>
|
9519
9700
|
</fo:inline>
|
9520
9701
|
</fo:block>
|
9521
9702
|
</fo:list-item-label>
|
9522
9703
|
<fo:list-item-body start-indent="body-start()">
|
9523
9704
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
|
9524
|
-
<xsl:call-template name="processBibitem"
|
9705
|
+
<xsl:call-template name="processBibitem">
|
9706
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
9707
|
+
</xsl:call-template>
|
9525
9708
|
</fo:block>
|
9526
9709
|
</fo:list-item-body>
|
9527
9710
|
</fo:list-item>
|
@@ -9530,166 +9713,51 @@
|
|
9530
9713
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
9531
9714
|
|
9532
9715
|
<xsl:template name="processBibitem">
|
9716
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
9533
9717
|
|
9534
|
-
<!-- start
|
9535
|
-
<xsl:if test="
|
9718
|
+
<!-- start bibitem processing -->
|
9719
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
9536
9720
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
9537
9721
|
</xsl:if>
|
9722
|
+
|
9723
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
9724
|
+
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
9725
|
+
</xsl:apply-templates>
|
9538
9726
|
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
9539
|
-
<!-- end
|
9727
|
+
<!-- end bibitem processing -->
|
9540
9728
|
|
9541
9729
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
9542
9730
|
|
9543
|
-
<xsl:template name="
|
9544
|
-
<xsl:
|
9545
|
-
|
9546
|
-
|
9547
|
-
|
9548
|
-
|
9549
|
-
|
9550
|
-
|
9551
|
-
|
9552
|
-
|
9553
|
-
|
9554
|
-
|
9555
|
-
<xsl:if test="$type != ''">
|
9556
|
-
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
9557
|
-
</xsl:if> -->
|
9558
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
9559
|
-
</xsl:otherwise>
|
9560
|
-
</xsl:choose>
|
9561
|
-
</xsl:template> <!-- processBibitemDocId -->
|
9731
|
+
<xsl:template match="*[local-name() = 'title']" mode="title">
|
9732
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
9733
|
+
</xsl:template>
|
9734
|
+
|
9735
|
+
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
9736
|
+
|
9737
|
+
<xsl:template match="*[local-name() = 'formattedref']">
|
9738
|
+
<!-- <xsl:if test="$namespace = 'unece' or $namespace = 'unece-rec'">
|
9739
|
+
<xsl:text>, </xsl:text>
|
9740
|
+
</xsl:if> -->
|
9741
|
+
<xsl:apply-templates/>
|
9742
|
+
</xsl:template>
|
9562
9743
|
|
9563
|
-
<xsl:template name="
|
9744
|
+
<xsl:template match="*[local-name() = 'biblio-tag']">
|
9745
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
9564
9746
|
<xsl:choose>
|
9565
|
-
<xsl:when test="
|
9566
|
-
<
|
9567
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
9568
|
-
</author>
|
9747
|
+
<xsl:when test="$biblio_tag_part = 'first' and *[local-name() = 'tab']">
|
9748
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
9569
9749
|
</xsl:when>
|
9570
|
-
<xsl:when test="
|
9571
|
-
<
|
9572
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
9573
|
-
<xsl:text> </xsl:text>
|
9574
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
9575
|
-
</author>
|
9576
|
-
</xsl:when>
|
9577
|
-
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
9578
|
-
<author>
|
9579
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
9580
|
-
<xsl:text> </xsl:text>
|
9581
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
9582
|
-
</author>
|
9750
|
+
<xsl:when test="$biblio_tag_part = 'last'">
|
9751
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
9583
9752
|
</xsl:when>
|
9584
9753
|
<xsl:otherwise>
|
9585
9754
|
<xsl:apply-templates/>
|
9586
9755
|
</xsl:otherwise>
|
9587
9756
|
</xsl:choose>
|
9588
|
-
</xsl:template> <!-- processPersonalAuthor -->
|
9589
|
-
|
9590
|
-
<xsl:template name="renderDate">
|
9591
|
-
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
9592
|
-
<xsl:value-of select="*[local-name() = 'on']"/>
|
9593
|
-
</xsl:if>
|
9594
|
-
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
9595
|
-
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
9596
|
-
</xsl:if>
|
9597
|
-
</xsl:template>
|
9598
|
-
|
9599
|
-
<xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
9600
|
-
<xsl:value-of select="translate(.,'. ','')"/>
|
9601
9757
|
</xsl:template>
|
9602
9758
|
|
9603
|
-
<xsl:template match="*[local-name() = '
|
9604
|
-
<xsl:
|
9605
|
-
</xsl:template>
|
9606
|
-
|
9607
|
-
<xsl:template match="*[local-name() = 'title']" mode="title">
|
9608
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
9609
|
-
</xsl:template>
|
9610
|
-
|
9611
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
|
9612
|
-
<!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
|
9613
|
-
<fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
|
9614
|
-
<xsl:apply-templates/>
|
9615
|
-
</fo:inline>
|
9616
|
-
</xsl:template>
|
9617
|
-
|
9618
|
-
<!-- bibitem/note renders as footnote -->
|
9619
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
|
9620
|
-
|
9621
|
-
<!-- list of footnotes to calculate actual footnotes number -->
|
9622
|
-
<xsl:variable name="p_fn_">
|
9623
|
-
<xsl:call-template name="get_fn_list"/>
|
9624
|
-
</xsl:variable>
|
9625
|
-
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
9626
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
9627
|
-
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
9628
|
-
<!-- fn sequence number in document -->
|
9629
|
-
<xsl:variable name="current_fn_number">
|
9630
|
-
<xsl:choose>
|
9631
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
9632
|
-
<xsl:otherwise>
|
9633
|
-
<!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
|
9634
|
-
<xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
|
9635
|
-
</xsl:otherwise>
|
9636
|
-
</xsl:choose>
|
9637
|
-
</xsl:variable>
|
9638
|
-
<fo:footnote>
|
9639
|
-
<xsl:variable name="number">
|
9640
|
-
|
9641
|
-
<xsl:choose>
|
9642
|
-
<xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
|
9643
|
-
<xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
|
9644
|
-
</xsl:when>
|
9645
|
-
<xsl:otherwise>
|
9646
|
-
<xsl:value-of select="$current_fn_number"/>
|
9647
|
-
</xsl:otherwise>
|
9648
|
-
</xsl:choose>
|
9649
|
-
|
9650
|
-
</xsl:variable>
|
9651
|
-
|
9652
|
-
<xsl:variable name="current_fn_number_text">
|
9653
|
-
<xsl:value-of select="$number"/>
|
9654
|
-
|
9655
|
-
</xsl:variable>
|
9656
|
-
|
9657
|
-
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
9658
|
-
<fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
|
9659
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
9660
|
-
</fo:basic-link>
|
9661
|
-
</fo:inline>
|
9662
|
-
<fo:footnote-body>
|
9663
|
-
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
9664
|
-
<fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
9665
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
9666
|
-
</fo:inline>
|
9667
|
-
<xsl:apply-templates/>
|
9668
|
-
</fo:block>
|
9669
|
-
</fo:footnote-body>
|
9670
|
-
</fo:footnote>
|
9671
|
-
</xsl:template>
|
9672
|
-
|
9673
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
|
9674
|
-
<xsl:text> edition </xsl:text>
|
9675
|
-
<xsl:value-of select="."/>
|
9676
|
-
</xsl:template>
|
9677
|
-
|
9678
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
|
9679
|
-
<xsl:text> (</xsl:text>
|
9680
|
-
<fo:inline xsl:use-attribute-sets="link-style">
|
9681
|
-
<fo:basic-link external-destination="." fox:alt-text=".">
|
9682
|
-
<xsl:value-of select="."/>
|
9683
|
-
</fo:basic-link>
|
9684
|
-
</fo:inline>
|
9685
|
-
<xsl:text>)</xsl:text>
|
9686
|
-
</xsl:template>
|
9687
|
-
|
9688
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
9689
|
-
|
9690
|
-
<xsl:template match="*[local-name() = 'formattedref']">
|
9691
|
-
|
9692
|
-
<xsl:apply-templates/>
|
9759
|
+
<xsl:template match="*[local-name() = 'biblio-tag']/*[local-name() = 'tab']" priority="2">
|
9760
|
+
<xsl:text> </xsl:text>
|
9693
9761
|
</xsl:template>
|
9694
9762
|
|
9695
9763
|
<!-- ======================= -->
|
@@ -10118,6 +10186,12 @@
|
|
10118
10186
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
10119
10187
|
<xsl:apply-templates mode="update_xml_step1"/>
|
10120
10188
|
</xsl:template>
|
10189
|
+
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10190
|
+
<xsl:copy>
|
10191
|
+
<xsl:copy-of select="@*"/>
|
10192
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
10193
|
+
</xsl:copy>
|
10194
|
+
</xsl:template>
|
10121
10195
|
<!-- =========================================================================== -->
|
10122
10196
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10123
10197
|
<!-- =========================================================================== -->
|
@@ -10598,6 +10672,10 @@
|
|
10598
10672
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
10599
10673
|
</xsl:template>
|
10600
10674
|
|
10675
|
+
<xsl:template name="getDocumentId_fromCurrentNode">
|
10676
|
+
<xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
|
10677
|
+
</xsl:template>
|
10678
|
+
|
10601
10679
|
<xsl:template name="namespaceCheck">
|
10602
10680
|
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
10603
10681
|
<xsl:variable name="XSLNS">
|