metanorma-bipm 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be68aaa802943c019afdfd6279a33269e9de8e9c2a9ece29a311e08e6c465355
|
4
|
+
data.tar.gz: 96b2dc9464927ae543c7a4ce10a705b14647ca79db313ff503e6856c1ce788b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de26de8eb2254291733038b0598e7dade4f27378ff1285a42d5957c95d14d02202df44ebfcb7a0072eb2760985a6d1c4c0d3feb860aa218f6eb34a0737a4dbf7
|
7
|
+
data.tar.gz: 447a238c927f5a14a655acbc0c52a4f33c3db5513eddf208ac6c564a6429786e62c53308e4adf0de5e15a0c26dfda28d29c9f855355dbe9bc1f6f7b98403787e
|
@@ -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>
|
@@ -1837,11 +1837,12 @@
|
|
1837
1837
|
<xsl:if test="@level >= 3">
|
1838
1838
|
<fo:inline padding-right="2mm"><xsl:value-of select="@section"/></fo:inline>
|
1839
1839
|
</xsl:if>
|
1840
|
-
<xsl:variable name="sectionTitle">
|
1840
|
+
<!-- <xsl:variable name="sectionTitle">
|
1841
1841
|
<xsl:apply-templates select="title"/>
|
1842
|
-
</xsl:variable>
|
1842
|
+
</xsl:variable> -->
|
1843
1843
|
<fo:inline>
|
1844
|
-
<xsl:value-of select="$sectionTitle"/>
|
1844
|
+
<!-- <xsl:value-of select="$sectionTitle"/> -->
|
1845
|
+
<xsl:apply-templates select="title"/>
|
1845
1846
|
</fo:inline>
|
1846
1847
|
<!-- <xsl:text> </xsl:text> -->
|
1847
1848
|
<!-- keep-together.within-line="always" -->
|
@@ -1937,6 +1938,12 @@
|
|
1937
1938
|
</xsl:if>
|
1938
1939
|
</xsl:template>
|
1939
1940
|
|
1941
|
+
<xsl:template match="*[local-name() = 'strong']" mode="contents_item" priority="2">
|
1942
|
+
<!-- <xsl:copy> -->
|
1943
|
+
<xsl:apply-templates mode="contents_item"/>
|
1944
|
+
<!-- </xsl:copy> -->
|
1945
|
+
</xsl:template>
|
1946
|
+
|
1940
1947
|
<!-- ============================= -->
|
1941
1948
|
<!-- ============================= -->
|
1942
1949
|
|
@@ -3313,6 +3320,17 @@
|
|
3313
3320
|
</xsl:copy>
|
3314
3321
|
</xsl:template>
|
3315
3322
|
|
3323
|
+
<!-- Decrease height of / and | -->
|
3324
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '/' or normalize-space(text()) = '|']" mode="mathml">
|
3325
|
+
<xsl:copy>
|
3326
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
3327
|
+
<xsl:if test="not(@stretchy)">
|
3328
|
+
<xsl:attribute name="stretchy">false</xsl:attribute>
|
3329
|
+
</xsl:if>
|
3330
|
+
<xsl:apply-templates mode="mathml"/>
|
3331
|
+
</xsl:copy>
|
3332
|
+
</xsl:template>
|
3333
|
+
|
3316
3334
|
<xsl:template name="insertHeaderFooter">
|
3317
3335
|
<xsl:param name="header-title"/>
|
3318
3336
|
<fo:static-content flow-name="header-odd">
|
@@ -4617,212 +4635,240 @@
|
|
4617
4635
|
<xsl:call-template name="add-zero-spaces-java"/>
|
4618
4636
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
4619
4637
|
|
4620
|
-
<xsl:variable name="
|
4621
|
-
<xsl:call-template name="getSimpleTable"/>
|
4622
|
-
</xsl:variable>
|
4638
|
+
<xsl:variable name="table">
|
4623
4639
|
|
4624
|
-
|
4625
|
-
|
4626
|
-
|
4627
|
-
|
4628
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
4629
|
-
<fo:block> </fo:block>
|
4630
|
-
</xsl:if> -->
|
4631
|
-
|
4632
|
-
<!-- $namespace = 'iso' or -->
|
4633
|
-
|
4634
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4635
|
-
|
4636
|
-
|
4637
|
-
|
4638
|
-
<xsl:call-template name="fn_name_display"/>
|
4640
|
+
<xsl:variable name="simple-table">
|
4641
|
+
<xsl:call-template name="getSimpleTable"/>
|
4642
|
+
</xsl:variable>
|
4639
4643
|
|
4640
4644
|
|
4641
|
-
|
4642
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4643
|
-
|
4644
|
-
<!-- <xsl:variable name="cols-count">
|
4645
|
-
<xsl:choose>
|
4646
|
-
<xsl:when test="*[local-name()='thead']">
|
4647
|
-
<xsl:call-template name="calculate-columns-numbers">
|
4648
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
4649
|
-
</xsl:call-template>
|
4650
|
-
</xsl:when>
|
4651
|
-
<xsl:otherwise>
|
4652
|
-
<xsl:call-template name="calculate-columns-numbers">
|
4653
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
4654
|
-
</xsl:call-template>
|
4655
|
-
</xsl:otherwise>
|
4656
|
-
</xsl:choose>
|
4657
|
-
</xsl:variable> -->
|
4658
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
4659
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
<xsl:variable name="colwidths">
|
4664
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
4665
|
-
<xsl:call-template name="calculate-column-widths">
|
4666
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4667
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
4668
|
-
</xsl:call-template>
|
4669
|
-
</xsl:if>
|
4670
|
-
</xsl:variable>
|
4671
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
4672
|
-
|
4673
|
-
<!-- <xsl:variable name="colwidths2">
|
4674
|
-
<xsl:call-template name="calculate-column-widths">
|
4675
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4676
|
-
</xsl:call-template>
|
4677
|
-
</xsl:variable> -->
|
4678
|
-
|
4679
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
4680
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
4681
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
4682
|
-
|
4683
|
-
<xsl:variable name="margin-left">
|
4684
|
-
<xsl:choose>
|
4685
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
4686
|
-
<xsl:otherwise>0</xsl:otherwise>
|
4687
|
-
</xsl:choose>
|
4688
|
-
</xsl:variable>
|
4689
|
-
|
4690
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
4691
4645
|
|
4692
4646
|
|
4693
|
-
|
4694
|
-
|
4695
|
-
|
4696
4647
|
|
4648
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
4649
|
+
<fo:block> </fo:block>
|
4650
|
+
</xsl:if> -->
|
4697
4651
|
|
4698
|
-
|
4652
|
+
<!-- $namespace = 'iso' or -->
|
4699
4653
|
|
4654
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4700
4655
|
|
4656
|
+
|
4701
4657
|
|
4658
|
+
<xsl:call-template name="fn_name_display"/>
|
4702
4659
|
|
4660
|
+
|
4703
4661
|
|
4704
|
-
|
4705
|
-
|
4706
|
-
|
4707
|
-
<xsl:
|
4708
|
-
<xsl:
|
4709
|
-
|
4710
|
-
|
4711
|
-
|
4712
|
-
|
4713
|
-
<xsl:
|
4662
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4663
|
+
|
4664
|
+
<!-- <xsl:variable name="cols-count">
|
4665
|
+
<xsl:choose>
|
4666
|
+
<xsl:when test="*[local-name()='thead']">
|
4667
|
+
<xsl:call-template name="calculate-columns-numbers">
|
4668
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
4669
|
+
</xsl:call-template>
|
4670
|
+
</xsl:when>
|
4671
|
+
<xsl:otherwise>
|
4672
|
+
<xsl:call-template name="calculate-columns-numbers">
|
4673
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
4674
|
+
</xsl:call-template>
|
4675
|
+
</xsl:otherwise>
|
4676
|
+
</xsl:choose>
|
4677
|
+
</xsl:variable> -->
|
4678
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
4679
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
4680
|
+
|
4681
|
+
|
4682
|
+
|
4683
|
+
<xsl:variable name="colwidths">
|
4684
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
4685
|
+
<xsl:call-template name="calculate-column-widths">
|
4686
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4687
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
4688
|
+
</xsl:call-template>
|
4714
4689
|
</xsl:if>
|
4690
|
+
</xsl:variable>
|
4691
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
4715
4692
|
|
4693
|
+
<!-- <xsl:variable name="colwidths2">
|
4694
|
+
<xsl:call-template name="calculate-column-widths">
|
4695
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4696
|
+
</xsl:call-template>
|
4697
|
+
</xsl:variable> -->
|
4716
4698
|
|
4699
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
4700
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
4701
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
4717
4702
|
|
4718
|
-
<xsl:variable name="
|
4719
|
-
<
|
4720
|
-
|
4721
|
-
<xsl:
|
4722
|
-
|
4723
|
-
|
4724
|
-
|
4725
|
-
|
4726
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
4727
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
4703
|
+
<xsl:variable name="margin-left">
|
4704
|
+
<xsl:choose>
|
4705
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
4706
|
+
<xsl:otherwise>0</xsl:otherwise>
|
4707
|
+
</xsl:choose>
|
4708
|
+
</xsl:variable>
|
4709
|
+
|
4710
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
4728
4711
|
|
4729
4712
|
|
4713
|
+
|
4714
|
+
|
4715
|
+
|
4730
4716
|
|
4731
4717
|
|
4732
|
-
|
4733
|
-
|
4734
|
-
|
4718
|
+
|
4735
4719
|
|
4736
|
-
|
4737
|
-
|
4738
|
-
<xsl:if test="not(ancestor::*[local-name()='preface']) and not(ancestor::*[local-name()='note_side']) and not(ancestor::*[local-name() = 'annex'] and .//*[local-name() = 'xref'][@pagenumber])">
|
4739
|
-
<attribute name="border-top">0.5pt solid black</attribute>
|
4740
|
-
<attribute name="border-bottom">0.5pt solid black</attribute>
|
4741
|
-
</xsl:if>
|
4742
|
-
<attribute name="margin-left">0mm</attribute>
|
4743
|
-
<attribute name="margin-right">0mm</attribute>
|
4744
4720
|
|
4745
|
-
</xsl:variable>
|
4746
|
-
|
4747
|
-
|
4748
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
4749
4721
|
|
4750
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
4751
|
-
<xsl:attribute name="{@name}">
|
4752
|
-
<xsl:value-of select="."/>
|
4753
|
-
</xsl:attribute>
|
4754
|
-
</xsl:for-each>
|
4755
4722
|
|
4756
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
4757
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4758
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
4759
|
-
</xsl:if>
|
4760
4723
|
|
4761
|
-
|
4762
|
-
<xsl:
|
4763
|
-
|
4764
|
-
|
4765
|
-
|
4766
|
-
</xsl:
|
4767
|
-
<xsl:
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
4771
|
-
|
4772
|
-
</xsl:when>
|
4773
|
-
<xsl:otherwise>
|
4774
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
4775
|
-
</xsl:otherwise>
|
4776
|
-
</xsl:choose>
|
4777
|
-
</xsl:for-each>
|
4778
|
-
</xsl:otherwise>
|
4779
|
-
</xsl:choose>
|
4724
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
4725
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4726
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
4727
|
+
<xsl:if test="not(ancestor::*[local-name()='note_side'])">
|
4728
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4729
|
+
</xsl:if>
|
4730
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4731
|
+
<xsl:if test="@parent-type = 'quote'">
|
4732
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
4733
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
4734
|
+
</xsl:if>
|
4780
4735
|
|
4781
|
-
<xsl:choose>
|
4782
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
4783
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4784
|
-
</xsl:when>
|
4785
|
-
<xsl:otherwise>
|
4786
|
-
<xsl:apply-templates/>
|
4787
|
-
</xsl:otherwise>
|
4788
|
-
</xsl:choose>
|
4789
4736
|
|
4790
|
-
|
4791
|
-
|
4792
|
-
|
4793
|
-
|
4794
|
-
|
4795
|
-
|
4796
|
-
|
4797
|
-
|
4798
|
-
|
4799
|
-
|
4800
|
-
|
4801
|
-
<!-- insert footer as table -->
|
4802
|
-
<!-- <fo:table>
|
4803
|
-
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
4804
|
-
<xsl:attribute name="{@name}">
|
4805
|
-
<xsl:value-of select="."/>
|
4806
|
-
</xsl:attribute>
|
4807
|
-
</xsl:for-each>
|
4737
|
+
<xsl:variable name="table_width">
|
4738
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
4739
|
+
|
4740
|
+
|
4741
|
+
|
4742
|
+
<xsl:choose>
|
4743
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
4744
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
4745
|
+
</xsl:choose>
|
4746
|
+
|
4747
|
+
</xsl:variable>
|
4808
4748
|
|
4809
|
-
<xsl:
|
4749
|
+
<xsl:variable name="table_attributes">
|
4750
|
+
<attribute name="table-layout">fixed</attribute>
|
4751
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
4752
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
4753
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
4754
|
+
|
4755
|
+
|
4756
|
+
|
4757
|
+
|
4758
|
+
|
4759
|
+
|
4760
|
+
|
4761
|
+
|
4762
|
+
|
4763
|
+
|
4764
|
+
<xsl:if test="not(ancestor::*[local-name()='preface']) and not(ancestor::*[local-name()='note_side']) and not(ancestor::*[local-name() = 'annex'] and .//*[local-name() = 'xref'][@pagenumber])">
|
4765
|
+
<attribute name="border-top">0.5pt solid black</attribute>
|
4766
|
+
<attribute name="border-bottom">0.5pt solid black</attribute>
|
4767
|
+
</xsl:if>
|
4768
|
+
<attribute name="margin-left">0mm</attribute>
|
4769
|
+
<attribute name="margin-right">0mm</attribute>
|
4770
|
+
|
4771
|
+
</xsl:variable>
|
4772
|
+
|
4773
|
+
|
4774
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
4775
|
+
|
4776
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
4777
|
+
<xsl:attribute name="{@name}">
|
4778
|
+
<xsl:value-of select="."/>
|
4779
|
+
</xsl:attribute>
|
4780
|
+
</xsl:for-each>
|
4781
|
+
|
4782
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
4783
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4784
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
4785
|
+
</xsl:if>
|
4786
|
+
|
4787
|
+
<xsl:choose>
|
4788
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
4789
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
4790
|
+
<fo:table-column column-width="{@width}"/>
|
4791
|
+
</xsl:for-each>
|
4792
|
+
</xsl:when>
|
4793
|
+
<xsl:otherwise>
|
4794
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
4795
|
+
<xsl:choose>
|
4796
|
+
<xsl:when test=". = 1 or . = 0">
|
4797
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
4798
|
+
</xsl:when>
|
4799
|
+
<xsl:otherwise>
|
4800
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
4801
|
+
</xsl:otherwise>
|
4802
|
+
</xsl:choose>
|
4803
|
+
</xsl:for-each>
|
4804
|
+
</xsl:otherwise>
|
4805
|
+
</xsl:choose>
|
4806
|
+
|
4810
4807
|
<xsl:choose>
|
4811
|
-
<xsl:when test="
|
4812
|
-
<
|
4808
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
4809
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4813
4810
|
</xsl:when>
|
4814
4811
|
<xsl:otherwise>
|
4815
|
-
<
|
4812
|
+
<xsl:apply-templates/>
|
4816
4813
|
</xsl:otherwise>
|
4817
4814
|
</xsl:choose>
|
4815
|
+
|
4816
|
+
</fo:table>
|
4817
|
+
|
4818
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
4819
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
4820
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
4821
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
4822
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4823
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
4824
|
+
</xsl:call-template>
|
4818
4825
|
</xsl:for-each>
|
4819
|
-
|
4820
|
-
|
4821
|
-
|
4822
|
-
|
4823
|
-
|
4824
|
-
|
4825
|
-
|
4826
|
+
|
4827
|
+
<!-- insert footer as table -->
|
4828
|
+
<!-- <fo:table>
|
4829
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
4830
|
+
<xsl:attribute name="{@name}">
|
4831
|
+
<xsl:value-of select="."/>
|
4832
|
+
</xsl:attribute>
|
4833
|
+
</xsl:for-each>
|
4834
|
+
|
4835
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
4836
|
+
<xsl:choose>
|
4837
|
+
<xsl:when test=". = 1 or . = 0">
|
4838
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
4839
|
+
</xsl:when>
|
4840
|
+
<xsl:otherwise>
|
4841
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
4842
|
+
</xsl:otherwise>
|
4843
|
+
</xsl:choose>
|
4844
|
+
</xsl:for-each>
|
4845
|
+
</fo:table>-->
|
4846
|
+
|
4847
|
+
|
4848
|
+
|
4849
|
+
|
4850
|
+
|
4851
|
+
</fo:block-container>
|
4852
|
+
</xsl:variable>
|
4853
|
+
|
4854
|
+
|
4855
|
+
|
4856
|
+
<xsl:choose>
|
4857
|
+
<xsl:when test="@width">
|
4858
|
+
|
4859
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
4860
|
+
|
4861
|
+
|
4862
|
+
|
4863
|
+
<xsl:copy-of select="$table"/>
|
4864
|
+
|
4865
|
+
|
4866
|
+
</xsl:when>
|
4867
|
+
<xsl:otherwise>
|
4868
|
+
<xsl:copy-of select="$table"/>
|
4869
|
+
</xsl:otherwise>
|
4870
|
+
</xsl:choose>
|
4871
|
+
|
4826
4872
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
4827
4873
|
<xsl:if test="normalize-space() != ''">
|
4828
4874
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -5723,7 +5769,7 @@
|
|
5723
5769
|
<xsl:with-param name="table" select="$html-table"/>
|
5724
5770
|
</xsl:call-template>
|
5725
5771
|
</xsl:variable>
|
5726
|
-
<!-- colwidths=<xsl:
|
5772
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
5727
5773
|
<xsl:variable name="maxlength_dt">
|
5728
5774
|
<xsl:call-template name="getMaxLength_dt"/>
|
5729
5775
|
</xsl:variable>
|
@@ -5752,13 +5798,22 @@
|
|
5752
5798
|
</xsl:when>
|
5753
5799
|
<xsl:otherwise>
|
5754
5800
|
<xsl:choose>
|
5801
|
+
<!-- to set width check most wide chars like `W` -->
|
5755
5802
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
5756
|
-
<fo:table-column column-width="
|
5757
|
-
<fo:table-column column-width="
|
5803
|
+
<fo:table-column column-width="7%"/>
|
5804
|
+
<fo:table-column column-width="93%"/>
|
5805
|
+
</xsl:when>
|
5806
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
5807
|
+
<fo:table-column column-width="15%"/>
|
5808
|
+
<fo:table-column column-width="85%"/>
|
5758
5809
|
</xsl:when>
|
5759
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
5760
|
-
<fo:table-column column-width="
|
5761
|
-
<fo:table-column column-width="
|
5810
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
5811
|
+
<fo:table-column column-width="20%"/>
|
5812
|
+
<fo:table-column column-width="80%"/>
|
5813
|
+
</xsl:when>
|
5814
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
5815
|
+
<fo:table-column column-width="25%"/>
|
5816
|
+
<fo:table-column column-width="75%"/>
|
5762
5817
|
</xsl:when>
|
5763
5818
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
5764
5819
|
<fo:table-column column-width="60%"/>
|
@@ -6068,6 +6123,10 @@
|
|
6068
6123
|
<xsl:param name="text" select="."/>
|
6069
6124
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
6070
6125
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
6126
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
6127
|
+
<xsl:param name="text" select="."/>
|
6128
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
6129
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
6071
6130
|
</xsl:template><xsl:template name="add-zero-spaces">
|
6072
6131
|
<xsl:param name="text" select="."/>
|
6073
6132
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -6332,6 +6391,11 @@
|
|
6332
6391
|
<!-- replace start and end spaces to non-break space -->
|
6333
6392
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
6334
6393
|
</xsl:copy>
|
6394
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
6395
|
+
<xsl:copy>
|
6396
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
6397
|
+
</xsl:copy>
|
6398
|
+
<mathml:mspace width="0.5ex"/>
|
6335
6399
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
6336
6400
|
<xsl:variable name="target">
|
6337
6401
|
<xsl:choose>
|
@@ -6353,7 +6417,10 @@
|
|
6353
6417
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
6354
6418
|
<xsl:choose>
|
6355
6419
|
<xsl:when test="normalize-space(.) = ''">
|
6356
|
-
<xsl:value-of select="$target"/>
|
6420
|
+
<!-- <xsl:value-of select="$target"/> -->
|
6421
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
6422
|
+
<xsl:with-param name="text" select="$target"/>
|
6423
|
+
</xsl:call-template>
|
6357
6424
|
</xsl:when>
|
6358
6425
|
<xsl:otherwise>
|
6359
6426
|
<xsl:apply-templates/>
|
@@ -6853,6 +6920,8 @@
|
|
6853
6920
|
<xsl:copy>
|
6854
6921
|
<xsl:apply-templates mode="contents_item"/>
|
6855
6922
|
</xsl:copy>
|
6923
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
6924
|
+
<xsl:copy-of select="."/>
|
6856
6925
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
6857
6926
|
<xsl:text> </xsl:text>
|
6858
6927
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -7259,11 +7328,13 @@
|
|
7259
7328
|
</xsl:if>
|
7260
7329
|
</xsl:if>
|
7261
7330
|
|
7331
|
+
|
7262
7332
|
<fo:block-container margin-left="0mm">
|
7263
7333
|
|
7264
7334
|
<fo:block xsl:use-attribute-sets="quote-style">
|
7265
7335
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
7266
|
-
|
7336
|
+
|
7337
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
7267
7338
|
</fo:block>
|
7268
7339
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
7269
7340
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -7708,7 +7779,7 @@
|
|
7708
7779
|
<xsl:param name="charDelim" select="', '"/>
|
7709
7780
|
<xsl:choose>
|
7710
7781
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
7711
|
-
<xsl:for-each select="
|
7782
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
7712
7783
|
<xsl:sort data-type="text" order="ascending"/>
|
7713
7784
|
<xsl:call-template name="insertKeyword">
|
7714
7785
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -7717,7 +7788,7 @@
|
|
7717
7788
|
</xsl:for-each>
|
7718
7789
|
</xsl:when>
|
7719
7790
|
<xsl:otherwise>
|
7720
|
-
<xsl:for-each select="
|
7791
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
7721
7792
|
<xsl:call-template name="insertKeyword">
|
7722
7793
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
7723
7794
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -7734,6 +7805,9 @@
|
|
7734
7805
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
7735
7806
|
</xsl:choose>
|
7736
7807
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
7808
|
+
<xsl:variable name="lang">
|
7809
|
+
<xsl:call-template name="getLang"/>
|
7810
|
+
</xsl:variable>
|
7737
7811
|
<fo:declarations>
|
7738
7812
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
7739
7813
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -7746,13 +7820,16 @@
|
|
7746
7820
|
<!-- Dublin Core properties go here -->
|
7747
7821
|
<dc:title>
|
7748
7822
|
<xsl:variable name="title">
|
7749
|
-
|
7750
|
-
|
7751
|
-
|
7752
|
-
|
7753
|
-
|
7754
|
-
|
7755
|
-
|
7823
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
7824
|
+
|
7825
|
+
|
7826
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
7827
|
+
|
7828
|
+
|
7829
|
+
|
7830
|
+
|
7831
|
+
|
7832
|
+
</xsl:for-each>
|
7756
7833
|
</xsl:variable>
|
7757
7834
|
<xsl:choose>
|
7758
7835
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -7764,20 +7841,22 @@
|
|
7764
7841
|
</xsl:choose>
|
7765
7842
|
</dc:title>
|
7766
7843
|
<dc:creator>
|
7767
|
-
|
7768
|
-
|
7769
|
-
|
7770
|
-
|
7771
|
-
|
7772
|
-
|
7773
|
-
<dc:description>
|
7774
|
-
<xsl:variable name="abstract">
|
7844
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
7845
|
+
|
7846
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
7847
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
7848
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
7849
|
+
</xsl:for-each>
|
7775
7850
|
|
7776
7851
|
|
7777
7852
|
|
7853
|
+
</xsl:for-each>
|
7854
|
+
</dc:creator>
|
7855
|
+
<dc:description>
|
7856
|
+
<xsl:variable name="abstract">
|
7778
7857
|
|
7858
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
7779
7859
|
|
7780
|
-
<xsl:copy-of select="//*[local-name() = 'bibdata'][@type='standard']/*[local-name() = 'abstract']//text()"/>
|
7781
7860
|
|
7782
7861
|
</xsl:variable>
|
7783
7862
|
<xsl:value-of select="normalize-space($abstract)"/>
|