metanorma-bipm 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/bipm/isodoc.rng +63 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +280 -201
- data/lib/isodoc/bipm/bipm.guide.xsl +280 -201
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +280 -201
- data/lib/isodoc/bipm/bipm.rapport.xsl +280 -201
- data/lib/isodoc/bipm/jcgm.standard.xsl +420 -291
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +3 -3
@@ -34,20 +34,35 @@
|
|
34
34
|
<xsl:copy-of select="$doc_first_step2"/>
|
35
35
|
</xsl:if>
|
36
36
|
</xsl:variable>
|
37
|
-
<xsl:variable name="
|
37
|
+
<xsl:variable name="docs_slave">
|
38
38
|
<xsl:if test="*[local-name()='metanorma-collection']">
|
39
|
-
<xsl:
|
40
|
-
<xsl:
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
<xsl:
|
46
|
-
|
47
|
-
|
39
|
+
<xsl:for-each select="(/*[local-name()='metanorma-collection']//*[contains(local-name(), '-standard')])[position() > 1]">
|
40
|
+
<xsl:variable name="doc_first_step1">
|
41
|
+
<xsl:apply-templates select="." mode="flatxml_step1">
|
42
|
+
<xsl:with-param name="num" select="'slave'"/>
|
43
|
+
</xsl:apply-templates>
|
44
|
+
</xsl:variable>
|
45
|
+
<xsl:variable name="doc_first_step2">
|
46
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first_step1)" mode="flatxml_step2"/>
|
47
|
+
</xsl:variable>
|
48
|
+
<xsl:copy-of select="$doc_first_step2"/>
|
49
|
+
</xsl:for-each>
|
48
50
|
</xsl:if>
|
49
51
|
</xsl:variable>
|
50
|
-
|
52
|
+
|
53
|
+
<xsl:variable name="page_width">172</xsl:variable>
|
54
|
+
<xsl:variable name="column_gap">8</xsl:variable>
|
55
|
+
<xsl:variable name="docs_count">
|
56
|
+
<xsl:choose>
|
57
|
+
<xsl:when test="/*[local-name()='metanorma-collection']">
|
58
|
+
<xsl:value-of select="count(/*[local-name()='metanorma-collection']//*[contains(local-name(), '-standard')])"/>
|
59
|
+
</xsl:when>
|
60
|
+
<xsl:otherwise>1</xsl:otherwise>
|
61
|
+
</xsl:choose>
|
62
|
+
</xsl:variable>
|
63
|
+
<!-- (page_width - column_gap)/n_columns = column_width -->
|
64
|
+
<!-- example: for two-column layout: 82mm 8mm 82mm -->
|
65
|
+
<xsl:variable name="column_width" select="($page_width - $column_gap) div $docs_count"/>
|
51
66
|
|
52
67
|
<xsl:variable name="debug">false</xsl:variable>
|
53
68
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
@@ -444,32 +459,32 @@
|
|
444
459
|
</xsl:variable> -->
|
445
460
|
|
446
461
|
<!-- doc_first=<xsl:copy-of select="$doc_first"/>
|
447
|
-
|
462
|
+
docs_slave=<xsl:copy-of select="$docs_slave"/> -->
|
448
463
|
|
449
|
-
<!-- <xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="
|
450
|
-
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='section_scope']/*" mode="
|
464
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="multi_columns"/> -->
|
465
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='section_scope']/*" mode="multi_columns"/>
|
451
466
|
|
452
467
|
<!-- Normative references -->
|
453
|
-
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="
|
468
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="multi_columns"/>
|
454
469
|
<!-- Terms and definitions -->
|
455
|
-
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='section_terms']/*" mode="
|
470
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='section_terms']/*" mode="multi_columns"/>
|
456
471
|
|
457
472
|
<!-- <xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='terms'] |
|
458
473
|
xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] |
|
459
474
|
xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='definitions'] |
|
460
|
-
xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="
|
475
|
+
xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="multi_columns"/> -->
|
461
476
|
|
462
477
|
<!-- Another main sections -->
|
463
478
|
<!-- <xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name() != 'terms' and
|
464
479
|
local-name() != 'definitions' and
|
465
480
|
not(@type='scope') and
|
466
481
|
not(local-name() = 'clause' and .//*[local-name()='terms']) and
|
467
|
-
not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="
|
468
|
-
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name() != 'section_terms' and local-name() != 'section_scope']" mode="
|
482
|
+
not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="multi_columns"/> -->
|
483
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='sections']/*[local-name() != 'section_terms' and local-name() != 'section_scope']" mode="multi_columns"/>
|
469
484
|
|
470
|
-
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='annex']" mode="
|
485
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='annex']" mode="multi_columns"/>
|
471
486
|
<!-- Bibliography -->
|
472
|
-
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="
|
487
|
+
<xsl:apply-templates select="xalan:nodeset($doc_first)/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="multi_columns"/>
|
473
488
|
|
474
489
|
|
475
490
|
</xsl:otherwise>
|
@@ -638,7 +653,7 @@
|
|
638
653
|
</xsl:choose>
|
639
654
|
</xsl:attribute>
|
640
655
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
641
|
-
<xsl:if test="ancestor::*[@first or @
|
656
|
+
<xsl:if test="ancestor::*[@first or @slave]">
|
642
657
|
<!-- JCGM two column layout -->
|
643
658
|
<xsl:attribute name="widows">1</xsl:attribute>
|
644
659
|
<xsl:attribute name="orphans">1</xsl:attribute>
|
@@ -729,21 +744,30 @@
|
|
729
744
|
</xsl:if>
|
730
745
|
</xsl:variable>
|
731
746
|
<xsl:value-of select="$docidentifier"/>
|
732
|
-
|
733
|
-
<xsl:
|
734
|
-
|
735
|
-
|
736
|
-
<xsl:
|
737
|
-
|
738
|
-
|
739
|
-
<xsl:
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
+
|
748
|
+
<xsl:choose>
|
749
|
+
<xsl:when test="*[local-name()='formattedref']">
|
750
|
+
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
751
|
+
<xsl:apply-templates select="*[local-name()='formattedref']"/>
|
752
|
+
</xsl:when>
|
753
|
+
<xsl:otherwise>
|
754
|
+
<xsl:apply-templates select="*[local-name()='note']"/>
|
755
|
+
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
756
|
+
<fo:inline font-style="italic">
|
757
|
+
<xsl:choose>
|
758
|
+
<xsl:when test="*[local-name()='title'][@type = 'main' and @language = $lang]">
|
759
|
+
<xsl:value-of select="*[local-name()='title'][@type = 'main' and @language = $lang]"/>
|
760
|
+
</xsl:when>
|
761
|
+
<xsl:when test="*[local-name()='title'][@type = 'main' and @language = 'en']">
|
762
|
+
<xsl:value-of select="*[local-name()='title'][@type = 'main' and @language = 'en']"/>
|
763
|
+
</xsl:when>
|
764
|
+
<xsl:otherwise>
|
765
|
+
<xsl:value-of select="*[local-name()='title']"/>
|
766
|
+
</xsl:otherwise>
|
767
|
+
</xsl:choose>
|
768
|
+
</fo:inline>
|
769
|
+
</xsl:otherwise>
|
770
|
+
</xsl:choose>
|
747
771
|
</fo:block>
|
748
772
|
</xsl:template>
|
749
773
|
|
@@ -1504,16 +1528,18 @@
|
|
1504
1528
|
<!-- Two columns layout -->
|
1505
1529
|
<!-- =================== -->
|
1506
1530
|
|
1507
|
-
<!-- <xsl:template match="*[@first]/*[local-name()='sections']//*[not(@cross-align) or not(@cross-align='true')]" mode="
|
1531
|
+
<!-- <xsl:template match="*[@first]/*[local-name()='sections']//*[not(@cross-align) or not(@cross-align='true')]" mode="multi_columns"/> -->
|
1508
1532
|
|
1509
|
-
<xsl:template match="*[@first]/*[local-name()='sections']//*[local-name() = 'cross-align'] | *[@first]/*[local-name()='annex']//*[local-name() = 'cross-align']" mode="
|
1533
|
+
<xsl:template match="*[@first]/*[local-name()='sections']//*[local-name() = 'cross-align'] | *[@first]/*[local-name()='annex']//*[local-name() = 'cross-align']" mode="multi_columns">
|
1510
1534
|
<xsl:variable name="element-number" select="@element-number"/>
|
1511
1535
|
<fo:block>
|
1512
1536
|
<xsl:copy-of select="@keep-with-next"/>
|
1513
1537
|
<fo:table table-layout="fixed" width="100%">
|
1514
|
-
<fo:table-column column-width="
|
1515
|
-
<
|
1516
|
-
|
1538
|
+
<fo:table-column column-width="{$column_width}mm"/>
|
1539
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1540
|
+
<fo:table-column column-width="{$column_gap}mm"/>
|
1541
|
+
<fo:table-column column-width="{$column_width}mm"/>
|
1542
|
+
</xsl:for-each>
|
1517
1543
|
<fo:table-body>
|
1518
1544
|
<fo:table-row>
|
1519
1545
|
<fo:table-cell>
|
@@ -1524,17 +1550,22 @@
|
|
1524
1550
|
</fo:block>
|
1525
1551
|
<fo:block font-size="1pt"/>
|
1526
1552
|
</fo:table-cell>
|
1527
|
-
<
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
<fo:
|
1533
|
-
<
|
1534
|
-
<
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1553
|
+
<xsl:variable name="keep-with-next" select="@keep-with-next"/>
|
1554
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1555
|
+
<fo:table-cell>
|
1556
|
+
<fo:block/>
|
1557
|
+
</fo:table-cell>
|
1558
|
+
<fo:table-cell>
|
1559
|
+
<fo:block font-size="1pt" keep-with-next="always"/>
|
1560
|
+
<fo:block>
|
1561
|
+
<xsl:if test="$keep-with-next != ''">
|
1562
|
+
<xsl:attribute name="keep-with-next"><xsl:value-of select="$keep-with-next"/></xsl:attribute>
|
1563
|
+
</xsl:if>
|
1564
|
+
<xsl:apply-templates select=".//*[local-name() = 'cross-align' and @element-number=$element-number]"/>
|
1565
|
+
</fo:block>
|
1566
|
+
<fo:block font-size="1pt"/>
|
1567
|
+
</fo:table-cell>
|
1568
|
+
</xsl:for-each>
|
1538
1569
|
</fo:table-row>
|
1539
1570
|
</fo:table-body>
|
1540
1571
|
</fo:table>
|
@@ -1545,37 +1576,41 @@
|
|
1545
1576
|
<xsl:apply-templates/>
|
1546
1577
|
</xsl:template>
|
1547
1578
|
|
1548
|
-
<!-- no display table/figure from
|
1549
|
-
<xsl:template match="*[@
|
1550
|
-
<xsl:template match="*[@
|
1551
|
-
<xsl:template match="*[@
|
1552
|
-
<xsl:template match="*[@
|
1579
|
+
<!-- no display table/figure from slave documents if common=true or span=true -->
|
1580
|
+
<xsl:template match="*[@slave]//*[local-name()='table'][@common = 'true']" priority="2"/>
|
1581
|
+
<xsl:template match="*[@slave]//*[local-name()='table'][@span = 'true']" priority="2"/>
|
1582
|
+
<xsl:template match="*[@slave]//*[local-name()='figure'][@common = 'true']" priority="2"/>
|
1583
|
+
<xsl:template match="*[@slave]//*[local-name()='figure'][@span = 'true']" priority="2"/>
|
1553
1584
|
|
1554
1585
|
<!-- for table and figure with @common='true' -->
|
1555
1586
|
<!-- display only element from first document -->
|
1556
|
-
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@common = 'true']" mode="
|
1587
|
+
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@common = 'true']" mode="multi_columns">
|
1557
1588
|
<fo:block>
|
1558
1589
|
<xsl:apply-templates/>
|
1559
1590
|
</fo:block>
|
1560
1591
|
</xsl:template>
|
1561
1592
|
|
1562
1593
|
<!-- for table and figure with @span='true' -->
|
1563
|
-
<!-- display element from first document, then (after) from
|
1564
|
-
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@span = 'true']" mode="
|
1594
|
+
<!-- display element from first document, then (after) from 2nd one, then 3rd, etc. -->
|
1595
|
+
<xsl:template match="*[@first]//*[local-name() = 'cross-align'][@span = 'true']" mode="multi_columns">
|
1565
1596
|
<xsl:variable name="element-number" select="@element-number"/>
|
1566
1597
|
<fo:block>
|
1567
1598
|
<xsl:apply-templates/>
|
1568
1599
|
<fo:block> </fo:block>
|
1569
1600
|
<xsl:choose>
|
1570
1601
|
<xsl:when test="local-name(*[@span = 'true']) = 'table'">
|
1571
|
-
<xsl:for-each select="xalan:nodeset($
|
1602
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1603
|
+
<xsl:for-each select=".//*[local-name() = 'table' and @element-number=$element-number]">
|
1572
1604
|
<xsl:call-template name="table"/>
|
1573
1605
|
</xsl:for-each>
|
1606
|
+
</xsl:for-each>
|
1574
1607
|
</xsl:when>
|
1575
1608
|
<xsl:when test="local-name(*[@span = 'true']) = 'figure'">
|
1576
|
-
<xsl:for-each select="xalan:nodeset($
|
1609
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1610
|
+
<xsl:for-each select=".//*[local-name() = 'figure' and @element-number=$element-number]">
|
1577
1611
|
<xsl:call-template name="figure"/>
|
1578
1612
|
</xsl:for-each>
|
1613
|
+
</xsl:for-each>
|
1579
1614
|
</xsl:when>
|
1580
1615
|
</xsl:choose>
|
1581
1616
|
</fo:block>
|
@@ -1583,19 +1618,26 @@
|
|
1583
1618
|
|
1584
1619
|
<!-- =========== -->
|
1585
1620
|
<!-- References -->
|
1586
|
-
<xsl:template match="*[@first]//*[local-name()='references'][@normative='true']" mode="
|
1587
|
-
<fo:block font-size="1pt" keep-with-next="always"
|
1588
|
-
|
1621
|
+
<xsl:template match="*[@first]//*[local-name()='references'][@normative='true']" mode="multi_columns">
|
1622
|
+
<fo:block font-size="1pt" keep-with-next="always">
|
1623
|
+
<fo:inline id="{@id}"/>
|
1624
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1625
|
+
<fo:inline id="{.//*[local-name()='references'][@normative='true']/@id}"/>
|
1626
|
+
</xsl:for-each>
|
1627
|
+
</fo:block>
|
1628
|
+
<xsl:apply-templates mode="multi_columns"/>
|
1589
1629
|
</xsl:template>
|
1590
1630
|
|
1591
|
-
<xsl:template match="*[@first]//*[local-name()='references'][@normative='true']/*" mode="
|
1631
|
+
<xsl:template match="*[@first]//*[local-name()='references'][@normative='true']/*" mode="multi_columns">
|
1592
1632
|
<xsl:variable name="number_"><xsl:number count="*"/></xsl:variable>
|
1593
1633
|
<xsl:variable name="number" select="number(normalize-space($number_))"/>
|
1594
1634
|
<fo:block>
|
1595
1635
|
<fo:table table-layout="fixed" width="100%">
|
1596
|
-
<fo:table-column column-width="
|
1597
|
-
<
|
1598
|
-
|
1636
|
+
<fo:table-column column-width="{$column_width}mm"/>
|
1637
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1638
|
+
<fo:table-column column-width="{$column_gap}mm"/>
|
1639
|
+
<fo:table-column column-width="{$column_width}mm"/>
|
1640
|
+
</xsl:for-each>
|
1599
1641
|
<fo:table-body>
|
1600
1642
|
<fo:table-row>
|
1601
1643
|
<fo:table-cell>
|
@@ -1603,51 +1645,63 @@
|
|
1603
1645
|
<xsl:apply-templates select="."/>
|
1604
1646
|
<fo:block font-size="1pt"/>
|
1605
1647
|
</fo:table-cell>
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
<
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1648
|
+
|
1649
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1650
|
+
<fo:table-cell>
|
1651
|
+
<fo:block/>
|
1652
|
+
</fo:table-cell>
|
1653
|
+
<fo:table-cell>
|
1654
|
+
<fo:block>
|
1655
|
+
<fo:block font-size="1pt"/>
|
1656
|
+
<xsl:apply-templates select="(.//*[local-name()='references'][@normative='true']/*)[$number]"/>
|
1657
|
+
<fo:block font-size="1pt"/>
|
1658
|
+
</fo:block>
|
1659
|
+
</fo:table-cell>
|
1660
|
+
</xsl:for-each>
|
1616
1661
|
</fo:table-row>
|
1617
1662
|
</fo:table-body>
|
1618
1663
|
</fo:table>
|
1619
1664
|
</fo:block>
|
1620
1665
|
</xsl:template>
|
1621
1666
|
|
1622
|
-
<xsl:template match="*[@first]//*[local-name()='references'][not(@normative='true')]" mode="
|
1667
|
+
<xsl:template match="*[@first]//*[local-name()='references'][not(@normative='true')]" mode="multi_columns">
|
1623
1668
|
<fo:block break-after="page"/>
|
1624
|
-
<fo:block font-size="1pt"><fo:inline id="{@id}"
|
1625
|
-
|
1669
|
+
<fo:block font-size="1pt"><fo:inline id="{@id}"/>
|
1670
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1671
|
+
<fo:inline id="{.//*[local-name()='references'][not(@normative='true')]/@id}"/>
|
1672
|
+
</xsl:for-each>
|
1673
|
+
</fo:block>
|
1674
|
+
<xsl:apply-templates mode="multi_columns"/>
|
1626
1675
|
</xsl:template>
|
1627
1676
|
|
1628
|
-
<xsl:template match="*[@first]//*[local-name()='references'][not(@normative='true')]/*" mode="
|
1677
|
+
<xsl:template match="*[@first]//*[local-name()='references'][not(@normative='true')]/*" mode="multi_columns">
|
1629
1678
|
<xsl:variable name="number_"><xsl:number count="*"/></xsl:variable>
|
1630
1679
|
<xsl:variable name="number" select="number(normalize-space($number_))"/>
|
1631
1680
|
<fo:block>
|
1632
1681
|
<fo:table table-layout="fixed" width="100%">
|
1633
|
-
<fo:table-column column-width="
|
1634
|
-
<
|
1635
|
-
|
1682
|
+
<fo:table-column column-width="{$column_width}mm"/>
|
1683
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1684
|
+
<fo:table-column column-width="{$column_gap}mm"/>
|
1685
|
+
<fo:table-column column-width="{$column_width}mm"/>
|
1686
|
+
</xsl:for-each>
|
1636
1687
|
<fo:table-body>
|
1637
1688
|
<fo:table-row>
|
1638
1689
|
<fo:table-cell>
|
1639
1690
|
<xsl:apply-templates select="."/>
|
1640
1691
|
<fo:block font-size="1pt"/>
|
1641
1692
|
</fo:table-cell>
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
<fo:block
|
1649
|
-
|
1650
|
-
|
1693
|
+
|
1694
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1695
|
+
<fo:table-cell>
|
1696
|
+
<fo:block/>
|
1697
|
+
</fo:table-cell>
|
1698
|
+
<fo:table-cell>
|
1699
|
+
<fo:block>
|
1700
|
+
<xsl:apply-templates select="(.//*[local-name()='references'][not(@normative='true')]/*)[$number]"/>
|
1701
|
+
<fo:block font-size="1pt"/>
|
1702
|
+
</fo:block>
|
1703
|
+
</fo:table-cell>
|
1704
|
+
</xsl:for-each>
|
1651
1705
|
</fo:table-row>
|
1652
1706
|
</fo:table-body>
|
1653
1707
|
</fo:table>
|
@@ -1655,12 +1709,16 @@
|
|
1655
1709
|
</xsl:template>
|
1656
1710
|
<!-- End of References -->
|
1657
1711
|
|
1658
|
-
<xsl:template match="*[@first]//*[local-name()='annex']" mode="
|
1712
|
+
<xsl:template match="*[@first]//*[local-name()='annex']" mode="multi_columns">
|
1659
1713
|
<xsl:variable name="number_"><xsl:number/></xsl:variable>
|
1660
1714
|
<xsl:variable name="number" select="number(normalize-space($number_))"/>
|
1661
1715
|
<fo:block break-after="page"/>
|
1662
|
-
<fo:block font-size="1pt"><fo:inline id="{@id}"
|
1663
|
-
|
1716
|
+
<fo:block font-size="1pt"><fo:inline id="{@id}"/>
|
1717
|
+
<xsl:for-each select="xalan:nodeset($docs_slave)/*">
|
1718
|
+
<fo:inline id="{(.//*[local-name()='annex'])[$number]/@id}"/>
|
1719
|
+
</xsl:for-each>
|
1720
|
+
</fo:block>
|
1721
|
+
<xsl:apply-templates mode="multi_columns"/>
|
1664
1722
|
</xsl:template>
|
1665
1723
|
|
1666
1724
|
<!-- =================== -->
|
@@ -2384,15 +2442,12 @@
|
|
2384
2442
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2385
2443
|
|
2386
2444
|
|
2387
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2388
|
-
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
2389
|
-
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
2390
|
-
|
2391
2445
|
|
2392
2446
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2393
2447
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
2394
2448
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
2395
2449
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
2450
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
2396
2451
|
|
2397
2452
|
|
2398
2453
|
|
@@ -2536,204 +2591,238 @@
|
|
2536
2591
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2537
2592
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2538
2593
|
|
2539
|
-
<xsl:variable name="
|
2540
|
-
<xsl:call-template name="getSimpleTable"/>
|
2541
|
-
</xsl:variable>
|
2594
|
+
<xsl:variable name="table">
|
2542
2595
|
|
2543
|
-
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2547
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
2548
|
-
<fo:block> </fo:block>
|
2549
|
-
</xsl:if> -->
|
2550
|
-
|
2551
|
-
<!-- $namespace = 'iso' or -->
|
2552
|
-
|
2553
|
-
|
2596
|
+
<xsl:variable name="simple-table">
|
2597
|
+
<xsl:call-template name="getSimpleTable"/>
|
2598
|
+
</xsl:variable>
|
2554
2599
|
|
2555
2600
|
|
2556
|
-
|
2557
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2558
|
-
|
2559
|
-
<!-- <xsl:variable name="cols-count">
|
2560
|
-
<xsl:choose>
|
2561
|
-
<xsl:when test="*[local-name()='thead']">
|
2562
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2563
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2564
|
-
</xsl:call-template>
|
2565
|
-
</xsl:when>
|
2566
|
-
<xsl:otherwise>
|
2567
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2568
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2569
|
-
</xsl:call-template>
|
2570
|
-
</xsl:otherwise>
|
2571
|
-
</xsl:choose>
|
2572
|
-
</xsl:variable> -->
|
2573
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2574
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2575
|
-
|
2576
|
-
|
2577
|
-
|
2578
|
-
<xsl:variable name="colwidths">
|
2579
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2580
|
-
<xsl:call-template name="calculate-column-widths">
|
2581
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2582
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
2583
|
-
</xsl:call-template>
|
2584
|
-
</xsl:if>
|
2585
|
-
</xsl:variable>
|
2586
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2587
|
-
|
2588
|
-
<!-- <xsl:variable name="colwidths2">
|
2589
|
-
<xsl:call-template name="calculate-column-widths">
|
2590
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2591
|
-
</xsl:call-template>
|
2592
|
-
</xsl:variable> -->
|
2593
|
-
|
2594
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2595
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2596
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2597
|
-
|
2598
|
-
<xsl:variable name="margin-left">
|
2599
|
-
<xsl:choose>
|
2600
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2601
|
-
<xsl:otherwise>0</xsl:otherwise>
|
2602
|
-
</xsl:choose>
|
2603
|
-
</xsl:variable>
|
2604
|
-
|
2605
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2606
2601
|
|
2607
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2608
2602
|
|
2609
2603
|
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2604
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2605
|
+
<fo:block> </fo:block>
|
2606
|
+
</xsl:if> -->
|
2613
2607
|
|
2608
|
+
<!-- $namespace = 'iso' or -->
|
2614
2609
|
|
2615
|
-
|
2610
|
+
|
2616
2611
|
|
2612
|
+
|
2617
2613
|
|
2618
|
-
|
2619
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2620
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2621
|
-
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2614
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2622
2615
|
|
2616
|
+
<!-- <xsl:variable name="cols-count">
|
2617
|
+
<xsl:choose>
|
2618
|
+
<xsl:when test="*[local-name()='thead']">
|
2619
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2620
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2621
|
+
</xsl:call-template>
|
2622
|
+
</xsl:when>
|
2623
|
+
<xsl:otherwise>
|
2624
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2625
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2626
|
+
</xsl:call-template>
|
2627
|
+
</xsl:otherwise>
|
2628
|
+
</xsl:choose>
|
2629
|
+
</xsl:variable> -->
|
2630
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2631
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2623
2632
|
|
2624
2633
|
|
2625
2634
|
|
2635
|
+
<xsl:variable name="colwidths">
|
2636
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2637
|
+
<xsl:call-template name="calculate-column-widths">
|
2638
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2639
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2640
|
+
</xsl:call-template>
|
2641
|
+
</xsl:if>
|
2642
|
+
</xsl:variable>
|
2643
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2644
|
+
|
2645
|
+
<!-- <xsl:variable name="colwidths2">
|
2646
|
+
<xsl:call-template name="calculate-column-widths">
|
2647
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2648
|
+
</xsl:call-template>
|
2649
|
+
</xsl:variable> -->
|
2626
2650
|
|
2651
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2652
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2653
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2627
2654
|
|
2628
|
-
<xsl:variable name="
|
2629
|
-
<
|
2630
|
-
|
2631
|
-
<xsl:
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2637
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2655
|
+
<xsl:variable name="margin-left">
|
2656
|
+
<xsl:choose>
|
2657
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2658
|
+
<xsl:otherwise>0</xsl:otherwise>
|
2659
|
+
</xsl:choose>
|
2660
|
+
</xsl:variable>
|
2661
|
+
|
2662
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2638
2663
|
|
2639
|
-
<attribute name="
|
2640
|
-
<xsl:if test="*[local-name()='thead']">
|
2641
|
-
<attribute name="border-top">1pt solid black</attribute>
|
2642
|
-
</xsl:if>
|
2664
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2643
2665
|
|
2644
2666
|
|
2667
|
+
|
2668
|
+
|
2669
|
+
|
2645
2670
|
|
2646
2671
|
|
2647
|
-
|
2648
|
-
<attribute name="margin-right">0mm</attribute>
|
2672
|
+
|
2649
2673
|
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
2674
|
|
2654
|
-
|
2675
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2676
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2677
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2678
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2655
2679
|
|
2656
|
-
</xsl:variable>
|
2657
|
-
|
2658
|
-
|
2659
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2660
2680
|
|
2661
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2662
|
-
<xsl:attribute name="{@name}">
|
2663
|
-
<xsl:value-of select="."/>
|
2664
|
-
</xsl:attribute>
|
2665
|
-
</xsl:for-each>
|
2666
2681
|
|
2667
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2668
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2669
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2670
|
-
</xsl:if>
|
2671
2682
|
|
2672
|
-
<xsl:choose>
|
2673
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2674
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2675
|
-
<fo:table-column column-width="{@width}"/>
|
2676
|
-
</xsl:for-each>
|
2677
|
-
</xsl:when>
|
2678
|
-
<xsl:otherwise>
|
2679
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2680
|
-
<xsl:choose>
|
2681
|
-
<xsl:when test=". = 1 or . = 0">
|
2682
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
2683
|
-
</xsl:when>
|
2684
|
-
<xsl:otherwise>
|
2685
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
2686
|
-
</xsl:otherwise>
|
2687
|
-
</xsl:choose>
|
2688
|
-
</xsl:for-each>
|
2689
|
-
</xsl:otherwise>
|
2690
|
-
</xsl:choose>
|
2691
2683
|
|
2692
|
-
<xsl:
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2684
|
+
<xsl:variable name="table_width">
|
2685
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2686
|
+
100%
|
2687
|
+
|
2688
|
+
|
2689
|
+
</xsl:variable>
|
2690
|
+
|
2691
|
+
<xsl:variable name="table_attributes">
|
2692
|
+
<attribute name="table-layout">fixed</attribute>
|
2693
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
2694
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2695
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2696
|
+
|
2697
|
+
<attribute name="border">1.5pt solid black</attribute>
|
2698
|
+
<xsl:if test="*[local-name()='thead']">
|
2699
|
+
<attribute name="border-top">1pt solid black</attribute>
|
2700
|
+
</xsl:if>
|
2701
|
+
|
2702
|
+
|
2703
|
+
|
2704
|
+
|
2705
|
+
<attribute name="margin-left">0mm</attribute>
|
2706
|
+
<attribute name="margin-right">0mm</attribute>
|
2707
|
+
|
2708
|
+
|
2709
|
+
|
2710
|
+
|
2711
|
+
|
2712
|
+
|
2713
|
+
|
2714
|
+
</xsl:variable>
|
2700
2715
|
|
2701
|
-
</fo:table>
|
2702
|
-
|
2703
|
-
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2704
|
-
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2705
|
-
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2706
|
-
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2707
|
-
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2708
|
-
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2709
|
-
</xsl:call-template>
|
2710
|
-
</xsl:for-each>
|
2711
|
-
|
2712
|
-
<!-- insert footer as table -->
|
2713
|
-
<!-- <fo:table>
|
2714
|
-
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2715
|
-
<xsl:attribute name="{@name}">
|
2716
|
-
<xsl:value-of select="."/>
|
2717
|
-
</xsl:attribute>
|
2718
|
-
</xsl:for-each>
|
2719
2716
|
|
2720
|
-
<
|
2717
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2718
|
+
|
2719
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2720
|
+
<xsl:attribute name="{@name}">
|
2721
|
+
<xsl:value-of select="."/>
|
2722
|
+
</xsl:attribute>
|
2723
|
+
</xsl:for-each>
|
2724
|
+
|
2725
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2726
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2727
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2728
|
+
</xsl:if>
|
2729
|
+
|
2721
2730
|
<xsl:choose>
|
2722
|
-
<xsl:when test="
|
2723
|
-
<
|
2731
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2732
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2733
|
+
<fo:table-column column-width="{@width}"/>
|
2734
|
+
</xsl:for-each>
|
2724
2735
|
</xsl:when>
|
2725
2736
|
<xsl:otherwise>
|
2726
|
-
<
|
2737
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2738
|
+
<xsl:choose>
|
2739
|
+
<xsl:when test=". = 1 or . = 0">
|
2740
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2741
|
+
</xsl:when>
|
2742
|
+
<xsl:otherwise>
|
2743
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2744
|
+
</xsl:otherwise>
|
2745
|
+
</xsl:choose>
|
2746
|
+
</xsl:for-each>
|
2727
2747
|
</xsl:otherwise>
|
2728
2748
|
</xsl:choose>
|
2749
|
+
|
2750
|
+
<xsl:choose>
|
2751
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2752
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2753
|
+
</xsl:when>
|
2754
|
+
<xsl:otherwise>
|
2755
|
+
<xsl:apply-templates/>
|
2756
|
+
</xsl:otherwise>
|
2757
|
+
</xsl:choose>
|
2758
|
+
|
2759
|
+
</fo:table>
|
2760
|
+
|
2761
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2762
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2763
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2764
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2765
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2766
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2767
|
+
</xsl:call-template>
|
2729
2768
|
</xsl:for-each>
|
2730
|
-
|
2731
|
-
|
2732
|
-
|
2733
|
-
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2769
|
+
|
2770
|
+
<!-- insert footer as table -->
|
2771
|
+
<!-- <fo:table>
|
2772
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2773
|
+
<xsl:attribute name="{@name}">
|
2774
|
+
<xsl:value-of select="."/>
|
2775
|
+
</xsl:attribute>
|
2776
|
+
</xsl:for-each>
|
2777
|
+
|
2778
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2779
|
+
<xsl:choose>
|
2780
|
+
<xsl:when test=". = 1 or . = 0">
|
2781
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2782
|
+
</xsl:when>
|
2783
|
+
<xsl:otherwise>
|
2784
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2785
|
+
</xsl:otherwise>
|
2786
|
+
</xsl:choose>
|
2787
|
+
</xsl:for-each>
|
2788
|
+
</fo:table>-->
|
2789
|
+
|
2790
|
+
|
2791
|
+
|
2792
|
+
|
2793
|
+
|
2794
|
+
</fo:block-container>
|
2795
|
+
</xsl:variable>
|
2796
|
+
|
2797
|
+
|
2798
|
+
|
2799
|
+
<xsl:choose>
|
2800
|
+
<xsl:when test="@width">
|
2801
|
+
|
2802
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
2803
|
+
|
2804
|
+
<fo:table table-layout="fixed" width="100%">
|
2805
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
2806
|
+
<fo:table-column column-width="{@width}"/>
|
2807
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
2808
|
+
<fo:table-body>
|
2809
|
+
<fo:table-row>
|
2810
|
+
<fo:table-cell column-number="2">
|
2811
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
2812
|
+
</fo:table-cell>
|
2813
|
+
</fo:table-row>
|
2814
|
+
</fo:table-body>
|
2815
|
+
</fo:table>
|
2816
|
+
|
2817
|
+
|
2818
|
+
|
2819
|
+
|
2820
|
+
</xsl:when>
|
2821
|
+
<xsl:otherwise>
|
2822
|
+
<xsl:copy-of select="$table"/>
|
2823
|
+
</xsl:otherwise>
|
2824
|
+
</xsl:choose>
|
2825
|
+
|
2737
2826
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2738
2827
|
<xsl:if test="normalize-space() != ''">
|
2739
2828
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3640,7 +3729,7 @@
|
|
3640
3729
|
<xsl:with-param name="table" select="$html-table"/>
|
3641
3730
|
</xsl:call-template>
|
3642
3731
|
</xsl:variable>
|
3643
|
-
<!-- colwidths=<xsl:
|
3732
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3644
3733
|
<xsl:variable name="maxlength_dt">
|
3645
3734
|
<xsl:call-template name="getMaxLength_dt"/>
|
3646
3735
|
</xsl:variable>
|
@@ -3669,13 +3758,22 @@
|
|
3669
3758
|
</xsl:when>
|
3670
3759
|
<xsl:otherwise>
|
3671
3760
|
<xsl:choose>
|
3761
|
+
<!-- to set width check most wide chars like `W` -->
|
3672
3762
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
3673
|
-
<fo:table-column column-width="
|
3674
|
-
<fo:table-column column-width="
|
3763
|
+
<fo:table-column column-width="7%"/>
|
3764
|
+
<fo:table-column column-width="93%"/>
|
3765
|
+
</xsl:when>
|
3766
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
3767
|
+
<fo:table-column column-width="15%"/>
|
3768
|
+
<fo:table-column column-width="85%"/>
|
3769
|
+
</xsl:when>
|
3770
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
3771
|
+
<fo:table-column column-width="20%"/>
|
3772
|
+
<fo:table-column column-width="80%"/>
|
3675
3773
|
</xsl:when>
|
3676
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
3677
|
-
<fo:table-column column-width="
|
3678
|
-
<fo:table-column column-width="
|
3774
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
3775
|
+
<fo:table-column column-width="25%"/>
|
3776
|
+
<fo:table-column column-width="75%"/>
|
3679
3777
|
</xsl:when>
|
3680
3778
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
3681
3779
|
<fo:table-column column-width="60%"/>
|
@@ -3984,6 +4082,10 @@
|
|
3984
4082
|
<xsl:param name="text" select="."/>
|
3985
4083
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
3986
4084
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
4085
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
4086
|
+
<xsl:param name="text" select="."/>
|
4087
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4088
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
3987
4089
|
</xsl:template><xsl:template name="add-zero-spaces">
|
3988
4090
|
<xsl:param name="text" select="."/>
|
3989
4091
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -4244,6 +4346,11 @@
|
|
4244
4346
|
<!-- replace start and end spaces to non-break space -->
|
4245
4347
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4246
4348
|
</xsl:copy>
|
4349
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
4350
|
+
<xsl:copy>
|
4351
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4352
|
+
</xsl:copy>
|
4353
|
+
<mathml:mspace width="0.5ex"/>
|
4247
4354
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4248
4355
|
<xsl:variable name="target">
|
4249
4356
|
<xsl:choose>
|
@@ -4265,7 +4372,10 @@
|
|
4265
4372
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
4266
4373
|
<xsl:choose>
|
4267
4374
|
<xsl:when test="normalize-space(.) = ''">
|
4268
|
-
<xsl:value-of select="$target"/>
|
4375
|
+
<!-- <xsl:value-of select="$target"/> -->
|
4376
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
4377
|
+
<xsl:with-param name="text" select="$target"/>
|
4378
|
+
</xsl:call-template>
|
4269
4379
|
</xsl:when>
|
4270
4380
|
<xsl:otherwise>
|
4271
4381
|
<xsl:apply-templates/>
|
@@ -4738,6 +4848,8 @@
|
|
4738
4848
|
<xsl:copy>
|
4739
4849
|
<xsl:apply-templates mode="contents_item"/>
|
4740
4850
|
</xsl:copy>
|
4851
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
4852
|
+
<xsl:copy-of select="."/>
|
4741
4853
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4742
4854
|
<xsl:text> </xsl:text>
|
4743
4855
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -5144,11 +5256,23 @@
|
|
5144
5256
|
</xsl:if>
|
5145
5257
|
</xsl:if>
|
5146
5258
|
|
5259
|
+
|
5260
|
+
<xsl:if test="not(*)">
|
5261
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
5262
|
+
</xsl:if>
|
5263
|
+
|
5147
5264
|
<fo:block-container margin-left="0mm">
|
5148
5265
|
|
5149
5266
|
<fo:block xsl:use-attribute-sets="quote-style">
|
5150
5267
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
5151
|
-
|
5268
|
+
|
5269
|
+
<xsl:if test="ancestor::*[local-name() = 'boilerplate']">
|
5270
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
5271
|
+
<xsl:attribute name="margin-right">7mm</xsl:attribute>
|
5272
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
5273
|
+
</xsl:if>
|
5274
|
+
|
5275
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
5152
5276
|
</fo:block>
|
5153
5277
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5154
5278
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -5563,7 +5687,7 @@
|
|
5563
5687
|
<xsl:param name="charDelim" select="', '"/>
|
5564
5688
|
<xsl:choose>
|
5565
5689
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
5566
|
-
<xsl:for-each select="
|
5690
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5567
5691
|
<xsl:sort data-type="text" order="ascending"/>
|
5568
5692
|
<xsl:call-template name="insertKeyword">
|
5569
5693
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -5572,7 +5696,7 @@
|
|
5572
5696
|
</xsl:for-each>
|
5573
5697
|
</xsl:when>
|
5574
5698
|
<xsl:otherwise>
|
5575
|
-
<xsl:for-each select="
|
5699
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5576
5700
|
<xsl:call-template name="insertKeyword">
|
5577
5701
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
5578
5702
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -5589,6 +5713,9 @@
|
|
5589
5713
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
5590
5714
|
</xsl:choose>
|
5591
5715
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
5716
|
+
<xsl:variable name="lang">
|
5717
|
+
<xsl:call-template name="getLang"/>
|
5718
|
+
</xsl:variable>
|
5592
5719
|
<fo:declarations>
|
5593
5720
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
5594
5721
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -5601,13 +5728,16 @@
|
|
5601
5728
|
<!-- Dublin Core properties go here -->
|
5602
5729
|
<dc:title>
|
5603
5730
|
<xsl:variable name="title">
|
5604
|
-
|
5605
|
-
|
5606
|
-
|
5607
|
-
|
5608
|
-
|
5609
|
-
|
5610
|
-
|
5731
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5732
|
+
|
5733
|
+
|
5734
|
+
|
5735
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'part']"/>
|
5736
|
+
|
5737
|
+
|
5738
|
+
|
5739
|
+
|
5740
|
+
</xsl:for-each>
|
5611
5741
|
</xsl:variable>
|
5612
5742
|
<xsl:choose>
|
5613
5743
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -5619,20 +5749,19 @@
|
|
5619
5749
|
</xsl:choose>
|
5620
5750
|
</dc:title>
|
5621
5751
|
<dc:creator>
|
5622
|
-
|
5623
|
-
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
5624
|
-
|
5625
|
-
|
5626
|
-
|
5627
|
-
</dc:creator>
|
5628
|
-
<dc:description>
|
5629
|
-
<xsl:variable name="abstract">
|
5752
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5630
5753
|
|
5631
|
-
<xsl:copy-of select="/*/*[local-name() = 'bibliography']/*[local-name() = 'references']/*[local-name() = 'bibitem']/*[local-name() = 'abstract']//text()"/>
|
5632
5754
|
|
5755
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'ext']/*[local-name() = 'editorialgroup']/*[local-name() = 'committee'])"/>
|
5633
5756
|
|
5634
5757
|
|
5758
|
+
</xsl:for-each>
|
5759
|
+
</dc:creator>
|
5760
|
+
<dc:description>
|
5761
|
+
<xsl:variable name="abstract">
|
5762
|
+
|
5635
5763
|
|
5764
|
+
<xsl:value-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
5636
5765
|
|
5637
5766
|
</xsl:variable>
|
5638
5767
|
<xsl:value-of select="normalize-space($abstract)"/>
|