metanorma-itu 1.2.12 → 1.2.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b83dc88219111d0638c307ac05020a1b3234dd000050548539b55e9944ad5562
4
- data.tar.gz: cf2800c450d29d9228b807ea8a52b754ad68684ce2fe573eea6d622825b44639
3
+ metadata.gz: 340bcccdb9ded5f73eebc8659e51d1dd84c7fb90b9fb8e46982b6f1e6d20e550
4
+ data.tar.gz: 918ca96ab247a0a7438851f23a4f7a9b0fb39df132387ef3dcb81ee5c14c2beb
5
5
  SHA512:
6
- metadata.gz: 873af5c00c3ed8c65aef1551ad74dca628759a4cb558c6fec136365910efdfb6582836e2a088f7364e3c72148cec7249970d673b9705f23af2362bbc9df44b46
7
- data.tar.gz: 93c68a94ba74666bba34faf2cb46bc86be84fc42c6392722dc51e6224d9d0ecc86f21a953a79b826002f50db14e0485e1a228ffb1b394cde9475f5af1187ea7c
6
+ metadata.gz: 3ace4c85c4d8b054bb6f071e4244a036dbc3329b951d32c35bec361c352de8c2f9d4fb5120fb36f30567e3e2556002622628d12cc508692072fc762363e8923d
7
+ data.tar.gz: e721fe79126d50a40035b32c0a9c6250316ae0be45d42381bf61482904c2eac840beca6499695f3604140d5a6243ba04334bf0c8ce9adec2cb7343c8c2f2a17c
@@ -812,6 +812,8 @@
812
812
  <ref name="requirement"/>
813
813
  <ref name="recommendation"/>
814
814
  <ref name="permission"/>
815
+ <ref name="imagemap"/>
816
+ <ref name="svgmap"/>
815
817
  </choice>
816
818
  </define>
817
819
  <define name="bibliography">
@@ -1635,4 +1637,65 @@
1635
1637
  <text/>
1636
1638
  </element>
1637
1639
  </define>
1640
+ <define name="imagemap">
1641
+ <element name="imagemap">
1642
+ <ref name="figure"/>
1643
+ <zeroOrMore>
1644
+ <element name="area">
1645
+ <attribute name="type">
1646
+ <choice>
1647
+ <value>rect</value>
1648
+ <value>circle</value>
1649
+ <value>ellipse</value>
1650
+ <value>poly</value>
1651
+ </choice>
1652
+ </attribute>
1653
+ <choice>
1654
+ <ref name="xref"/>
1655
+ <ref name="hyperlink"/>
1656
+ <ref name="eref"/>
1657
+ </choice>
1658
+ <oneOrMore>
1659
+ <element name="coords">
1660
+ <attribute name="x">
1661
+ <data type="float"/>
1662
+ </attribute>
1663
+ <attribute name="y">
1664
+ <data type="float"/>
1665
+ </attribute>
1666
+ </element>
1667
+ </oneOrMore>
1668
+ <optional>
1669
+ <element name="radius">
1670
+ <attribute name="x">
1671
+ <data type="float"/>
1672
+ </attribute>
1673
+ <optional>
1674
+ <attribute name="y">
1675
+ <data type="float"/>
1676
+ </attribute>
1677
+ </optional>
1678
+ </element>
1679
+ </optional>
1680
+ </element>
1681
+ </zeroOrMore>
1682
+ </element>
1683
+ </define>
1684
+ <define name="svgmap">
1685
+ <element name="svgmap">
1686
+ <ref name="figure"/>
1687
+ <zeroOrMore>
1688
+ <element name="target">
1689
+ <attribute name="href">
1690
+ <data type="anyURI"/>
1691
+ </attribute>
1692
+ <choice>
1693
+ <ref name="xref"/>
1694
+ <ref name="hyperlink"/>
1695
+ <ref name="eref"/>
1696
+ </choice>
1697
+ </element>
1698
+ </zeroOrMore>
1699
+ </element>
1700
+ </define>
1638
1701
  </grammar>
@@ -31,7 +31,7 @@
31
31
  <xsl:variable name="doctype" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
32
32
 
33
33
  <xsl:variable name="xSTR-ACRONYM">
34
- <xsl:variable name="x" select="substring(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title, 1, 1)"/>
34
+ <xsl:variable name="x" select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'abbrev']"/>
35
35
  <xsl:variable name="acronym" select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
36
36
  <xsl:value-of select="concat($x,'STR-', $acronym)"/>
37
37
  </xsl:variable>
@@ -100,6 +100,11 @@
100
100
  <xsl:text> </xsl:text>
101
101
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
102
102
  </xsl:when>
103
+ <xsl:when test="$doctype = 'recommendation-supplement'">
104
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement-Short']"/>
105
+ <xsl:text> </xsl:text>
106
+ <xsl:value-of select="$docdate"/>
107
+ </xsl:when>
103
108
  <xsl:otherwise>
104
109
  <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
105
110
  </xsl:otherwise>
@@ -378,10 +383,30 @@
378
383
  <xsl:text> </xsl:text>
379
384
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
380
385
  </xsl:when>
386
+ <xsl:when test="$doctype = 'resolution'"/>
387
+ <xsl:when test="$doctype = 'recommendation-supplement'">
388
+ <!-- Series L -->
389
+ <xsl:variable name="title-series">
390
+ <xsl:call-template name="getLocalizedString">
391
+ <xsl:with-param name="key">series</xsl:with-param>
392
+ </xsl:call-template>
393
+ </xsl:variable>
394
+ <xsl:call-template name="capitalize">
395
+ <xsl:with-param name="str" select="$title-series"/>
396
+ </xsl:call-template>
397
+ <xsl:text> </xsl:text>
398
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type='main']/itu:title[@type='abbrev']"/>
399
+ <!-- Ex. Supplement 37 -->
400
+ <fo:block font-size="18pt">
401
+ <xsl:call-template name="getLocalizedString">
402
+ <xsl:with-param name="key">doctype_dict.recommendation-supplement</xsl:with-param>
403
+ </xsl:call-template>
404
+ <xsl:text> </xsl:text>
405
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
406
+ </fo:block>
407
+ </xsl:when>
381
408
  <xsl:otherwise>
382
- <xsl:if test="$doctype != 'resolution'">
383
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
384
- </xsl:if>
409
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
385
410
  </xsl:otherwise>
386
411
  </xsl:choose>
387
412
  </fo:block>
@@ -488,25 +513,36 @@
488
513
  </fo:block>
489
514
  </xsl:if>
490
515
  <fo:block text-transform="uppercase">
491
- <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']) != ''">
516
+ <xsl:variable name="series_title" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
517
+ <xsl:if test="$series_title != ''">
492
518
  <xsl:variable name="title">
493
519
  <xsl:if test="$doctype != 'resolution'">
494
- <xsl:text>Series </xsl:text>
520
+ <!-- <xsl:text>Series </xsl:text> -->
521
+ <xsl:call-template name="getLocalizedString">
522
+ <xsl:with-param name="key">series</xsl:with-param>
523
+ </xsl:call-template>
524
+ <xsl:text> </xsl:text>
495
525
  </xsl:if>
496
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']"/>
526
+ <xsl:value-of select="$series_title"/>
497
527
  </xsl:variable>
498
528
  <xsl:value-of select="$title"/>
499
529
  </xsl:if>
500
530
  </fo:block>
501
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
502
- <fo:block margin-top="6pt">
503
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
504
- <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
505
- <xsl:text> — </xsl:text>
506
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
531
+ <xsl:choose>
532
+ <xsl:when test="$doctype = 'recommendation-supplement'"/>
533
+ <xsl:otherwise>
534
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
535
+ <fo:block margin-top="6pt">
536
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
537
+ <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
538
+ <xsl:text> — </xsl:text>
539
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
540
+ </xsl:if>
541
+ </fo:block>
507
542
  </xsl:if>
508
- </fo:block>
509
- </xsl:if>
543
+ </xsl:otherwise>
544
+ </xsl:choose>
545
+
510
546
  </fo:block>
511
547
  </fo:table-cell>
512
548
  </fo:table-row>
@@ -586,6 +622,9 @@
586
622
  <fo:block font-size="16pt" margin-top="3pt">
587
623
  <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
588
624
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
625
+ <xsl:if test="$doctype = 'recommendation-supplement'">
626
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
627
+ </xsl:if>
589
628
  </xsl:if>
590
629
 
591
630
  <xsl:choose>
@@ -602,6 +641,11 @@
602
641
  </xsl:when>
603
642
  <xsl:when test="$doctype = 'implementers-guide'"/>
604
643
  <xsl:when test="$doctype = 'resolution'"/>
644
+ <xsl:when test="$doctype = 'recommendation-supplement'">
645
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
646
+ <xsl:text>ITU-</xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:bureau"/><xsl:text> </xsl:text>
647
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
648
+ </xsl:when>
605
649
  <xsl:otherwise>
606
650
  <xsl:value-of select="$doctypeTitle"/>
607
651
  <xsl:text>  </xsl:text>
@@ -641,6 +685,11 @@
641
685
  <fo:block-container font-size="14pt" font-weight="bold">
642
686
  <xsl:choose>
643
687
  <xsl:when test="$doctype = 'implementers-guide'"/>
688
+ <xsl:when test="$doctype = 'recommendation-supplement'">
689
+ <fo:block>
690
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement-Internal']"/>
691
+ </fo:block>
692
+ </xsl:when>
644
693
  <xsl:otherwise>
645
694
  <fo:block>
646
695
  <xsl:value-of select="$doctypeTitle"/>
@@ -852,6 +901,12 @@
852
901
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type='resolution' and @language = $lang]"/>
853
902
  </fo:block>
854
903
  </xsl:when>
904
+ <xsl:when test="$doctype = 'implementers-guide'"/>
905
+ <xsl:when test="$doctype = 'recommendation-supplement'">
906
+ <fo:block font-weight="bold">
907
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement-Internal']"/>
908
+ </fo:block>
909
+ </xsl:when>
855
910
  <xsl:otherwise>
856
911
  <fo:block font-weight="bold">
857
912
  <xsl:value-of select="$doctypeTitle"/>
@@ -2342,206 +2397,240 @@
2342
2397
  <xsl:call-template name="add-zero-spaces-java"/>
2343
2398
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2344
2399
 
2345
- <xsl:variable name="simple-table">
2346
- <xsl:call-template name="getSimpleTable"/>
2347
- </xsl:variable>
2400
+ <xsl:variable name="table">
2348
2401
 
2349
-
2350
- <fo:block space-before="18pt"> </fo:block>
2351
-
2352
-
2353
-
2354
-
2355
- <!-- <xsl:if test="$namespace = 'bipm'">
2356
- <fo:block>&#xA0;</fo:block>
2357
- </xsl:if> -->
2358
-
2359
- <!-- $namespace = 'iso' or -->
2360
-
2361
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2362
-
2363
-
2364
-
2365
- <xsl:call-template name="fn_name_display"/>
2402
+ <xsl:variable name="simple-table">
2403
+ <xsl:call-template name="getSimpleTable"/>
2404
+ </xsl:variable>
2366
2405
 
2367
2406
 
2368
-
2369
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2370
-
2371
- <!-- <xsl:variable name="cols-count">
2372
- <xsl:choose>
2373
- <xsl:when test="*[local-name()='thead']">
2374
- <xsl:call-template name="calculate-columns-numbers">
2375
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2376
- </xsl:call-template>
2377
- </xsl:when>
2378
- <xsl:otherwise>
2379
- <xsl:call-template name="calculate-columns-numbers">
2380
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2381
- </xsl:call-template>
2382
- </xsl:otherwise>
2383
- </xsl:choose>
2384
- </xsl:variable> -->
2385
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2386
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2387
-
2388
-
2389
-
2390
- <xsl:variable name="colwidths">
2391
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2392
- <xsl:call-template name="calculate-column-widths">
2393
- <xsl:with-param name="cols-count" select="$cols-count"/>
2394
- <xsl:with-param name="table" select="$simple-table"/>
2395
- </xsl:call-template>
2396
- </xsl:if>
2397
- </xsl:variable>
2398
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2399
-
2400
- <!-- <xsl:variable name="colwidths2">
2401
- <xsl:call-template name="calculate-column-widths">
2402
- <xsl:with-param name="cols-count" select="$cols-count"/>
2403
- </xsl:call-template>
2404
- </xsl:variable> -->
2405
-
2406
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2407
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
2408
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2409
-
2410
- <xsl:variable name="margin-left">
2411
- <xsl:choose>
2412
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2413
- <xsl:otherwise>0</xsl:otherwise>
2414
- </xsl:choose>
2415
- </xsl:variable>
2416
-
2417
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2407
+ <fo:block space-before="18pt"> </fo:block>
2418
2408
 
2419
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2420
2409
 
2421
2410
 
2422
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2423
2411
 
2424
-
2425
-
2426
-
2412
+ <!-- <xsl:if test="$namespace = 'bipm'">
2413
+ <fo:block>&#xA0;</fo:block>
2414
+ </xsl:if> -->
2427
2415
 
2428
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2429
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2430
- <xsl:attribute name="space-after">18pt</xsl:attribute>
2416
+ <!-- $namespace = 'iso' or -->
2431
2417
 
2418
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2432
2419
 
2433
-
2420
+
2434
2421
 
2422
+ <xsl:call-template name="fn_name_display"/>
2435
2423
 
2424
+
2436
2425
 
2426
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2437
2427
 
2428
+ <!-- <xsl:variable name="cols-count">
2429
+ <xsl:choose>
2430
+ <xsl:when test="*[local-name()='thead']">
2431
+ <xsl:call-template name="calculate-columns-numbers">
2432
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2433
+ </xsl:call-template>
2434
+ </xsl:when>
2435
+ <xsl:otherwise>
2436
+ <xsl:call-template name="calculate-columns-numbers">
2437
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2438
+ </xsl:call-template>
2439
+ </xsl:otherwise>
2440
+ </xsl:choose>
2441
+ </xsl:variable> -->
2442
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2443
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2438
2444
 
2439
2445
 
2440
2446
 
2441
- <xsl:variable name="table_attributes">
2442
- <attribute name="table-layout">fixed</attribute>
2443
- <attribute name="width">
2444
- <xsl:choose>
2445
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2446
- <xsl:otherwise>100%</xsl:otherwise>
2447
- </xsl:choose>
2448
- </attribute>
2449
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2450
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2447
+ <xsl:variable name="colwidths">
2448
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2449
+ <xsl:call-template name="calculate-column-widths">
2450
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2451
+ <xsl:with-param name="table" select="$simple-table"/>
2452
+ </xsl:call-template>
2453
+ </xsl:if>
2454
+ </xsl:variable>
2455
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2456
+
2457
+ <!-- <xsl:variable name="colwidths2">
2458
+ <xsl:call-template name="calculate-column-widths">
2459
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2460
+ </xsl:call-template>
2461
+ </xsl:variable> -->
2462
+
2463
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2464
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
2465
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2466
+
2467
+ <xsl:variable name="margin-left">
2468
+ <xsl:choose>
2469
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2470
+ <xsl:otherwise>0</xsl:otherwise>
2471
+ </xsl:choose>
2472
+ </xsl:variable>
2473
+
2474
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2451
2475
 
2476
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2452
2477
 
2453
2478
 
2454
- <attribute name="margin-left">0mm</attribute>
2455
- <attribute name="margin-right">0mm</attribute>
2479
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2456
2480
 
2481
+
2482
+
2483
+
2457
2484
 
2458
-
2459
-
2460
-
2485
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2486
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2487
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
2461
2488
 
2462
-
2463
2489
 
2464
- </xsl:variable>
2465
-
2466
-
2467
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2490
+
2468
2491
 
2469
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2470
- <xsl:attribute name="{@name}">
2471
- <xsl:value-of select="."/>
2472
- </xsl:attribute>
2473
- </xsl:for-each>
2474
2492
 
2475
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
2476
- <xsl:if test="$isNoteOrFnExist = 'true'">
2477
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2478
- </xsl:if>
2479
2493
 
2480
- <xsl:choose>
2481
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2482
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2483
- <fo:table-column column-width="{@width}"/>
2484
- </xsl:for-each>
2485
- </xsl:when>
2486
- <xsl:otherwise>
2487
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2488
- <xsl:choose>
2489
- <xsl:when test=". = 1 or . = 0">
2490
- <fo:table-column column-width="proportional-column-width(2)"/>
2491
- </xsl:when>
2492
- <xsl:otherwise>
2493
- <fo:table-column column-width="proportional-column-width({.})"/>
2494
- </xsl:otherwise>
2495
- </xsl:choose>
2496
- </xsl:for-each>
2497
- </xsl:otherwise>
2498
- </xsl:choose>
2499
2494
 
2500
- <xsl:choose>
2501
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2502
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2503
- </xsl:when>
2504
- <xsl:otherwise>
2505
- <xsl:apply-templates/>
2506
- </xsl:otherwise>
2507
- </xsl:choose>
2508
2495
 
2509
- </fo:table>
2510
-
2511
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2512
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2513
- <xsl:call-template name="insertTableFooterInSeparateTable">
2514
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
2515
- <xsl:with-param name="colwidths" select="$colwidths"/>
2516
- <xsl:with-param name="colgroup" select="$colgroup"/>
2517
- </xsl:call-template>
2518
- </xsl:for-each>
2519
-
2520
- <!-- insert footer as table -->
2521
- <!-- <fo:table>
2522
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2523
- <xsl:attribute name="{@name}">
2524
- <xsl:value-of select="."/>
2525
- </xsl:attribute>
2526
- </xsl:for-each>
2527
2496
 
2528
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2497
+ <xsl:variable name="table_width">
2498
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2499
+ 100%
2500
+
2501
+
2502
+ </xsl:variable>
2503
+
2504
+ <xsl:variable name="table_attributes">
2505
+ <attribute name="table-layout">fixed</attribute>
2506
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
2507
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2508
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2509
+
2510
+
2511
+
2512
+ <attribute name="margin-left">0mm</attribute>
2513
+ <attribute name="margin-right">0mm</attribute>
2514
+
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+ </xsl:variable>
2523
+
2524
+
2525
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
2526
+
2527
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2528
+ <xsl:attribute name="{@name}">
2529
+ <xsl:value-of select="."/>
2530
+ </xsl:attribute>
2531
+ </xsl:for-each>
2532
+
2533
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
2534
+ <xsl:if test="$isNoteOrFnExist = 'true'">
2535
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2536
+ </xsl:if>
2537
+
2529
2538
  <xsl:choose>
2530
- <xsl:when test=". = 1 or . = 0">
2531
- <fo:table-column column-width="proportional-column-width(2)"/>
2539
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2540
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2541
+ <fo:table-column column-width="{@width}"/>
2542
+ </xsl:for-each>
2532
2543
  </xsl:when>
2533
2544
  <xsl:otherwise>
2534
- <fo:table-column column-width="proportional-column-width({.})"/>
2545
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2546
+ <xsl:choose>
2547
+ <xsl:when test=". = 1 or . = 0">
2548
+ <fo:table-column column-width="proportional-column-width(2)"/>
2549
+ </xsl:when>
2550
+ <xsl:otherwise>
2551
+ <fo:table-column column-width="proportional-column-width({.})"/>
2552
+ </xsl:otherwise>
2553
+ </xsl:choose>
2554
+ </xsl:for-each>
2535
2555
  </xsl:otherwise>
2536
2556
  </xsl:choose>
2557
+
2558
+ <xsl:choose>
2559
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2560
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2561
+ </xsl:when>
2562
+ <xsl:otherwise>
2563
+ <xsl:apply-templates/>
2564
+ </xsl:otherwise>
2565
+ </xsl:choose>
2566
+
2567
+ </fo:table>
2568
+
2569
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2570
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2571
+ <xsl:call-template name="insertTableFooterInSeparateTable">
2572
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
2573
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2574
+ <xsl:with-param name="colgroup" select="$colgroup"/>
2575
+ </xsl:call-template>
2537
2576
  </xsl:for-each>
2538
- </fo:table>-->
2539
-
2540
-
2541
-
2542
-
2543
-
2544
- </fo:block-container>
2577
+
2578
+ <!-- insert footer as table -->
2579
+ <!-- <fo:table>
2580
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2581
+ <xsl:attribute name="{@name}">
2582
+ <xsl:value-of select="."/>
2583
+ </xsl:attribute>
2584
+ </xsl:for-each>
2585
+
2586
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2587
+ <xsl:choose>
2588
+ <xsl:when test=". = 1 or . = 0">
2589
+ <fo:table-column column-width="proportional-column-width(2)"/>
2590
+ </xsl:when>
2591
+ <xsl:otherwise>
2592
+ <fo:table-column column-width="proportional-column-width({.})"/>
2593
+ </xsl:otherwise>
2594
+ </xsl:choose>
2595
+ </xsl:for-each>
2596
+ </fo:table>-->
2597
+
2598
+
2599
+
2600
+
2601
+
2602
+ </fo:block-container>
2603
+ </xsl:variable>
2604
+
2605
+
2606
+
2607
+ <xsl:choose>
2608
+ <xsl:when test="@width">
2609
+
2610
+ <!-- centered table when table name is centered (see table-name-style) -->
2611
+
2612
+ <fo:table table-layout="fixed" width="100%">
2613
+ <fo:table-column column-width="proportional-column-width(1)"/>
2614
+ <fo:table-column column-width="{@width}"/>
2615
+ <fo:table-column column-width="proportional-column-width(1)"/>
2616
+ <fo:table-body>
2617
+ <fo:table-row>
2618
+ <fo:table-cell column-number="2">
2619
+ <fo:block><xsl:copy-of select="$table"/></fo:block>
2620
+ </fo:table-cell>
2621
+ </fo:table-row>
2622
+ </fo:table-body>
2623
+ </fo:table>
2624
+
2625
+
2626
+
2627
+
2628
+ </xsl:when>
2629
+ <xsl:otherwise>
2630
+ <xsl:copy-of select="$table"/>
2631
+ </xsl:otherwise>
2632
+ </xsl:choose>
2633
+
2545
2634
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2546
2635
  <xsl:if test="normalize-space() != ''">
2547
2636
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -3399,7 +3488,7 @@
3399
3488
  <xsl:with-param name="table" select="$html-table"/>
3400
3489
  </xsl:call-template>
3401
3490
  </xsl:variable>
3402
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
3491
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3403
3492
  <xsl:variable name="maxlength_dt">
3404
3493
  <xsl:call-template name="getMaxLength_dt"/>
3405
3494
  </xsl:variable>
@@ -3428,13 +3517,22 @@
3428
3517
  </xsl:when>
3429
3518
  <xsl:otherwise>
3430
3519
  <xsl:choose>
3520
+ <!-- to set width check most wide chars like `W` -->
3431
3521
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
3432
- <fo:table-column column-width="5%"/>
3433
- <fo:table-column column-width="95%"/>
3522
+ <fo:table-column column-width="7%"/>
3523
+ <fo:table-column column-width="93%"/>
3524
+ </xsl:when>
3525
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
3526
+ <fo:table-column column-width="15%"/>
3527
+ <fo:table-column column-width="85%"/>
3528
+ </xsl:when>
3529
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
3530
+ <fo:table-column column-width="20%"/>
3531
+ <fo:table-column column-width="80%"/>
3434
3532
  </xsl:when>
3435
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
3436
- <fo:table-column column-width="10%"/>
3437
- <fo:table-column column-width="90%"/>
3533
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
3534
+ <fo:table-column column-width="25%"/>
3535
+ <fo:table-column column-width="75%"/>
3438
3536
  </xsl:when>
3439
3537
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
3440
3538
  <fo:table-column column-width="60%"/>
@@ -3751,6 +3849,10 @@
3751
3849
  <xsl:param name="text" select="."/>
3752
3850
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3753
3851
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
3852
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
3853
+ <xsl:param name="text" select="."/>
3854
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3855
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
3754
3856
  </xsl:template><xsl:template name="add-zero-spaces">
3755
3857
  <xsl:param name="text" select="."/>
3756
3858
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -4011,6 +4113,11 @@
4011
4113
  <!-- replace start and end spaces to non-break space -->
4012
4114
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4013
4115
  </xsl:copy>
4116
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
4117
+ <xsl:copy>
4118
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
4119
+ </xsl:copy>
4120
+ <mathml:mspace width="0.5ex"/>
4014
4121
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4015
4122
  <xsl:variable name="target">
4016
4123
  <xsl:choose>
@@ -4032,7 +4139,10 @@
4032
4139
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
4033
4140
  <xsl:choose>
4034
4141
  <xsl:when test="normalize-space(.) = ''">
4035
- <xsl:value-of select="$target"/>
4142
+ <!-- <xsl:value-of select="$target"/> -->
4143
+ <xsl:call-template name="add-zero-spaces-link-java">
4144
+ <xsl:with-param name="text" select="$target"/>
4145
+ </xsl:call-template>
4036
4146
  </xsl:when>
4037
4147
  <xsl:otherwise>
4038
4148
  <xsl:apply-templates/>
@@ -4511,6 +4621,8 @@
4511
4621
  <xsl:copy>
4512
4622
  <xsl:apply-templates mode="contents_item"/>
4513
4623
  </xsl:copy>
4624
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
4625
+ <xsl:copy-of select="."/>
4514
4626
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4515
4627
  <xsl:text> </xsl:text>
4516
4628
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -4904,11 +5016,13 @@
4904
5016
  </xsl:if>
4905
5017
  </xsl:if>
4906
5018
 
5019
+
4907
5020
  <fo:block-container margin-left="0mm">
4908
5021
 
4909
5022
  <fo:block xsl:use-attribute-sets="quote-style">
4910
5023
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4911
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5024
+
5025
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4912
5026
  </fo:block>
4913
5027
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4914
5028
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -5332,7 +5446,7 @@
5332
5446
  <xsl:param name="charDelim" select="', '"/>
5333
5447
  <xsl:choose>
5334
5448
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
5335
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5449
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5336
5450
  <xsl:sort data-type="text" order="ascending"/>
5337
5451
  <xsl:call-template name="insertKeyword">
5338
5452
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -5341,7 +5455,7 @@
5341
5455
  </xsl:for-each>
5342
5456
  </xsl:when>
5343
5457
  <xsl:otherwise>
5344
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5458
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5345
5459
  <xsl:call-template name="insertKeyword">
5346
5460
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
5347
5461
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -5358,6 +5472,9 @@
5358
5472
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
5359
5473
  </xsl:choose>
5360
5474
  </xsl:template><xsl:template name="addPDFUAmeta">
5475
+ <xsl:variable name="lang">
5476
+ <xsl:call-template name="getLang"/>
5477
+ </xsl:variable>
5361
5478
  <fo:declarations>
5362
5479
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
5363
5480
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -5370,13 +5487,16 @@
5370
5487
  <!-- Dublin Core properties go here -->
5371
5488
  <dc:title>
5372
5489
  <xsl:variable name="title">
5373
-
5374
-
5375
-
5376
-
5377
-
5378
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@type='main']"/>
5379
-
5490
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5491
+
5492
+
5493
+
5494
+
5495
+
5496
+
5497
+ <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
5498
+
5499
+ </xsl:for-each>
5380
5500
  </xsl:variable>
5381
5501
  <xsl:choose>
5382
5502
  <xsl:when test="normalize-space($title) != ''">
@@ -5388,19 +5508,21 @@
5388
5508
  </xsl:choose>
5389
5509
  </dc:title>
5390
5510
  <dc:creator>
5391
-
5392
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
5393
-
5394
-
5395
-
5396
- </dc:creator>
5397
- <dc:description>
5398
- <xsl:variable name="abstract">
5511
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5512
+
5513
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5514
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5515
+ <xsl:if test="position() != last()">; </xsl:if>
5516
+ </xsl:for-each>
5399
5517
 
5400
5518
 
5401
5519
 
5520
+ </xsl:for-each>
5521
+ </dc:creator>
5522
+ <dc:description>
5523
+ <xsl:variable name="abstract">
5402
5524
 
5403
- <xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
5525
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5404
5526
 
5405
5527
 
5406
5528
  </xsl:variable>