metanorma-bipm 2.2.9 → 2.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +500 -111
- data/lib/isodoc/bipm/bipm.guide.xsl +500 -111
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +500 -111
- data/lib/isodoc/bipm/bipm.rapport.xsl +500 -111
- data/lib/isodoc/bipm/i18n-en.yaml +3 -1
- data/lib/isodoc/bipm/i18n-fr.yaml +3 -1
- data/lib/isodoc/bipm/init.rb +1 -1
- data/lib/isodoc/bipm/jcgm.standard.xsl +552 -150
- data/lib/isodoc/bipm/presentation_xml_convert.rb +53 -33
- data/lib/metanorma/bipm/converter.rb +11 -3
- data/lib/metanorma/bipm/isodoc.rng +23 -1
- data/lib/metanorma/bipm/version.rb +1 -1
- data/lib/relaton/render/config.yml +47 -0
- data/lib/relaton/render/general.rb +23 -0
- data/lib/relaton/render/parse.rb +20 -0
- metadata +5 -2
@@ -342,71 +342,16 @@
|
|
342
342
|
<xsl:copy-of select="."/>
|
343
343
|
</xsl:variable>
|
344
344
|
<xsl:for-each select="xalan:nodeset($current_document)">
|
345
|
-
<xsl:variable name="docid">
|
346
|
-
<xsl:call-template name="getDocumentId"/>
|
347
|
-
</xsl:variable>
|
348
|
-
|
349
|
-
<!-- Table of Contents -->
|
350
|
-
<fo:block-container>
|
351
|
-
<fo:block role="TOC">
|
352
|
-
<fo:block text-align-last="justify">
|
353
|
-
<fo:inline font-size="15pt" font-weight="bold" role="H1">
|
354
|
-
<xsl:call-template name="getLocalizedString">
|
355
|
-
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
356
|
-
</xsl:call-template>
|
357
|
-
</fo:inline>
|
358
|
-
<fo:inline keep-together.within-line="always">
|
359
|
-
<fo:leader leader-pattern="space"/>
|
360
|
-
<xsl:call-template name="getLocalizedString">
|
361
|
-
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
362
|
-
</xsl:call-template>
|
363
|
-
</fo:inline>
|
364
|
-
</fo:block>
|
365
345
|
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
<xsl:variable name="annexes_title">
|
374
|
-
<xsl:call-template name="getLocalizedString">
|
375
|
-
<xsl:with-param name="key">Annex.pl</xsl:with-param>
|
376
|
-
</xsl:call-template>
|
377
|
-
</xsl:variable>
|
378
|
-
|
379
|
-
<xsl:for-each select="$contents/doc[@id=$docid]//item[@display = 'true']"> <!-- and not (@type = 'annex') and not (@type = 'references') -->
|
380
|
-
<xsl:if test="@type = 'annex' and not(preceding-sibling::item[@display = 'true' and @type = 'annex'])">
|
381
|
-
<fo:block font-size="12pt" space-before="16pt" font-weight="bold" role="TOCI">
|
382
|
-
<xsl:value-of select="$annexes_title"/>
|
383
|
-
</fo:block>
|
384
|
-
</xsl:if>
|
385
|
-
<xsl:call-template name="print_JCGN_toc_item"/>
|
386
|
-
</xsl:for-each>
|
387
|
-
|
388
|
-
<!-- List of Tables -->
|
389
|
-
<xsl:if test="$contents//tables/table">
|
390
|
-
<xsl:call-template name="insertListOf_Title">
|
391
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
392
|
-
</xsl:call-template>
|
393
|
-
<xsl:for-each select="$contents//tables/table">
|
394
|
-
<xsl:call-template name="insertListOf_Item"/>
|
395
|
-
</xsl:for-each>
|
396
|
-
</xsl:if>
|
397
|
-
|
398
|
-
<!-- List of Figures -->
|
399
|
-
<xsl:if test="$contents//figures/figure">
|
400
|
-
<xsl:call-template name="insertListOf_Title">
|
401
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
402
|
-
</xsl:call-template>
|
403
|
-
<xsl:for-each select="$contents//figures/figure">
|
404
|
-
<xsl:call-template name="insertListOf_Item"/>
|
405
|
-
</xsl:for-each>
|
406
|
-
</xsl:if>
|
346
|
+
<xsl:if test="$debug = 'true'">
|
347
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
348
|
+
DEBUG
|
349
|
+
contents=<xsl:copy-of select="$contents"/>
|
350
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
351
|
+
</xsl:if>
|
407
352
|
|
408
|
-
|
409
|
-
|
353
|
+
<!-- Table of Contents -->
|
354
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='clause'][@type = 'toc']"/>
|
410
355
|
|
411
356
|
</xsl:for-each>
|
412
357
|
|
@@ -431,7 +376,7 @@
|
|
431
376
|
</xsl:for-each>
|
432
377
|
<xsl:for-each select="//*[local-name() = 'bipm-standard']">
|
433
378
|
<fo:block break-after="page"/>
|
434
|
-
<xsl:apply-templates select="./*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition']"/>
|
379
|
+
<xsl:apply-templates select="./*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition' and not(local-name() = 'clause' and @type = 'toc')]"/>
|
435
380
|
</xsl:for-each>
|
436
381
|
<xsl:for-each select="//*[local-name() = 'bipm-standard']">
|
437
382
|
<fo:block break-after="page"/>
|
@@ -573,6 +518,69 @@
|
|
573
518
|
</fo:block>
|
574
519
|
</xsl:template>
|
575
520
|
|
521
|
+
<xsl:template match="jcgm:preface/jcgm:clause[@type = 'toc']" priority="3">
|
522
|
+
<fo:block-container>
|
523
|
+
<fo:block role="TOC">
|
524
|
+
|
525
|
+
<xsl:apply-templates/>
|
526
|
+
|
527
|
+
<xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
|
528
|
+
|
529
|
+
<xsl:variable name="docid">
|
530
|
+
<xsl:call-template name="getDocumentId"/>
|
531
|
+
</xsl:variable>
|
532
|
+
|
533
|
+
<xsl:for-each select="$contents/doc[@id=$docid]//item[@display = 'true']"> <!-- and not (@type = 'annex') and not (@type = 'references') -->
|
534
|
+
<xsl:if test="@type = 'annex' and not(preceding-sibling::item[@display = 'true' and @type = 'annex'])">
|
535
|
+
<fo:block font-size="12pt" space-before="16pt" font-weight="bold" role="TOCI">
|
536
|
+
<xsl:call-template name="getLocalizedString">
|
537
|
+
<xsl:with-param name="key">Annex.pl</xsl:with-param>
|
538
|
+
</xsl:call-template>
|
539
|
+
</fo:block>
|
540
|
+
</xsl:if>
|
541
|
+
<xsl:call-template name="print_JCGN_toc_item"/>
|
542
|
+
</xsl:for-each>
|
543
|
+
|
544
|
+
<!-- List of Tables -->
|
545
|
+
<xsl:if test="$contents//tables/table">
|
546
|
+
<xsl:call-template name="insertListOf_Title">
|
547
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
548
|
+
</xsl:call-template>
|
549
|
+
<xsl:for-each select="$contents//tables/table">
|
550
|
+
<xsl:call-template name="insertListOf_Item"/>
|
551
|
+
</xsl:for-each>
|
552
|
+
</xsl:if>
|
553
|
+
|
554
|
+
<!-- List of Figures -->
|
555
|
+
<xsl:if test="$contents//figures/figure">
|
556
|
+
<xsl:call-template name="insertListOf_Title">
|
557
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
558
|
+
</xsl:call-template>
|
559
|
+
<xsl:for-each select="$contents//figures/figure">
|
560
|
+
<xsl:call-template name="insertListOf_Item"/>
|
561
|
+
</xsl:for-each>
|
562
|
+
</xsl:if>
|
563
|
+
</xsl:if>
|
564
|
+
</fo:block>
|
565
|
+
</fo:block-container>
|
566
|
+
</xsl:template>
|
567
|
+
|
568
|
+
<xsl:template match="jcgm:preface/jcgm:clause[@type = 'toc']/jcgm:title" priority="3">
|
569
|
+
<fo:block text-align-last="justify">
|
570
|
+
<fo:inline font-size="15pt" font-weight="bold" role="H1">
|
571
|
+
<xsl:call-template name="getLocalizedString">
|
572
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
573
|
+
</xsl:call-template>
|
574
|
+
</fo:inline>
|
575
|
+
<fo:inline keep-together.within-line="always">
|
576
|
+
<fo:leader leader-pattern="space"/>
|
577
|
+
<xsl:call-template name="getLocalizedString">
|
578
|
+
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
579
|
+
</xsl:call-template>
|
580
|
+
</fo:inline>
|
581
|
+
</fo:block>
|
582
|
+
</xsl:template>
|
583
|
+
|
576
584
|
<xsl:template match="node()">
|
577
585
|
<xsl:apply-templates/>
|
578
586
|
</xsl:template>
|
@@ -612,6 +620,7 @@
|
|
612
620
|
|
613
621
|
<xsl:variable name="skip">
|
614
622
|
<xsl:choose>
|
623
|
+
<xsl:when test="@type = 'toc'">true</xsl:when>
|
615
624
|
<xsl:when test="ancestor-or-self::*[local-name()='bibitem']">true</xsl:when>
|
616
625
|
<xsl:when test="ancestor-or-self::*[local-name()='term']">true</xsl:when>
|
617
626
|
<xsl:otherwise>false</xsl:otherwise>
|
@@ -2092,6 +2101,10 @@
|
|
2092
2101
|
|
2093
2102
|
</xsl:attribute-set>
|
2094
2103
|
|
2104
|
+
<xsl:template name="refine_link-style">
|
2105
|
+
|
2106
|
+
</xsl:template> <!-- refine_link-style -->
|
2107
|
+
|
2095
2108
|
<xsl:attribute-set name="sourcecode-container-style">
|
2096
2109
|
|
2097
2110
|
</xsl:attribute-set>
|
@@ -2106,6 +2119,10 @@
|
|
2106
2119
|
|
2107
2120
|
</xsl:attribute-set>
|
2108
2121
|
|
2122
|
+
<xsl:template name="refine_sourcecode-style">
|
2123
|
+
|
2124
|
+
</xsl:template> <!-- refine_sourcecode-style -->
|
2125
|
+
|
2109
2126
|
<xsl:attribute-set name="pre-style">
|
2110
2127
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
2111
2128
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -2192,6 +2209,10 @@
|
|
2192
2209
|
|
2193
2210
|
</xsl:attribute-set> <!-- example-style -->
|
2194
2211
|
|
2212
|
+
<xsl:template name="refine_example-style">
|
2213
|
+
|
2214
|
+
</xsl:template> <!-- refine_example-style -->
|
2215
|
+
|
2195
2216
|
<xsl:attribute-set name="example-body-style">
|
2196
2217
|
|
2197
2218
|
</xsl:attribute-set> <!-- example-body-style -->
|
@@ -2210,6 +2231,10 @@
|
|
2210
2231
|
|
2211
2232
|
</xsl:attribute-set> <!-- example-p-style -->
|
2212
2233
|
|
2234
|
+
<xsl:template name="refine_example-p-style">
|
2235
|
+
|
2236
|
+
</xsl:template> <!-- refine_example-p-style -->
|
2237
|
+
|
2213
2238
|
<xsl:attribute-set name="termexample-name-style">
|
2214
2239
|
|
2215
2240
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -2239,6 +2264,12 @@
|
|
2239
2264
|
|
2240
2265
|
</xsl:attribute-set> <!-- table-container-style -->
|
2241
2266
|
|
2267
|
+
<xsl:template name="refine_table-container-style">
|
2268
|
+
<xsl:param name="margin-side"/>
|
2269
|
+
|
2270
|
+
<!-- end table block-container attributes -->
|
2271
|
+
</xsl:template> <!-- refine_table-container-style -->
|
2272
|
+
|
2242
2273
|
<xsl:attribute-set name="table-style">
|
2243
2274
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
2244
2275
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
@@ -2247,6 +2278,17 @@
|
|
2247
2278
|
|
2248
2279
|
</xsl:attribute-set><!-- table-style -->
|
2249
2280
|
|
2281
|
+
<xsl:template name="refine_table-style">
|
2282
|
+
<xsl:param name="margin-side"/>
|
2283
|
+
|
2284
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2285
|
+
|
2286
|
+
<xsl:if test="*[local-name()='thead']">
|
2287
|
+
<xsl:attribute name="border-top">1pt solid black</xsl:attribute>
|
2288
|
+
</xsl:if>
|
2289
|
+
|
2290
|
+
</xsl:template> <!-- refine_table-style -->
|
2291
|
+
|
2250
2292
|
<xsl:attribute-set name="table-name-style">
|
2251
2293
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2252
2294
|
|
@@ -2257,6 +2299,11 @@
|
|
2257
2299
|
|
2258
2300
|
</xsl:attribute-set> <!-- table-name-style -->
|
2259
2301
|
|
2302
|
+
<xsl:template name="refine_table-name-style">
|
2303
|
+
<xsl:param name="continued"/>
|
2304
|
+
|
2305
|
+
</xsl:template> <!-- refine_table-name-style -->
|
2306
|
+
|
2260
2307
|
<xsl:attribute-set name="table-row-style">
|
2261
2308
|
<xsl:attribute name="min-height">4mm</xsl:attribute>
|
2262
2309
|
|
@@ -2270,6 +2317,23 @@
|
|
2270
2317
|
|
2271
2318
|
</xsl:attribute-set>
|
2272
2319
|
|
2320
|
+
<xsl:template name="refine_table-header-row-style">
|
2321
|
+
|
2322
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2323
|
+
|
2324
|
+
<xsl:choose>
|
2325
|
+
<xsl:when test="position() = 1">
|
2326
|
+
<xsl:attribute name="border-top">solid black 1.5pt</xsl:attribute>
|
2327
|
+
<xsl:attribute name="border-bottom">solid black 1pt</xsl:attribute>
|
2328
|
+
</xsl:when>
|
2329
|
+
<xsl:when test="position() = last()">
|
2330
|
+
<xsl:attribute name="border-top">solid black 1pt</xsl:attribute>
|
2331
|
+
<xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
|
2332
|
+
</xsl:when>
|
2333
|
+
</xsl:choose>
|
2334
|
+
|
2335
|
+
</xsl:template> <!-- refine_table-header-row-style -->
|
2336
|
+
|
2273
2337
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
2274
2338
|
|
2275
2339
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
@@ -2278,10 +2342,20 @@
|
|
2278
2342
|
|
2279
2343
|
</xsl:attribute-set>
|
2280
2344
|
|
2345
|
+
<xsl:template name="refine_table-footer-row-style">
|
2346
|
+
|
2347
|
+
</xsl:template> <!-- refine_table-footer-row-style -->
|
2348
|
+
|
2281
2349
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
2282
2350
|
|
2283
2351
|
</xsl:attribute-set>
|
2284
2352
|
|
2353
|
+
<xsl:template name="refine_table-body-row-style">
|
2354
|
+
|
2355
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2356
|
+
|
2357
|
+
</xsl:template> <!-- refine_table-body-row-style -->
|
2358
|
+
|
2285
2359
|
<xsl:attribute-set name="table-header-cell-style">
|
2286
2360
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2287
2361
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -2293,6 +2367,18 @@
|
|
2293
2367
|
|
2294
2368
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
2295
2369
|
|
2370
|
+
<xsl:template name="refine_table-header-cell-style">
|
2371
|
+
|
2372
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2373
|
+
|
2374
|
+
<xsl:if test="$lang = 'ar'">
|
2375
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2376
|
+
</xsl:if>
|
2377
|
+
|
2378
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
2379
|
+
|
2380
|
+
</xsl:template> <!-- refine_table-header-cell-style -->
|
2381
|
+
|
2296
2382
|
<xsl:attribute-set name="table-cell-style">
|
2297
2383
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
2298
2384
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -2303,6 +2389,25 @@
|
|
2303
2389
|
|
2304
2390
|
</xsl:attribute-set> <!-- table-cell-style -->
|
2305
2391
|
|
2392
|
+
<xsl:template name="refine_table-cell-style">
|
2393
|
+
|
2394
|
+
<xsl:if test="$lang = 'ar'">
|
2395
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2396
|
+
</xsl:if>
|
2397
|
+
|
2398
|
+
<!-- bsi -->
|
2399
|
+
|
2400
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2401
|
+
|
2402
|
+
<xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
|
2403
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
2404
|
+
</xsl:if>
|
2405
|
+
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
2406
|
+
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
2407
|
+
</xsl:if>
|
2408
|
+
|
2409
|
+
</xsl:template> <!-- refine_table-cell-style -->
|
2410
|
+
|
2306
2411
|
<xsl:attribute-set name="table-footer-cell-style">
|
2307
2412
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
2308
2413
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -2313,6 +2418,10 @@
|
|
2313
2418
|
|
2314
2419
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
2315
2420
|
|
2421
|
+
<xsl:template name="refine_table-footer-cell-style">
|
2422
|
+
|
2423
|
+
</xsl:template> <!-- refine_table-footer-cell-style -->
|
2424
|
+
|
2316
2425
|
<xsl:attribute-set name="table-note-style">
|
2317
2426
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2318
2427
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -2322,6 +2431,10 @@
|
|
2322
2431
|
|
2323
2432
|
</xsl:attribute-set><!-- table-note-style -->
|
2324
2433
|
|
2434
|
+
<xsl:template name="refine_table-note-style">
|
2435
|
+
|
2436
|
+
</xsl:template> <!-- refine_table-note-style -->
|
2437
|
+
|
2325
2438
|
<xsl:attribute-set name="table-fn-style">
|
2326
2439
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2327
2440
|
|
@@ -2380,11 +2493,19 @@
|
|
2380
2493
|
|
2381
2494
|
</xsl:attribute-set>
|
2382
2495
|
|
2496
|
+
<xsl:template name="refine_dt-cell-style">
|
2497
|
+
|
2498
|
+
</xsl:template> <!-- refine_dt-cell-style -->
|
2499
|
+
|
2383
2500
|
<xsl:attribute-set name="dt-block-style">
|
2384
2501
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2385
2502
|
|
2386
2503
|
</xsl:attribute-set>
|
2387
2504
|
|
2505
|
+
<xsl:template name="refine_dt-block-style">
|
2506
|
+
|
2507
|
+
</xsl:template> <!-- refine_dt-block-style -->
|
2508
|
+
|
2388
2509
|
<xsl:attribute-set name="dl-name-style">
|
2389
2510
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2390
2511
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -2398,6 +2519,10 @@
|
|
2398
2519
|
|
2399
2520
|
</xsl:attribute-set>
|
2400
2521
|
|
2522
|
+
<xsl:template name="refine_dd-cell-style">
|
2523
|
+
|
2524
|
+
</xsl:template> <!-- refine_dd-cell-style -->
|
2525
|
+
|
2401
2526
|
<!-- ========================== -->
|
2402
2527
|
<!-- END Definition's list styles -->
|
2403
2528
|
<!-- ========================== -->
|
@@ -2420,7 +2545,6 @@
|
|
2420
2545
|
</xsl:attribute-set>
|
2421
2546
|
|
2422
2547
|
<xsl:attribute-set name="xref-style">
|
2423
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
2424
2548
|
|
2425
2549
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2426
2550
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -2431,6 +2555,12 @@
|
|
2431
2555
|
|
2432
2556
|
</xsl:attribute-set>
|
2433
2557
|
|
2558
|
+
<xsl:template name="refine_eref-style">
|
2559
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
2560
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
2561
|
+
|
2562
|
+
</xsl:template> <!-- refine_eref-style -->
|
2563
|
+
|
2434
2564
|
<xsl:attribute-set name="note-style">
|
2435
2565
|
|
2436
2566
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -2440,6 +2570,10 @@
|
|
2440
2570
|
|
2441
2571
|
</xsl:attribute-set>
|
2442
2572
|
|
2573
|
+
<xsl:template name="refine_note-style">
|
2574
|
+
|
2575
|
+
</xsl:template>
|
2576
|
+
|
2443
2577
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
2444
2578
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
2445
2579
|
|
@@ -2449,11 +2583,19 @@
|
|
2449
2583
|
|
2450
2584
|
</xsl:attribute-set>
|
2451
2585
|
|
2586
|
+
<xsl:template name="refine_note-name-style">
|
2587
|
+
|
2588
|
+
</xsl:template> <!-- refine_note-name-style -->
|
2589
|
+
|
2452
2590
|
<xsl:attribute-set name="table-note-name-style">
|
2453
2591
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
2454
2592
|
|
2455
2593
|
</xsl:attribute-set>
|
2456
2594
|
|
2595
|
+
<xsl:template name="refine_table-note-name-style">
|
2596
|
+
|
2597
|
+
</xsl:template> <!-- refine_table-note-name-style -->
|
2598
|
+
|
2457
2599
|
<xsl:attribute-set name="note-p-style">
|
2458
2600
|
|
2459
2601
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
@@ -2470,10 +2612,18 @@
|
|
2470
2612
|
|
2471
2613
|
</xsl:attribute-set>
|
2472
2614
|
|
2615
|
+
<xsl:template name="refine_termnote-style">
|
2616
|
+
|
2617
|
+
</xsl:template> <!-- refine_termnote-style -->
|
2618
|
+
|
2473
2619
|
<xsl:attribute-set name="termnote-name-style">
|
2474
2620
|
|
2475
2621
|
</xsl:attribute-set>
|
2476
2622
|
|
2623
|
+
<xsl:template name="refine_termnote-name-style">
|
2624
|
+
|
2625
|
+
</xsl:template>
|
2626
|
+
|
2477
2627
|
<xsl:attribute-set name="termnote-p-style">
|
2478
2628
|
|
2479
2629
|
</xsl:attribute-set>
|
@@ -2488,6 +2638,16 @@
|
|
2488
2638
|
|
2489
2639
|
</xsl:attribute-set>
|
2490
2640
|
|
2641
|
+
<xsl:template name="refine_quote-style">
|
2642
|
+
|
2643
|
+
<xsl:if test="ancestor::*[local-name() = 'boilerplate']">
|
2644
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
2645
|
+
<xsl:attribute name="margin-right">7mm</xsl:attribute>
|
2646
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
2647
|
+
</xsl:if>
|
2648
|
+
|
2649
|
+
</xsl:template>
|
2650
|
+
|
2491
2651
|
<xsl:attribute-set name="quote-source-style">
|
2492
2652
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
2493
2653
|
|
@@ -2499,6 +2659,10 @@
|
|
2499
2659
|
|
2500
2660
|
</xsl:attribute-set>
|
2501
2661
|
|
2662
|
+
<xsl:template name="refine_termsource-style">
|
2663
|
+
|
2664
|
+
</xsl:template> <!-- refine_termsource-style -->
|
2665
|
+
|
2502
2666
|
<xsl:attribute-set name="termsource-text-style">
|
2503
2667
|
|
2504
2668
|
</xsl:attribute-set>
|
@@ -2539,6 +2703,10 @@
|
|
2539
2703
|
|
2540
2704
|
</xsl:attribute-set>
|
2541
2705
|
|
2706
|
+
<xsl:template name="refine_figure-name-style">
|
2707
|
+
|
2708
|
+
</xsl:template> <!-- refine_figure-name-style -->
|
2709
|
+
|
2542
2710
|
<xsl:attribute-set name="figure-source-style">
|
2543
2711
|
|
2544
2712
|
</xsl:attribute-set>
|
@@ -2558,6 +2726,10 @@
|
|
2558
2726
|
|
2559
2727
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
2560
2728
|
|
2729
|
+
<xsl:template name="refine_formula-stem-block-style">
|
2730
|
+
|
2731
|
+
</xsl:template> <!-- refine_formula-stem-block-style -->
|
2732
|
+
|
2561
2733
|
<xsl:attribute-set name="formula-stem-number-style">
|
2562
2734
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
2563
2735
|
|
@@ -2569,6 +2741,10 @@
|
|
2569
2741
|
|
2570
2742
|
</xsl:attribute-set>
|
2571
2743
|
|
2744
|
+
<xsl:template name="refine_image-style">
|
2745
|
+
|
2746
|
+
</xsl:template>
|
2747
|
+
|
2572
2748
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
2573
2749
|
|
2574
2750
|
</xsl:attribute-set>
|
@@ -2665,6 +2841,10 @@
|
|
2665
2841
|
|
2666
2842
|
</xsl:attribute-set>
|
2667
2843
|
|
2844
|
+
<xsl:template name="refine_mathml-style">
|
2845
|
+
|
2846
|
+
</xsl:template>
|
2847
|
+
|
2668
2848
|
<xsl:attribute-set name="list-style">
|
2669
2849
|
|
2670
2850
|
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
@@ -2672,6 +2852,10 @@
|
|
2672
2852
|
|
2673
2853
|
</xsl:attribute-set> <!-- list-style -->
|
2674
2854
|
|
2855
|
+
<xsl:template name="refine_list-style">
|
2856
|
+
|
2857
|
+
</xsl:template> <!-- refine_list-style -->
|
2858
|
+
|
2675
2859
|
<xsl:attribute-set name="list-name-style">
|
2676
2860
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2677
2861
|
|
@@ -2684,14 +2868,26 @@
|
|
2684
2868
|
|
2685
2869
|
</xsl:attribute-set>
|
2686
2870
|
|
2871
|
+
<xsl:template name="refine_list-item-style">
|
2872
|
+
|
2873
|
+
</xsl:template> <!-- refine_list-item-style -->
|
2874
|
+
|
2687
2875
|
<xsl:attribute-set name="list-item-label-style">
|
2688
2876
|
|
2689
2877
|
</xsl:attribute-set>
|
2690
2878
|
|
2879
|
+
<xsl:template name="refine_list-item-label-style">
|
2880
|
+
|
2881
|
+
</xsl:template> <!-- refine_list-item-label-style -->
|
2882
|
+
|
2691
2883
|
<xsl:attribute-set name="list-item-body-style">
|
2692
2884
|
|
2693
2885
|
</xsl:attribute-set>
|
2694
2886
|
|
2887
|
+
<xsl:template name="refine_list-item-body-style">
|
2888
|
+
|
2889
|
+
</xsl:template> <!-- refine_list-item-body-style -->
|
2890
|
+
|
2695
2891
|
<xsl:attribute-set name="toc-style">
|
2696
2892
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2697
2893
|
</xsl:attribute-set>
|
@@ -2702,6 +2898,15 @@
|
|
2702
2898
|
|
2703
2899
|
</xsl:attribute-set>
|
2704
2900
|
|
2901
|
+
<xsl:template name="refine_fn-reference-style">
|
2902
|
+
|
2903
|
+
<xsl:if test="ancestor::*[local-name()='table']">
|
2904
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2905
|
+
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
2906
|
+
</xsl:if>
|
2907
|
+
|
2908
|
+
</xsl:template> <!-- refine_fn-reference-style -->
|
2909
|
+
|
2705
2910
|
<xsl:attribute-set name="fn-style">
|
2706
2911
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2707
2912
|
</xsl:attribute-set>
|
@@ -2727,6 +2932,10 @@
|
|
2727
2932
|
|
2728
2933
|
</xsl:attribute-set>
|
2729
2934
|
|
2935
|
+
<xsl:template name="refine_fn-body-style">
|
2936
|
+
|
2937
|
+
</xsl:template> <!-- refine_fn-body-style -->
|
2938
|
+
|
2730
2939
|
<xsl:attribute-set name="fn-body-num-style">
|
2731
2940
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2732
2941
|
|
@@ -2736,6 +2945,10 @@
|
|
2736
2945
|
|
2737
2946
|
</xsl:attribute-set> <!-- fn-body-num-style -->
|
2738
2947
|
|
2948
|
+
<xsl:template name="refine_fn-body-num-style">
|
2949
|
+
|
2950
|
+
</xsl:template> <!-- refine_fn-body-num-style -->
|
2951
|
+
|
2739
2952
|
<!-- admonition -->
|
2740
2953
|
<xsl:attribute-set name="admonition-style">
|
2741
2954
|
|
@@ -3379,7 +3592,9 @@
|
|
3379
3592
|
|
3380
3593
|
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
3381
3594
|
|
3382
|
-
|
3595
|
+
<xsl:call-template name="refine_table-container-style">
|
3596
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3597
|
+
</xsl:call-template>
|
3383
3598
|
|
3384
3599
|
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
3385
3600
|
|
@@ -3400,11 +3615,9 @@
|
|
3400
3615
|
|
3401
3616
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
3402
3617
|
|
3403
|
-
<xsl:call-template name="
|
3404
|
-
|
3405
|
-
|
3406
|
-
<xsl:attribute name="border-top">1pt solid black</xsl:attribute>
|
3407
|
-
</xsl:if>
|
3618
|
+
<xsl:call-template name="refine_table-style">
|
3619
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3620
|
+
</xsl:call-template>
|
3408
3621
|
|
3409
3622
|
</xsl:element>
|
3410
3623
|
</xsl:variable>
|
@@ -3426,7 +3639,7 @@
|
|
3426
3639
|
</xsl:attribute>
|
3427
3640
|
</xsl:for-each>
|
3428
3641
|
|
3429
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3642
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3430
3643
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3431
3644
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3432
3645
|
</xsl:if>
|
@@ -3470,7 +3683,7 @@
|
|
3470
3683
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3471
3684
|
</xsl:when>
|
3472
3685
|
<xsl:otherwise>
|
3473
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3686
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3474
3687
|
</xsl:otherwise>
|
3475
3688
|
</xsl:choose>
|
3476
3689
|
|
@@ -3560,6 +3773,10 @@
|
|
3560
3773
|
|
3561
3774
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
3562
3775
|
|
3776
|
+
<xsl:call-template name="refine_table-name-style">
|
3777
|
+
<xsl:with-param name="continued" select="$continued"/>
|
3778
|
+
</xsl:call-template>
|
3779
|
+
|
3563
3780
|
<xsl:choose>
|
3564
3781
|
<xsl:when test="$continued = 'true'">
|
3565
3782
|
<!-- $namespace = 'iso' or -->
|
@@ -3948,6 +4165,8 @@
|
|
3948
4165
|
<fo:table-row>
|
3949
4166
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
3950
4167
|
|
4168
|
+
<xsl:call-template name="refine_table-header-title-style"/>
|
4169
|
+
|
3951
4170
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
3952
4171
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3953
4172
|
</xsl:apply-templates>
|
@@ -3969,6 +4188,10 @@
|
|
3969
4188
|
</fo:table-row>
|
3970
4189
|
</xsl:template> <!-- table-header-title -->
|
3971
4190
|
|
4191
|
+
<xsl:template name="refine_table-header-title-style">
|
4192
|
+
|
4193
|
+
</xsl:template> <!-- refine_table-header-title-style -->
|
4194
|
+
|
3972
4195
|
<xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
3973
4196
|
<fo:table-body>
|
3974
4197
|
<xsl:apply-templates/>
|
@@ -3993,7 +4216,7 @@
|
|
3993
4216
|
<xsl:param name="colwidths"/>
|
3994
4217
|
<xsl:param name="colgroup"/>
|
3995
4218
|
|
3996
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
4219
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3997
4220
|
|
3998
4221
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3999
4222
|
|
@@ -4053,6 +4276,8 @@
|
|
4053
4276
|
<fo:table-row>
|
4054
4277
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4055
4278
|
|
4279
|
+
<xsl:call-template name="refine_table-footer-cell-style"/>
|
4280
|
+
|
4056
4281
|
<xsl:call-template name="setBordersTableArray"/>
|
4057
4282
|
|
4058
4283
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -4061,8 +4286,10 @@
|
|
4061
4286
|
|
4062
4287
|
<!-- except gb and bsi -->
|
4063
4288
|
|
4289
|
+
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4064
4290
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4065
4291
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4292
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4066
4293
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4067
4294
|
|
4068
4295
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -4071,7 +4298,7 @@
|
|
4071
4298
|
|
4072
4299
|
<!-- horizontal row separator -->
|
4073
4300
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4074
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
4301
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4075
4302
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4076
4303
|
|
4077
4304
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -4233,18 +4460,7 @@
|
|
4233
4460
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
4234
4461
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
4235
4462
|
|
4236
|
-
<xsl:call-template name="
|
4237
|
-
|
4238
|
-
<xsl:choose>
|
4239
|
-
<xsl:when test="position() = 1">
|
4240
|
-
<xsl:attribute name="border-top">solid black 1.5pt</xsl:attribute>
|
4241
|
-
<xsl:attribute name="border-bottom">solid black 1pt</xsl:attribute>
|
4242
|
-
</xsl:when>
|
4243
|
-
<xsl:when test="position() = last()">
|
4244
|
-
<xsl:attribute name="border-top">solid black 1pt</xsl:attribute>
|
4245
|
-
<xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
|
4246
|
-
</xsl:when>
|
4247
|
-
</xsl:choose>
|
4463
|
+
<xsl:call-template name="refine_table-header-row-style"/>
|
4248
4464
|
|
4249
4465
|
<xsl:call-template name="setTableRowAttributes"/>
|
4250
4466
|
|
@@ -4278,6 +4494,8 @@
|
|
4278
4494
|
<xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
|
4279
4495
|
<fo:table-row xsl:use-attribute-sets="table-footer-row-style">
|
4280
4496
|
|
4497
|
+
<xsl:call-template name="refine_table-footer-row-style"/>
|
4498
|
+
|
4281
4499
|
<xsl:call-template name="setTableRowAttributes"/>
|
4282
4500
|
<xsl:apply-templates/>
|
4283
4501
|
</fo:table-row>
|
@@ -4291,9 +4509,10 @@
|
|
4291
4509
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4292
4510
|
</xsl:if>
|
4293
4511
|
|
4294
|
-
<xsl:call-template name="
|
4512
|
+
<xsl:call-template name="refine_table-body-row-style"/>
|
4295
4513
|
|
4296
4514
|
<xsl:call-template name="setTableRowAttributes"/>
|
4515
|
+
|
4297
4516
|
<xsl:apply-templates/>
|
4298
4517
|
</fo:table-row>
|
4299
4518
|
</xsl:template>
|
@@ -4312,13 +4531,7 @@
|
|
4312
4531
|
<xsl:with-param name="default">center</xsl:with-param>
|
4313
4532
|
</xsl:call-template>
|
4314
4533
|
|
4315
|
-
<xsl:call-template name="
|
4316
|
-
|
4317
|
-
<xsl:if test="$lang = 'ar'">
|
4318
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4319
|
-
</xsl:if>
|
4320
|
-
|
4321
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
4534
|
+
<xsl:call-template name="refine_table-header-cell-style"/>
|
4322
4535
|
|
4323
4536
|
<fo:block>
|
4324
4537
|
<xsl:apply-templates/>
|
@@ -4360,20 +4573,7 @@
|
|
4360
4573
|
<xsl:with-param name="default">left</xsl:with-param>
|
4361
4574
|
</xsl:call-template>
|
4362
4575
|
|
4363
|
-
<xsl:
|
4364
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4365
|
-
</xsl:if>
|
4366
|
-
|
4367
|
-
<!-- bsi -->
|
4368
|
-
|
4369
|
-
<xsl:call-template name="setBordersTableArray"/>
|
4370
|
-
|
4371
|
-
<xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
|
4372
|
-
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4373
|
-
</xsl:if>
|
4374
|
-
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
4375
|
-
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
4376
|
-
</xsl:if>
|
4576
|
+
<xsl:call-template name="refine_table-cell-style"/>
|
4377
4577
|
|
4378
4578
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4379
4579
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
@@ -4400,13 +4600,17 @@
|
|
4400
4600
|
</fo:table-cell>
|
4401
4601
|
</xsl:template> <!-- td -->
|
4402
4602
|
|
4403
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
4603
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
4404
4604
|
|
4405
4605
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4406
4606
|
|
4407
|
-
|
4607
|
+
<xsl:call-template name="refine_table-note-style"/>
|
4608
|
+
|
4609
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
4408
4610
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
4409
4611
|
|
4612
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
4613
|
+
|
4410
4614
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
4411
4615
|
|
4412
4616
|
</fo:inline>
|
@@ -4416,7 +4620,7 @@
|
|
4416
4620
|
|
4417
4621
|
</xsl:template> <!-- table/note -->
|
4418
4622
|
|
4419
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
4623
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
4420
4624
|
<xsl:apply-templates/>
|
4421
4625
|
</xsl:template>
|
4422
4626
|
|
@@ -4434,6 +4638,14 @@
|
|
4434
4638
|
<!-- list of footnotes to calculate actual footnotes number -->
|
4435
4639
|
<xsl:variable name="p_fn_">
|
4436
4640
|
<xsl:call-template name="get_fn_list"/>
|
4641
|
+
<!-- <xsl:choose>
|
4642
|
+
<xsl:when test="$namespace = 'jis'">
|
4643
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
4644
|
+
</xsl:when>
|
4645
|
+
<xsl:otherwise>
|
4646
|
+
<xsl:call-template name="get_fn_list"/>
|
4647
|
+
</xsl:otherwise>
|
4648
|
+
</xsl:choose> -->
|
4437
4649
|
</xsl:variable>
|
4438
4650
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
4439
4651
|
|
@@ -4458,7 +4670,14 @@
|
|
4458
4670
|
|
4459
4671
|
</xsl:variable>
|
4460
4672
|
|
4461
|
-
<xsl:variable name="ref_id"
|
4673
|
+
<xsl:variable name="ref_id">
|
4674
|
+
<xsl:choose>
|
4675
|
+
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
4676
|
+
<xsl:otherwise>
|
4677
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
4678
|
+
</xsl:otherwise>
|
4679
|
+
</xsl:choose>
|
4680
|
+
</xsl:variable>
|
4462
4681
|
<xsl:variable name="footnote_inline">
|
4463
4682
|
<fo:inline>
|
4464
4683
|
|
@@ -4484,7 +4703,7 @@
|
|
4484
4703
|
<xsl:call-template name="insert_basic_link">
|
4485
4704
|
<xsl:with-param name="element">
|
4486
4705
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
4487
|
-
<xsl:
|
4706
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
4488
4707
|
</fo:basic-link>
|
4489
4708
|
</xsl:with-param>
|
4490
4709
|
</xsl:call-template>
|
@@ -4504,8 +4723,12 @@
|
|
4504
4723
|
|
4505
4724
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
4506
4725
|
|
4726
|
+
<xsl:call-template name="refine_fn-body-style"/>
|
4727
|
+
|
4507
4728
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
4508
4729
|
|
4730
|
+
<xsl:call-template name="refine_fn-body-num-style"/>
|
4731
|
+
|
4509
4732
|
<xsl:value-of select="$current_fn_number_text"/>
|
4510
4733
|
</fo:inline>
|
4511
4734
|
<xsl:apply-templates/>
|
@@ -4557,6 +4780,28 @@
|
|
4557
4780
|
</xsl:choose>
|
4558
4781
|
</xsl:template>
|
4559
4782
|
|
4783
|
+
<xsl:template name="get_fn_list_for_element">
|
4784
|
+
<xsl:choose>
|
4785
|
+
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
4786
|
+
<fn gen_id="{generate-id(.)}">
|
4787
|
+
<xsl:copy-of select="@*"/>
|
4788
|
+
<xsl:copy-of select="node()"/>
|
4789
|
+
</fn>
|
4790
|
+
</xsl:when>
|
4791
|
+
<xsl:otherwise>
|
4792
|
+
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
4793
|
+
<xsl:variable name="element_id" select="@id"/>
|
4794
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4795
|
+
<!-- copy unique fn -->
|
4796
|
+
<fn gen_id="{generate-id(.)}">
|
4797
|
+
<xsl:copy-of select="@*"/>
|
4798
|
+
<xsl:copy-of select="node()"/>
|
4799
|
+
</fn>
|
4800
|
+
</xsl:for-each>
|
4801
|
+
</xsl:for-each>
|
4802
|
+
</xsl:otherwise>
|
4803
|
+
</xsl:choose>
|
4804
|
+
</xsl:template>
|
4560
4805
|
<!-- ============================ -->
|
4561
4806
|
<!-- table's footnotes rendering -->
|
4562
4807
|
<!-- ============================ -->
|
@@ -4731,10 +4976,7 @@
|
|
4731
4976
|
<xsl:template match="*[local-name()='fn']">
|
4732
4977
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
4733
4978
|
|
4734
|
-
|
4735
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4736
|
-
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
4737
|
-
</xsl:if>
|
4979
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
4738
4980
|
|
4739
4981
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
4740
4982
|
|
@@ -4839,7 +5081,7 @@
|
|
4839
5081
|
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
4840
5082
|
<fo:block margin-bottom="12pt" text-align="left">
|
4841
5083
|
|
4842
|
-
|
5084
|
+
<xsl:call-template name="refine_dl_formula_where_style"/>
|
4843
5085
|
|
4844
5086
|
<!-- <xsl:variable name="title-where">
|
4845
5087
|
<xsl:call-template name="getLocalizedString">
|
@@ -4854,8 +5096,7 @@
|
|
4854
5096
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4855
5097
|
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4856
5098
|
|
4857
|
-
|
4858
|
-
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
5099
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4859
5100
|
|
4860
5101
|
<xsl:variable name="title-key">
|
4861
5102
|
<xsl:call-template name="getLocalizedString">
|
@@ -4871,10 +5112,7 @@
|
|
4871
5112
|
<xsl:if test="$onlyOneComponent = 'false'">
|
4872
5113
|
<fo:block>
|
4873
5114
|
|
4874
|
-
|
4875
|
-
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
4876
|
-
</xsl:if>
|
4877
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
5115
|
+
<xsl:call-template name="refine_multicomponent_style"/>
|
4878
5116
|
|
4879
5117
|
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
4880
5118
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
@@ -4882,6 +5120,8 @@
|
|
4882
5120
|
|
4883
5121
|
<fo:block>
|
4884
5122
|
|
5123
|
+
<xsl:call-template name="refine_multicomponent_block_style"/>
|
5124
|
+
|
4885
5125
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
4886
5126
|
<xsl:with-param name="process">true</xsl:with-param>
|
4887
5127
|
</xsl:apply-templates>
|
@@ -5039,6 +5279,34 @@
|
|
5039
5279
|
|
5040
5280
|
</xsl:template> <!-- END: dl -->
|
5041
5281
|
|
5282
|
+
<xsl:template name="refine_dl_formula_where_style">
|
5283
|
+
|
5284
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5285
|
+
|
5286
|
+
</xsl:template> <!-- refine_dl_formula_where_style -->
|
5287
|
+
|
5288
|
+
<xsl:template name="refine_figure_key_style">
|
5289
|
+
|
5290
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
5291
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
5292
|
+
|
5293
|
+
</xsl:template> <!-- refine_figure_key_style -->
|
5294
|
+
|
5295
|
+
<xsl:template name="refine_multicomponent_style">
|
5296
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
5297
|
+
|
5298
|
+
<xsl:if test="$parent = 'formula'">
|
5299
|
+
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
5300
|
+
</xsl:if>
|
5301
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
5302
|
+
|
5303
|
+
</xsl:template> <!-- refine_multicomponent_style -->
|
5304
|
+
|
5305
|
+
<xsl:template name="refine_multicomponent_block_style">
|
5306
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
5307
|
+
|
5308
|
+
</xsl:template> <!-- refine_multicomponent_block_style -->
|
5309
|
+
|
5042
5310
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
5043
5311
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
5044
5312
|
|
@@ -5258,6 +5526,8 @@
|
|
5258
5526
|
|
5259
5527
|
</xsl:if>
|
5260
5528
|
|
5529
|
+
<xsl:call-template name="refine_dt-cell-style"/>
|
5530
|
+
|
5261
5531
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
5262
5532
|
<xsl:copy-of select="@id"/>
|
5263
5533
|
|
@@ -5265,6 +5535,8 @@
|
|
5265
5535
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
5266
5536
|
</xsl:if>
|
5267
5537
|
|
5538
|
+
<xsl:call-template name="refine_dt-block-style"/>
|
5539
|
+
|
5268
5540
|
<xsl:apply-templates>
|
5269
5541
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
5270
5542
|
</xsl:apply-templates>
|
@@ -5284,6 +5556,8 @@
|
|
5284
5556
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
5285
5557
|
</xsl:if>
|
5286
5558
|
|
5559
|
+
<xsl:call-template name="refine_dd-cell-style"/>
|
5560
|
+
|
5287
5561
|
<fo:block>
|
5288
5562
|
|
5289
5563
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -5426,20 +5700,31 @@
|
|
5426
5700
|
<!-- ========================= -->
|
5427
5701
|
<xsl:template match="*[local-name()='em']">
|
5428
5702
|
<fo:inline font-style="italic">
|
5703
|
+
<xsl:call-template name="refine_italic_style"/>
|
5429
5704
|
<xsl:apply-templates/>
|
5430
5705
|
</fo:inline>
|
5431
5706
|
</xsl:template>
|
5432
5707
|
|
5708
|
+
<xsl:template name="refine_italic_style">
|
5709
|
+
|
5710
|
+
</xsl:template>
|
5711
|
+
|
5433
5712
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
5434
5713
|
<xsl:param name="split_keep-within-line"/>
|
5435
5714
|
<fo:inline font-weight="bold">
|
5436
5715
|
|
5716
|
+
<xsl:call-template name="refine_strong_style"/>
|
5717
|
+
|
5437
5718
|
<xsl:apply-templates>
|
5438
5719
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
5439
5720
|
</xsl:apply-templates>
|
5440
5721
|
</fo:inline>
|
5441
5722
|
</xsl:template>
|
5442
5723
|
|
5724
|
+
<xsl:template name="refine_strong_style">
|
5725
|
+
|
5726
|
+
</xsl:template>
|
5727
|
+
|
5443
5728
|
<xsl:template match="*[local-name()='padding']">
|
5444
5729
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
5445
5730
|
</xsl:template>
|
@@ -5909,7 +6194,10 @@
|
|
5909
6194
|
</xsl:choose>
|
5910
6195
|
</xsl:variable>
|
5911
6196
|
|
5912
|
-
|
6197
|
+
<!-- replace sequence #x200B and space TO space -->
|
6198
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
6199
|
+
|
6200
|
+
<xsl:value-of select="$text10"/>
|
5913
6201
|
</xsl:template>
|
5914
6202
|
|
5915
6203
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -6584,6 +6872,11 @@
|
|
6584
6872
|
|
6585
6873
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6586
6874
|
|
6875
|
+
<!-- DEBUG -->
|
6876
|
+
<!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
|
6877
|
+
|
6878
|
+
<xsl:call-template name="refine_mathml-style"/>
|
6879
|
+
|
6587
6880
|
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
6588
6881
|
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
6589
6882
|
</xsl:if>
|
@@ -6688,12 +6981,7 @@
|
|
6688
6981
|
|
6689
6982
|
<fo:instream-foreign-object fox:alt-text="Math">
|
6690
6983
|
|
6691
|
-
|
6692
|
-
<xsl:attribute name="width">95%</xsl:attribute>
|
6693
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
6694
|
-
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6695
|
-
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6696
|
-
</xsl:if>
|
6984
|
+
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
6697
6985
|
|
6698
6986
|
<!-- put MathML in Actual Text -->
|
6699
6987
|
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
@@ -6715,6 +7003,17 @@
|
|
6715
7003
|
</fo:instream-foreign-object>
|
6716
7004
|
</xsl:template>
|
6717
7005
|
|
7006
|
+
<xsl:template name="refine_mathml_insteam_object_style">
|
7007
|
+
|
7008
|
+
<xsl:if test="local-name(../..) = 'formula' or (local-name(../..) = 'td' and count(../../*) = 1)">
|
7009
|
+
<xsl:attribute name="width">95%</xsl:attribute>
|
7010
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7011
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7012
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7013
|
+
</xsl:if>
|
7014
|
+
|
7015
|
+
</xsl:template> <!-- refine_mathml_insteam_object_style -->
|
7016
|
+
|
6718
7017
|
<xsl:template match="mathml:*" mode="mathml_actual_text">
|
6719
7018
|
<!-- <xsl:text>a+b</xsl:text> -->
|
6720
7019
|
<xsl:text><</xsl:text>
|
@@ -6859,6 +7158,8 @@
|
|
6859
7158
|
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
6860
7159
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6861
7160
|
|
7161
|
+
<xsl:call-template name="refine_mathml-style"/>
|
7162
|
+
|
6862
7163
|
<xsl:choose>
|
6863
7164
|
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6864
7165
|
<xsl:otherwise>
|
@@ -6903,6 +7204,8 @@
|
|
6903
7204
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6904
7205
|
</xsl:if>
|
6905
7206
|
|
7207
|
+
<xsl:call-template name="refine_link-style"/>
|
7208
|
+
|
6906
7209
|
<xsl:choose>
|
6907
7210
|
<xsl:when test="$target_text = ''">
|
6908
7211
|
<xsl:apply-templates/>
|
@@ -6990,6 +7293,9 @@
|
|
6990
7293
|
<xsl:call-template name="insert_basic_link">
|
6991
7294
|
<xsl:with-param name="element">
|
6992
7295
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
7296
|
+
<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'])">
|
7297
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7298
|
+
</xsl:if>
|
6993
7299
|
<xsl:if test="parent::*[local-name() = 'add']">
|
6994
7300
|
<xsl:call-template name="append_add-style"/>
|
6995
7301
|
</xsl:if>
|
@@ -7051,6 +7357,8 @@
|
|
7051
7357
|
<fo:table-cell display-align="center">
|
7052
7358
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
7053
7359
|
|
7360
|
+
<xsl:call-template name="refine_formula-stem-block-style"/>
|
7361
|
+
|
7054
7362
|
<xsl:apply-templates/>
|
7055
7363
|
</fo:block>
|
7056
7364
|
</fo:table-cell>
|
@@ -7092,12 +7400,18 @@
|
|
7092
7400
|
|
7093
7401
|
<xsl:call-template name="setBlockSpanAll"/>
|
7094
7402
|
|
7403
|
+
<xsl:call-template name="refine_note-style"/>
|
7404
|
+
|
7095
7405
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
7096
7406
|
|
7097
7407
|
<fo:block>
|
7098
7408
|
|
7409
|
+
<xsl:call-template name="refine_note_block_style"/>
|
7410
|
+
|
7099
7411
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
7100
7412
|
|
7413
|
+
<xsl:call-template name="refine_note-name-style"/>
|
7414
|
+
|
7101
7415
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7102
7416
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
7103
7417
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -7123,6 +7437,10 @@
|
|
7123
7437
|
|
7124
7438
|
</xsl:template>
|
7125
7439
|
|
7440
|
+
<xsl:template name="refine_note_block_style">
|
7441
|
+
|
7442
|
+
</xsl:template>
|
7443
|
+
|
7126
7444
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
7127
7445
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
7128
7446
|
<xsl:choose>
|
@@ -7144,12 +7462,16 @@
|
|
7144
7462
|
|
7145
7463
|
<xsl:call-template name="setBlockSpanAll"/>
|
7146
7464
|
|
7465
|
+
<xsl:call-template name="refine_termnote-style"/>
|
7466
|
+
|
7147
7467
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
7148
7468
|
|
7149
7469
|
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
7150
7470
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
7151
7471
|
</xsl:if>
|
7152
7472
|
|
7473
|
+
<xsl:call-template name="refine_termnote-name-style"/>
|
7474
|
+
|
7153
7475
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7154
7476
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
7155
7477
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -7321,6 +7643,8 @@
|
|
7321
7643
|
<xsl:otherwise>
|
7322
7644
|
<fo:block xsl:use-attribute-sets="image-style">
|
7323
7645
|
|
7646
|
+
<xsl:call-template name="refine_image-style"/>
|
7647
|
+
|
7324
7648
|
<xsl:variable name="src">
|
7325
7649
|
<xsl:call-template name="image_src"/>
|
7326
7650
|
</xsl:variable>
|
@@ -8170,6 +8494,8 @@
|
|
8170
8494
|
<xsl:if test="normalize-space() != ''">
|
8171
8495
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
8172
8496
|
|
8497
|
+
<xsl:call-template name="refine_figure-name-style"/>
|
8498
|
+
|
8173
8499
|
<xsl:apply-templates/>
|
8174
8500
|
</fo:block>
|
8175
8501
|
</xsl:if>
|
@@ -8434,6 +8760,8 @@
|
|
8434
8760
|
</xsl:attribute>
|
8435
8761
|
</xsl:for-each>
|
8436
8762
|
|
8763
|
+
<xsl:call-template name="refine_sourcecode-style"/>
|
8764
|
+
|
8437
8765
|
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
8438
8766
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
8439
8767
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
@@ -9138,6 +9466,8 @@
|
|
9138
9466
|
|
9139
9467
|
<xsl:call-template name="setBlockSpanAll"/>
|
9140
9468
|
|
9469
|
+
<xsl:call-template name="refine_example-style"/>
|
9470
|
+
|
9141
9471
|
<xsl:variable name="fo_element">
|
9142
9472
|
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
|
9143
9473
|
inline
|
@@ -9248,6 +9578,12 @@
|
|
9248
9578
|
|
9249
9579
|
</xsl:template>
|
9250
9580
|
|
9581
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9582
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9583
|
+
<xsl:apply-templates/>
|
9584
|
+
</fo:inline>
|
9585
|
+
</xsl:template>
|
9586
|
+
|
9251
9587
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
9252
9588
|
<xsl:param name="fo_element">block</xsl:param>
|
9253
9589
|
|
@@ -9270,6 +9606,8 @@
|
|
9270
9606
|
</xsl:if>
|
9271
9607
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
9272
9608
|
|
9609
|
+
<xsl:call-template name="refine_example-p-style"/>
|
9610
|
+
|
9273
9611
|
<xsl:apply-templates/>
|
9274
9612
|
</fo:block>
|
9275
9613
|
</fo:block-container>
|
@@ -9286,6 +9624,7 @@
|
|
9286
9624
|
</xsl:otherwise>
|
9287
9625
|
</xsl:choose>
|
9288
9626
|
</xsl:template> <!-- example/p -->
|
9627
|
+
|
9289
9628
|
<!-- ====== -->
|
9290
9629
|
<!-- ====== -->
|
9291
9630
|
|
@@ -9297,6 +9636,8 @@
|
|
9297
9636
|
<xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
9298
9637
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
9299
9638
|
|
9639
|
+
<xsl:call-template name="refine_termsource-style"/>
|
9640
|
+
|
9300
9641
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
9301
9642
|
<xsl:variable name="termsource_text">
|
9302
9643
|
<xsl:apply-templates/>
|
@@ -9416,11 +9757,7 @@
|
|
9416
9757
|
<fo:block-container margin-left="0mm">
|
9417
9758
|
<fo:block-container xsl:use-attribute-sets="quote-style">
|
9418
9759
|
|
9419
|
-
|
9420
|
-
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
9421
|
-
<xsl:attribute name="margin-right">7mm</xsl:attribute>
|
9422
|
-
<xsl:attribute name="font-style">normal</xsl:attribute>
|
9423
|
-
</xsl:if>
|
9760
|
+
<xsl:call-template name="refine_quote-style"/>
|
9424
9761
|
|
9425
9762
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
9426
9763
|
<fo:block role="BlockQuote">
|
@@ -9496,8 +9833,7 @@
|
|
9496
9833
|
|
9497
9834
|
</xsl:if>
|
9498
9835
|
|
9499
|
-
<xsl:
|
9500
|
-
<xsl:variable name="text" select="normalize-space()"/>
|
9836
|
+
<xsl:call-template name="refine_eref-style"/>
|
9501
9837
|
|
9502
9838
|
<xsl:call-template name="insert_basic_link">
|
9503
9839
|
<xsl:with-param name="element">
|
@@ -9507,6 +9843,8 @@
|
|
9507
9843
|
</xsl:if>
|
9508
9844
|
<xsl:if test="@type = 'inline'">
|
9509
9845
|
|
9846
|
+
<xsl:call-template name="refine_basic_link_style"/>
|
9847
|
+
|
9510
9848
|
</xsl:if>
|
9511
9849
|
|
9512
9850
|
<xsl:choose>
|
@@ -9539,6 +9877,11 @@
|
|
9539
9877
|
</xsl:otherwise>
|
9540
9878
|
</xsl:choose>
|
9541
9879
|
</xsl:template>
|
9880
|
+
|
9881
|
+
<xsl:template name="refine_basic_link_style">
|
9882
|
+
|
9883
|
+
</xsl:template> <!-- refine_basic_link_style -->
|
9884
|
+
|
9542
9885
|
<!-- ====== -->
|
9543
9886
|
<!-- END eref -->
|
9544
9887
|
<!-- ====== -->
|
@@ -9681,16 +10024,22 @@
|
|
9681
10024
|
<fo:block>
|
9682
10025
|
<xsl:call-template name="setId"/>
|
9683
10026
|
|
9684
|
-
|
9685
|
-
<xsl:if test="$pos >= 2">
|
9686
|
-
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
9687
|
-
</xsl:if>
|
10027
|
+
<xsl:call-template name="sections_element_style"/>
|
9688
10028
|
|
9689
10029
|
<xsl:apply-templates/>
|
9690
10030
|
</fo:block>
|
9691
10031
|
|
9692
10032
|
</xsl:template>
|
9693
10033
|
|
10034
|
+
<xsl:template name="sections_element_style">
|
10035
|
+
|
10036
|
+
<xsl:variable name="pos"><xsl:number count="*"/></xsl:variable>
|
10037
|
+
<xsl:if test="$pos >= 2">
|
10038
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
10039
|
+
</xsl:if>
|
10040
|
+
|
10041
|
+
</xsl:template> <!-- sections_element_style -->
|
10042
|
+
|
9694
10043
|
<xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
9695
10044
|
<fo:block break-after="page"/>
|
9696
10045
|
<fo:block>
|
@@ -9705,14 +10054,20 @@
|
|
9705
10054
|
|
9706
10055
|
<xsl:call-template name="setBlockSpanAll"/>
|
9707
10056
|
|
9708
|
-
|
9709
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
9710
|
-
</xsl:if>
|
10057
|
+
<xsl:call-template name="refine_clause_style"/>
|
9711
10058
|
|
9712
10059
|
<xsl:apply-templates/>
|
9713
10060
|
</fo:block>
|
9714
10061
|
</xsl:template>
|
9715
10062
|
|
10063
|
+
<xsl:template name="refine_clause_style">
|
10064
|
+
|
10065
|
+
<xsl:if test="@inline-header='true'">
|
10066
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
10067
|
+
</xsl:if>
|
10068
|
+
|
10069
|
+
</xsl:template> <!-- refine_clause_style -->
|
10070
|
+
|
9716
10071
|
<xsl:template match="*[local-name() = 'definitions']">
|
9717
10072
|
<fo:block id="{@id}">
|
9718
10073
|
<xsl:apply-templates/>
|
@@ -9725,10 +10080,16 @@
|
|
9725
10080
|
|
9726
10081
|
<xsl:call-template name="setBlockSpanAll"/>
|
9727
10082
|
|
10083
|
+
<xsl:call-template name="refine_annex_style"/>
|
10084
|
+
|
9728
10085
|
</fo:block>
|
9729
10086
|
<xsl:apply-templates/>
|
9730
10087
|
</xsl:template>
|
9731
10088
|
|
10089
|
+
<xsl:template name="refine_annex_style">
|
10090
|
+
|
10091
|
+
</xsl:template>
|
10092
|
+
|
9732
10093
|
<xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
9733
10094
|
<!-- comment 2019-11-29 -->
|
9734
10095
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
@@ -9807,6 +10168,9 @@
|
|
9807
10168
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
9808
10169
|
</xsl:choose>
|
9809
10170
|
</xsl:when>
|
10171
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
10172
|
+
<xsl:value-of select="@label"/>
|
10173
|
+
</xsl:when>
|
9810
10174
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
9811
10175
|
|
9812
10176
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -9864,10 +10228,10 @@
|
|
9864
10228
|
<xsl:when test="$type = 'arabic'">
|
9865
10229
|
1.
|
9866
10230
|
</xsl:when>
|
9867
|
-
<xsl:when test="$type = 'alphabet'">
|
10231
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9868
10232
|
a)
|
9869
10233
|
</xsl:when>
|
9870
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
10234
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9871
10235
|
A.
|
9872
10236
|
</xsl:when>
|
9873
10237
|
<xsl:when test="$type = 'roman'">
|
@@ -9895,6 +10259,8 @@
|
|
9895
10259
|
</xsl:choose>
|
9896
10260
|
</xsl:attribute>
|
9897
10261
|
|
10262
|
+
<xsl:call-template name="refine_list_container_style"/>
|
10263
|
+
|
9898
10264
|
<fo:block-container margin-left="0mm">
|
9899
10265
|
<fo:block>
|
9900
10266
|
<xsl:apply-templates select="." mode="list"/>
|
@@ -9912,6 +10278,10 @@
|
|
9912
10278
|
</xsl:choose>
|
9913
10279
|
</xsl:template>
|
9914
10280
|
|
10281
|
+
<xsl:template name="refine_list_container_style">
|
10282
|
+
|
10283
|
+
</xsl:template> <!-- refine_list_container_style -->
|
10284
|
+
|
9915
10285
|
<xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
9916
10286
|
|
9917
10287
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
@@ -9922,7 +10292,7 @@
|
|
9922
10292
|
|
9923
10293
|
<xsl:variable name="provisional_distance_between_starts_">
|
9924
10294
|
<attributes xsl:use-attribute-sets="list-style">
|
9925
|
-
|
10295
|
+
<xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
|
9926
10296
|
</attributes>
|
9927
10297
|
</xsl:variable>
|
9928
10298
|
<xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
|
@@ -9958,6 +10328,8 @@
|
|
9958
10328
|
<addon><xsl:value-of select="$addon"/></addon> -->
|
9959
10329
|
</xsl:if>
|
9960
10330
|
|
10331
|
+
<xsl:call-template name="refine_list-style"/>
|
10332
|
+
|
9961
10333
|
<xsl:if test="*[local-name() = 'name']">
|
9962
10334
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
9963
10335
|
</xsl:if>
|
@@ -9970,6 +10342,10 @@
|
|
9970
10342
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
9971
10343
|
</xsl:template>
|
9972
10344
|
|
10345
|
+
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
10346
|
+
|
10347
|
+
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
10348
|
+
|
9973
10349
|
<xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
9974
10350
|
<xsl:param name="process">false</xsl:param>
|
9975
10351
|
<xsl:if test="$process = 'true'">
|
@@ -9983,20 +10359,27 @@
|
|
9983
10359
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
9984
10360
|
<xsl:copy-of select="@id"/>
|
9985
10361
|
|
10362
|
+
<xsl:call-template name="refine_list-item-style"/>
|
10363
|
+
|
9986
10364
|
<fo:list-item-label end-indent="label-end()">
|
9987
10365
|
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
9988
10366
|
|
10367
|
+
<xsl:call-template name="refine_list-item-label-style"/>
|
10368
|
+
|
9989
10369
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
9990
10370
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
9991
10371
|
<xsl:call-template name="append_add-style"/>
|
9992
10372
|
</xsl:if>
|
9993
10373
|
|
9994
10374
|
<xsl:call-template name="getListItemFormat"/>
|
10375
|
+
|
9995
10376
|
</fo:block>
|
9996
10377
|
</fo:list-item-label>
|
9997
10378
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9998
10379
|
<fo:block>
|
9999
10380
|
|
10381
|
+
<xsl:call-template name="refine_list-item-body-style"/>
|
10382
|
+
|
10000
10383
|
<xsl:apply-templates/>
|
10001
10384
|
|
10002
10385
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
@@ -10314,6 +10697,7 @@
|
|
10314
10697
|
|
10315
10698
|
<fo:block id="{@id}">
|
10316
10699
|
<xsl:apply-templates/>
|
10700
|
+
|
10317
10701
|
</fo:block>
|
10318
10702
|
</xsl:template>
|
10319
10703
|
|
@@ -10333,6 +10717,7 @@
|
|
10333
10717
|
|
10334
10718
|
<fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
|
10335
10719
|
<xsl:apply-templates/>
|
10720
|
+
|
10336
10721
|
</fo:block>
|
10337
10722
|
|
10338
10723
|
</xsl:template> <!-- references -->
|
@@ -10920,6 +11305,9 @@
|
|
10920
11305
|
</xsl:copy>
|
10921
11306
|
</xsl:template>
|
10922
11307
|
|
11308
|
+
<!-- prevent empty thead processing in XSL-FO, remove it -->
|
11309
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
|
11310
|
+
|
10923
11311
|
<xsl:template name="add_id">
|
10924
11312
|
<xsl:if test="not(@id)">
|
10925
11313
|
<!-- add @id - first element with @id plus '_element_name' -->
|
@@ -11204,6 +11592,14 @@
|
|
11204
11592
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
|
11205
11593
|
<xsl:variable name="p_fn_">
|
11206
11594
|
<xsl:call-template name="get_fn_list"/>
|
11595
|
+
<!-- <xsl:choose>
|
11596
|
+
<xsl:when test="$namespace = 'jis'">
|
11597
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
11598
|
+
</xsl:when>
|
11599
|
+
<xsl:otherwise>
|
11600
|
+
<xsl:call-template name="get_fn_list"/>
|
11601
|
+
</xsl:otherwise>
|
11602
|
+
</xsl:choose> -->
|
11207
11603
|
</xsl:variable>
|
11208
11604
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
11209
11605
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
@@ -11218,8 +11614,14 @@
|
|
11218
11614
|
<xsl:attribute name="current_fn_number">
|
11219
11615
|
<xsl:value-of select="$current_fn_number"/>
|
11220
11616
|
</xsl:attribute>
|
11617
|
+
<xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
|
11221
11618
|
<xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
|
11222
|
-
|
11619
|
+
|
11620
|
+
<xsl:value-of select="$skip_footnote_body_"/>
|
11621
|
+
|
11622
|
+
</xsl:attribute>
|
11623
|
+
<xsl:attribute name="ref_id">
|
11624
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
11223
11625
|
</xsl:attribute>
|
11224
11626
|
<xsl:apply-templates select="node()" mode="linear_xml"/>
|
11225
11627
|
</xsl:copy>
|