metanorma-jis 0.3.5 → 0.3.7
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/html2doc/lists.rb +1 -1
- data/lib/isodoc/jis/base_convert.rb +1 -1
- data/lib/isodoc/jis/figure.rb +1 -1
- data/lib/isodoc/jis/html_convert.rb +1 -1
- data/lib/isodoc/jis/i18n-ja.yaml +1 -0
- data/lib/isodoc/jis/i18n.rb +1 -1
- data/lib/isodoc/jis/init.rb +2 -2
- data/lib/isodoc/jis/jis.international-standard.xsl +1332 -207
- data/lib/isodoc/jis/metadata.rb +1 -1
- data/lib/isodoc/jis/pdf_convert.rb +1 -1
- data/lib/isodoc/jis/presentation_section.rb +1 -1
- data/lib/isodoc/jis/presentation_xml_convert.rb +38 -2
- data/lib/isodoc/jis/table.rb +1 -1
- data/lib/isodoc/jis/word_cleanup.rb +2 -2
- data/lib/isodoc/jis/word_convert.rb +1 -1
- data/lib/isodoc/jis/xref.rb +55 -17
- data/lib/metanorma/jis/biblio-standoc.rng +13 -0
- data/lib/metanorma/jis/biblio.rng +19 -12
- data/lib/metanorma/jis/cleanup.rb +2 -2
- data/lib/metanorma/jis/converter.rb +11 -11
- data/lib/metanorma/jis/front.rb +2 -2
- data/lib/metanorma/jis/processor.rb +15 -6
- data/lib/metanorma/jis/relaton-jis.rng +1 -0
- data/lib/metanorma/jis/validate.rb +2 -2
- data/lib/metanorma/jis/version.rb +2 -2
- data/lib/metanorma/jis.rb +1 -1
- data/lib/metanorma-jis.rb +1 -1
- data/lib/relaton/render-jis/general.rb +2 -2
- data/lib/relaton/render-jis/parse.rb +8 -4
- data/metanorma-jis.gemspec +1 -1
- metadata +2 -2
@@ -47,11 +47,21 @@
|
|
47
47
|
</xsl:for-each>
|
48
48
|
</xsl:variable>
|
49
49
|
|
50
|
+
<xsl:variable name="pageWidthA5">148</xsl:variable>
|
51
|
+
<xsl:variable name="pageHeightA5">210</xsl:variable>
|
52
|
+
|
50
53
|
<xsl:template match="/">
|
51
54
|
|
52
55
|
<fo:root xml:lang="{$lang}">
|
53
56
|
<xsl:variable name="root-style">
|
54
57
|
<root-style xsl:use-attribute-sets="root-style">
|
58
|
+
<xsl:if test="$vertical_layout = 'true'">
|
59
|
+
<xsl:attribute name="font-family">Noto Serif JP, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
|
60
|
+
<xsl:attribute name="font-family-generic">Serif</xsl:attribute>
|
61
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
62
|
+
<xsl:attribute name="font-weight">200</xsl:attribute>
|
63
|
+
<xsl:attribute name="color">rgb(34,31,31)</xsl:attribute>
|
64
|
+
</xsl:if>
|
55
65
|
</root-style>
|
56
66
|
</xsl:variable>
|
57
67
|
<xsl:call-template name="insertRootStyle">
|
@@ -69,6 +79,20 @@
|
|
69
79
|
<fo:region-end region-name="right-region" extent="22mm"/>
|
70
80
|
</fo:simple-page-master>
|
71
81
|
|
82
|
+
<fo:simple-page-master master-name="cover-page_2024" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
|
83
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
84
|
+
fo:region-body/@margin-top = left margin
|
85
|
+
fo:region-body/@margin-bottom = right margin
|
86
|
+
fo:region-body/margin-left = bottom margin
|
87
|
+
fo:region-body/margin-right = top margin
|
88
|
+
-->
|
89
|
+
<fo:region-body margin-top="6mm" margin-bottom="6mm" margin-left="12.8mm" margin-right="58mm" writing-mode="tb-rl"/>
|
90
|
+
<fo:region-before region-name="header" extent="58mm" precedence="true"/>
|
91
|
+
<fo:region-after region-name="footer" extent="12.8mm"/>
|
92
|
+
<fo:region-start region-name="left-region" extent="20mm"/> <!-- 6 20mm -->
|
93
|
+
<fo:region-end region-name="right-region" extent="6.8mm"/> <!-- 17mm -->
|
94
|
+
</fo:simple-page-master>
|
95
|
+
|
72
96
|
<fo:simple-page-master master-name="first_page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
73
97
|
<xsl:if test="$vertical_layout = 'true'">
|
74
98
|
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
@@ -139,6 +163,38 @@
|
|
139
163
|
</fo:repeatable-page-master-alternatives>
|
140
164
|
</fo:page-sequence-master>
|
141
165
|
|
166
|
+
<xsl:if test="1 = 3">
|
167
|
+
<fo:simple-page-master master-name="document_toc_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
168
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
169
|
+
fo:region-body/@margin-top = left margin
|
170
|
+
fo:region-body/@margin-bottom = right margin
|
171
|
+
fo:region-body/margin-left = bottom margin
|
172
|
+
fo:region-body/margin-right = top margin
|
173
|
+
-->
|
174
|
+
<!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
|
175
|
+
<fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="30mm" margin-right="30mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
|
176
|
+
<fo:region-before region-name="header" extent="30mm"/> <!-- background-color="yellow" -->
|
177
|
+
<fo:region-after region-name="footer" extent="210mm" writing-mode="tb-rl" background-color="green"/> <!-- 30 background-color="green" -->
|
178
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm" writing-mode="tb-rl" background-color="blue"/> <!-- background-color="blue" -->
|
179
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
|
180
|
+
</fo:simple-page-master>
|
181
|
+
</xsl:if>
|
182
|
+
|
183
|
+
<fo:simple-page-master master-name="document_toc_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
184
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
185
|
+
fo:region-body/@margin-top = left margin
|
186
|
+
fo:region-body/@margin-bottom = right margin
|
187
|
+
fo:region-body/margin-left = bottom margin
|
188
|
+
fo:region-body/margin-right = top margin
|
189
|
+
-->
|
190
|
+
<!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
|
191
|
+
<fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="38mm" margin-left="30mm" margin-right="30mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
|
192
|
+
<fo:region-before region-name="header" extent="30mm"/> <!-- background-color="yellow" -->
|
193
|
+
<fo:region-after region-name="footer" extent="30mm"/> <!-- background-color="green" -->
|
194
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
|
195
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
|
196
|
+
</fo:simple-page-master>
|
197
|
+
|
142
198
|
<fo:page-sequence-master master-name="document_preface">
|
143
199
|
<fo:repeatable-page-master-alternatives>
|
144
200
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
@@ -161,6 +217,60 @@
|
|
161
217
|
</fo:repeatable-page-master-alternatives>
|
162
218
|
</fo:page-sequence-master>
|
163
219
|
|
220
|
+
<fo:simple-page-master master-name="document_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
221
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
222
|
+
fo:region-body/@margin-top = left margin
|
223
|
+
fo:region-body/@margin-bottom = right margin
|
224
|
+
fo:region-body/margin-left = bottom margin
|
225
|
+
fo:region-body/margin-right = top margin
|
226
|
+
-->
|
227
|
+
<!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
|
228
|
+
<fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
|
229
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/> <!-- background-color="yellow" -->
|
230
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
|
231
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
|
232
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
|
233
|
+
</fo:simple-page-master>
|
234
|
+
|
235
|
+
<fo:simple-page-master master-name="document_2024_page" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
236
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
237
|
+
fo:region-body/@margin-top = left margin
|
238
|
+
fo:region-body/@margin-bottom = right margin
|
239
|
+
fo:region-body/margin-left = bottom margin
|
240
|
+
fo:region-body/margin-right = top margin
|
241
|
+
-->
|
242
|
+
<!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
|
243
|
+
<fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
|
244
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/> <!-- background-color="yellow" -->
|
245
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
|
246
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
|
247
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
|
248
|
+
</fo:simple-page-master>
|
249
|
+
<fo:simple-page-master master-name="document_2024_last" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
250
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
251
|
+
fo:region-body/@margin-top = left margin
|
252
|
+
fo:region-body/@margin-bottom = right margin
|
253
|
+
fo:region-body/margin-left = bottom margin
|
254
|
+
fo:region-body/margin-right = top margin
|
255
|
+
-->
|
256
|
+
<!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
|
257
|
+
<fo:region-body margin-top="194mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
|
258
|
+
<fo:region-before region-name="header-last" extent="{$marginTop}mm" writing-mode="tb-rl"/> <!-- background-color="yellow" -->
|
259
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
|
260
|
+
<!-- for boilerplate:
|
261
|
+
reserve paper space in left-region, but text will render in the header
|
262
|
+
-->
|
263
|
+
<fo:region-start region-name="left-region" extent="194mm"/> <!-- background-color="blue" background-color="rgb(230,230,230)" -->
|
264
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
|
265
|
+
</fo:simple-page-master>
|
266
|
+
|
267
|
+
<fo:page-sequence-master master-name="document_2024_with_last">
|
268
|
+
<fo:repeatable-page-master-alternatives>
|
269
|
+
<fo:conditional-page-master-reference page-position="last" master-reference="document_2024_last"/>
|
270
|
+
<fo:conditional-page-master-reference page-position="any" master-reference="document_2024_page"/>
|
271
|
+
</fo:repeatable-page-master-alternatives>
|
272
|
+
</fo:page-sequence-master>
|
273
|
+
|
164
274
|
<fo:simple-page-master master-name="commentary_first_page_even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
165
275
|
<xsl:if test="$vertical_layout = 'true'">
|
166
276
|
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
@@ -224,6 +334,19 @@
|
|
224
334
|
</fo:repeatable-page-master-alternatives>
|
225
335
|
</fo:page-sequence-master>
|
226
336
|
|
337
|
+
<fo:simple-page-master master-name="back-page_2024" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
|
338
|
+
<!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
|
339
|
+
fo:region-body/@margin-top = left margin
|
340
|
+
fo:region-body/@margin-bottom = right margin
|
341
|
+
fo:region-body/margin-left = bottom margin
|
342
|
+
fo:region-body/margin-right = top margin
|
343
|
+
-->
|
344
|
+
<fo:region-body margin-top="5mm" margin-bottom="122mm" margin-left="6.5mm" margin-right="70mm" writing-mode="tb-rl"/>
|
345
|
+
<fo:region-before region-name="header" extent="70mm"/>
|
346
|
+
<fo:region-after region-name="footer" extent="6.5mm"/>
|
347
|
+
<fo:region-start region-name="left-region" extent="5mm"/>
|
348
|
+
<fo:region-end region-name="right-region" extent="122mm"/>
|
349
|
+
</fo:simple-page-master>
|
227
350
|
</fo:layout-master-set>
|
228
351
|
|
229
352
|
<fo:declarations>
|
@@ -290,20 +413,51 @@
|
|
290
413
|
<xsl:variable name="title_ja" select="/*/jis:bibdata/jis:title[@language = 'ja' and @type = 'main']"/>
|
291
414
|
<xsl:variable name="title_en" select="/*/jis:bibdata/jis:title[@language = 'en' and @type = 'main']"/>
|
292
415
|
|
293
|
-
<xsl:
|
294
|
-
|
295
|
-
<xsl:
|
296
|
-
|
416
|
+
<xsl:variable name="cover_header_footer_background_value" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:color-header-footer-background)"/>
|
417
|
+
<xsl:variable name="cover_header_footer_background_">
|
418
|
+
<xsl:value-of select="$cover_header_footer_background_value"/>
|
419
|
+
<xsl:if test="$cover_header_footer_background_value = ''">#0B0968</xsl:if>
|
420
|
+
</xsl:variable>
|
421
|
+
<xsl:variable name="cover_header_footer_background" select="normalize-space($cover_header_footer_background_)"/>
|
422
|
+
|
423
|
+
<xsl:variable name="docidentifier_JIS_" select="/*/jis:bibdata/jis:docidentifier[@type = 'JIS']"/>
|
424
|
+
<xsl:variable name="docidentifier_JIS">
|
425
|
+
<xsl:choose>
|
426
|
+
<xsl:when test="contains($docidentifier_JIS_, ':')"><xsl:value-of select="substring-before($docidentifier_JIS_, ':')"/></xsl:when>
|
427
|
+
<xsl:otherwise><xsl:value-of select="$docidentifier_JIS_"/></xsl:otherwise>
|
428
|
+
</xsl:choose>
|
429
|
+
</xsl:variable>
|
430
|
+
<xsl:variable name="edition" select="/jis:jis-standard/jis:bibdata/jis:edition[@language = 'ja' and @numberonly = 'true']"/>
|
297
431
|
|
432
|
+
<xsl:choose>
|
433
|
+
<xsl:when test="$vertical_layout = 'true'">
|
434
|
+
<xsl:call-template name="insertCoverPage2024">
|
435
|
+
<xsl:with-param name="num" select="$num"/>
|
436
|
+
</xsl:call-template>
|
437
|
+
</xsl:when>
|
438
|
+
<xsl:otherwise>
|
439
|
+
<xsl:call-template name="insertCoverPage">
|
440
|
+
<xsl:with-param name="num" select="$num"/>
|
441
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
442
|
+
</xsl:call-template>
|
443
|
+
</xsl:otherwise>
|
444
|
+
</xsl:choose>
|
445
|
+
|
446
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
298
447
|
<xsl:call-template name="insertInnerCoverPage">
|
299
448
|
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
300
449
|
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
301
450
|
</xsl:call-template>
|
451
|
+
</xsl:if>
|
302
452
|
|
303
453
|
<!-- ========================== -->
|
304
454
|
<!-- Contents and preface pages -->
|
305
455
|
<!-- ========================== -->
|
306
456
|
|
457
|
+
<xsl:variable name="bibdata">
|
458
|
+
<xsl:copy-of select="/jis:jis-standard/jis:bibdata"/>
|
459
|
+
</xsl:variable>
|
460
|
+
|
307
461
|
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'clause' and @type = 'contributors')]">
|
308
462
|
<xsl:sort select="@displayorder" data-type="number"/>
|
309
463
|
|
@@ -311,23 +465,42 @@
|
|
311
465
|
<xsl:when test="local-name() = 'clause' and @type = 'toc'">
|
312
466
|
<fo:page-sequence master-reference="document_toc" force-page-count="no-force">
|
313
467
|
|
468
|
+
<xsl:if test="$vertical_layout = 'true'">
|
469
|
+
<xsl:attribute name="master-reference">document_toc_2024</xsl:attribute>
|
470
|
+
<xsl:attribute name="format">二</xsl:attribute>
|
471
|
+
</xsl:if>
|
472
|
+
|
314
473
|
<xsl:if test="position() = 1">
|
315
474
|
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
316
475
|
</xsl:if>
|
317
476
|
|
318
|
-
<xsl:
|
319
|
-
<xsl:
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
<xsl:
|
325
|
-
<xsl:
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
477
|
+
<xsl:choose>
|
478
|
+
<xsl:when test="$vertical_layout = 'true'">
|
479
|
+
<xsl:call-template name="insertLeftRightRegions">
|
480
|
+
<xsl:with-param name="cover_header_footer_background" select="$cover_header_footer_background"/>
|
481
|
+
<xsl:with-param name="title_ja" select="$title_ja"/>
|
482
|
+
<xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
|
483
|
+
<xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
|
484
|
+
<xsl:with-param name="edition" select="$edition"/>
|
485
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
486
|
+
</xsl:call-template>
|
487
|
+
</xsl:when>
|
488
|
+
<xsl:otherwise>
|
489
|
+
<xsl:call-template name="insertHeaderFooter">
|
490
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
491
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
492
|
+
<xsl:with-param name="section">preface</xsl:with-param>
|
493
|
+
<xsl:with-param name="section_title">
|
494
|
+
<fo:inline font-family="IPAexGothic">
|
495
|
+
<xsl:text> </xsl:text>
|
496
|
+
<xsl:call-template name="getLocalizedString">
|
497
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
498
|
+
</xsl:call-template>
|
499
|
+
</fo:inline>
|
500
|
+
</xsl:with-param>
|
501
|
+
</xsl:call-template>
|
502
|
+
</xsl:otherwise>
|
503
|
+
</xsl:choose>
|
331
504
|
|
332
505
|
<fo:flow flow-name="xsl-region-body">
|
333
506
|
|
@@ -365,6 +538,11 @@
|
|
365
538
|
<!-- Preface pages -->
|
366
539
|
<fo:page-sequence master-reference="document_preface" force-page-count="no-force">
|
367
540
|
|
541
|
+
<xsl:if test="$vertical_layout = 'true'">
|
542
|
+
<xsl:attribute name="master-reference">document_2024</xsl:attribute>
|
543
|
+
<xsl:attribute name="format">二</xsl:attribute>
|
544
|
+
</xsl:if>
|
545
|
+
|
368
546
|
<xsl:if test="position() = 1">
|
369
547
|
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
370
548
|
</xsl:if>
|
@@ -375,11 +553,27 @@
|
|
375
553
|
</fo:block>
|
376
554
|
</fo:static-content>
|
377
555
|
|
378
|
-
<xsl:
|
379
|
-
<xsl:
|
380
|
-
|
381
|
-
|
382
|
-
|
556
|
+
<xsl:choose>
|
557
|
+
<xsl:when test="$vertical_layout = 'true'">
|
558
|
+
<xsl:call-template name="insertLeftRightRegions">
|
559
|
+
<xsl:with-param name="cover_header_footer_background" select="$cover_header_footer_background"/>
|
560
|
+
<xsl:with-param name="title_ja" select="$title_ja"/>
|
561
|
+
<xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
|
562
|
+
<xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
|
563
|
+
<xsl:with-param name="edition" select="$edition"/>
|
564
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
565
|
+
<!-- <xsl:with-param name="insertLast">true</xsl:with-param> -->
|
566
|
+
<xsl:with-param name="bibdata" select="$bibdata"/>
|
567
|
+
</xsl:call-template>
|
568
|
+
</xsl:when>
|
569
|
+
<xsl:otherwise>
|
570
|
+
<xsl:call-template name="insertHeaderFooter">
|
571
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
572
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
573
|
+
<xsl:with-param name="section">preface</xsl:with-param>
|
574
|
+
</xsl:call-template>
|
575
|
+
</xsl:otherwise>
|
576
|
+
</xsl:choose>
|
383
577
|
|
384
578
|
<fo:flow flow-name="xsl-region-body">
|
385
579
|
|
@@ -398,6 +592,8 @@
|
|
398
592
|
</xsl:choose>
|
399
593
|
</xsl:for-each>
|
400
594
|
|
595
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
596
|
+
|
401
597
|
<!-- Document type rendering -->
|
402
598
|
<fo:page-sequence master-reference="document_preface" force-page-count="no-force">
|
403
599
|
<xsl:call-template name="insertHeaderFooter">
|
@@ -418,6 +614,7 @@
|
|
418
614
|
</fo:block-container>
|
419
615
|
</fo:flow>
|
420
616
|
</fo:page-sequence>
|
617
|
+
</xsl:if>
|
421
618
|
|
422
619
|
<!-- ========================== -->
|
423
620
|
<!-- END Contents and preface pages -->
|
@@ -489,18 +686,33 @@
|
|
489
686
|
<xsl:variable name="isCommentary" select="normalize-space(.//jis:annex[@commentary = 'true'] and 1 = 1)"/> <!-- true or false -->
|
490
687
|
<!-- DEBUG: <xsl:copy-of select="."/> -->
|
491
688
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
689
|
+
|
690
|
+
<xsl:choose>
|
691
|
+
<xsl:when test="$vertical_layout = 'true'">
|
692
|
+
<xsl:attribute name="master-reference">document_2024</xsl:attribute>
|
693
|
+
<xsl:if test="position() = last()">
|
694
|
+
<xsl:attribute name="master-reference">document_2024_with_last</xsl:attribute>
|
695
|
+
</xsl:if>
|
696
|
+
|
697
|
+
<xsl:attribute name="format">二</xsl:attribute>
|
698
|
+
<!-- <xsl:attribute name="fox:number-conversion-features">ア</xsl:attribute> -->
|
699
|
+
</xsl:when>
|
700
|
+
<xsl:otherwise>
|
701
|
+
<xsl:if test="position() = 1">
|
702
|
+
<xsl:attribute name="master-reference">document_first_section</xsl:attribute>
|
703
|
+
</xsl:if>
|
704
|
+
<xsl:if test="@orientation = 'landscape'">
|
705
|
+
<xsl:attribute name="master-reference">document-<xsl:value-of select="@orientation"/></xsl:attribute>
|
706
|
+
</xsl:if>
|
707
|
+
<xsl:if test="$isCommentary = 'true'">
|
708
|
+
<xsl:attribute name="master-reference">document_commentary_section</xsl:attribute>
|
709
|
+
</xsl:if>
|
710
|
+
<xsl:if test="position() = 1">
|
711
|
+
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
712
|
+
</xsl:if>
|
713
|
+
</xsl:otherwise>
|
714
|
+
</xsl:choose>
|
715
|
+
|
504
716
|
<fo:static-content flow-name="xsl-footnote-separator">
|
505
717
|
<fo:block>
|
506
718
|
<fo:leader leader-pattern="rule" leader-length="15%"/>
|
@@ -509,7 +721,10 @@
|
|
509
721
|
|
510
722
|
<xsl:variable name="section_title">
|
511
723
|
<xsl:if test="$isCommentary = 'true'">
|
512
|
-
<fo:inline
|
724
|
+
<fo:inline padding-left="2mm">
|
725
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
726
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
727
|
+
</xsl:if>
|
513
728
|
<xsl:text> </xsl:text>
|
514
729
|
<xsl:call-template name="getLocalizedString">
|
515
730
|
<xsl:with-param name="key">commentary</xsl:with-param>
|
@@ -525,14 +740,30 @@
|
|
525
740
|
</xsl:choose>
|
526
741
|
</xsl:variable>
|
527
742
|
|
528
|
-
<xsl:
|
529
|
-
<xsl:
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
743
|
+
<xsl:choose>
|
744
|
+
<xsl:when test="$vertical_layout = 'true'">
|
745
|
+
<xsl:call-template name="insertLeftRightRegions">
|
746
|
+
<xsl:with-param name="cover_header_footer_background" select="$cover_header_footer_background"/>
|
747
|
+
<xsl:with-param name="title_ja" select="$title_ja"/>
|
748
|
+
<xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
|
749
|
+
<xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
|
750
|
+
<xsl:with-param name="edition" select="$edition"/>
|
751
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
752
|
+
<xsl:with-param name="insertLast" select="normalize-space(position() = last())"/>
|
753
|
+
<xsl:with-param name="bibdata" select="$bibdata"/>
|
754
|
+
</xsl:call-template>
|
755
|
+
</xsl:when>
|
756
|
+
<xsl:otherwise>
|
757
|
+
<xsl:call-template name="insertHeaderFooter">
|
758
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
759
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
760
|
+
<xsl:with-param name="section" select="$section"/>
|
761
|
+
<xsl:with-param name="section_title">
|
762
|
+
<xsl:copy-of select="$section_title"/>
|
763
|
+
</xsl:with-param>
|
764
|
+
</xsl:call-template>
|
765
|
+
</xsl:otherwise>
|
766
|
+
</xsl:choose>
|
536
767
|
|
537
768
|
<fo:flow flow-name="xsl-region-body">
|
538
769
|
|
@@ -590,6 +821,12 @@
|
|
590
821
|
<!-- <fo:block role="H1" font-family="IPAexGothic" font-size="16pt" text-align="center" margin-top="6mm"><xsl:value-of select="$title_ja"/></fo:block> -->
|
591
822
|
<!-- </xsl:if> -->
|
592
823
|
|
824
|
+
<xsl:if test="$vertical_layout = 'true' and position() = 1">
|
825
|
+
<fo:block font-weight="bold" font-size="12pt" margin-top="5mm" letter-spacing="4mm" margin-left="-6mm">
|
826
|
+
<xsl:value-of select="$i18n_JIS"/>
|
827
|
+
</fo:block>
|
828
|
+
</xsl:if>
|
829
|
+
|
593
830
|
<xsl:apply-templates select="*" mode="page"/>
|
594
831
|
|
595
832
|
<xsl:if test="not(*)">
|
@@ -600,6 +837,13 @@
|
|
600
837
|
</fo:page-sequence>
|
601
838
|
</xsl:for-each>
|
602
839
|
|
840
|
+
<xsl:if test="$vertical_layout = 'true'">
|
841
|
+
<xsl:call-template name="insertBackPage2024">
|
842
|
+
<xsl:with-param name="num" select="$num"/>
|
843
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
844
|
+
</xsl:call-template>
|
845
|
+
</xsl:if>
|
846
|
+
|
603
847
|
</xsl:for-each>
|
604
848
|
|
605
849
|
</xsl:for-each>
|
@@ -623,7 +867,7 @@
|
|
623
867
|
|
624
868
|
<xsl:template match="*[local-name() = 'colon_gothic']">
|
625
869
|
<!-- replace : to : (Fullwidth colon) and render it in the font IPAexGothic -->
|
626
|
-
<fo:inline font-family
|
870
|
+
<fo:inline><xsl:if test="not($vertical_layout = 'true')"><xsl:attribute name="font-family">IPAexGothic</xsl:attribute></xsl:if>:</fo:inline>
|
627
871
|
</xsl:template>
|
628
872
|
|
629
873
|
<xsl:template match="*[local-name()='preface']/*[local-name() = 'clause'][@type = 'toc']" priority="4">
|
@@ -631,47 +875,67 @@
|
|
631
875
|
<xsl:apply-templates/>
|
632
876
|
<xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
|
633
877
|
<!-- fill ToC -->
|
634
|
-
<fo:block role="TOC"
|
878
|
+
<fo:block role="TOC">
|
879
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
880
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
881
|
+
</xsl:if>
|
882
|
+
<xsl:if test="$vertical_layout = 'true'">
|
883
|
+
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
884
|
+
</xsl:if>
|
885
|
+
|
635
886
|
<xsl:if test="$contents/doc[@num = $num]//item[@display = 'true']">
|
636
887
|
<xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true'][@level <= $toc_level or @type='figure' or @type = 'table']">
|
637
888
|
<fo:block role="TOCI">
|
638
889
|
<xsl:choose>
|
639
890
|
<xsl:when test="@type = 'annex' or @type = 'bibliography'">
|
640
|
-
<fo:block space-after="5pt">
|
891
|
+
<fo:block space-after="5pt" role="SKIP">
|
892
|
+
<xsl:if test="$vertical_layout = 'true'">
|
893
|
+
<xsl:attribute name="space-after">8pt</xsl:attribute>
|
894
|
+
</xsl:if>
|
641
895
|
<xsl:call-template name="insertTocItem"/>
|
642
896
|
</fo:block>
|
643
897
|
</xsl:when>
|
644
898
|
<xsl:otherwise>
|
645
|
-
<fo:list-block space-after="5pt">
|
646
|
-
<xsl:
|
647
|
-
<xsl:
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
<xsl:
|
652
|
-
</xsl:
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
899
|
+
<fo:list-block space-after="5pt" role="SKIP">
|
900
|
+
<xsl:if test="$vertical_layout = 'true'">
|
901
|
+
<xsl:attribute name="space-after">8pt</xsl:attribute>
|
902
|
+
</xsl:if>
|
903
|
+
<xsl:choose>
|
904
|
+
<xsl:when test="$vertical_layout = 'true'">
|
905
|
+
<xsl:attribute name="provisional-distance-between-starts">10mm</xsl:attribute>
|
906
|
+
</xsl:when>
|
907
|
+
<xsl:otherwise>
|
908
|
+
<xsl:variable name="provisional-distance-between-starts">
|
909
|
+
<xsl:choose>
|
910
|
+
<xsl:when test="string-length(@section) = 1">5</xsl:when>
|
911
|
+
<xsl:when test="string-length(@section) >= 2"><xsl:value-of select="5 + (string-length(@section) - 1) * 2"/></xsl:when>
|
912
|
+
<xsl:when test="@type = 'annex'">16</xsl:when>
|
913
|
+
<xsl:otherwise>5</xsl:otherwise>
|
914
|
+
</xsl:choose>
|
915
|
+
</xsl:variable>
|
916
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
917
|
+
<xsl:choose>
|
918
|
+
<xsl:when test="$vertical_layout_rotate_clause_numbers = 'true'">
|
919
|
+
<xsl:value-of select="concat($provisional-distance-between-starts * 1.5, 'mm')"/>
|
920
|
+
</xsl:when>
|
921
|
+
<xsl:otherwise>
|
922
|
+
<xsl:value-of select="concat($provisional-distance-between-starts, 'mm')"/>
|
923
|
+
</xsl:otherwise>
|
924
|
+
</xsl:choose>
|
925
|
+
</xsl:attribute>
|
661
926
|
</xsl:otherwise>
|
662
927
|
</xsl:choose>
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
<xsl:if test="@section != '' and @type != 'annex'">
|
928
|
+
<fo:list-item role="SKIP">
|
929
|
+
<fo:list-item-label end-indent="label-end()" role="SKIP">
|
930
|
+
<fo:block role="SKIP">
|
931
|
+
<xsl:if test="not($vertical_layout = 'true') and @section != '' and @type != 'annex'">
|
668
932
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
669
933
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
670
934
|
</xsl:if>
|
671
935
|
<xsl:value-of select="@section"/>
|
672
936
|
</fo:block>
|
673
937
|
</fo:list-item-label>
|
674
|
-
<fo:list-item-body start-indent="body-start()">
|
938
|
+
<fo:list-item-body start-indent="body-start()" role="SKIP">
|
675
939
|
<xsl:call-template name="insertTocItem"/>
|
676
940
|
</fo:list-item-body>
|
677
941
|
</fo:list-item>
|
@@ -686,14 +950,35 @@
|
|
686
950
|
</xsl:template>
|
687
951
|
|
688
952
|
<xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" priority="3">
|
689
|
-
<fo:block text-align="center" font-size="14pt"
|
953
|
+
<fo:block text-align="center" font-size="14pt" margin-top="8.5mm">
|
954
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
955
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
956
|
+
</xsl:if>
|
957
|
+
<xsl:if test="$vertical_layout = 'true'">
|
958
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
959
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
960
|
+
<!-- <xsl:attribute name="margin-top">26mm</xsl:attribute> -->
|
961
|
+
</xsl:if>
|
690
962
|
<!-- Contents -->
|
691
963
|
<!-- <xsl:call-template name="getLocalizedString">
|
692
964
|
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
693
965
|
</xsl:call-template> -->
|
966
|
+
<fo:marker marker-class-name="section_title">
|
967
|
+
<xsl:variable name="section_title"><xsl:apply-templates/></xsl:variable>
|
968
|
+
<xsl:value-of select="translate($section_title, ' ', '')"/>
|
969
|
+
</fo:marker>
|
694
970
|
<xsl:apply-templates/>
|
695
971
|
</fo:block>
|
696
|
-
<fo:block text-align="right"
|
972
|
+
<fo:block text-align="right" margin-top="10mm">
|
973
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
974
|
+
<xsl:attribute name="font-family">IPAexMincho</xsl:attribute>
|
975
|
+
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
976
|
+
</xsl:if>
|
977
|
+
<xsl:if test="$vertical_layout = 'true'">
|
978
|
+
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
979
|
+
<xsl:attribute name="margin-top">1mm</xsl:attribute>
|
980
|
+
<xsl:attribute name="margin-bottom">6mm</xsl:attribute>
|
981
|
+
</xsl:if>
|
697
982
|
<!-- Page -->
|
698
983
|
<xsl:call-template name="getLocalizedString">
|
699
984
|
<xsl:with-param name="key">locality.page</xsl:with-param>
|
@@ -702,12 +987,30 @@
|
|
702
987
|
</xsl:template>
|
703
988
|
|
704
989
|
<xsl:template name="insertTocItem">
|
705
|
-
<fo:block text-align-last="justify" role="
|
990
|
+
<fo:block text-align-last="justify" role="SKIP">
|
706
991
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
707
|
-
<fo:inline
|
992
|
+
<fo:inline>
|
993
|
+
<xsl:if test="$vertical_layout = 'true'">
|
994
|
+
<xsl:attribute name="padding-right">7.5mm</xsl:attribute>
|
995
|
+
</xsl:if>
|
996
|
+
<xsl:apply-templates select="title"/>
|
997
|
+
</fo:inline>
|
708
998
|
<fo:inline keep-together.within-line="always">
|
709
|
-
<fo:leader leader-pattern="dots"
|
710
|
-
|
999
|
+
<fo:leader leader-pattern="dots">
|
1000
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1001
|
+
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
1002
|
+
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
1003
|
+
<xsl:attribute name="baseline-shift">60%</xsl:attribute>
|
1004
|
+
</xsl:if>
|
1005
|
+
</fo:leader>
|
1006
|
+
<fo:inline>
|
1007
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
1008
|
+
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
1009
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1010
|
+
</xsl:if>
|
1011
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1012
|
+
<xsl:attribute name="padding-left">6mm</xsl:attribute>
|
1013
|
+
</xsl:if>
|
711
1014
|
<fo:page-number-citation ref-id="{@id}"/>
|
712
1015
|
</fo:inline>
|
713
1016
|
</fo:inline>
|
@@ -766,6 +1069,250 @@
|
|
766
1069
|
</fo:page-sequence>
|
767
1070
|
</xsl:template> <!-- insertCoverPage -->
|
768
1071
|
|
1072
|
+
<xsl:variable name="i18n_JIS"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">JIS</xsl:with-param></xsl:call-template></xsl:variable>
|
1073
|
+
<xsl:template name="insertCoverPage2024">
|
1074
|
+
<xsl:param name="num"/>
|
1075
|
+
|
1076
|
+
<fo:page-sequence master-reference="cover-page_2024" force-page-count="no-force">
|
1077
|
+
|
1078
|
+
<!-- <xsl:variable name="cover_page_background_1_value" select="normalize-space(//jis:jis-standard/jis:metanorma-extension/jis:presentation-metadata/jis:color-cover-page-background-1)"/>
|
1079
|
+
<xsl:variable name="cover_page_background_1_">
|
1080
|
+
<xsl:value-of select="$cover_page_background_1_value"/>
|
1081
|
+
<xsl:if test="$cover_page_background_1_value = ''">#00063F</xsl:if>
|
1082
|
+
</xsl:variable>
|
1083
|
+
<xsl:variable name="cover_page_background_1" select="normalize-space($cover_page_background_1_)"/>
|
1084
|
+
|
1085
|
+
<xsl:variable name="cover_page_background_2_value" select="normalize-space(//jis:jis-standard/jis:metanorma-extension/jis:presentation-metadata/jis:color-cover-page-background-2)"/>
|
1086
|
+
<xsl:variable name="cover_page_background_2_">
|
1087
|
+
<xsl:value-of select="$cover_page_background_2_value"/>
|
1088
|
+
<xsl:if test="$cover_page_background_2_value = ''">#DBD6BD</xsl:if>
|
1089
|
+
</xsl:variable>
|
1090
|
+
<xsl:variable name="cover_page_background_2" select="normalize-space($cover_page_background_2_)"/> -->
|
1091
|
+
|
1092
|
+
<fo:static-content flow-name="header">
|
1093
|
+
<xsl:call-template name="insertBackgroundPageImage"/>
|
1094
|
+
|
1095
|
+
<!-- vertical bar -->
|
1096
|
+
<!-- <xsl:call-template name="insertBackgroundColor">
|
1097
|
+
<xsl:with-param name="opacity">0.58</xsl:with-param>
|
1098
|
+
<xsl:with-param name="color_background" select="$cover_page_background_1"/>
|
1099
|
+
<xsl:with-param name="width">20mm</xsl:with-param>
|
1100
|
+
<xsl:with-param name="absolute_position">true</xsl:with-param>
|
1101
|
+
</xsl:call-template> -->
|
1102
|
+
|
1103
|
+
<!-- vertical bar -->
|
1104
|
+
<!-- <xsl:call-template name="insertBackgroundColor">
|
1105
|
+
<xsl:with-param name="opacity">0.75</xsl:with-param>
|
1106
|
+
<xsl:with-param name="color_background" select="$cover_page_background_2"/>
|
1107
|
+
<xsl:with-param name="width">46.5mm</xsl:with-param>
|
1108
|
+
<xsl:with-param name="absolute_position">true</xsl:with-param>
|
1109
|
+
<xsl:with-param name="left">20mm</xsl:with-param>
|
1110
|
+
</xsl:call-template> -->
|
1111
|
+
|
1112
|
+
<!-- vertical bar -->
|
1113
|
+
<!-- <xsl:call-template name="insertBackgroundColor">
|
1114
|
+
<xsl:with-param name="opacity">0.75</xsl:with-param>
|
1115
|
+
<xsl:with-param name="color_background" select="$cover_page_background_2"/>
|
1116
|
+
<xsl:with-param name="width">10.7mm</xsl:with-param>
|
1117
|
+
<xsl:with-param name="absolute_position">true</xsl:with-param>
|
1118
|
+
<xsl:with-param name="left">133.8mm</xsl:with-param>
|
1119
|
+
</xsl:call-template> -->
|
1120
|
+
|
1121
|
+
<!-- vertical bar -->
|
1122
|
+
<!-- <xsl:call-template name="insertBackgroundColor">
|
1123
|
+
<xsl:with-param name="opacity">0.58</xsl:with-param>
|
1124
|
+
<xsl:with-param name="color_background" select="$cover_page_background_1"/>
|
1125
|
+
<xsl:with-param name="width">17mm</xsl:with-param>
|
1126
|
+
<xsl:with-param name="absolute_position">true</xsl:with-param>
|
1127
|
+
<xsl:with-param name="left">131mm</xsl:with-param>
|
1128
|
+
</xsl:call-template> -->
|
1129
|
+
|
1130
|
+
</fo:static-content>
|
1131
|
+
|
1132
|
+
<fo:static-content flow-name="left-region">
|
1133
|
+
<fo:table table-layout="fixed" width="9mm" font-size="10pt" font-weight="bold" color="white" margin-left="2.7mm" margin-top="-1mm" line-height="1.5">
|
1134
|
+
<fo:table-column column-width="proportional-column-width(3)"/>
|
1135
|
+
<fo:table-column column-width="proportional-column-width(2.2)"/>
|
1136
|
+
<fo:table-column column-width="proportional-column-width(3)"/>
|
1137
|
+
<fo:table-body>
|
1138
|
+
<fo:table-row height="50mm">
|
1139
|
+
<fo:table-cell>
|
1140
|
+
<fo:block><xsl:value-of select="/*/jis:bibdata/jis:contributor[jis:role/@type = 'publisher']/jis:organization/jis:name/jis:variant[@language = 'ja']"/></fo:block>
|
1141
|
+
</fo:table-cell>
|
1142
|
+
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1143
|
+
<fo:table-cell>
|
1144
|
+
<fo:block><xsl:value-of select="/*/jis:bibdata/jis:contributor[jis:role/@type = 'authorizer']//jis:organization/jis:name"/></fo:block>
|
1145
|
+
</fo:table-cell>
|
1146
|
+
</fo:table-row>
|
1147
|
+
<fo:table-row>
|
1148
|
+
<fo:table-cell>
|
1149
|
+
<fo:block>発行</fo:block>
|
1150
|
+
</fo:table-cell>
|
1151
|
+
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1152
|
+
<fo:table-cell>
|
1153
|
+
<fo:block>審議</fo:block>
|
1154
|
+
</fo:table-cell>
|
1155
|
+
</fo:table-row>
|
1156
|
+
</fo:table-body>
|
1157
|
+
</fo:table>
|
1158
|
+
</fo:static-content>
|
1159
|
+
|
1160
|
+
<!-- <fo:static-content flow-name="left-region"> -->
|
1161
|
+
|
1162
|
+
<!-- JIS, JSA_logos -->
|
1163
|
+
<!-- <fo:block-container absolute-position="fixed" left="2.4mm" top="171mm" font-size="0">
|
1164
|
+
<fo:block id="firstpage_id_{$num}" margin-left="2mm">
|
1165
|
+
<fo:instream-foreign-object content-width="12.1mm" fox:alt-text="JIS Logo">
|
1166
|
+
<xsl:copy-of select="$JIS-Logo_2024"/>
|
1167
|
+
</fo:instream-foreign-object>
|
1168
|
+
</fo:block>
|
1169
|
+
<fo:block margin-top="3mm">
|
1170
|
+
<fo:instream-foreign-object content-width="15.2mm" fox:alt-text="JSA Logo">
|
1171
|
+
<xsl:copy-of select="$JSA-Logo_2024"/>
|
1172
|
+
</fo:instream-foreign-object>
|
1173
|
+
</fo:block>
|
1174
|
+
</fo:block-container>
|
1175
|
+
</fo:static-content> -->
|
1176
|
+
|
1177
|
+
<fo:flow flow-name="xsl-region-body" font-family="Noto Serif JP">
|
1178
|
+
|
1179
|
+
<fo:block font-weight="900" font-size="14pt" color="white" letter-spacing="2.5mm">
|
1180
|
+
<xsl:value-of select="$i18n_JIS"/>
|
1181
|
+
</fo:block>
|
1182
|
+
|
1183
|
+
<fo:block margin-top="75mm" font-size="14pt" font-weight="500">
|
1184
|
+
|
1185
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
1186
|
+
|
1187
|
+
<xsl:variable name="blocks">
|
1188
|
+
<xsl:call-template name="insertEachCharInBlock">
|
1189
|
+
<xsl:with-param name="str">JIS <xsl:value-of select="java:replaceAll(java:java.lang.String.new($docidentifier_number), ' ', ' ')"/></xsl:with-param>
|
1190
|
+
<xsl:with-param name="spaceIndent">0.5em</xsl:with-param>
|
1191
|
+
<xsl:with-param name="lineHeight">1.1em</xsl:with-param>
|
1192
|
+
</xsl:call-template>
|
1193
|
+
<fo:block line-height="1em" margin-top="0.2em"/>
|
1194
|
+
</xsl:variable>
|
1195
|
+
<xsl:variable name="blocksWidth">
|
1196
|
+
<xsl:for-each select="xalan:nodeset($blocks)//@line-height[normalize-space(..) != '']">
|
1197
|
+
<width><xsl:value-of select="substring-before(.,'em')"/></width>
|
1198
|
+
</xsl:for-each>
|
1199
|
+
<xsl:for-each select="xalan:nodeset($blocks)//@margin-top">
|
1200
|
+
<width><xsl:value-of select="substring-before(.,'em')"/></width>
|
1201
|
+
</xsl:for-each>
|
1202
|
+
</xsl:variable>
|
1203
|
+
<xsl:attribute name="width"><xsl:value-of select="sum(xalan:nodeset($blocksWidth)//width)"/>em</xsl:attribute>
|
1204
|
+
<fo:block-container width="1em">
|
1205
|
+
<xsl:copy-of select="$blocks"/>
|
1206
|
+
</fo:block-container>
|
1207
|
+
</fo:inline-container>
|
1208
|
+
|
1209
|
+
<fo:inline font-size="8.16pt" baseline-shift="20%">:</fo:inline>
|
1210
|
+
|
1211
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
1212
|
+
<fo:block-container width="1em">
|
1213
|
+
<fo:block line-height="1em" margin-top="0.2em"/>
|
1214
|
+
<fo:block font-size="8.16pt" baseline-shift="20%">
|
1215
|
+
<xsl:call-template name="insertEachCharInBlock">
|
1216
|
+
<xsl:with-param name="str"><xsl:value-of select="$docidentifier_year"/></xsl:with-param>
|
1217
|
+
<xsl:with-param name="lineHeight">1em</xsl:with-param>
|
1218
|
+
</xsl:call-template>
|
1219
|
+
</fo:block>
|
1220
|
+
</fo:block-container>
|
1221
|
+
</fo:inline-container>
|
1222
|
+
</fo:block>
|
1223
|
+
|
1224
|
+
<fo:block margin-top="2mm" letter-spacing="2mm" font-weight="bold">
|
1225
|
+
<xsl:variable name="title_len" select="string-length(/*/jis:bibdata/jis:title[@language = 'ja' and @type = 'main']/node())"/>
|
1226
|
+
<xsl:attribute name="font-size">
|
1227
|
+
<xsl:choose>
|
1228
|
+
<xsl:when test="$title_len > 20">16pt</xsl:when>
|
1229
|
+
<xsl:when test="$title_len > 16">18pt</xsl:when>
|
1230
|
+
<xsl:when test="$title_len > 13">20pt</xsl:when>
|
1231
|
+
<xsl:otherwise>24pt</xsl:otherwise>
|
1232
|
+
</xsl:choose>
|
1233
|
+
</xsl:attribute>
|
1234
|
+
<xsl:apply-templates select="/*/jis:bibdata/jis:title[@language = 'ja' and @type = 'main']/node()"/>
|
1235
|
+
</fo:block>
|
1236
|
+
|
1237
|
+
<fo:block margin-top="3mm" font-size="11pt" font-weight="500">
|
1238
|
+
<xsl:apply-templates select="/*/jis:bibdata/jis:title[@language = 'en' and @type = 'main']/node()"/>
|
1239
|
+
</fo:block>
|
1240
|
+
|
1241
|
+
<fo:block margin-top="6.5mm" font-size="8pt" font-weight="500">
|
1242
|
+
<fo:inline padding-right="5mm"><xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'published']/text()"/></fo:inline>改正
|
1243
|
+
</fo:block>
|
1244
|
+
|
1245
|
+
</fo:flow>
|
1246
|
+
</fo:page-sequence>
|
1247
|
+
</xsl:template> <!-- insertCoverPage2024 -->
|
1248
|
+
|
1249
|
+
<xsl:template name="insertBackPage2024">
|
1250
|
+
<xsl:param name="num"/>
|
1251
|
+
<xsl:param name="copyrightText"/>
|
1252
|
+
|
1253
|
+
<fo:page-sequence master-reference="back-page_2024" force-page-count="no-force" font-family="Noto Serif JP" font-weight="500">
|
1254
|
+
|
1255
|
+
<fo:static-content flow-name="header">
|
1256
|
+
<xsl:variable name="presentation_metadata_image_name">
|
1257
|
+
<xsl:choose>
|
1258
|
+
<xsl:when test="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'backpage-image']/*[local-name() = 'value']/*[local-name() = 'image']">backpage-image</xsl:when>
|
1259
|
+
<xsl:otherwise>coverpage-image</xsl:otherwise>
|
1260
|
+
</xsl:choose>
|
1261
|
+
</xsl:variable>
|
1262
|
+
<xsl:call-template name="insertBackgroundPageImage">
|
1263
|
+
<xsl:with-param name="name" select="$presentation_metadata_image_name"/>
|
1264
|
+
<xsl:with-param name="suffix">back</xsl:with-param>
|
1265
|
+
</xsl:call-template>
|
1266
|
+
</fo:static-content>
|
1267
|
+
|
1268
|
+
<fo:flow flow-name="xsl-region-body">
|
1269
|
+
<!-- publication date -->
|
1270
|
+
<fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
|
1271
|
+
<xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'published']/text()"/>
|
1272
|
+
<fo:inline keep-together.within-line="always">
|
1273
|
+
<fo:leader leader-pattern="space"/>
|
1274
|
+
<xsl:text>発行</xsl:text>
|
1275
|
+
</fo:inline>
|
1276
|
+
</fo:block>
|
1277
|
+
<!-- revision date -->
|
1278
|
+
<fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
|
1279
|
+
<xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'revised']/text()"/>
|
1280
|
+
<fo:inline keep-together.within-line="always">
|
1281
|
+
<fo:leader leader-pattern="space"/>
|
1282
|
+
<xsl:text>改正</xsl:text>
|
1283
|
+
</fo:inline>
|
1284
|
+
</fo:block>
|
1285
|
+
<fo:block font-size="12pt" margin-top="7mm" text-align="right"><xsl:value-of select="$copyrightText"/></fo:block>
|
1286
|
+
</fo:flow>
|
1287
|
+
</fo:page-sequence>
|
1288
|
+
</xsl:template> <!-- insertBackPage2024 -->
|
1289
|
+
|
1290
|
+
<xsl:template name="insertBackgroundColor">
|
1291
|
+
<xsl:param name="opacity">1</xsl:param>
|
1292
|
+
<xsl:param name="color_background">#ffffff</xsl:param>
|
1293
|
+
<xsl:param name="width">20mm</xsl:param>
|
1294
|
+
<xsl:param name="absolute_position">false</xsl:param>
|
1295
|
+
<xsl:param name="left"/>
|
1296
|
+
|
1297
|
+
<!-- background color -->
|
1298
|
+
<fo:block-container font-size="0"> <!-- absolute-position="fixed" left="0" top="0" -->
|
1299
|
+
<xsl:if test="$absolute_position = 'true'">
|
1300
|
+
<xsl:attribute name="absolute-position">fixed</xsl:attribute>
|
1301
|
+
<xsl:attribute name="top">0</xsl:attribute>
|
1302
|
+
</xsl:if>
|
1303
|
+
<xsl:if test="normalize-space($left) != ''">
|
1304
|
+
<xsl:attribute name="left"><xsl:value-of select="$left"/></xsl:attribute>
|
1305
|
+
</xsl:if>
|
1306
|
+
<fo:block>
|
1307
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
|
1308
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$width}" height="{$pageHeight}mm">
|
1309
|
+
<rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:{$color_background};stroke-width:0;fill-opacity:{$opacity}"/>
|
1310
|
+
</svg>
|
1311
|
+
</fo:instream-foreign-object>
|
1312
|
+
</fo:block>
|
1313
|
+
</fo:block-container>
|
1314
|
+
</xsl:template>
|
1315
|
+
|
769
1316
|
<xsl:template name="insertInnerCoverPage">
|
770
1317
|
<xsl:param name="docidentifier"/>
|
771
1318
|
<xsl:param name="copyrightText"/>
|
@@ -804,6 +1351,7 @@
|
|
804
1351
|
</xsl:template> <!-- insertInnerCoverPage -->
|
805
1352
|
|
806
1353
|
<xsl:template match="jis:p[@class = 'JapaneseIndustrialStandard']" priority="4">
|
1354
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
807
1355
|
<fo:table table-layout="fixed" width="100%">
|
808
1356
|
<fo:table-column column-width="proportional-column-width(36)"/>
|
809
1357
|
<fo:table-column column-width="proportional-column-width(92)"/>
|
@@ -826,9 +1374,11 @@
|
|
826
1374
|
</fo:table-row>
|
827
1375
|
</fo:table-body>
|
828
1376
|
</fo:table>
|
1377
|
+
</xsl:if>
|
829
1378
|
</xsl:template>
|
830
1379
|
|
831
1380
|
<xsl:template match="jis:p[@class = 'StandardNumber']" priority="4">
|
1381
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
832
1382
|
<fo:table table-layout="fixed" width="100%">
|
833
1383
|
<fo:table-column column-width="proportional-column-width(36)"/>
|
834
1384
|
<fo:table-column column-width="proportional-column-width(92)"/>
|
@@ -849,6 +1399,7 @@
|
|
849
1399
|
</fo:table-row>
|
850
1400
|
</fo:table-body>
|
851
1401
|
</fo:table>
|
1402
|
+
</xsl:if>
|
852
1403
|
</xsl:template>
|
853
1404
|
|
854
1405
|
<xsl:template match="jis:p[@class = 'StandardNumber']//text()[not(ancestor::jis:span)]" priority="4">
|
@@ -883,13 +1434,34 @@
|
|
883
1434
|
</xsl:template>
|
884
1435
|
|
885
1436
|
<xsl:template match="jis:p[@class = 'zzSTDTitle1']" priority="4">
|
886
|
-
<fo:block font-
|
1437
|
+
<fo:block font-size="19pt" text-align="center" margin-top="12mm" margin-bottom="4mm">
|
1438
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
1439
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
1440
|
+
</xsl:if>
|
1441
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1442
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
1443
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1444
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
1445
|
+
<xsl:attribute name="margin-top">6mm</xsl:attribute>
|
1446
|
+
<xsl:attribute name="margin-bottom">2.5mm</xsl:attribute>
|
1447
|
+
<xsl:attribute name="letter-spacing">3mm</xsl:attribute>
|
1448
|
+
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
1449
|
+
</xsl:if>
|
887
1450
|
<xsl:apply-templates/>
|
888
1451
|
</fo:block>
|
889
1452
|
</xsl:template>
|
890
1453
|
|
891
1454
|
<xsl:template match="jis:p[@class = 'zzSTDTitle2']" priority="4">
|
892
|
-
<fo:block font-
|
1455
|
+
<fo:block font-size="13pt" text-align="center" margin-bottom="10mm">
|
1456
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
1457
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
1458
|
+
</xsl:if>
|
1459
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1460
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1461
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
1462
|
+
<xsl:attribute name="margin-bottom">3mm</xsl:attribute>
|
1463
|
+
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
1464
|
+
</xsl:if>
|
893
1465
|
<xsl:apply-templates/>
|
894
1466
|
</fo:block>
|
895
1467
|
</xsl:template>
|
@@ -1058,37 +1630,34 @@
|
|
1058
1630
|
<xsl:call-template name="getLevel"/>
|
1059
1631
|
</xsl:variable>
|
1060
1632
|
|
1061
|
-
<xsl:variable name="font-family">
|
1633
|
+
<xsl:variable name="font-family">
|
1634
|
+
<xsl:choose>
|
1635
|
+
<xsl:when test="$vertical_layout = 'true'">Noto Sans JP</xsl:when>
|
1636
|
+
<xsl:otherwise>IPAexGothic</xsl:otherwise>
|
1637
|
+
</xsl:choose>
|
1638
|
+
</xsl:variable>
|
1062
1639
|
|
1063
1640
|
<xsl:variable name="font-size">
|
1064
1641
|
<xsl:choose>
|
1065
|
-
<xsl:when test="
|
1066
|
-
<xsl:
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
<xsl:when test="@ancestor = 'sections' and $level >= '3'">10pt</xsl:when>
|
1076
|
-
<xsl:when test="@ancestor = 'sections' and $level = '2' and preceding-sibling::*[1][local-name() = 'references']">inherit</xsl:when>
|
1077
|
-
<xsl:when test="@ancestor = 'sections' and $level = '2'">11pt</xsl:when>
|
1078
|
-
<xsl:when test="@ancestor = 'sections' and $level >= '3' and preceding-sibling::*[1][local-name() = 'terms']">11pt</xsl:when>
|
1079
|
-
<xsl:when test="@ancestor = 'sections' and $level = '3'">10.5pt</xsl:when>
|
1080
|
-
<xsl:when test="@ancestor = 'sections' and $level >= '4'">10pt</xsl:when>
|
1081
|
-
|
1082
|
-
<xsl:when test="@ancestor = 'annex' and $level = '2'">13pt</xsl:when>
|
1083
|
-
<xsl:when test="@ancestor = 'annex' and $level >= '3'">11.5pt</xsl:when>
|
1084
|
-
<xsl:when test="@ancestor = 'bibliography' and $level = '1' and preceding-sibling::*[local-name() = 'references']">11.5pt</xsl:when>
|
1085
|
-
<xsl:when test="@ancestor = 'bibliography' and $level = '1'">13pt</xsl:when>
|
1086
|
-
<xsl:when test="@ancestor = 'bibliography' and $level >= '2'">10pt</xsl:when> -->
|
1087
|
-
<xsl:otherwise>10pt</xsl:otherwise>
|
1642
|
+
<xsl:when test="$vertical_layout = 'true'">12pt</xsl:when>
|
1643
|
+
<xsl:otherwise>
|
1644
|
+
<xsl:choose>
|
1645
|
+
<xsl:when test="@type = 'section-title'">18pt</xsl:when>
|
1646
|
+
<xsl:when test="@ancestor = 'foreword' and $level = '1'">14pt</xsl:when>
|
1647
|
+
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::*[local-name() = 'annex'][1][@commentary = 'true']">16pt</xsl:when>
|
1648
|
+
<xsl:when test="@ancestor = 'annex' and $level = '1'">14pt</xsl:when>
|
1649
|
+
<xsl:otherwise>10pt</xsl:otherwise>
|
1650
|
+
</xsl:choose>
|
1651
|
+
</xsl:otherwise>
|
1088
1652
|
</xsl:choose>
|
1089
1653
|
</xsl:variable>
|
1090
1654
|
|
1091
|
-
<xsl:variable name="font-weight">
|
1655
|
+
<xsl:variable name="font-weight">
|
1656
|
+
<xsl:choose>
|
1657
|
+
<xsl:when test="$vertical_layout = 'true'">500</xsl:when> <!-- bold, or 500 (medium) ? -->
|
1658
|
+
<xsl:otherwise>normal</xsl:otherwise>
|
1659
|
+
</xsl:choose>
|
1660
|
+
</xsl:variable>
|
1092
1661
|
|
1093
1662
|
<xsl:variable name="text-align">
|
1094
1663
|
<xsl:choose>
|
@@ -1162,6 +1731,11 @@
|
|
1162
1731
|
<xsl:copy-of select="@id"/>
|
1163
1732
|
</xsl:if>
|
1164
1733
|
|
1734
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1735
|
+
<xsl:attribute name="letter-spacing">1mm</xsl:attribute>
|
1736
|
+
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
1737
|
+
</xsl:if>
|
1738
|
+
|
1165
1739
|
<!-- if first and last childs are `add` ace-tag, then move start ace-tag before title -->
|
1166
1740
|
<xsl:if test="*[local-name() = 'tab'][1]/following-sibling::node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
1167
1741
|
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
@@ -1172,10 +1746,32 @@
|
|
1172
1746
|
<xsl:variable name="section">
|
1173
1747
|
<xsl:call-template name="extractSection"/>
|
1174
1748
|
</xsl:variable>
|
1749
|
+
|
1750
|
+
<xsl:if test="$level = 1">
|
1751
|
+
<fo:marker marker-class-name="section_title">
|
1752
|
+
<xsl:choose>
|
1753
|
+
<xsl:when test="@ancestor = 'annex' and *[local-name() = 'br']">
|
1754
|
+
<xsl:variable name="stitle">
|
1755
|
+
<xsl:for-each select="jis:br[1]/preceding-sibling::node()">
|
1756
|
+
<xsl:value-of select="."/>
|
1757
|
+
</xsl:for-each>
|
1758
|
+
</xsl:variable>
|
1759
|
+
<xsl:value-of select="$stitle"/>
|
1760
|
+
</xsl:when>
|
1761
|
+
<xsl:otherwise>
|
1762
|
+
<xsl:variable name="stitle"><xsl:call-template name="extractTitle"/></xsl:variable>
|
1763
|
+
<xsl:variable name="section_title"><xsl:value-of select="normalize-space(concat($section, ' ', $stitle))"/></xsl:variable>
|
1764
|
+
<xsl:value-of select="translate($section_title, ' ', ' ')"/>
|
1765
|
+
</xsl:otherwise>
|
1766
|
+
</xsl:choose>
|
1767
|
+
</fo:marker>
|
1768
|
+
</xsl:if>
|
1769
|
+
|
1175
1770
|
<xsl:if test="normalize-space($section) != ''">
|
1176
1771
|
|
1177
1772
|
<xsl:choose>
|
1178
|
-
|
1773
|
+
<!-- DISABLED rotation due writing-mode="tb-rl" -->
|
1774
|
+
<xsl:when test="$vertical_layout_rotate_clause_numbers = 'true123'">
|
1179
1775
|
<fo:inline font-family="Times New Roman" font-weight="bold">
|
1180
1776
|
<xsl:call-template name="insertVerticalChar">
|
1181
1777
|
<xsl:with-param name="str" select="$section"/>
|
@@ -1184,7 +1780,12 @@
|
|
1184
1780
|
<fo:inline padding-right="4mm"> </fo:inline>
|
1185
1781
|
</xsl:when>
|
1186
1782
|
<xsl:otherwise>
|
1187
|
-
<fo:inline
|
1783
|
+
<fo:inline>
|
1784
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
1785
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1786
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1787
|
+
</xsl:if>
|
1788
|
+
<!-- <xsl:value-of select="translate($section, '.', '・')"/> -->
|
1188
1789
|
<xsl:value-of select="$section"/>
|
1189
1790
|
<fo:inline padding-right="4mm"> </fo:inline>
|
1190
1791
|
</fo:inline>
|
@@ -1201,6 +1802,20 @@
|
|
1201
1802
|
</xsl:choose>
|
1202
1803
|
</xsl:template>
|
1203
1804
|
|
1805
|
+
<xsl:template match="*[local-name() = 'term']" priority="2">
|
1806
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
1807
|
+
|
1808
|
+
<xsl:if test="$vertical_layout = 'true'">
|
1809
|
+
<xsl:attribute name="letter-spacing">1mm</xsl:attribute>
|
1810
|
+
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
1811
|
+
</xsl:if>
|
1812
|
+
|
1813
|
+
</fo:block>
|
1814
|
+
<fo:block>
|
1815
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
1816
|
+
</fo:block>
|
1817
|
+
</xsl:template>
|
1818
|
+
|
1204
1819
|
<xsl:template match="*[local-name() = 'introduction']">
|
1205
1820
|
<fo:block id="{@id}">
|
1206
1821
|
<xsl:apply-templates/>
|
@@ -1326,6 +1941,12 @@
|
|
1326
1941
|
</xsl:variable>
|
1327
1942
|
|
1328
1943
|
<xsl:choose>
|
1944
|
+
<xsl:when test="$vertical_layout = 'true' and contains($list_item_label, ')') and ../@type = 'arabic'">
|
1945
|
+
<fo:inline font-weight="normal">(</fo:inline>
|
1946
|
+
<xsl:value-of select="substring-before($list_item_label,')')"/>
|
1947
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
1948
|
+
<xsl:value-of select="substring-after($list_item_label,')')"/>
|
1949
|
+
</xsl:when>
|
1329
1950
|
<xsl:when test="contains($list_item_label, ')')">
|
1330
1951
|
<xsl:value-of select="substring-before($list_item_label,')')"/>
|
1331
1952
|
<fo:inline font-weight="normal">)</fo:inline>
|
@@ -1493,7 +2114,16 @@
|
|
1493
2114
|
<!-- Allocate non-Japanese text -->
|
1494
2115
|
<!-- ========================= -->
|
1495
2116
|
|
1496
|
-
|
2117
|
+
<!-- if vertical_layout = 'true', then font_en and font_en_bold are using for text rotation -->
|
2118
|
+
<xsl:variable name="regex_en_base">\u00A0\u2002-\u200B\u3000-\u9FFF\uF900-\uFFFF</xsl:variable>
|
2119
|
+
<xsl:variable name="regex_en_">
|
2120
|
+
<xsl:choose>
|
2121
|
+
<!-- ( ) [ ] _ { } U+FF08 FULLWIDTH LEFT PARENTHESIS U+FF09 FULLWIDTH RIGHT PARENTHESIS-->
|
2122
|
+
<xsl:when test="$vertical_layout = 'true'">((<xsl:value-of select="$regex_ja_spec"/>)|([^\u0028\u0029\u005B\u005D\u005F\u007B\u007D<xsl:value-of select="$regex_en_base"/>]){1,})</xsl:when>
|
2123
|
+
<xsl:otherwise>([^<xsl:value-of select="$regex_en_base"/>]{1,})</xsl:otherwise>
|
2124
|
+
</xsl:choose>
|
2125
|
+
</xsl:variable>
|
2126
|
+
<xsl:variable name="regex_en" select="normalize-space($regex_en_)"/>
|
1497
2127
|
|
1498
2128
|
<xsl:variable name="element_name_font_en">font_en</xsl:variable>
|
1499
2129
|
<xsl:variable name="tag_font_en_open">###<xsl:value-of select="$element_name_font_en"/>###</xsl:variable>
|
@@ -1502,7 +2132,7 @@
|
|
1502
2132
|
<xsl:variable name="tag_font_en_bold_open">###<xsl:value-of select="$element_name_font_en_bold"/>###</xsl:variable>
|
1503
2133
|
<xsl:variable name="tag_font_en_bold_close">###/<xsl:value-of select="$element_name_font_en_bold"/>###</xsl:variable>
|
1504
2134
|
|
1505
|
-
<xsl:template match="jis:p//text()[not(ancestor::jis:strong)] | jis:dt/text()" mode="update_xml_step1">
|
2135
|
+
<xsl:template match="jis:p//text()[not(ancestor::jis:strong) and not(ancestor::jis:p[@class = 'zzSTDTitle2'])] | jis:dt/text()" mode="update_xml_step1">
|
1506
2136
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_open,'$1',$tag_font_en_close))"/>
|
1507
2137
|
<xsl:variable name="text_en">
|
1508
2138
|
<xsl:element name="text" namespace="{$namespace_full}">
|
@@ -1519,7 +2149,7 @@
|
|
1519
2149
|
<!-- jis:term/jis:preferred2//text() | -->
|
1520
2150
|
|
1521
2151
|
<!-- <name>注記 1</name> to <name>注記<font_en> 1</font_en></name> -->
|
1522
|
-
<xsl:template match="jis:title/text() | jis:note/jis:name/text() | jis:termnote/jis:name/text() | jis:table/jis:name/text() | jis:figure/jis:name/text() | jis:termexample/jis:name/text() | jis:xref//text() | jis:origin/text()" mode="update_xml_step1">
|
2152
|
+
<xsl:template match="jis:title/text() | jis:term/jis:name/text() | jis:note/jis:name/text() | jis:termnote/jis:name/text() | jis:table/jis:name/text() | jis:figure/jis:name/text() | jis:termexample/jis:name/text() | jis:xref//text() | jis:origin/text()" mode="update_xml_step1">
|
1523
2153
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1524
2154
|
<xsl:variable name="text_en">
|
1525
2155
|
<xsl:element name="text" namespace="{$namespace_full}">
|
@@ -1635,25 +2265,71 @@
|
|
1635
2265
|
|
1636
2266
|
<xsl:template match="*[local-name() = 'font_en_bold'][normalize-space() != '']">
|
1637
2267
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
1638
|
-
<fo:inline
|
1639
|
-
<xsl:if test="
|
1640
|
-
<xsl:attribute name="font-
|
2268
|
+
<fo:inline>
|
2269
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
2270
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2271
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2272
|
+
<xsl:if test="ancestor::*[local-name() = 'preferred']">
|
2273
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2274
|
+
</xsl:if>
|
1641
2275
|
</xsl:if>
|
1642
|
-
<xsl:
|
2276
|
+
<!-- <xsl:if test="$vertical_layout = 'true'">
|
2277
|
+
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
2278
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2279
|
+
</xsl:if> -->
|
2280
|
+
<xsl:call-template name="insertEnglishText"/>
|
1643
2281
|
</fo:inline>
|
1644
2282
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
1645
2283
|
</xsl:template>
|
1646
2284
|
|
2285
|
+
<xsl:template name="insertEnglishText">
|
2286
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
2287
|
+
<xsl:choose>
|
2288
|
+
<xsl:when test="not($vertical_layout = 'true')">
|
2289
|
+
<xsl:apply-templates/>
|
2290
|
+
</xsl:when>
|
2291
|
+
<xsl:otherwise> <!-- $vertical_layout = 'true' -->
|
2292
|
+
<xsl:for-each select="node()">
|
2293
|
+
<xsl:choose>
|
2294
|
+
<xsl:when test="self::text()">
|
2295
|
+
<!-- convert to vertical layout -->
|
2296
|
+
<xsl:variable name="text">
|
2297
|
+
<xsl:choose>
|
2298
|
+
<xsl:when test="ancestor::*[local-name(../..) = 'note'] and ancestor::*[local-name(..) = 'name']">
|
2299
|
+
<xsl:value-of select="concat(' ', normalize-space(.))"/>
|
2300
|
+
</xsl:when>
|
2301
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
2302
|
+
</xsl:choose>
|
2303
|
+
</xsl:variable>
|
2304
|
+
<xsl:call-template name="insertVerticalChar">
|
2305
|
+
<xsl:with-param name="str" select="$text"/>
|
2306
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
2307
|
+
</xsl:call-template>
|
2308
|
+
</xsl:when>
|
2309
|
+
<xsl:otherwise>
|
2310
|
+
<xsl:apply-templates select="."/>
|
2311
|
+
</xsl:otherwise>
|
2312
|
+
</xsl:choose>
|
2313
|
+
</xsl:for-each>
|
2314
|
+
</xsl:otherwise>
|
2315
|
+
</xsl:choose>
|
2316
|
+
</xsl:template>
|
2317
|
+
|
1647
2318
|
<xsl:template match="*[local-name() = 'font_en'][normalize-space() != '']">
|
1648
2319
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
1649
2320
|
<fo:inline>
|
1650
2321
|
<xsl:if test="not(ancestor::jis:p[@class = 'zzSTDTitle2']) and not(ancestor::jis:span[@class = 'JIS'])">
|
1651
|
-
<xsl:
|
2322
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
2323
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2324
|
+
</xsl:if>
|
1652
2325
|
</xsl:if>
|
1653
2326
|
<xsl:if test="ancestor::*[local-name() = 'preferred']">
|
1654
2327
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1655
2328
|
</xsl:if>
|
1656
|
-
<xsl:
|
2329
|
+
<!-- <xsl:if test="$vertical_layout = 'true'">
|
2330
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
2331
|
+
</xsl:if> -->
|
2332
|
+
<xsl:call-template name="insertEnglishText"/>
|
1657
2333
|
</fo:inline>
|
1658
2334
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
1659
2335
|
</xsl:template>
|
@@ -1662,6 +2338,22 @@
|
|
1662
2338
|
<!-- END: Allocate non-Japanese text -->
|
1663
2339
|
<!-- ========================= -->
|
1664
2340
|
|
2341
|
+
<!-- patch for correct list-item-label rendering: enclose each char in inline-container -->
|
2342
|
+
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/text()" priority="3">
|
2343
|
+
<xsl:choose>
|
2344
|
+
<xsl:when test="not($vertical_layout = 'true')">
|
2345
|
+
<xsl:value-of select="."/>
|
2346
|
+
</xsl:when>
|
2347
|
+
<xsl:otherwise> <!-- $vertical_layout = 'true' -->
|
2348
|
+
<xsl:call-template name="insertVerticalChar">
|
2349
|
+
<xsl:with-param name="str" select="."/>
|
2350
|
+
<!-- <xsl:with-param name="writing-mode"/>
|
2351
|
+
<xsl:with-param name="reference-orientation"/> -->
|
2352
|
+
</xsl:call-template>
|
2353
|
+
</xsl:otherwise>
|
2354
|
+
</xsl:choose>
|
2355
|
+
</xsl:template>
|
2356
|
+
|
1665
2357
|
<xsl:template name="insertHeaderFooter">
|
1666
2358
|
<xsl:param name="docidentifier"/>
|
1667
2359
|
<xsl:param name="hidePageNumber">false</xsl:param>
|
@@ -1762,6 +2454,193 @@
|
|
1762
2454
|
</fo:static-content>
|
1763
2455
|
</xsl:template>
|
1764
2456
|
|
2457
|
+
<xsl:template name="insertLeftRightRegions">
|
2458
|
+
<xsl:param name="cover_header_footer_background"/>
|
2459
|
+
<xsl:param name="i18n_JIS"/>
|
2460
|
+
<xsl:param name="docidentifier"/>
|
2461
|
+
<xsl:param name="title_ja"/>
|
2462
|
+
<xsl:param name="edition"/>
|
2463
|
+
<xsl:param name="copyrightText"/>
|
2464
|
+
<xsl:param name="insertLast"/>
|
2465
|
+
<xsl:param name="bibdata"/>
|
2466
|
+
|
2467
|
+
<!-- header -->
|
2468
|
+
<fo:static-content flow-name="right-region" role="artifact">
|
2469
|
+
<fo:block-container font-size="9pt" height="{$pageHeightA5}mm" width="6mm" color="white" background-color="{$cover_header_footer_background}" text-align="center" margin-left="11mm">
|
2470
|
+
<fo:block-container margin-left="0mm" margin-top="14.5mm" line-height="1.1">
|
2471
|
+
<!-- text-align-last="justify" -->
|
2472
|
+
<!-- example: 日本工業規格 JIS Z 8301 規格票の様式及び作成方法 一 -->
|
2473
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2474
|
+
<xsl:with-param name="str" select="$i18n_JIS"/>
|
2475
|
+
</xsl:call-template>
|
2476
|
+
<fo:block margin-top="3mm">
|
2477
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2478
|
+
<xsl:with-param name="str" select="$docidentifier"/>
|
2479
|
+
<xsl:with-param name="spaceIndent">1mm</xsl:with-param>
|
2480
|
+
</xsl:call-template>
|
2481
|
+
</fo:block>
|
2482
|
+
<fo:block margin-top="3mm">
|
2483
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2484
|
+
<xsl:with-param name="str" select="$title_ja"/>
|
2485
|
+
</xsl:call-template>
|
2486
|
+
</fo:block>
|
2487
|
+
<fo:block margin-top="21mm">
|
2488
|
+
<xsl:value-of select="$edition"/>
|
2489
|
+
</fo:block>
|
2490
|
+
</fo:block-container>
|
2491
|
+
</fo:block-container>
|
2492
|
+
</fo:static-content>
|
2493
|
+
|
2494
|
+
<xsl:if test="$insertLast = 'true'">
|
2495
|
+
<!-- header last render in header region -->
|
2496
|
+
<fo:static-content flow-name="header-last" role="artifact">
|
2497
|
+
<fo:block font-size="12pt" font-weight="bold" margin-left="10mm">
|
2498
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
2499
|
+
<fo:block-container width="1em">
|
2500
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2501
|
+
<xsl:with-param name="str">JIS <xsl:value-of select="$docidentifier_number"/></xsl:with-param>
|
2502
|
+
<xsl:with-param name="spaceIndent">0.5em</xsl:with-param>
|
2503
|
+
<xsl:with-param name="lineHeight">1.1em</xsl:with-param>
|
2504
|
+
</xsl:call-template>
|
2505
|
+
</fo:block-container>
|
2506
|
+
</fo:inline-container>
|
2507
|
+
</fo:block>
|
2508
|
+
<fo:block margin-top="2mm" font-size="12pt" font-weight="bold" margin-left="10mm" letter-spacing="2.5mm">
|
2509
|
+
<xsl:value-of select="$title_ja"/>
|
2510
|
+
</fo:block>
|
2511
|
+
<fo:block margin-top="6.5mm" font-size="10pt" font-weight="bold" margin-left="16.5mm">
|
2512
|
+
<fo:inline padding-right="7mm"><xsl:value-of select="xalan:nodeset($bibdata)//jis:bibdata/jis:date[@type = 'published']"/></fo:inline>
|
2513
|
+
<xsl:variable name="edition" select="xalan:nodeset($bibdata)//jis:edition[@language = 'ja'][1]"/>
|
2514
|
+
<!-- add spaced between characters -->
|
2515
|
+
<fo:inline padding-right="6mm"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($edition), '(.)', '$1 ')"/></fo:inline>
|
2516
|
+
発行
|
2517
|
+
</fo:block>
|
2518
|
+
|
2519
|
+
<fo:block margin-top="13mm" font-size="10pt" font-weight="bold" margin-left="16.5mm">
|
2520
|
+
</fo:block>
|
2521
|
+
|
2522
|
+
</fo:static-content>
|
2523
|
+
</xsl:if>
|
2524
|
+
|
2525
|
+
<xsl:if test="1 = 3">
|
2526
|
+
<fo:static-content flow-name="left-region" role="artifact">
|
2527
|
+
<fo:block>l=<fo:page-number/> 三用語及び定義</fo:block>
|
2528
|
+
</fo:static-content>
|
2529
|
+
|
2530
|
+
<fo:static-content flow-name="footer" role="artifact">
|
2531
|
+
|
2532
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0" width="6mm" height="{$pageHeightA5}mm" background-color="{$cover_header_footer_background}">
|
2533
|
+
<fo:block color="white">f=<fo:page-number/> 三用語及び定義</fo:block>
|
2534
|
+
</fo:block-container>
|
2535
|
+
<fo:block text-align="left" margin-top="192.5mm" margin-left="100mm" color="white">
|
2536
|
+
|
2537
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
2538
|
+
<fo:block-container width="1em">
|
2539
|
+
<fo:block line-height="1em"><fo:page-number/> </fo:block>
|
2540
|
+
</fo:block-container>
|
2541
|
+
</fo:inline-container>
|
2542
|
+
|
2543
|
+
</fo:block> <!-- f= 三用語及び定義 -->
|
2544
|
+
</fo:static-content>
|
2545
|
+
</xsl:if>
|
2546
|
+
|
2547
|
+
<!-- footer -->
|
2548
|
+
<xsl:if test="1 = 1">
|
2549
|
+
<fo:static-content flow-name="left-region"> <!-- role="artifact" commented, because there is <fo:retrieve-marker below, occurs java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 -->
|
2550
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0" width="6mm" height="{$pageHeightA5}mm" background-color="{$cover_header_footer_background}">
|
2551
|
+
<fo:block-container font-size="9pt" color="white" text-align="center">
|
2552
|
+
<fo:block margin-top="131mm">
|
2553
|
+
<fo:page-number/>
|
2554
|
+
</fo:block> <!-- 二 -->
|
2555
|
+
</fo:block-container>
|
2556
|
+
</fo:block-container>
|
2557
|
+
|
2558
|
+
<fo:block-container font-size="9pt" color="white" height="5.5mm" writing-mode="tb-rl" margin-left="56mm" line-height="1.1">
|
2559
|
+
|
2560
|
+
<fo:block text-align-last="justify" margin-top="56mm" margin-bottom="3mm">
|
2561
|
+
|
2562
|
+
<fo:inline baseline-shift="-20%">
|
2563
|
+
<fo:inline>
|
2564
|
+
<fo:retrieve-marker retrieve-class-name="section_title" retrieve-position="last-ending-within-page" retrieve-boundary="page"/>
|
2565
|
+
</fo:inline><!-- <fo:inline padding-bottom="5mm">三</fo:inline>用語及び定義 -->
|
2566
|
+
</fo:inline>
|
2567
|
+
|
2568
|
+
<fo:inline keep-together.within-line="always">
|
2569
|
+
<fo:leader leader-pattern="space"/>
|
2570
|
+
<fo:inline font-size="6pt" baseline-shift="-10%"><xsl:value-of select="$copyrightText"/></fo:inline>
|
2571
|
+
</fo:inline>
|
2572
|
+
|
2573
|
+
<!-- <fo:table table-layout="fixed" width="100%">
|
2574
|
+
<fo:table-column column-width="proportional-column-width(56)"/>
|
2575
|
+
<fo:table-column column-width="proportional-column-width(70)"/>
|
2576
|
+
<fo:table-column column-width="proportional-column-width(24)"/>
|
2577
|
+
<fo:table-column column-width="proportional-column-width(59)"/>
|
2578
|
+
<fo:table-body>
|
2579
|
+
<fo:table-row>
|
2580
|
+
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
2581
|
+
<fo:table-cell><fo:block>三用語及び定義</fo:block></fo:table-cell>
|
2582
|
+
<fo:table-cell><fo:block text-align="center">二</fo:block></fo:table-cell>
|
2583
|
+
<fo:table-cell display-align="center"><fo:block font-size="6pt"><xsl:value-of select="$copyrightText"/></fo:block></fo:table-cell>
|
2584
|
+
</fo:table-row>
|
2585
|
+
</fo:table-body>
|
2586
|
+
</fo:table> -->
|
2587
|
+
</fo:block>
|
2588
|
+
</fo:block-container>
|
2589
|
+
</fo:static-content>
|
2590
|
+
</xsl:if>
|
2591
|
+
<!-- <fo:static-content flow-name="left-region" role="artifact">
|
2592
|
+
<fo:block-container font-size="9pt" height="{$pageHeightA5}mm" width="6mm" color="white" background-color="{$cover_header_footer_background}" text-align="center">
|
2593
|
+
<fo:block-container margin-left="0mm" margin-top="55.5mm" line-height="1.1">
|
2594
|
+
|
2595
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2596
|
+
<xsl:with-param name="str" select="$i18n_JIS"/>
|
2597
|
+
</xsl:call-template>
|
2598
|
+
<fo:block margin-top="3mm">
|
2599
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2600
|
+
<xsl:with-param name="str" select="$docidentifier"/>
|
2601
|
+
<xsl:with-param name="spaceIndent">1mm</xsl:with-param>
|
2602
|
+
</xsl:call-template>
|
2603
|
+
</fo:block>
|
2604
|
+
<fo:block margin-top="3mm">
|
2605
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2606
|
+
<xsl:with-param name="str" select="$title_ja"/>
|
2607
|
+
</xsl:call-template>
|
2608
|
+
</fo:block>
|
2609
|
+
<fo:block margin-top="21mm">
|
2610
|
+
<xsl:value-of select="$edition"/>
|
2611
|
+
</fo:block>
|
2612
|
+
</fo:block-container>
|
2613
|
+
</fo:block-container>
|
2614
|
+
</fo:static-content> -->
|
2615
|
+
</xsl:template>
|
2616
|
+
|
2617
|
+
<xsl:template name="insertEachCharInBlock">
|
2618
|
+
<xsl:param name="str"/>
|
2619
|
+
<xsl:param name="spaceIndent"/>
|
2620
|
+
<xsl:param name="lineHeight"/>
|
2621
|
+
<xsl:if test="string-length($str) > 0">
|
2622
|
+
<xsl:variable name="char" select="substring($str, 1, 1)"/>
|
2623
|
+
<fo:block>
|
2624
|
+
<xsl:if test="$lineHeight != ''">
|
2625
|
+
<xsl:attribute name="line-height"><xsl:value-of select="$lineHeight"/></xsl:attribute>
|
2626
|
+
</xsl:if>
|
2627
|
+
<xsl:choose>
|
2628
|
+
<xsl:when test="$char = ' ' and $spaceIndent != ''">
|
2629
|
+
<xsl:attribute name="margin-top"><xsl:value-of select="$spaceIndent"/></xsl:attribute>
|
2630
|
+
</xsl:when>
|
2631
|
+
<xsl:otherwise>
|
2632
|
+
<xsl:value-of select="$char"/>
|
2633
|
+
</xsl:otherwise>
|
2634
|
+
</xsl:choose>
|
2635
|
+
</fo:block>
|
2636
|
+
<xsl:call-template name="insertEachCharInBlock">
|
2637
|
+
<xsl:with-param name="str" select="substring($str,2)"/>
|
2638
|
+
<xsl:with-param name="spaceIndent" select="$spaceIndent"/>
|
2639
|
+
<xsl:with-param name="lineHeight" select="$lineHeight"/>
|
2640
|
+
</xsl:call-template>
|
2641
|
+
</xsl:if>
|
2642
|
+
</xsl:template>
|
2643
|
+
|
1765
2644
|
<xsl:variable name="JIS-Logo">
|
1766
2645
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" width="80.94133mm" height="47.963669mm" viewBox="0 0 80.94133 47.963669" version="1.1" id="svg781">
|
1767
2646
|
<defs id="defs778"/>
|
@@ -1773,6 +2652,39 @@
|
|
1773
2652
|
</svg>
|
1774
2653
|
</xsl:variable>
|
1775
2654
|
|
2655
|
+
<xsl:variable name="JIS-Logo_2024">
|
2656
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34.29 34.29">
|
2657
|
+
<defs>
|
2658
|
+
<style>
|
2659
|
+
.cls-1 {
|
2660
|
+
fill: #fff;
|
2661
|
+
stroke-width: 0px;
|
2662
|
+
}
|
2663
|
+
</style>
|
2664
|
+
</defs>
|
2665
|
+
<path class="cls-1" d="m6.72,27.57c5.76,5.76,15.09,5.76,20.85,0,5.76-5.76,5.76-15.09,0-20.85C21.81.96,12.48.96,6.72,6.72c-3.28,3.28-4.82,7.91-4.17,12.5.26,1.84,1.97,3.13,3.81,2.86,1.66-.24,2.9-1.66,2.9-3.34v-9.32h3.09v9.32c0,3.38-2.74,6.11-6.11,6.11-3.03,0-5.61-2.22-6.05-5.23C-1.19,10.27,5.29,1.56,14.66.18c9.37-1.38,18.08,5.11,19.45,14.47,1.38,9.37-5.1,18.08-14.47,19.45-5.36.79-10.78-1.01-14.61-4.84m13.84-19.84v15.43h-3.43v-15.43m11.78,7.71c1.8,1.68,1.9,4.5.23,6.3-.84.91-2.03,1.42-3.26,1.42h-2.74v-2.74h2.23c1.04,0,1.89-.84,1.89-1.89,0-.52-.22-1.02-.6-1.38l-2.15-1.99c-1.73-1.61-1.83-4.32-.22-6.06.81-.87,1.95-1.37,3.14-1.37h2.06v2.74h-1.54c-.95,0-1.71.77-1.71,1.71,0,.48.2.93.55,1.26"/>
|
2666
|
+
</svg>
|
2667
|
+
</xsl:variable>
|
2668
|
+
|
2669
|
+
<xsl:variable name="JSA-Logo_2024">
|
2670
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 43.34 25.77">
|
2671
|
+
<defs>
|
2672
|
+
<style>
|
2673
|
+
.cls-1 {
|
2674
|
+
fill: #fff;
|
2675
|
+
stroke-width: 0px;
|
2676
|
+
}
|
2677
|
+
</style>
|
2678
|
+
</defs>
|
2679
|
+
<path class="cls-1" d="m2.01,24.08c-1.58-3.99,5.49-12.06,15.79-17.97C28.09.2,37.75-1.37,39.32,2.62c.67,1.72-.24,4.18-2.34,6.89,2.31-2.77,3.38-5.32,2.72-7.12-1.52-4.17-11.45-2.58-22.51,2.95-1.2.6-2.01,1.19-2.98,1.78-.62.37-1.29.7-1.88,1.09C4.14,13.57-1.09,19.87.19,23.39c.44,1.21,1.6,1.95,3.28,2.26-.67-.32-1.19-.88-1.47-1.56"/>
|
2680
|
+
<polygon class="cls-1" points="32.72 6.03 32.72 23.58 43.34 23.58 32.72 6.03"/>
|
2681
|
+
<path class="cls-1" d="m20.81,7.75c-2.34,2.17-2.48,5.83-.31,8.17.05.06.1.11.16.17l8.93-8.49c-2.54-2.2-6.33-2.14-8.78.15"/>
|
2682
|
+
<path class="cls-1" d="m18.94,21.67c.06.06.1.11.15.16,2.47,2.29,6.28,2.29,8.75,0,2.3-2.13,2.44-5.71.31-8.01-.1-.11-.2-.21-.31-.31-.05-.05-.11-.09-.16-.14l-8.74,8.31Z"/>
|
2683
|
+
<path class="cls-1" d="m7.09,25.77l-.32-1.1c3.44-.29,5.37-1.72,5.37-7.99v-8.32l3.81-2.3v10.62c0,6.8-5.17,9.09-8.85,9.09"/>
|
2684
|
+
<path class="cls-1" d="m15.98,1.92c0,1.06-.86,1.92-1.92,1.92-1.06,0-1.92-.86-1.92-1.92C12.15.86,13,0,14.06,0c1.06,0,1.92.85,1.92,1.9v.02"/>
|
2685
|
+
</svg>
|
2686
|
+
</xsl:variable>
|
2687
|
+
|
1776
2688
|
<xsl:strip-space elements="jis:xref"/>
|
1777
2689
|
|
1778
2690
|
<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
|
@@ -1921,22 +2833,42 @@
|
|
1921
2833
|
<!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
|
1922
2834
|
for example, left margin on odd page and right margin on even page -->
|
1923
2835
|
<xsl:variable name="marginLeftRight1_">
|
1924
|
-
|
2836
|
+
|
2837
|
+
<xsl:choose>
|
2838
|
+
<xsl:when test="$vertical_layout = 'true'">19</xsl:when>
|
2839
|
+
<xsl:otherwise>22</xsl:otherwise>
|
2840
|
+
</xsl:choose>
|
2841
|
+
|
1925
2842
|
</xsl:variable>
|
1926
2843
|
<xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
|
1927
2844
|
|
1928
2845
|
<xsl:variable name="marginLeftRight2_">
|
1929
|
-
|
2846
|
+
|
2847
|
+
<xsl:choose>
|
2848
|
+
<xsl:when test="$vertical_layout = 'true'">17</xsl:when>
|
2849
|
+
<xsl:otherwise>22</xsl:otherwise>
|
2850
|
+
</xsl:choose>
|
2851
|
+
|
1930
2852
|
</xsl:variable>
|
1931
2853
|
<xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
|
1932
2854
|
|
1933
2855
|
<xsl:variable name="marginTop_">
|
1934
|
-
|
2856
|
+
|
2857
|
+
<xsl:choose>
|
2858
|
+
<xsl:when test="$vertical_layout = 'true'">16</xsl:when> <!-- 9.4 -->
|
2859
|
+
<xsl:otherwise>30</xsl:otherwise>
|
2860
|
+
</xsl:choose>
|
2861
|
+
|
1935
2862
|
</xsl:variable>
|
1936
2863
|
<xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
|
1937
2864
|
|
1938
2865
|
<xsl:variable name="marginBottom_">
|
1939
|
-
|
2866
|
+
|
2867
|
+
<xsl:choose>
|
2868
|
+
<xsl:when test="$vertical_layout = 'true'">15.2</xsl:when>
|
2869
|
+
<xsl:otherwise>24.5</xsl:otherwise>
|
2870
|
+
</xsl:choose>
|
2871
|
+
|
1940
2872
|
</xsl:variable>
|
1941
2873
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
1942
2874
|
|
@@ -2348,12 +3280,14 @@
|
|
2348
3280
|
|
2349
3281
|
<xsl:attribute-set name="example-name-style">
|
2350
3282
|
|
2351
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2352
|
-
|
2353
3283
|
</xsl:attribute-set> <!-- example-name-style -->
|
2354
3284
|
|
2355
3285
|
<xsl:template name="refine_example-name-style">
|
2356
3286
|
|
3287
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3288
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
3289
|
+
</xsl:if>
|
3290
|
+
|
2357
3291
|
</xsl:template>
|
2358
3292
|
|
2359
3293
|
<xsl:attribute-set name="example-p-style">
|
@@ -2368,12 +3302,14 @@
|
|
2368
3302
|
|
2369
3303
|
<xsl:attribute-set name="termexample-name-style">
|
2370
3304
|
|
2371
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2372
|
-
|
2373
3305
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
2374
3306
|
|
2375
3307
|
<xsl:template name="refine_termexample-name-style">
|
2376
3308
|
|
3309
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3310
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
3311
|
+
</xsl:if>
|
3312
|
+
|
2377
3313
|
</xsl:template>
|
2378
3314
|
|
2379
3315
|
<!-- ========================== -->
|
@@ -2428,7 +3364,6 @@
|
|
2428
3364
|
<xsl:attribute-set name="table-name-style">
|
2429
3365
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2430
3366
|
|
2431
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2432
3367
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2433
3368
|
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
2434
3369
|
|
@@ -2437,6 +3372,10 @@
|
|
2437
3372
|
<xsl:template name="refine_table-name-style">
|
2438
3373
|
<xsl:param name="continued"/>
|
2439
3374
|
|
3375
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3376
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
3377
|
+
</xsl:if>
|
3378
|
+
|
2440
3379
|
</xsl:template> <!-- refine_table-name-style -->
|
2441
3380
|
|
2442
3381
|
<xsl:attribute-set name="table-row-style">
|
@@ -2586,7 +3525,6 @@
|
|
2586
3525
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2587
3526
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2588
3527
|
|
2589
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2590
3528
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
2591
3529
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2592
3530
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2684,8 +3622,6 @@
|
|
2684
3622
|
|
2685
3623
|
<xsl:attribute-set name="xref-style">
|
2686
3624
|
|
2687
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2688
|
-
|
2689
3625
|
</xsl:attribute-set>
|
2690
3626
|
|
2691
3627
|
<xsl:attribute-set name="eref-style">
|
@@ -2714,12 +3650,18 @@
|
|
2714
3650
|
|
2715
3651
|
<xsl:attribute-set name="note-name-style">
|
2716
3652
|
|
2717
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2718
|
-
|
2719
3653
|
</xsl:attribute-set>
|
2720
3654
|
|
2721
3655
|
<xsl:template name="refine_note-name-style">
|
2722
3656
|
|
3657
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3658
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
3659
|
+
</xsl:if>
|
3660
|
+
<xsl:if test="$vertical_layout = 'true'">
|
3661
|
+
<xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
|
3662
|
+
<xsl:attribute name="font-weight">500</xsl:attribute>
|
3663
|
+
</xsl:if>
|
3664
|
+
|
2723
3665
|
</xsl:template> <!-- refine_note-name-style -->
|
2724
3666
|
|
2725
3667
|
<xsl:attribute-set name="table-note-name-style">
|
@@ -2749,12 +3691,14 @@
|
|
2749
3691
|
|
2750
3692
|
<xsl:attribute-set name="termnote-name-style">
|
2751
3693
|
|
2752
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2753
|
-
|
2754
3694
|
</xsl:attribute-set>
|
2755
3695
|
|
2756
3696
|
<xsl:template name="refine_termnote-name-style">
|
2757
3697
|
|
3698
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3699
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
3700
|
+
</xsl:if>
|
3701
|
+
|
2758
3702
|
</xsl:template>
|
2759
3703
|
|
2760
3704
|
<xsl:attribute-set name="termnote-p-style">
|
@@ -2811,7 +3755,6 @@
|
|
2811
3755
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2812
3756
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2813
3757
|
|
2814
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2815
3758
|
<xsl:attribute name="space-after">2pt</xsl:attribute>
|
2816
3759
|
|
2817
3760
|
</xsl:attribute-set>
|
@@ -2836,7 +3779,6 @@
|
|
2836
3779
|
<xsl:attribute-set name="figure-name-style">
|
2837
3780
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
2838
3781
|
|
2839
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2840
3782
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2841
3783
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2842
3784
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -2850,6 +3792,9 @@
|
|
2850
3792
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2851
3793
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2852
3794
|
</xsl:if>
|
3795
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3796
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
3797
|
+
</xsl:if>
|
2853
3798
|
|
2854
3799
|
</xsl:template> <!-- refine_figure-name-style -->
|
2855
3800
|
|
@@ -2926,7 +3871,6 @@
|
|
2926
3871
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2927
3872
|
|
2928
3873
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2929
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
2930
3874
|
|
2931
3875
|
</xsl:attribute-set>
|
2932
3876
|
|
@@ -3019,7 +3963,7 @@
|
|
3019
3963
|
|
3020
3964
|
<xsl:template name="refine_list-item-label-style">
|
3021
3965
|
|
3022
|
-
<xsl:if test="parent::*[local-name() = 'ol']">
|
3966
|
+
<xsl:if test="parent::*[local-name() = 'ol'] and not($vertical_layout = 'true')">
|
3023
3967
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
3024
3968
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3025
3969
|
</xsl:if>
|
@@ -3042,7 +3986,6 @@
|
|
3042
3986
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3043
3987
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3044
3988
|
|
3045
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
3046
3989
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
3047
3990
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3048
3991
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3051,6 +3994,10 @@
|
|
3051
3994
|
|
3052
3995
|
<xsl:template name="refine_fn-reference-style">
|
3053
3996
|
|
3997
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
3998
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
3999
|
+
</xsl:if>
|
4000
|
+
|
3054
4001
|
</xsl:template> <!-- refine_fn-reference-style -->
|
3055
4002
|
|
3056
4003
|
<xsl:attribute-set name="fn-style">
|
@@ -3060,7 +4007,6 @@
|
|
3060
4007
|
<xsl:attribute-set name="fn-num-style">
|
3061
4008
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3062
4009
|
|
3063
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
3064
4010
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
3065
4011
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3066
4012
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3077,14 +4023,15 @@
|
|
3077
4023
|
|
3078
4024
|
<xsl:template name="refine_fn-body-style">
|
3079
4025
|
|
3080
|
-
<xsl:
|
4026
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
4027
|
+
<xsl:attribute name="font-family">IPAexMincho</xsl:attribute> <!-- prevent font for footnote in Times New Roman main text -->
|
4028
|
+
</xsl:if>
|
3081
4029
|
|
3082
4030
|
</xsl:template> <!-- refine_fn-body-style -->
|
3083
4031
|
|
3084
4032
|
<xsl:attribute-set name="fn-body-num-style">
|
3085
4033
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
3086
4034
|
|
3087
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
3088
4035
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
3089
4036
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3090
4037
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3093,6 +4040,10 @@
|
|
3093
4040
|
|
3094
4041
|
<xsl:template name="refine_fn-body-num-style">
|
3095
4042
|
|
4043
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
4044
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
4045
|
+
</xsl:if>
|
4046
|
+
|
3096
4047
|
</xsl:template> <!-- refine_fn-body-num-style -->
|
3097
4048
|
|
3098
4049
|
<!-- admonition -->
|
@@ -3167,7 +4118,6 @@
|
|
3167
4118
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3168
4119
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
3169
4120
|
|
3170
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
3171
4121
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
3172
4122
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3173
4123
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -5096,7 +6046,8 @@
|
|
5096
6046
|
</xsl:choose>
|
5097
6047
|
</xsl:variable>
|
5098
6048
|
<xsl:variable name="current_fn_number_text">
|
5099
|
-
|
6049
|
+
|
6050
|
+
<xsl:value-of select="$current_fn_number"/>
|
5100
6051
|
|
5101
6052
|
<fo:inline font-weight="normal">)</fo:inline>
|
5102
6053
|
|
@@ -5116,10 +6067,22 @@
|
|
5116
6067
|
<xsl:variable name="fn_styles">
|
5117
6068
|
<xsl:choose>
|
5118
6069
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
5119
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
6070
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
6071
|
+
|
6072
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
6073
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
6074
|
+
</xsl:if>
|
6075
|
+
|
6076
|
+
</fn_styles>
|
5120
6077
|
</xsl:when>
|
5121
6078
|
<xsl:otherwise>
|
5122
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
6079
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
6080
|
+
|
6081
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
6082
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
6083
|
+
</xsl:if>
|
6084
|
+
|
6085
|
+
</fn_styles>
|
5123
6086
|
</xsl:otherwise>
|
5124
6087
|
</xsl:choose>
|
5125
6088
|
</xsl:variable>
|
@@ -5134,8 +6097,10 @@
|
|
5134
6097
|
|
5135
6098
|
<xsl:call-template name="insert_basic_link">
|
5136
6099
|
<xsl:with-param name="element">
|
5137
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl"
|
5138
|
-
<
|
6100
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
6101
|
+
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
6102
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
6103
|
+
</fo:inline>
|
5139
6104
|
</fo:basic-link>
|
5140
6105
|
</xsl:with-param>
|
5141
6106
|
</xsl:call-template>
|
@@ -5253,13 +6218,19 @@
|
|
5253
6218
|
<fo:list-item>
|
5254
6219
|
<fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
|
5255
6220
|
<fo:block>
|
5256
|
-
<fo:inline font-size="9pt"
|
6221
|
+
<fo:inline font-size="9pt">
|
6222
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
6223
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
6224
|
+
</xsl:if>
|
5257
6225
|
<xsl:call-template name="getLocalizedString">
|
5258
6226
|
<xsl:with-param name="key">table_footnote</xsl:with-param>
|
5259
6227
|
</xsl:call-template>
|
5260
6228
|
</fo:inline>
|
5261
6229
|
<xsl:text> </xsl:text>
|
5262
6230
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style">
|
6231
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
6232
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
6233
|
+
</xsl:if>
|
5263
6234
|
<xsl:value-of select="@reference"/>
|
5264
6235
|
<fo:inline font-weight="normal">)</fo:inline>
|
5265
6236
|
</fo:inline>
|
@@ -5427,7 +6398,7 @@
|
|
5427
6398
|
|
5428
6399
|
<xsl:call-template name="refine_fn-reference-style"/>
|
5429
6400
|
|
5430
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6401
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5431
6402
|
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
|
5432
6403
|
<xsl:attribute name="internal-destination">
|
5433
6404
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
@@ -6204,7 +7175,9 @@
|
|
6204
7175
|
|
6205
7176
|
<xsl:template name="refine_strong_style">
|
6206
7177
|
|
6207
|
-
<xsl:
|
7178
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
7179
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
7180
|
+
</xsl:if>
|
6208
7181
|
|
6209
7182
|
<xsl:if test="ancestor::*['preferred']">
|
6210
7183
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -6436,9 +7409,19 @@
|
|
6436
7409
|
</fo:inline>
|
6437
7410
|
</xsl:template>
|
6438
7411
|
|
6439
|
-
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
7412
|
+
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
|
7413
|
+
<xsl:param name="txt"/>
|
6440
7414
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
6441
|
-
<xsl:variable name="text"
|
7415
|
+
<xsl:variable name="text">
|
7416
|
+
<xsl:choose>
|
7417
|
+
<xsl:when test="$txt != ''">
|
7418
|
+
<xsl:value-of select="$txt"/>
|
7419
|
+
</xsl:when>
|
7420
|
+
<xsl:otherwise>
|
7421
|
+
<xsl:value-of select="."/>
|
7422
|
+
</xsl:otherwise>
|
7423
|
+
</xsl:choose>
|
7424
|
+
</xsl:variable>
|
6442
7425
|
<xsl:variable name="ratio_">
|
6443
7426
|
0.75
|
6444
7427
|
</xsl:variable>
|
@@ -6552,7 +7535,12 @@
|
|
6552
7535
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
6553
7536
|
|
6554
7537
|
<xsl:if test="@name = 'font-family' and . = 'MS Gothic'">
|
6555
|
-
<xsl:
|
7538
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
7539
|
+
<xsl:attribute name="{@name}">IPAexGothic</xsl:attribute>
|
7540
|
+
</xsl:if>
|
7541
|
+
<xsl:if test="$vertical_layout = 'true'">
|
7542
|
+
<xsl:attribute name="{@name}">Noto Serif JP</xsl:attribute>
|
7543
|
+
</xsl:if>
|
6556
7544
|
</xsl:if>
|
6557
7545
|
|
6558
7546
|
</xsl:for-each>
|
@@ -7888,9 +8876,12 @@
|
|
7888
8876
|
<xsl:apply-templates/>
|
7889
8877
|
</xsl:when>
|
7890
8878
|
<xsl:otherwise>
|
8879
|
+
<xsl:variable name="alt_text">
|
8880
|
+
<xsl:call-template name="getAltText"/>
|
8881
|
+
</xsl:variable>
|
7891
8882
|
<xsl:call-template name="insert_basic_link">
|
7892
8883
|
<xsl:with-param name="element">
|
7893
|
-
<fo:basic-link external-destination="{$target}" fox:alt-text="{$
|
8884
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
|
7894
8885
|
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7895
8886
|
<xsl:attribute name="role">Annot</xsl:attribute>
|
7896
8887
|
</xsl:if>
|
@@ -7917,6 +8908,14 @@
|
|
7917
8908
|
</fo:inline>
|
7918
8909
|
</xsl:template> <!-- link -->
|
7919
8910
|
|
8911
|
+
<xsl:template name="getAltText">
|
8912
|
+
<xsl:choose>
|
8913
|
+
<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
|
8914
|
+
<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
|
8915
|
+
<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
|
8916
|
+
</xsl:choose>
|
8917
|
+
</xsl:template>
|
8918
|
+
|
7920
8919
|
<!-- ======================== -->
|
7921
8920
|
<!-- Appendix processing -->
|
7922
8921
|
<!-- ======================== -->
|
@@ -7947,7 +8946,7 @@
|
|
7947
8946
|
<xsl:template match="*[local-name() = 'callout']">
|
7948
8947
|
<xsl:choose>
|
7949
8948
|
<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
|
7950
|
-
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{
|
8949
|
+
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
|
7951
8950
|
</xsl:choose>
|
7952
8951
|
</xsl:template>
|
7953
8952
|
|
@@ -7976,10 +8975,18 @@
|
|
7976
8975
|
<xsl:template match="*[local-name() = 'xref']">
|
7977
8976
|
<xsl:call-template name="insert_basic_link">
|
7978
8977
|
<xsl:with-param name="element">
|
7979
|
-
<
|
8978
|
+
<xsl:variable name="alt_text">
|
8979
|
+
<xsl:call-template name="getAltText"/>
|
8980
|
+
</xsl:variable>
|
8981
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
7980
8982
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
7981
8983
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7982
8984
|
</xsl:if>
|
8985
|
+
|
8986
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
8987
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
8988
|
+
</xsl:if>
|
8989
|
+
|
7983
8990
|
<xsl:if test="parent::*[local-name() = 'add']">
|
7984
8991
|
<xsl:call-template name="append_add-style"/>
|
7985
8992
|
</xsl:if>
|
@@ -8088,39 +9095,37 @@
|
|
8088
9095
|
|
8089
9096
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
8090
9097
|
|
8091
|
-
|
8092
|
-
|
8093
|
-
<xsl:call-template name="setBlockSpanAll"/>
|
8094
|
-
|
8095
|
-
<xsl:call-template name="refine_note-style"/>
|
8096
|
-
|
8097
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9098
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
9099
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
8098
9100
|
|
8099
|
-
|
8100
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
8101
|
-
<xsl:choose>
|
8102
|
-
<!-- if last char is digit -->
|
8103
|
-
<xsl:when test="translate(substring(*[local-name() = 'name'], string-length(*[local-name() = 'name'])),'0123456789','') = ''"><xsl:value-of select="14 + $text_indent"/>mm</xsl:when>
|
8104
|
-
<xsl:otherwise><xsl:value-of select="10 + $text_indent"/>mm</xsl:otherwise>
|
8105
|
-
</xsl:choose>
|
8106
|
-
</xsl:attribute>
|
8107
|
-
<fo:list-item>
|
8108
|
-
<fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
|
8109
|
-
<fo:block xsl:use-attribute-sets="note-name-style">
|
8110
|
-
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
8111
|
-
</fo:block>
|
8112
|
-
</fo:list-item-label>
|
8113
|
-
<fo:list-item-body start-indent="body-start()">
|
8114
|
-
<fo:block>
|
8115
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
8116
|
-
</fo:block>
|
8117
|
-
</fo:list-item-body>
|
8118
|
-
</fo:list-item>
|
8119
|
-
</fo:list-block>
|
8120
|
-
<!-- jis -->
|
9101
|
+
<xsl:call-template name="refine_note-style"/>
|
8121
9102
|
|
8122
|
-
|
8123
|
-
|
9103
|
+
<fo:list-block>
|
9104
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
9105
|
+
<xsl:choose>
|
9106
|
+
<!-- if last char is digit -->
|
9107
|
+
<xsl:when test="translate(substring(*[local-name() = 'name'], string-length(*[local-name() = 'name'])),'0123456789','') = ''"><xsl:value-of select="16 + $text_indent"/>mm</xsl:when>
|
9108
|
+
<xsl:otherwise><xsl:value-of select="10 + $text_indent"/>mm</xsl:otherwise>
|
9109
|
+
</xsl:choose>
|
9110
|
+
</xsl:attribute>
|
9111
|
+
<fo:list-item>
|
9112
|
+
<fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
|
9113
|
+
<xsl:if test="$vertical_layout = 'true'">
|
9114
|
+
<xsl:attribute name="start-indent">0mm</xsl:attribute>
|
9115
|
+
</xsl:if>
|
9116
|
+
<fo:block xsl:use-attribute-sets="note-name-style">
|
9117
|
+
<xsl:call-template name="refine_note-name-style"/>
|
9118
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
9119
|
+
</fo:block>
|
9120
|
+
</fo:list-item-label>
|
9121
|
+
<fo:list-item-body start-indent="body-start()">
|
9122
|
+
<fo:block>
|
9123
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
9124
|
+
</fo:block>
|
9125
|
+
</fo:list-item-body>
|
9126
|
+
</fo:list-item>
|
9127
|
+
</fo:list-block>
|
9128
|
+
</fo:block>
|
8124
9129
|
|
8125
9130
|
</xsl:template>
|
8126
9131
|
|
@@ -10449,12 +11454,14 @@
|
|
10449
11454
|
|
10450
11455
|
<xsl:when test="contains(normalize-space($fo_element), 'list')">
|
10451
11456
|
|
10452
|
-
<xsl:variable name="
|
11457
|
+
<xsl:variable name="provisional_distance_between_starts_">
|
10453
11458
|
<xsl:value-of select="10 + $text_indent"/>
|
10454
11459
|
</xsl:variable>
|
10455
|
-
<xsl:variable name="
|
11460
|
+
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
11461
|
+
<xsl:variable name="indent_">
|
10456
11462
|
<xsl:value-of select="$text_indent"/>
|
10457
11463
|
</xsl:variable>
|
11464
|
+
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
10458
11465
|
|
10459
11466
|
<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
10460
11467
|
<fo:list-item>
|
@@ -10518,6 +11525,11 @@
|
|
10518
11525
|
</xsl:when>
|
10519
11526
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
10520
11527
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
11528
|
+
|
11529
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
11530
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
11531
|
+
</xsl:if>
|
11532
|
+
|
10521
11533
|
<xsl:apply-templates/>
|
10522
11534
|
</fo:block>
|
10523
11535
|
</xsl:when>
|
@@ -10533,6 +11545,11 @@
|
|
10533
11545
|
|
10534
11546
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
10535
11547
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11548
|
+
|
11549
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
11550
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
11551
|
+
</xsl:if>
|
11552
|
+
|
10536
11553
|
<xsl:apply-templates/>
|
10537
11554
|
</fo:inline>
|
10538
11555
|
</xsl:template>
|
@@ -10899,14 +11916,34 @@
|
|
10899
11916
|
</xsl:variable>
|
10900
11917
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
10901
11918
|
|
11919
|
+
<xsl:if test="$vertical_layout = 'true'">
|
11920
|
+
<xsl:attribute name="letter-spacing">1mm</xsl:attribute>
|
11921
|
+
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
11922
|
+
</xsl:if>
|
11923
|
+
|
10902
11924
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
10903
11925
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
11926
|
+
|
11927
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
11928
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
11929
|
+
</xsl:if>
|
11930
|
+
|
10904
11931
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
10905
11932
|
</fo:block>
|
10906
11933
|
</xsl:if>
|
10907
11934
|
|
10908
11935
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
10909
11936
|
<xsl:call-template name="setStyle_preferred"/>
|
11937
|
+
|
11938
|
+
<xsl:if test="$vertical_layout = 'true'">
|
11939
|
+
<xsl:attribute name="margin-left">6mm</xsl:attribute>
|
11940
|
+
<xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
|
11941
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11942
|
+
</xsl:if>
|
11943
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
11944
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
11945
|
+
</xsl:if>
|
11946
|
+
|
10910
11947
|
<xsl:apply-templates/>
|
10911
11948
|
</fo:block>
|
10912
11949
|
</fo:block>
|
@@ -11171,14 +12208,17 @@
|
|
11171
12208
|
</xsl:when>
|
11172
12209
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
11173
12210
|
|
11174
|
-
<xsl:variable name="
|
12211
|
+
<xsl:variable name="type" select="../@type"/>
|
11175
12212
|
|
11176
|
-
|
12213
|
+
<xsl:variable name="label">
|
11177
12214
|
|
11178
12215
|
<xsl:variable name="style_prefix_">
|
11179
12216
|
<xsl:if test="$type = 'roman'">
|
11180
12217
|
<!-- Example: (i) -->
|
11181
12218
|
</xsl:if>
|
12219
|
+
<xsl:if test="$type = 'alphabet'">
|
12220
|
+
|
12221
|
+
</xsl:if>
|
11182
12222
|
</xsl:variable>
|
11183
12223
|
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
11184
12224
|
|
@@ -11204,13 +12244,15 @@
|
|
11204
12244
|
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
11205
12245
|
<xsl:value-of select="$style_prefix"/>
|
11206
12246
|
</xsl:if>
|
12247
|
+
|
11207
12248
|
<xsl:value-of select="@label"/>
|
12249
|
+
|
11208
12250
|
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
11209
12251
|
<xsl:value-of select="$style_suffix"/>
|
11210
12252
|
</xsl:if>
|
11211
12253
|
</xsl:variable>
|
11212
12254
|
|
11213
|
-
|
12255
|
+
<xsl:value-of select="normalize-space($label)"/>
|
11214
12256
|
|
11215
12257
|
</xsl:when>
|
11216
12258
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
@@ -11315,18 +12357,32 @@
|
|
11315
12357
|
</xsl:when>
|
11316
12358
|
<xsl:otherwise>
|
11317
12359
|
|
11318
|
-
<
|
11319
|
-
<xsl:
|
11320
|
-
<
|
11321
|
-
|
11322
|
-
|
11323
|
-
|
12360
|
+
<xsl:choose>
|
12361
|
+
<xsl:when test="$vertical_layout = 'true'">
|
12362
|
+
<fo:block role="SKIP">
|
12363
|
+
<xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
|
12364
|
+
<xsl:attribute name="margin-left">-3.5mm</xsl:attribute>
|
12365
|
+
</xsl:if>
|
11324
12366
|
<xsl:apply-templates select="." mode="list">
|
11325
12367
|
<xsl:with-param name="indent" select="$indent"/>
|
11326
12368
|
</xsl:apply-templates>
|
11327
12369
|
</fo:block>
|
11328
|
-
</
|
11329
|
-
|
12370
|
+
</xsl:when>
|
12371
|
+
<xsl:otherwise>
|
12372
|
+
<fo:block-container role="SKIP">
|
12373
|
+
<xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
|
12374
|
+
<xsl:attribute name="margin-left">3.5mm</xsl:attribute>
|
12375
|
+
</xsl:if>
|
12376
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
12377
|
+
<fo:block>
|
12378
|
+
<xsl:apply-templates select="." mode="list">
|
12379
|
+
<xsl:with-param name="indent" select="$indent"/>
|
12380
|
+
</xsl:apply-templates>
|
12381
|
+
</fo:block>
|
12382
|
+
</fo:block-container>
|
12383
|
+
</fo:block-container>
|
12384
|
+
</xsl:otherwise>
|
12385
|
+
</xsl:choose>
|
11330
12386
|
|
11331
12387
|
</xsl:otherwise>
|
11332
12388
|
</xsl:choose>
|
@@ -11398,6 +12454,29 @@
|
|
11398
12454
|
|
11399
12455
|
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
11400
12456
|
|
12457
|
+
<xsl:if test="local-name() = 'ol' and $vertical_layout = 'true' and @type = 'arabic'">
|
12458
|
+
<xsl:variable name="labels">
|
12459
|
+
<xsl:for-each select="*[local-name() = 'li']"><label_len><xsl:value-of select="string-length(@label)"/></label_len></xsl:for-each>
|
12460
|
+
</xsl:variable>
|
12461
|
+
<xsl:variable name="max_len_label_">
|
12462
|
+
<xsl:for-each select="xalan:nodeset($labels)//*">
|
12463
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
12464
|
+
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
12465
|
+
</xsl:for-each>
|
12466
|
+
</xsl:variable>
|
12467
|
+
<xsl:variable name="max_len_label" select="number($max_len_label_)"/>
|
12468
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
12469
|
+
<xsl:choose>
|
12470
|
+
<xsl:when test="$max_len_label = 1">8.5mm</xsl:when>
|
12471
|
+
<xsl:when test="$max_len_label = 2">12mm</xsl:when>
|
12472
|
+
<xsl:when test="$max_len_label = 3">20mm</xsl:when>
|
12473
|
+
<xsl:otherwise>
|
12474
|
+
<xsl:value-of select="3 + number($max_len_label) * 4"/>mm
|
12475
|
+
</xsl:otherwise>
|
12476
|
+
</xsl:choose>
|
12477
|
+
</xsl:attribute>
|
12478
|
+
</xsl:if>
|
12479
|
+
|
11401
12480
|
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
11402
12481
|
|
11403
12482
|
<xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
@@ -11886,7 +12965,10 @@
|
|
11886
12965
|
<xsl:if test=".//*[local-name() = 'fn']">
|
11887
12966
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
11888
12967
|
</xsl:if>
|
11889
|
-
<fo:inline font-
|
12968
|
+
<fo:inline font-weight="bold">
|
12969
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
12970
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
12971
|
+
</xsl:if>
|
11890
12972
|
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
11891
12973
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
11892
12974
|
</xsl:apply-templates>
|
@@ -13533,7 +14615,8 @@
|
|
13533
14615
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
13534
14616
|
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
13535
14617
|
<!-- Todo: need update -->
|
13536
|
-
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = '
|
14618
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
14619
|
+
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
13537
14620
|
|
13538
14621
|
<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
|
13539
14622
|
<xsl:attribute name="src">
|
@@ -13554,6 +14637,9 @@
|
|
13554
14637
|
<xsl:if test="$afrelationship != ''">
|
13555
14638
|
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13556
14639
|
</xsl:if>
|
14640
|
+
<xsl:if test="$volatile != ''">
|
14641
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
14642
|
+
</xsl:if>
|
13557
14643
|
</pdf:embedded-file>
|
13558
14644
|
</xsl:for-each>
|
13559
14645
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
@@ -13564,14 +14650,18 @@
|
|
13564
14650
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13565
14651
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13566
14652
|
<!-- Todo: need update -->
|
13567
|
-
|
14653
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
14654
|
+
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
13568
14655
|
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
13569
14656
|
<xsl:if test="$description != ''">
|
13570
14657
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13571
14658
|
</xsl:if>
|
13572
14659
|
<xsl:if test="$afrelationship != ''">
|
13573
|
-
|
13574
|
-
|
14660
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
14661
|
+
</xsl:if>
|
14662
|
+
<xsl:if test="$volatile != ''">
|
14663
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
14664
|
+
</xsl:if>
|
13575
14665
|
</pdf:embedded-file>
|
13576
14666
|
</xsl:for-each>
|
13577
14667
|
</xsl:if>
|
@@ -13618,10 +14708,31 @@
|
|
13618
14708
|
<xsl:value-of select="$level_total - 2"/>
|
13619
14709
|
</xsl:when>
|
13620
14710
|
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
13621
|
-
|
14711
|
+
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
14712
|
+
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
14713
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
|
14714
|
+
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
14715
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
|
14716
|
+
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
14717
|
+
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
14718
|
+
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
14719
|
+
<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
|
14720
|
+
<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
|
14721
|
+
<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
|
13622
14722
|
<xsl:choose>
|
13623
|
-
<xsl:when test="string(number($
|
13624
|
-
<xsl:value-of select="number($
|
14723
|
+
<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
|
14724
|
+
<xsl:value-of select="number($curr_clause_depth)"/>
|
14725
|
+
</xsl:when>
|
14726
|
+
<xsl:otherwise>
|
14727
|
+
<xsl:value-of select="$level_total - 2"/>
|
14728
|
+
</xsl:otherwise>
|
14729
|
+
</xsl:choose>
|
14730
|
+
</xsl:when>
|
14731
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
|
14732
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
14733
|
+
<xsl:choose>
|
14734
|
+
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
14735
|
+
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
13625
14736
|
</xsl:when>
|
13626
14737
|
<xsl:otherwise>
|
13627
14738
|
<xsl:value-of select="$level_total - 2"/>
|
@@ -13629,7 +14740,7 @@
|
|
13629
14740
|
</xsl:choose>
|
13630
14741
|
</xsl:when>
|
13631
14742
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13632
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
14743
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
13633
14744
|
<xsl:choose>
|
13634
14745
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13635
14746
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -13944,9 +15055,10 @@
|
|
13944
15055
|
<xsl:template name="insertBackgroundPageImage">
|
13945
15056
|
<xsl:param name="number">1</xsl:param>
|
13946
15057
|
<xsl:param name="name">coverpage-image</xsl:param>
|
15058
|
+
<xsl:param name="suffix"/>
|
13947
15059
|
<xsl:variable name="num" select="number($number)"/>
|
13948
15060
|
<!-- background image -->
|
13949
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
15061
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13950
15062
|
<fo:block>
|
13951
15063
|
<xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
|
13952
15064
|
<xsl:choose>
|
@@ -14012,16 +15124,29 @@
|
|
14012
15124
|
|
14013
15125
|
<!-- END: insert cover page image -->
|
14014
15126
|
|
15127
|
+
<xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
14015
15128
|
<xsl:template name="insertVerticalChar">
|
14016
15129
|
<xsl:param name="str"/>
|
15130
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
15131
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
14017
15132
|
<xsl:if test="string-length($str) > 0">
|
14018
|
-
<fo:inline-container
|
15133
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
15134
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
15135
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
15136
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
15137
|
+
</xsl:if>
|
15138
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
15139
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
15140
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
15141
|
+
</xsl:if>
|
14019
15142
|
<fo:block-container width="1em">
|
14020
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
15143
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
14021
15144
|
</fo:block-container>
|
14022
15145
|
</fo:inline-container>
|
14023
15146
|
<xsl:call-template name="insertVerticalChar">
|
14024
15147
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
15148
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
15149
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
14025
15150
|
</xsl:call-template>
|
14026
15151
|
</xsl:if>
|
14027
15152
|
</xsl:template>
|