metanorma-ogc 1.2.9 → 1.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -0
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/ogc/basicdoc.rng +20 -3
- data/lib/asciidoctor/ogc/converter.rb +5 -6
- data/lib/asciidoctor/ogc/isodoc.rng +99 -3
- data/lib/isodoc/ogc/base_convert.rb +2 -2
- data/lib/isodoc/ogc/html_convert.rb +2 -2
- data/lib/isodoc/ogc/i18n-en.yaml +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +432 -202
- data/lib/isodoc/ogc/ogc.best-practice.xsl +432 -202
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +432 -202
- data/lib/isodoc/ogc/ogc.community-practice.xsl +432 -202
- data/lib/isodoc/ogc/ogc.community-standard.xsl +432 -202
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +432 -202
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +432 -202
- data/lib/isodoc/ogc/ogc.other.xsl +432 -202
- data/lib/isodoc/ogc/ogc.policy.xsl +432 -202
- data/lib/isodoc/ogc/ogc.reference-model.xsl +432 -202
- data/lib/isodoc/ogc/ogc.release-notes.xsl +432 -202
- data/lib/isodoc/ogc/ogc.standard.xsl +432 -202
- data/lib/isodoc/ogc/ogc.test-suite.xsl +432 -202
- data/lib/isodoc/ogc/ogc.user-guide.xsl +432 -202
- data/lib/isodoc/ogc/ogc.white-paper.xsl +475 -205
- data/lib/isodoc/ogc/word_convert.rb +7 -9
- data/lib/isodoc/ogc/xref.rb +8 -4
- data/lib/metanorma/ogc/processor.rb +16 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +7 -8
- data/lib/metanorma/ogc/fonts_manifest.yaml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ff75971b081c5075f753de7e949e8ec739e07e9da4cd912407acd32506ce0d8
|
4
|
+
data.tar.gz: 74b3cebdae968c1d5b426f81858d0fea1b5bedcfcaff2435ec354f7d8a647ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b377f620327e123072075007ade92436d0c7ef5d580cede3977b742056df390d87dcc259c037feef74c1f2dc2a31d5b8f6eea1104158603aef68c0bbb26beefd
|
7
|
+
data.tar.gz: c0784e6eb59da69f1d96b7c1cdc38cf50f9268f1f5f4d55fbecc638db07ec44f458ac7f0081459c25934bc7461aed3b41a82b20a81b0beebfdb035970b435577
|
data/.github/workflows/rake.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -729,12 +729,29 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<attribute name="primary"/>
|
733
732
|
<optional>
|
734
|
-
<attribute name="
|
733
|
+
<attribute name="to">
|
734
|
+
<data type="IDREF"/>
|
735
|
+
</attribute>
|
736
|
+
</optional>
|
737
|
+
<element name="primary">
|
738
|
+
<oneOrMore>
|
739
|
+
<ref name="PureTextElement"/>
|
740
|
+
</oneOrMore>
|
741
|
+
</element>
|
742
|
+
<optional>
|
743
|
+
<element name="secondary">
|
744
|
+
<oneOrMore>
|
745
|
+
<ref name="PureTextElement"/>
|
746
|
+
</oneOrMore>
|
747
|
+
</element>
|
735
748
|
</optional>
|
736
749
|
<optional>
|
737
|
-
<
|
750
|
+
<element name="tertiary">
|
751
|
+
<oneOrMore>
|
752
|
+
<ref name="PureTextElement"/>
|
753
|
+
</oneOrMore>
|
754
|
+
</element>
|
738
755
|
</optional>
|
739
756
|
</element>
|
740
757
|
</define>
|
@@ -87,19 +87,19 @@ module Asciidoctor
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def insert_security(x, s)
|
90
|
-
|
91
|
-
|
90
|
+
doctype = s&.at("//bibdata/ext/doctype")&.text
|
91
|
+
description = %w(standard community-standard).include?(doctype) ? "standard" : "document"
|
92
|
+
preface = s.at("//preface") || s.add_previous_sibling("<preface/>").first
|
92
93
|
s = x&.at("//clause[@type = 'security']")&.remove ||
|
93
94
|
"<clause type='security' #{add_id}>"\
|
94
95
|
"<title>Security Considerations</title>"\
|
95
|
-
"<p>#{@i18n.security_empty}</p></clause>"
|
96
|
+
"<p>#{@i18n.security_empty.sub(/%/, description)}</p></clause>"
|
96
97
|
preface.add_child s
|
97
98
|
end
|
98
99
|
|
99
100
|
def insert_submitters(x, s)
|
100
101
|
if x.at("//submitters")
|
101
|
-
preface = s.at("//preface") ||
|
102
|
-
s.add_previous_sibling("<preface/>").first
|
102
|
+
preface = s.at("//preface") || s.add_previous_sibling("<preface/>").first
|
103
103
|
submitters = x.at("//submitters").remove
|
104
104
|
preface.add_child submitters.remove
|
105
105
|
end
|
@@ -127,7 +127,6 @@ module Asciidoctor
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def termdef_boilerplate_cleanup(xmldoc)
|
130
|
-
return
|
131
130
|
end
|
132
131
|
|
133
132
|
def bibdata_cleanup(xmldoc)
|
@@ -55,6 +55,13 @@
|
|
55
55
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
56
56
|
</data>
|
57
57
|
</attribute>
|
58
|
+
<optional>
|
59
|
+
<attribute name="to">
|
60
|
+
<data type="string">
|
61
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
62
|
+
</data>
|
63
|
+
</attribute>
|
64
|
+
</optional>
|
58
65
|
<optional>
|
59
66
|
<attribute name="type">
|
60
67
|
<ref name="ReferenceFormat"/>
|
@@ -246,6 +253,9 @@
|
|
246
253
|
<data type="boolean"/>
|
247
254
|
</attribute>
|
248
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
249
259
|
<optional>
|
250
260
|
<ref name="colgroup"/>
|
251
261
|
</optional>
|
@@ -779,6 +789,9 @@
|
|
779
789
|
<attribute name="width"/>
|
780
790
|
</element>
|
781
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
782
795
|
<define name="TextElement" combine="choice">
|
783
796
|
<ref name="concept"/>
|
784
797
|
</define>
|
@@ -799,6 +812,8 @@
|
|
799
812
|
<ref name="requirement"/>
|
800
813
|
<ref name="recommendation"/>
|
801
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
802
817
|
</choice>
|
803
818
|
</define>
|
804
819
|
<define name="bibliography">
|
@@ -829,6 +844,9 @@
|
|
829
844
|
<data type="boolean"/>
|
830
845
|
</attribute>
|
831
846
|
</optional>
|
847
|
+
<optional>
|
848
|
+
<attribute name="number"/>
|
849
|
+
</optional>
|
832
850
|
<optional>
|
833
851
|
<attribute name="obligation">
|
834
852
|
<choice>
|
@@ -884,9 +902,11 @@
|
|
884
902
|
<element name="code">
|
885
903
|
<text/>
|
886
904
|
</element>
|
887
|
-
<
|
888
|
-
<text
|
889
|
-
|
905
|
+
<optional>
|
906
|
+
<element name="text">
|
907
|
+
<text/>
|
908
|
+
</element>
|
909
|
+
</optional>
|
890
910
|
</element>
|
891
911
|
</define>
|
892
912
|
<define name="standard-document">
|
@@ -1056,6 +1076,9 @@
|
|
1056
1076
|
</choice>
|
1057
1077
|
</attribute>
|
1058
1078
|
</optional>
|
1079
|
+
<optional>
|
1080
|
+
<attribute name="number"/>
|
1081
|
+
</optional>
|
1059
1082
|
<optional>
|
1060
1083
|
<attribute name="type"/>
|
1061
1084
|
</optional>
|
@@ -1109,6 +1132,9 @@
|
|
1109
1132
|
<optional>
|
1110
1133
|
<attribute name="type"/>
|
1111
1134
|
</optional>
|
1135
|
+
<optional>
|
1136
|
+
<attribute name="number"/>
|
1137
|
+
</optional>
|
1112
1138
|
<optional>
|
1113
1139
|
<ref name="section-title"/>
|
1114
1140
|
</optional>
|
@@ -1211,6 +1237,9 @@
|
|
1211
1237
|
<optional>
|
1212
1238
|
<attribute name="type"/>
|
1213
1239
|
</optional>
|
1240
|
+
<optional>
|
1241
|
+
<attribute name="number"/>
|
1242
|
+
</optional>
|
1214
1243
|
<optional>
|
1215
1244
|
<attribute name="obligation">
|
1216
1245
|
<choice>
|
@@ -1539,6 +1568,7 @@
|
|
1539
1568
|
<value>add</value>
|
1540
1569
|
<value>modify</value>
|
1541
1570
|
<value>delete</value>
|
1571
|
+
<value>replace</value>
|
1542
1572
|
</choice>
|
1543
1573
|
</attribute>
|
1544
1574
|
<optional>
|
@@ -1569,6 +1599,11 @@
|
|
1569
1599
|
</optional>
|
1570
1600
|
<optional>
|
1571
1601
|
<element name="newcontent">
|
1602
|
+
<optional>
|
1603
|
+
<attribute name="id">
|
1604
|
+
<data type="ID"/>
|
1605
|
+
</attribute>
|
1606
|
+
</optional>
|
1572
1607
|
<zeroOrMore>
|
1573
1608
|
<ref name="BasicBlock"/>
|
1574
1609
|
</zeroOrMore>
|
@@ -1602,4 +1637,65 @@
|
|
1602
1637
|
<text/>
|
1603
1638
|
</element>
|
1604
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>
|
1605
1701
|
</grammar>
|
@@ -35,7 +35,7 @@ module IsoDoc
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
def middle_clause
|
38
|
+
def middle_clause(_docxml)
|
39
39
|
"//clause[parent::sections][not(@type = 'scope' or "\
|
40
40
|
"@type = 'conformance')][not(descendant::terms)]"
|
41
41
|
end
|
@@ -46,7 +46,7 @@ module IsoDoc
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def middle(isoxml, out)
|
49
|
-
middle_title(out)
|
49
|
+
middle_title(isoxml, out)
|
50
50
|
middle_admonitions(isoxml, out)
|
51
51
|
i = scope isoxml, out, 0
|
52
52
|
i = conformance isoxml, out, i
|
@@ -18,8 +18,8 @@ module IsoDoc
|
|
18
18
|
|
19
19
|
def default_fonts(options)
|
20
20
|
{
|
21
|
-
bodyfont:
|
22
|
-
headerfont:
|
21
|
+
bodyfont: '"Overpass",sans-serif',
|
22
|
+
headerfont: '"Overpass",sans-serif',
|
23
23
|
monospacefont: '"Space Mono",monospace',
|
24
24
|
normalfontsize: "16px",
|
25
25
|
monospacefontsize: "0.8em",
|
data/lib/isodoc/ogc/i18n-en.yaml
CHANGED
@@ -9,7 +9,7 @@ permissionclass: Permission Class
|
|
9
9
|
abstracttest: Abstract Test
|
10
10
|
conformanceclass: Conformance Class
|
11
11
|
example: Example
|
12
|
-
security_empty: No security considerations have been made for this
|
12
|
+
security_empty: No security considerations have been made for this %.
|
13
13
|
stage_dict:
|
14
14
|
swg-draft: Candidate SWG Draft
|
15
15
|
oab-review: Candidate OAB Review Draft
|
@@ -118,14 +118,14 @@
|
|
118
118
|
<fo:flow flow-name="xsl-region-body" color="white">
|
119
119
|
|
120
120
|
<!-- background image -->
|
121
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm">
|
121
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
122
122
|
<fo:block>
|
123
123
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
124
124
|
</fo:block>
|
125
125
|
</fo:block-container>
|
126
126
|
|
127
127
|
<!-- background color -->
|
128
|
-
<fo:block-container absolute-position="fixed" left="0" top="0">
|
128
|
+
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
129
129
|
<fo:block>
|
130
130
|
<fo:instream-foreign-object content-height="{$pageHeight}" fox:alt-text="Background color">
|
131
131
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="215.9mm" height="279.4mm">
|
@@ -268,7 +268,7 @@
|
|
268
268
|
</xsl:if>
|
269
269
|
|
270
270
|
<!-- crossing lines -->
|
271
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}">
|
271
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
272
272
|
<fo:block>
|
273
273
|
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
274
274
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -301,7 +301,7 @@
|
|
301
301
|
<fo:flow flow-name="xsl-region-body">
|
302
302
|
|
303
303
|
<!-- crossing lines -->
|
304
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}">
|
304
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
305
305
|
<fo:block>
|
306
306
|
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
307
307
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -595,7 +595,7 @@
|
|
595
595
|
</xsl:call-template>
|
596
596
|
<fo:flow flow-name="xsl-region-body">
|
597
597
|
<!-- background color -->
|
598
|
-
<fo:block-container absolute-position="fixed" left="0" top="0">
|
598
|
+
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
599
599
|
<fo:block>
|
600
600
|
<fo:instream-foreign-object content-height="{$pageHeight}" fox:alt-text="Background color">
|
601
601
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -1351,7 +1351,7 @@
|
|
1351
1351
|
</xsl:template>
|
1352
1352
|
|
1353
1353
|
<xsl:template name="insertCrossingLines">
|
1354
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}">
|
1354
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
1355
1355
|
<fo:block>
|
1356
1356
|
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
1357
1357
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -1887,6 +1887,7 @@
|
|
1887
1887
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1888
1888
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1889
1889
|
|
1890
|
+
|
1890
1891
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1891
1892
|
|
1892
1893
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1898,6 +1899,7 @@
|
|
1898
1899
|
|
1899
1900
|
|
1900
1901
|
|
1902
|
+
|
1901
1903
|
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1902
1904
|
|
1903
1905
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
@@ -2038,203 +2040,236 @@
|
|
2038
2040
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2039
2041
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
2040
2042
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2041
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
2043
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2042
2044
|
|
2043
|
-
<xsl:variable name="
|
2044
|
-
<xsl:call-template name="getSimpleTable"/>
|
2045
|
-
</xsl:variable>
|
2045
|
+
<xsl:variable name="table">
|
2046
2046
|
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
<fo:block> </fo:block>
|
2051
|
-
|
2052
|
-
|
2053
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
2054
|
-
<fo:block> </fo:block>
|
2055
|
-
</xsl:if> -->
|
2056
|
-
|
2057
|
-
<!-- $namespace = 'iso' or -->
|
2058
|
-
|
2059
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
<xsl:call-template name="fn_name_display"/>
|
2047
|
+
<xsl:variable name="simple-table">
|
2048
|
+
<xsl:call-template name="getSimpleTable"/>
|
2049
|
+
</xsl:variable>
|
2064
2050
|
|
2065
2051
|
|
2066
|
-
|
2067
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2068
|
-
|
2069
|
-
<!-- <xsl:variable name="cols-count">
|
2070
|
-
<xsl:choose>
|
2071
|
-
<xsl:when test="*[local-name()='thead']">
|
2072
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2073
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2074
|
-
</xsl:call-template>
|
2075
|
-
</xsl:when>
|
2076
|
-
<xsl:otherwise>
|
2077
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2078
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2079
|
-
</xsl:call-template>
|
2080
|
-
</xsl:otherwise>
|
2081
|
-
</xsl:choose>
|
2082
|
-
</xsl:variable> -->
|
2083
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2084
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2085
|
-
|
2086
|
-
|
2087
|
-
|
2088
|
-
<xsl:variable name="colwidths">
|
2089
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2090
|
-
<xsl:call-template name="calculate-column-widths">
|
2091
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2092
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
2093
|
-
</xsl:call-template>
|
2094
|
-
</xsl:if>
|
2095
|
-
</xsl:variable>
|
2096
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2097
|
-
|
2098
|
-
<!-- <xsl:variable name="colwidths2">
|
2099
|
-
<xsl:call-template name="calculate-column-widths">
|
2100
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2101
|
-
</xsl:call-template>
|
2102
|
-
</xsl:variable> -->
|
2103
|
-
|
2104
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2105
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2106
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2107
|
-
|
2108
|
-
<xsl:variable name="margin-left">
|
2109
|
-
<xsl:choose>
|
2110
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2111
|
-
<xsl:otherwise>0</xsl:otherwise>
|
2112
|
-
</xsl:choose>
|
2113
|
-
</xsl:variable>
|
2114
|
-
|
2115
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2116
2052
|
|
2117
2053
|
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2054
|
+
<fo:block> </fo:block>
|
2121
2055
|
|
2122
2056
|
|
2057
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2058
|
+
<fo:block> </fo:block>
|
2059
|
+
</xsl:if> -->
|
2123
2060
|
|
2124
|
-
|
2125
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2126
|
-
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
2127
|
-
|
2061
|
+
<!-- $namespace = 'iso' or -->
|
2128
2062
|
|
2129
|
-
<xsl:
|
2130
|
-
|
2131
|
-
|
2063
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2064
|
+
|
2065
|
+
|
2066
|
+
|
2067
|
+
<xsl:call-template name="fn_name_display"/>
|
2068
|
+
|
2069
|
+
|
2070
|
+
|
2071
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2072
|
+
|
2073
|
+
<!-- <xsl:variable name="cols-count">
|
2074
|
+
<xsl:choose>
|
2075
|
+
<xsl:when test="*[local-name()='thead']">
|
2076
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2077
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2078
|
+
</xsl:call-template>
|
2079
|
+
</xsl:when>
|
2080
|
+
<xsl:otherwise>
|
2081
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2082
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2083
|
+
</xsl:call-template>
|
2084
|
+
</xsl:otherwise>
|
2085
|
+
</xsl:choose>
|
2086
|
+
</xsl:variable> -->
|
2087
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2088
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2132
2089
|
|
2133
2090
|
|
2134
2091
|
|
2092
|
+
<xsl:variable name="colwidths">
|
2093
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2094
|
+
<xsl:call-template name="calculate-column-widths">
|
2095
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2096
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2097
|
+
</xsl:call-template>
|
2098
|
+
</xsl:if>
|
2099
|
+
</xsl:variable>
|
2100
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2135
2101
|
|
2102
|
+
<!-- <xsl:variable name="colwidths2">
|
2103
|
+
<xsl:call-template name="calculate-column-widths">
|
2104
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2105
|
+
</xsl:call-template>
|
2106
|
+
</xsl:variable> -->
|
2136
2107
|
|
2108
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2109
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2110
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2137
2111
|
|
2112
|
+
<xsl:variable name="margin-left">
|
2113
|
+
<xsl:choose>
|
2114
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2115
|
+
<xsl:otherwise>0</xsl:otherwise>
|
2116
|
+
</xsl:choose>
|
2117
|
+
</xsl:variable>
|
2138
2118
|
|
2139
|
-
<
|
2140
|
-
<attribute name="table-layout">fixed</attribute>
|
2141
|
-
<attribute name="width">100%</attribute>
|
2142
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2143
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2119
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2144
2120
|
|
2145
2121
|
|
2122
|
+
|
2123
|
+
|
2124
|
+
|
2146
2125
|
|
2147
2126
|
|
2148
2127
|
|
2149
|
-
<attribute name="margin-left">0mm</attribute>
|
2150
|
-
<attribute name="margin-right">0mm</attribute>
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2128
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2129
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2130
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
2131
|
+
|
2154
2132
|
|
2155
|
-
|
2133
|
+
<xsl:if test="ancestor::*[local-name()='sections']">
|
2134
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2135
|
+
</xsl:if>
|
2156
2136
|
|
2157
|
-
</xsl:variable>
|
2158
|
-
|
2159
|
-
|
2160
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2161
2137
|
|
2162
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2163
|
-
<xsl:attribute name="{@name}">
|
2164
|
-
<xsl:value-of select="."/>
|
2165
|
-
</xsl:attribute>
|
2166
|
-
</xsl:for-each>
|
2167
2138
|
|
2168
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2169
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2170
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2171
|
-
</xsl:if>
|
2172
2139
|
|
2173
|
-
<xsl:choose>
|
2174
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2175
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2176
|
-
<fo:table-column column-width="{@width}"/>
|
2177
|
-
</xsl:for-each>
|
2178
|
-
</xsl:when>
|
2179
|
-
<xsl:otherwise>
|
2180
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2181
|
-
<xsl:choose>
|
2182
|
-
<xsl:when test=". = 1 or . = 0">
|
2183
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
2184
|
-
</xsl:when>
|
2185
|
-
<xsl:otherwise>
|
2186
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
2187
|
-
</xsl:otherwise>
|
2188
|
-
</xsl:choose>
|
2189
|
-
</xsl:for-each>
|
2190
|
-
</xsl:otherwise>
|
2191
|
-
</xsl:choose>
|
2192
2140
|
|
2193
|
-
<xsl:choose>
|
2194
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2195
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2196
|
-
</xsl:when>
|
2197
|
-
<xsl:otherwise>
|
2198
|
-
<xsl:apply-templates/>
|
2199
|
-
</xsl:otherwise>
|
2200
|
-
</xsl:choose>
|
2201
2141
|
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
|
2214
|
-
|
2215
|
-
|
2216
|
-
<
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2142
|
+
<xsl:variable name="table_width">
|
2143
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2144
|
+
|
2145
|
+
|
2146
|
+
|
2147
|
+
<xsl:choose>
|
2148
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
2149
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
2150
|
+
</xsl:choose>
|
2151
|
+
|
2152
|
+
</xsl:variable>
|
2153
|
+
|
2154
|
+
<xsl:variable name="table_attributes">
|
2155
|
+
<attribute name="table-layout">fixed</attribute>
|
2156
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
2157
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2158
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2159
|
+
|
2160
|
+
|
2161
|
+
|
2162
|
+
|
2163
|
+
|
2164
|
+
<attribute name="margin-left">0mm</attribute>
|
2165
|
+
<attribute name="margin-right">0mm</attribute>
|
2166
|
+
|
2167
|
+
|
2168
|
+
|
2169
|
+
|
2170
|
+
|
2171
|
+
|
2172
|
+
</xsl:variable>
|
2173
|
+
|
2220
2174
|
|
2221
|
-
<
|
2175
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2176
|
+
|
2177
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2178
|
+
<xsl:attribute name="{@name}">
|
2179
|
+
<xsl:value-of select="."/>
|
2180
|
+
</xsl:attribute>
|
2181
|
+
</xsl:for-each>
|
2182
|
+
|
2183
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2184
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2185
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2186
|
+
</xsl:if>
|
2187
|
+
|
2222
2188
|
<xsl:choose>
|
2223
|
-
<xsl:when test="
|
2224
|
-
<
|
2189
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2190
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2191
|
+
<fo:table-column column-width="{@width}"/>
|
2192
|
+
</xsl:for-each>
|
2225
2193
|
</xsl:when>
|
2226
2194
|
<xsl:otherwise>
|
2227
|
-
<
|
2195
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2196
|
+
<xsl:choose>
|
2197
|
+
<xsl:when test=". = 1 or . = 0">
|
2198
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2199
|
+
</xsl:when>
|
2200
|
+
<xsl:otherwise>
|
2201
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2202
|
+
</xsl:otherwise>
|
2203
|
+
</xsl:choose>
|
2204
|
+
</xsl:for-each>
|
2228
2205
|
</xsl:otherwise>
|
2229
2206
|
</xsl:choose>
|
2207
|
+
|
2208
|
+
<xsl:choose>
|
2209
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2210
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2211
|
+
</xsl:when>
|
2212
|
+
<xsl:otherwise>
|
2213
|
+
<xsl:apply-templates/>
|
2214
|
+
</xsl:otherwise>
|
2215
|
+
</xsl:choose>
|
2216
|
+
|
2217
|
+
</fo:table>
|
2218
|
+
|
2219
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2220
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2221
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2222
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2223
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2224
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2225
|
+
</xsl:call-template>
|
2230
2226
|
</xsl:for-each>
|
2231
|
-
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2227
|
+
|
2228
|
+
<!-- insert footer as table -->
|
2229
|
+
<!-- <fo:table>
|
2230
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2231
|
+
<xsl:attribute name="{@name}">
|
2232
|
+
<xsl:value-of select="."/>
|
2233
|
+
</xsl:attribute>
|
2234
|
+
</xsl:for-each>
|
2235
|
+
|
2236
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2237
|
+
<xsl:choose>
|
2238
|
+
<xsl:when test=". = 1 or . = 0">
|
2239
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2240
|
+
</xsl:when>
|
2241
|
+
<xsl:otherwise>
|
2242
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2243
|
+
</xsl:otherwise>
|
2244
|
+
</xsl:choose>
|
2245
|
+
</xsl:for-each>
|
2246
|
+
</fo:table>-->
|
2247
|
+
|
2248
|
+
|
2249
|
+
|
2250
|
+
|
2251
|
+
|
2252
|
+
</fo:block-container>
|
2253
|
+
</xsl:variable>
|
2254
|
+
|
2255
|
+
|
2256
|
+
|
2257
|
+
<xsl:choose>
|
2258
|
+
<xsl:when test="@width">
|
2259
|
+
|
2260
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
2261
|
+
|
2262
|
+
|
2263
|
+
|
2264
|
+
<xsl:copy-of select="$table"/>
|
2265
|
+
|
2266
|
+
|
2267
|
+
</xsl:when>
|
2268
|
+
<xsl:otherwise>
|
2269
|
+
<xsl:copy-of select="$table"/>
|
2270
|
+
</xsl:otherwise>
|
2271
|
+
</xsl:choose>
|
2272
|
+
|
2238
2273
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2239
2274
|
<xsl:if test="normalize-space() != ''">
|
2240
2275
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -2946,7 +2981,9 @@
|
|
2946
2981
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2947
2982
|
<fo:block-container>
|
2948
2983
|
|
2949
|
-
<xsl:
|
2984
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2985
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2986
|
+
</xsl:if>
|
2950
2987
|
|
2951
2988
|
|
2952
2989
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2961,6 +2998,7 @@
|
|
2961
2998
|
<fo:block-container>
|
2962
2999
|
|
2963
3000
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3001
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2964
3002
|
|
2965
3003
|
|
2966
3004
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -3077,7 +3115,7 @@
|
|
3077
3115
|
<xsl:with-param name="table" select="$html-table"/>
|
3078
3116
|
</xsl:call-template>
|
3079
3117
|
</xsl:variable>
|
3080
|
-
<!-- colwidths=<xsl:
|
3118
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3081
3119
|
<xsl:variable name="maxlength_dt">
|
3082
3120
|
<xsl:call-template name="getMaxLength_dt"/>
|
3083
3121
|
</xsl:variable>
|
@@ -3106,13 +3144,22 @@
|
|
3106
3144
|
</xsl:when>
|
3107
3145
|
<xsl:otherwise>
|
3108
3146
|
<xsl:choose>
|
3147
|
+
<!-- to set width check most wide chars like `W` -->
|
3109
3148
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
3110
|
-
<fo:table-column column-width="
|
3111
|
-
<fo:table-column column-width="
|
3149
|
+
<fo:table-column column-width="7%"/>
|
3150
|
+
<fo:table-column column-width="93%"/>
|
3151
|
+
</xsl:when>
|
3152
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
3153
|
+
<fo:table-column column-width="15%"/>
|
3154
|
+
<fo:table-column column-width="85%"/>
|
3155
|
+
</xsl:when>
|
3156
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
3157
|
+
<fo:table-column column-width="20%"/>
|
3158
|
+
<fo:table-column column-width="80%"/>
|
3112
3159
|
</xsl:when>
|
3113
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
3114
|
-
<fo:table-column column-width="
|
3115
|
-
<fo:table-column column-width="
|
3160
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
3161
|
+
<fo:table-column column-width="25%"/>
|
3162
|
+
<fo:table-column column-width="75%"/>
|
3116
3163
|
</xsl:when>
|
3117
3164
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
3118
3165
|
<fo:table-column column-width="60%"/>
|
@@ -3144,12 +3191,32 @@
|
|
3144
3191
|
</xsl:otherwise>
|
3145
3192
|
</xsl:choose>
|
3146
3193
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
3147
|
-
<xsl:
|
3148
|
-
<xsl:
|
3149
|
-
|
3150
|
-
<xsl:
|
3151
|
-
|
3152
|
-
|
3194
|
+
<xsl:variable name="lengths">
|
3195
|
+
<xsl:for-each select="*[local-name()='dt']">
|
3196
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
3197
|
+
<xsl:variable name="attributes">
|
3198
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
3199
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
3200
|
+
</xsl:variable>
|
3201
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
3202
|
+
</xsl:for-each>
|
3203
|
+
</xsl:variable>
|
3204
|
+
<xsl:variable name="maxLength">
|
3205
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
3206
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
3207
|
+
<xsl:if test="position() = 1">
|
3208
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
3209
|
+
</xsl:if>
|
3210
|
+
</xsl:for-each> -->
|
3211
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
3212
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
3213
|
+
<xsl:if test="position() = 1">
|
3214
|
+
<xsl:value-of select="."/>
|
3215
|
+
</xsl:if>
|
3216
|
+
</xsl:for-each>
|
3217
|
+
</xsl:variable>
|
3218
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
3219
|
+
<xsl:value-of select="$maxLength"/>
|
3153
3220
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
3154
3221
|
<xsl:param name="key_iso"/>
|
3155
3222
|
|
@@ -3290,6 +3357,7 @@
|
|
3290
3357
|
|
3291
3358
|
|
3292
3359
|
|
3360
|
+
|
3293
3361
|
10
|
3294
3362
|
|
3295
3363
|
|
@@ -3306,6 +3374,10 @@
|
|
3306
3374
|
</xsl:if>
|
3307
3375
|
<xsl:apply-templates/>
|
3308
3376
|
</fo:inline>
|
3377
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
3378
|
+
<fo:inline text-decoration="underline">
|
3379
|
+
<xsl:apply-templates/>
|
3380
|
+
</fo:inline>
|
3309
3381
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3310
3382
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3311
3383
|
<xsl:apply-templates/>
|
@@ -3399,6 +3471,10 @@
|
|
3399
3471
|
<xsl:param name="text" select="."/>
|
3400
3472
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
3401
3473
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
3474
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
3475
|
+
<xsl:param name="text" select="."/>
|
3476
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
3477
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
3402
3478
|
</xsl:template><xsl:template name="add-zero-spaces">
|
3403
3479
|
<xsl:param name="text" select="."/>
|
3404
3480
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3659,6 +3735,11 @@
|
|
3659
3735
|
<!-- replace start and end spaces to non-break space -->
|
3660
3736
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3661
3737
|
</xsl:copy>
|
3738
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3739
|
+
<xsl:copy>
|
3740
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3741
|
+
</xsl:copy>
|
3742
|
+
<mathml:mspace width="0.5ex"/>
|
3662
3743
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3663
3744
|
<xsl:variable name="target">
|
3664
3745
|
<xsl:choose>
|
@@ -3680,7 +3761,10 @@
|
|
3680
3761
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3681
3762
|
<xsl:choose>
|
3682
3763
|
<xsl:when test="normalize-space(.) = ''">
|
3683
|
-
<xsl:value-of select="$target"/>
|
3764
|
+
<!-- <xsl:value-of select="$target"/> -->
|
3765
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
3766
|
+
<xsl:with-param name="text" select="$target"/>
|
3767
|
+
</xsl:call-template>
|
3684
3768
|
</xsl:when>
|
3685
3769
|
<xsl:otherwise>
|
3686
3770
|
<xsl:apply-templates/>
|
@@ -3890,7 +3974,7 @@
|
|
3890
3974
|
</xsl:if> -->
|
3891
3975
|
</fo:inline>
|
3892
3976
|
</xsl:if>
|
3893
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3977
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3894
3978
|
<fo:block-container id="{@id}">
|
3895
3979
|
|
3896
3980
|
<fo:block>
|
@@ -3959,6 +4043,8 @@
|
|
3959
4043
|
<xsl:variable name="bookmark-title_">
|
3960
4044
|
<xsl:call-template name="getLangVersion">
|
3961
4045
|
<xsl:with-param name="lang" select="@lang"/>
|
4046
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
4047
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3962
4048
|
</xsl:call-template>
|
3963
4049
|
</xsl:variable>
|
3964
4050
|
<xsl:choose>
|
@@ -3976,13 +4062,34 @@
|
|
3976
4062
|
</xsl:choose>
|
3977
4063
|
</fo:bookmark-title>
|
3978
4064
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4065
|
+
|
4066
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4067
|
+
<xsl:with-param name="contents" select="contents"/>
|
4068
|
+
</xsl:call-template>
|
4069
|
+
|
4070
|
+
<xsl:call-template name="insertTableBookmarks">
|
4071
|
+
<xsl:with-param name="contents" select="contents"/>
|
4072
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4073
|
+
</xsl:call-template>
|
4074
|
+
|
3979
4075
|
</fo:bookmark>
|
3980
4076
|
|
3981
4077
|
</xsl:for-each>
|
3982
4078
|
</xsl:when>
|
3983
4079
|
<xsl:otherwise>
|
3984
4080
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4081
|
+
|
3985
4082
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4083
|
+
|
4084
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4085
|
+
<xsl:with-param name="contents" select="contents"/>
|
4086
|
+
</xsl:call-template>
|
4087
|
+
|
4088
|
+
<xsl:call-template name="insertTableBookmarks">
|
4089
|
+
<xsl:with-param name="contents" select="contents"/>
|
4090
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4091
|
+
</xsl:call-template>
|
4092
|
+
|
3986
4093
|
</xsl:for-each>
|
3987
4094
|
</xsl:otherwise>
|
3988
4095
|
</xsl:choose>
|
@@ -4044,8 +4151,44 @@
|
|
4044
4151
|
|
4045
4152
|
</fo:bookmark-tree>
|
4046
4153
|
</xsl:if>
|
4154
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
4155
|
+
<xsl:param name="contents"/>
|
4156
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
4157
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
4158
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4159
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
4160
|
+
<fo:bookmark internal-destination="{@id}">
|
4161
|
+
<fo:bookmark-title>
|
4162
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4163
|
+
</fo:bookmark-title>
|
4164
|
+
</fo:bookmark>
|
4165
|
+
</xsl:for-each>
|
4166
|
+
</fo:bookmark>
|
4167
|
+
</xsl:if>
|
4168
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
4169
|
+
<xsl:param name="contents"/>
|
4170
|
+
<xsl:param name="lang"/>
|
4171
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
4172
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
4173
|
+
<fo:bookmark-title>
|
4174
|
+
<xsl:choose>
|
4175
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
4176
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4177
|
+
</xsl:choose>
|
4178
|
+
</fo:bookmark-title>
|
4179
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
4180
|
+
<fo:bookmark internal-destination="{@id}">
|
4181
|
+
<fo:bookmark-title>
|
4182
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4183
|
+
</fo:bookmark-title>
|
4184
|
+
</fo:bookmark>
|
4185
|
+
</xsl:for-each>
|
4186
|
+
</fo:bookmark>
|
4187
|
+
</xsl:if>
|
4047
4188
|
</xsl:template><xsl:template name="getLangVersion">
|
4048
4189
|
<xsl:param name="lang"/>
|
4190
|
+
<xsl:param name="doctype" select="''"/>
|
4191
|
+
<xsl:param name="title" select="''"/>
|
4049
4192
|
<xsl:choose>
|
4050
4193
|
<xsl:when test="$lang = 'en'">
|
4051
4194
|
|
@@ -4081,6 +4224,12 @@
|
|
4081
4224
|
<!-- <xsl:text> </xsl:text> -->
|
4082
4225
|
</xsl:template><xsl:template name="getSection">
|
4083
4226
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4227
|
+
<!--
|
4228
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
4229
|
+
<xsl:value-of select="."/>
|
4230
|
+
</xsl:for-each>
|
4231
|
+
-->
|
4232
|
+
|
4084
4233
|
</xsl:template><xsl:template name="getName">
|
4085
4234
|
<xsl:choose>
|
4086
4235
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -4133,6 +4282,12 @@
|
|
4133
4282
|
<xsl:copy>
|
4134
4283
|
<xsl:apply-templates mode="contents_item"/>
|
4135
4284
|
</xsl:copy>
|
4285
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
4286
|
+
<xsl:copy>
|
4287
|
+
<xsl:apply-templates mode="contents_item"/>
|
4288
|
+
</xsl:copy>
|
4289
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
4290
|
+
<xsl:copy-of select="."/>
|
4136
4291
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4137
4292
|
<xsl:text> </xsl:text>
|
4138
4293
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -4158,6 +4313,7 @@
|
|
4158
4313
|
|
4159
4314
|
|
4160
4315
|
|
4316
|
+
|
4161
4317
|
|
4162
4318
|
|
4163
4319
|
|
@@ -4545,10 +4701,13 @@
|
|
4545
4701
|
</xsl:if>
|
4546
4702
|
</xsl:if>
|
4547
4703
|
|
4704
|
+
|
4548
4705
|
<fo:block-container margin-left="0mm">
|
4549
4706
|
|
4550
4707
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4551
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4708
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4709
|
+
|
4710
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4552
4711
|
</fo:block>
|
4553
4712
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4554
4713
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4700,6 +4859,7 @@
|
|
4700
4859
|
|
4701
4860
|
|
4702
4861
|
|
4862
|
+
|
4703
4863
|
|
4704
4864
|
|
4705
4865
|
|
@@ -4716,7 +4876,7 @@
|
|
4716
4876
|
|
4717
4877
|
|
4718
4878
|
|
4719
|
-
</xsl:template><xsl:template match="
|
4879
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4720
4880
|
<fo:block break-after="page"/>
|
4721
4881
|
<fo:block>
|
4722
4882
|
<xsl:call-template name="setId"/>
|
@@ -4724,7 +4884,8 @@
|
|
4724
4884
|
</fo:block>
|
4725
4885
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4726
4886
|
<fo:block>
|
4727
|
-
<xsl:call-template name="setId"/>
|
4887
|
+
<xsl:call-template name="setId"/>
|
4888
|
+
|
4728
4889
|
|
4729
4890
|
<xsl:apply-templates/>
|
4730
4891
|
</fo:block>
|
@@ -5012,6 +5173,8 @@
|
|
5012
5173
|
<xsl:value-of select="translate(.,'. ','')"/>
|
5013
5174
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
5014
5175
|
<xsl:value-of select="substring(.,1,1)"/>
|
5176
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5177
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5015
5178
|
</xsl:template><xsl:template name="convertDate">
|
5016
5179
|
<xsl:param name="date"/>
|
5017
5180
|
<xsl:param name="format" select="'short'"/>
|
@@ -5036,6 +5199,57 @@
|
|
5036
5199
|
</xsl:variable>
|
5037
5200
|
<xsl:variable name="result">
|
5038
5201
|
<xsl:choose>
|
5202
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
5203
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5204
|
+
<xsl:text> </xsl:text>
|
5205
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
5206
|
+
</xsl:when>
|
5207
|
+
<xsl:when test="$format = 'ddMM'">
|
5208
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5209
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
5210
|
+
</xsl:when>
|
5211
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
5212
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5213
|
+
</xsl:when>
|
5214
|
+
<xsl:otherwise>
|
5215
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
5216
|
+
</xsl:otherwise>
|
5217
|
+
</xsl:choose>
|
5218
|
+
</xsl:variable>
|
5219
|
+
<xsl:value-of select="$result"/>
|
5220
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
5221
|
+
<xsl:param name="date"/>
|
5222
|
+
<xsl:param name="format" select="'short'"/>
|
5223
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
5224
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
5225
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
5226
|
+
<xsl:variable name="monthStr">
|
5227
|
+
<xsl:choose>
|
5228
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
5229
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
5230
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
5231
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
5232
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
5233
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
5234
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
5235
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
5236
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
5237
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
5238
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
5239
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
5240
|
+
</xsl:choose>
|
5241
|
+
</xsl:variable>
|
5242
|
+
<xsl:variable name="result">
|
5243
|
+
<xsl:choose>
|
5244
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
5245
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5246
|
+
<xsl:text> </xsl:text>
|
5247
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
5248
|
+
</xsl:when>
|
5249
|
+
<xsl:when test="$format = 'ddMM'">
|
5250
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5251
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
5252
|
+
</xsl:when>
|
5039
5253
|
<xsl:when test="$format = 'short' or $day = ''">
|
5040
5254
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5041
5255
|
</xsl:when>
|
@@ -5051,7 +5265,7 @@
|
|
5051
5265
|
<xsl:param name="charDelim" select="', '"/>
|
5052
5266
|
<xsl:choose>
|
5053
5267
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
5054
|
-
<xsl:for-each select="
|
5268
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5055
5269
|
<xsl:sort data-type="text" order="ascending"/>
|
5056
5270
|
<xsl:call-template name="insertKeyword">
|
5057
5271
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -5060,7 +5274,7 @@
|
|
5060
5274
|
</xsl:for-each>
|
5061
5275
|
</xsl:when>
|
5062
5276
|
<xsl:otherwise>
|
5063
|
-
<xsl:for-each select="
|
5277
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5064
5278
|
<xsl:call-template name="insertKeyword">
|
5065
5279
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
5066
5280
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -5077,6 +5291,9 @@
|
|
5077
5291
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
5078
5292
|
</xsl:choose>
|
5079
5293
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
5294
|
+
<xsl:variable name="lang">
|
5295
|
+
<xsl:call-template name="getLang"/>
|
5296
|
+
</xsl:variable>
|
5080
5297
|
<fo:declarations>
|
5081
5298
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
5082
5299
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -5089,13 +5306,16 @@
|
|
5089
5306
|
<!-- Dublin Core properties go here -->
|
5090
5307
|
<dc:title>
|
5091
5308
|
<xsl:variable name="title">
|
5092
|
-
|
5093
|
-
|
5094
|
-
|
5095
|
-
|
5096
|
-
|
5097
|
-
|
5098
|
-
|
5309
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5310
|
+
|
5311
|
+
|
5312
|
+
|
5313
|
+
|
5314
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
5315
|
+
|
5316
|
+
|
5317
|
+
|
5318
|
+
</xsl:for-each>
|
5099
5319
|
</xsl:variable>
|
5100
5320
|
<xsl:choose>
|
5101
5321
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -5107,17 +5327,21 @@
|
|
5107
5327
|
</xsl:choose>
|
5108
5328
|
</dc:title>
|
5109
5329
|
<dc:creator>
|
5110
|
-
|
5111
|
-
|
5112
|
-
|
5113
|
-
|
5114
|
-
|
5115
|
-
|
5330
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5331
|
+
|
5332
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
5333
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
5334
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
5335
|
+
</xsl:for-each>
|
5116
5336
|
|
5117
5337
|
|
5118
5338
|
|
5339
|
+
</xsl:for-each>
|
5340
|
+
</dc:creator>
|
5341
|
+
<dc:description>
|
5342
|
+
<xsl:variable name="abstract">
|
5119
5343
|
|
5120
|
-
<xsl:copy-of select="
|
5344
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
5121
5345
|
|
5122
5346
|
|
5123
5347
|
</xsl:variable>
|
@@ -5230,6 +5454,7 @@
|
|
5230
5454
|
|
5231
5455
|
|
5232
5456
|
|
5457
|
+
|
5233
5458
|
</xsl:variable>
|
5234
5459
|
<xsl:if test="$documentNS != $XSLNS">
|
5235
5460
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5289,6 +5514,11 @@
|
|
5289
5514
|
<xsl:call-template name="getLang"/>
|
5290
5515
|
</xsl:variable>
|
5291
5516
|
|
5292
|
-
<xsl:
|
5517
|
+
<xsl:choose>
|
5518
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5519
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5520
|
+
</xsl:when>
|
5521
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
5522
|
+
</xsl:choose>
|
5293
5523
|
|
5294
5524
|
</xsl:template></xsl:stylesheet>
|