metanorma-ogc 1.2.10 → 1.2.15
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 +5 -3
- data/lib/asciidoctor/ogc/boilerplate.xml +1 -1
- data/lib/asciidoctor/ogc/converter.rb +5 -5
- data/lib/asciidoctor/ogc/isodoc.rng +111 -4
- data/lib/asciidoctor/ogc/ogc.rng +6 -0
- data/lib/isodoc/ogc/base_convert.rb +1 -1
- 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 +341 -195
- data/lib/isodoc/ogc/ogc.best-practice.xsl +341 -195
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +341 -195
- data/lib/isodoc/ogc/ogc.community-practice.xsl +341 -195
- data/lib/isodoc/ogc/ogc.community-standard.xsl +341 -195
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +341 -195
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +341 -195
- data/lib/isodoc/ogc/ogc.other.xsl +341 -195
- data/lib/isodoc/ogc/ogc.policy.xsl +341 -195
- data/lib/isodoc/ogc/ogc.reference-model.xsl +341 -195
- data/lib/isodoc/ogc/ogc.release-notes.xsl +341 -195
- data/lib/isodoc/ogc/ogc.standard.xsl +341 -195
- data/lib/isodoc/ogc/ogc.test-suite.xsl +341 -195
- data/lib/isodoc/ogc/ogc.user-guide.xsl +341 -195
- data/lib/isodoc/ogc/ogc.white-paper.xsl +384 -198
- data/lib/isodoc/ogc/word_convert.rb +7 -9
- data/lib/isodoc/ogc/xref.rb +8 -4
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 285b68cc10ee7e8a0dd8e0da053492cb8f44b0b95289bc448351cf9ae41a3689
|
4
|
+
data.tar.gz: 2b1cc87f38fbd6f0a201fb138596f92b820a0843a7b597307dfca3349398ccf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1f9ec31debf56377ab244cf66b7e429bdc1fa001a0806c9f1728e257f8d87fee82d09634f05d1901f753155f1e373afd08d2bf16a28232b5aa8eb8ae03760ba
|
7
|
+
data.tar.gz: dd1ab33656829020e418e3e2c9d55418313499f53e33d6aed0c8b793bdf161e33e849329c010d2badf428266afa96cc18dddc66af206df929773c9b3f154a855
|
data/.github/workflows/rake.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -729,9 +729,11 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<
|
733
|
-
<
|
734
|
-
|
732
|
+
<optional>
|
733
|
+
<attribute name="to">
|
734
|
+
<data type="IDREF"/>
|
735
|
+
</attribute>
|
736
|
+
</optional>
|
735
737
|
<element name="primary">
|
736
738
|
<oneOrMore>
|
737
739
|
<ref name="PureTextElement"/>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<p align="center">Copyright
|
7
7
|
© {{ docyear }} Open Geospatial Consortium<br/>
|
8
8
|
To obtain additional rights of use, visit
|
9
|
-
<link target="http://www.
|
9
|
+
<link target="http://www.ogc.org/legal/">http://www.ogc.org/legal/</link></p>
|
10
10
|
</clause>
|
11
11
|
<clause>
|
12
12
|
<title>Note</title>
|
@@ -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
|
@@ -253,6 +253,9 @@
|
|
253
253
|
<data type="boolean"/>
|
254
254
|
</attribute>
|
255
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
256
259
|
<optional>
|
257
260
|
<ref name="colgroup"/>
|
258
261
|
</optional>
|
@@ -786,6 +789,9 @@
|
|
786
789
|
<attribute name="width"/>
|
787
790
|
</element>
|
788
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
789
795
|
<define name="TextElement" combine="choice">
|
790
796
|
<ref name="concept"/>
|
791
797
|
</define>
|
@@ -806,6 +812,8 @@
|
|
806
812
|
<ref name="requirement"/>
|
807
813
|
<ref name="recommendation"/>
|
808
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
809
817
|
</choice>
|
810
818
|
</define>
|
811
819
|
<define name="bibliography">
|
@@ -836,6 +844,9 @@
|
|
836
844
|
<data type="boolean"/>
|
837
845
|
</attribute>
|
838
846
|
</optional>
|
847
|
+
<optional>
|
848
|
+
<attribute name="number"/>
|
849
|
+
</optional>
|
839
850
|
<optional>
|
840
851
|
<attribute name="obligation">
|
841
852
|
<choice>
|
@@ -891,9 +902,11 @@
|
|
891
902
|
<element name="code">
|
892
903
|
<text/>
|
893
904
|
</element>
|
894
|
-
<
|
895
|
-
<text
|
896
|
-
|
905
|
+
<optional>
|
906
|
+
<element name="text">
|
907
|
+
<text/>
|
908
|
+
</element>
|
909
|
+
</optional>
|
897
910
|
</element>
|
898
911
|
</define>
|
899
912
|
<define name="standard-document">
|
@@ -906,6 +919,9 @@
|
|
906
919
|
</choice>
|
907
920
|
</attribute>
|
908
921
|
<ref name="bibdata"/>
|
922
|
+
<optional>
|
923
|
+
<ref name="misccontainer"/>
|
924
|
+
</optional>
|
909
925
|
<optional>
|
910
926
|
<ref name="boilerplate"/>
|
911
927
|
</optional>
|
@@ -916,11 +932,21 @@
|
|
916
932
|
<zeroOrMore>
|
917
933
|
<ref name="annex"/>
|
918
934
|
</zeroOrMore>
|
935
|
+
<optional>
|
936
|
+
<ref name="bibliography"/>
|
937
|
+
</optional>
|
919
938
|
<zeroOrMore>
|
920
|
-
<ref name="
|
939
|
+
<ref name="indexsect"/>
|
921
940
|
</zeroOrMore>
|
922
941
|
</element>
|
923
942
|
</define>
|
943
|
+
<define name="misccontainer">
|
944
|
+
<element name="misc-container">
|
945
|
+
<oneOrMore>
|
946
|
+
<ref name="AnyElement"/>
|
947
|
+
</oneOrMore>
|
948
|
+
</element>
|
949
|
+
</define>
|
924
950
|
<define name="preface">
|
925
951
|
<element name="preface">
|
926
952
|
<oneOrMore>
|
@@ -944,6 +970,11 @@
|
|
944
970
|
<ref name="Content-Section"/>
|
945
971
|
</element>
|
946
972
|
</define>
|
973
|
+
<define name="indexsect">
|
974
|
+
<element name="indexsect">
|
975
|
+
<ref name="Content-Section"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
947
978
|
<define name="boilerplate">
|
948
979
|
<element name="boilerplate">
|
949
980
|
<optional>
|
@@ -1063,6 +1094,9 @@
|
|
1063
1094
|
</choice>
|
1064
1095
|
</attribute>
|
1065
1096
|
</optional>
|
1097
|
+
<optional>
|
1098
|
+
<attribute name="number"/>
|
1099
|
+
</optional>
|
1066
1100
|
<optional>
|
1067
1101
|
<attribute name="type"/>
|
1068
1102
|
</optional>
|
@@ -1116,6 +1150,9 @@
|
|
1116
1150
|
<optional>
|
1117
1151
|
<attribute name="type"/>
|
1118
1152
|
</optional>
|
1153
|
+
<optional>
|
1154
|
+
<attribute name="number"/>
|
1155
|
+
</optional>
|
1119
1156
|
<optional>
|
1120
1157
|
<ref name="section-title"/>
|
1121
1158
|
</optional>
|
@@ -1218,6 +1255,9 @@
|
|
1218
1255
|
<optional>
|
1219
1256
|
<attribute name="type"/>
|
1220
1257
|
</optional>
|
1258
|
+
<optional>
|
1259
|
+
<attribute name="number"/>
|
1260
|
+
</optional>
|
1221
1261
|
<optional>
|
1222
1262
|
<attribute name="obligation">
|
1223
1263
|
<choice>
|
@@ -1546,6 +1586,7 @@
|
|
1546
1586
|
<value>add</value>
|
1547
1587
|
<value>modify</value>
|
1548
1588
|
<value>delete</value>
|
1589
|
+
<value>replace</value>
|
1549
1590
|
</choice>
|
1550
1591
|
</attribute>
|
1551
1592
|
<optional>
|
@@ -1576,6 +1617,11 @@
|
|
1576
1617
|
</optional>
|
1577
1618
|
<optional>
|
1578
1619
|
<element name="newcontent">
|
1620
|
+
<optional>
|
1621
|
+
<attribute name="id">
|
1622
|
+
<data type="ID"/>
|
1623
|
+
</attribute>
|
1624
|
+
</optional>
|
1579
1625
|
<zeroOrMore>
|
1580
1626
|
<ref name="BasicBlock"/>
|
1581
1627
|
</zeroOrMore>
|
@@ -1609,4 +1655,65 @@
|
|
1609
1655
|
<text/>
|
1610
1656
|
</element>
|
1611
1657
|
</define>
|
1658
|
+
<define name="imagemap">
|
1659
|
+
<element name="imagemap">
|
1660
|
+
<ref name="figure"/>
|
1661
|
+
<zeroOrMore>
|
1662
|
+
<element name="area">
|
1663
|
+
<attribute name="type">
|
1664
|
+
<choice>
|
1665
|
+
<value>rect</value>
|
1666
|
+
<value>circle</value>
|
1667
|
+
<value>ellipse</value>
|
1668
|
+
<value>poly</value>
|
1669
|
+
</choice>
|
1670
|
+
</attribute>
|
1671
|
+
<choice>
|
1672
|
+
<ref name="xref"/>
|
1673
|
+
<ref name="hyperlink"/>
|
1674
|
+
<ref name="eref"/>
|
1675
|
+
</choice>
|
1676
|
+
<oneOrMore>
|
1677
|
+
<element name="coords">
|
1678
|
+
<attribute name="x">
|
1679
|
+
<data type="float"/>
|
1680
|
+
</attribute>
|
1681
|
+
<attribute name="y">
|
1682
|
+
<data type="float"/>
|
1683
|
+
</attribute>
|
1684
|
+
</element>
|
1685
|
+
</oneOrMore>
|
1686
|
+
<optional>
|
1687
|
+
<element name="radius">
|
1688
|
+
<attribute name="x">
|
1689
|
+
<data type="float"/>
|
1690
|
+
</attribute>
|
1691
|
+
<optional>
|
1692
|
+
<attribute name="y">
|
1693
|
+
<data type="float"/>
|
1694
|
+
</attribute>
|
1695
|
+
</optional>
|
1696
|
+
</element>
|
1697
|
+
</optional>
|
1698
|
+
</element>
|
1699
|
+
</zeroOrMore>
|
1700
|
+
</element>
|
1701
|
+
</define>
|
1702
|
+
<define name="svgmap">
|
1703
|
+
<element name="svgmap">
|
1704
|
+
<ref name="figure"/>
|
1705
|
+
<zeroOrMore>
|
1706
|
+
<element name="target">
|
1707
|
+
<attribute name="href">
|
1708
|
+
<data type="anyURI"/>
|
1709
|
+
</attribute>
|
1710
|
+
<choice>
|
1711
|
+
<ref name="xref"/>
|
1712
|
+
<ref name="hyperlink"/>
|
1713
|
+
<ref name="eref"/>
|
1714
|
+
</choice>
|
1715
|
+
</element>
|
1716
|
+
</zeroOrMore>
|
1717
|
+
</element>
|
1718
|
+
</define>
|
1612
1719
|
</grammar>
|
data/lib/asciidoctor/ogc/ogc.rng
CHANGED
@@ -115,6 +115,9 @@
|
|
115
115
|
<zeroOrMore>
|
116
116
|
<ref name="termdocsource"/>
|
117
117
|
</zeroOrMore>
|
118
|
+
<optional>
|
119
|
+
<ref name="misccontainer"/>
|
120
|
+
</optional>
|
118
121
|
<optional>
|
119
122
|
<ref name="boilerplate"/>
|
120
123
|
</optional>
|
@@ -126,6 +129,9 @@
|
|
126
129
|
<ref name="annex"/>
|
127
130
|
</zeroOrMore>
|
128
131
|
<ref name="bibliography"/>
|
132
|
+
<zeroOrMore>
|
133
|
+
<ref name="indexsect"/>
|
134
|
+
</zeroOrMore>
|
129
135
|
</element>
|
130
136
|
</define>
|
131
137
|
</grammar>
|
@@ -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}">
|
@@ -1899,6 +1899,7 @@
|
|
1899
1899
|
|
1900
1900
|
|
1901
1901
|
|
1902
|
+
|
1902
1903
|
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1903
1904
|
|
1904
1905
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
@@ -2039,203 +2040,236 @@
|
|
2039
2040
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2040
2041
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
2041
2042
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2042
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
2043
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2043
2044
|
|
2044
|
-
<xsl:variable name="
|
2045
|
-
<xsl:call-template name="getSimpleTable"/>
|
2046
|
-
</xsl:variable>
|
2045
|
+
<xsl:variable name="table">
|
2047
2046
|
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
<fo:block> </fo:block>
|
2052
|
-
|
2053
|
-
|
2054
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
2055
|
-
<fo:block> </fo:block>
|
2056
|
-
</xsl:if> -->
|
2057
|
-
|
2058
|
-
<!-- $namespace = 'iso' or -->
|
2059
|
-
|
2060
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
<xsl:call-template name="fn_name_display"/>
|
2047
|
+
<xsl:variable name="simple-table">
|
2048
|
+
<xsl:call-template name="getSimpleTable"/>
|
2049
|
+
</xsl:variable>
|
2065
2050
|
|
2066
2051
|
|
2067
|
-
|
2068
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2069
|
-
|
2070
|
-
<!-- <xsl:variable name="cols-count">
|
2071
|
-
<xsl:choose>
|
2072
|
-
<xsl:when test="*[local-name()='thead']">
|
2073
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2074
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2075
|
-
</xsl:call-template>
|
2076
|
-
</xsl:when>
|
2077
|
-
<xsl:otherwise>
|
2078
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2079
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2080
|
-
</xsl:call-template>
|
2081
|
-
</xsl:otherwise>
|
2082
|
-
</xsl:choose>
|
2083
|
-
</xsl:variable> -->
|
2084
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2085
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2086
|
-
|
2087
|
-
|
2088
|
-
|
2089
|
-
<xsl:variable name="colwidths">
|
2090
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2091
|
-
<xsl:call-template name="calculate-column-widths">
|
2092
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2093
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
2094
|
-
</xsl:call-template>
|
2095
|
-
</xsl:if>
|
2096
|
-
</xsl:variable>
|
2097
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2098
|
-
|
2099
|
-
<!-- <xsl:variable name="colwidths2">
|
2100
|
-
<xsl:call-template name="calculate-column-widths">
|
2101
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2102
|
-
</xsl:call-template>
|
2103
|
-
</xsl:variable> -->
|
2104
|
-
|
2105
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2106
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2107
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2108
|
-
|
2109
|
-
<xsl:variable name="margin-left">
|
2110
|
-
<xsl:choose>
|
2111
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2112
|
-
<xsl:otherwise>0</xsl:otherwise>
|
2113
|
-
</xsl:choose>
|
2114
|
-
</xsl:variable>
|
2115
|
-
|
2116
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2117
2052
|
|
2118
2053
|
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2054
|
+
<fo:block> </fo:block>
|
2122
2055
|
|
2123
2056
|
|
2057
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2058
|
+
<fo:block> </fo:block>
|
2059
|
+
</xsl:if> -->
|
2124
2060
|
|
2125
|
-
|
2126
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2127
|
-
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
2128
|
-
|
2061
|
+
<!-- $namespace = 'iso' or -->
|
2129
2062
|
|
2130
|
-
<xsl:
|
2131
|
-
|
2132
|
-
|
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)"/>
|
2133
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"/> -->
|
2134
2089
|
|
2135
2090
|
|
2136
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"/> -->
|
2137
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> -->
|
2138
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 -->
|
2139
2111
|
|
2140
|
-
<xsl:variable name="
|
2141
|
-
<
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
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>
|
2118
|
+
|
2119
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2145
2120
|
|
2146
2121
|
|
2122
|
+
|
2123
|
+
|
2124
|
+
|
2147
2125
|
|
2148
2126
|
|
2149
2127
|
|
2150
|
-
<attribute name="margin-left">0mm</attribute>
|
2151
|
-
<attribute name="margin-right">0mm</attribute>
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
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
|
+
|
2155
2132
|
|
2156
|
-
|
2133
|
+
<xsl:if test="ancestor::*[local-name()='sections']">
|
2134
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2135
|
+
</xsl:if>
|
2157
2136
|
|
2158
|
-
</xsl:variable>
|
2159
|
-
|
2160
|
-
|
2161
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2162
2137
|
|
2163
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2164
|
-
<xsl:attribute name="{@name}">
|
2165
|
-
<xsl:value-of select="."/>
|
2166
|
-
</xsl:attribute>
|
2167
|
-
</xsl:for-each>
|
2168
2138
|
|
2169
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2170
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2171
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2172
|
-
</xsl:if>
|
2173
2139
|
|
2174
|
-
<xsl:choose>
|
2175
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2176
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2177
|
-
<fo:table-column column-width="{@width}"/>
|
2178
|
-
</xsl:for-each>
|
2179
|
-
</xsl:when>
|
2180
|
-
<xsl:otherwise>
|
2181
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2182
|
-
<xsl:choose>
|
2183
|
-
<xsl:when test=". = 1 or . = 0">
|
2184
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
2185
|
-
</xsl:when>
|
2186
|
-
<xsl:otherwise>
|
2187
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
2188
|
-
</xsl:otherwise>
|
2189
|
-
</xsl:choose>
|
2190
|
-
</xsl:for-each>
|
2191
|
-
</xsl:otherwise>
|
2192
|
-
</xsl:choose>
|
2193
2140
|
|
2194
|
-
<xsl:choose>
|
2195
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2196
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2197
|
-
</xsl:when>
|
2198
|
-
<xsl:otherwise>
|
2199
|
-
<xsl:apply-templates/>
|
2200
|
-
</xsl:otherwise>
|
2201
|
-
</xsl:choose>
|
2202
2141
|
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
|
2214
|
-
|
2215
|
-
|
2216
|
-
|
2217
|
-
<
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
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
|
+
|
2221
2174
|
|
2222
|
-
<
|
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
|
+
|
2188
|
+
<xsl:choose>
|
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>
|
2193
|
+
</xsl:when>
|
2194
|
+
<xsl:otherwise>
|
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>
|
2205
|
+
</xsl:otherwise>
|
2206
|
+
</xsl:choose>
|
2207
|
+
|
2223
2208
|
<xsl:choose>
|
2224
|
-
<xsl:when test="
|
2225
|
-
<
|
2209
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2210
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2226
2211
|
</xsl:when>
|
2227
2212
|
<xsl:otherwise>
|
2228
|
-
<
|
2213
|
+
<xsl:apply-templates/>
|
2229
2214
|
</xsl:otherwise>
|
2230
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>
|
2231
2226
|
</xsl:for-each>
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
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
|
+
|
2239
2273
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2240
2274
|
<xsl:if test="normalize-space() != ''">
|
2241
2275
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3081,7 +3115,7 @@
|
|
3081
3115
|
<xsl:with-param name="table" select="$html-table"/>
|
3082
3116
|
</xsl:call-template>
|
3083
3117
|
</xsl:variable>
|
3084
|
-
<!-- colwidths=<xsl:
|
3118
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3085
3119
|
<xsl:variable name="maxlength_dt">
|
3086
3120
|
<xsl:call-template name="getMaxLength_dt"/>
|
3087
3121
|
</xsl:variable>
|
@@ -3110,13 +3144,22 @@
|
|
3110
3144
|
</xsl:when>
|
3111
3145
|
<xsl:otherwise>
|
3112
3146
|
<xsl:choose>
|
3147
|
+
<!-- to set width check most wide chars like `W` -->
|
3113
3148
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
3114
|
-
<fo:table-column column-width="
|
3115
|
-
<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%"/>
|
3116
3159
|
</xsl:when>
|
3117
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
3118
|
-
<fo:table-column column-width="
|
3119
|
-
<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%"/>
|
3120
3163
|
</xsl:when>
|
3121
3164
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
3122
3165
|
<fo:table-column column-width="60%"/>
|
@@ -3314,6 +3357,7 @@
|
|
3314
3357
|
|
3315
3358
|
|
3316
3359
|
|
3360
|
+
|
3317
3361
|
10
|
3318
3362
|
|
3319
3363
|
|
@@ -3330,6 +3374,10 @@
|
|
3330
3374
|
</xsl:if>
|
3331
3375
|
<xsl:apply-templates/>
|
3332
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>
|
3333
3381
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3334
3382
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3335
3383
|
<xsl:apply-templates/>
|
@@ -3423,6 +3471,10 @@
|
|
3423
3471
|
<xsl:param name="text" select="."/>
|
3424
3472
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
3425
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')"/>
|
3426
3478
|
</xsl:template><xsl:template name="add-zero-spaces">
|
3427
3479
|
<xsl:param name="text" select="."/>
|
3428
3480
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3683,6 +3735,11 @@
|
|
3683
3735
|
<!-- replace start and end spaces to non-break space -->
|
3684
3736
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3685
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"/>
|
3686
3743
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3687
3744
|
<xsl:variable name="target">
|
3688
3745
|
<xsl:choose>
|
@@ -3704,7 +3761,10 @@
|
|
3704
3761
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3705
3762
|
<xsl:choose>
|
3706
3763
|
<xsl:when test="normalize-space(.) = ''">
|
3707
|
-
<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>
|
3708
3768
|
</xsl:when>
|
3709
3769
|
<xsl:otherwise>
|
3710
3770
|
<xsl:apply-templates/>
|
@@ -3914,7 +3974,7 @@
|
|
3914
3974
|
</xsl:if> -->
|
3915
3975
|
</fo:inline>
|
3916
3976
|
</xsl:if>
|
3917
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3977
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3918
3978
|
<fo:block-container id="{@id}">
|
3919
3979
|
|
3920
3980
|
<fo:block>
|
@@ -4164,6 +4224,12 @@
|
|
4164
4224
|
<!-- <xsl:text> </xsl:text> -->
|
4165
4225
|
</xsl:template><xsl:template name="getSection">
|
4166
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
|
+
|
4167
4233
|
</xsl:template><xsl:template name="getName">
|
4168
4234
|
<xsl:choose>
|
4169
4235
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -4216,6 +4282,12 @@
|
|
4216
4282
|
<xsl:copy>
|
4217
4283
|
<xsl:apply-templates mode="contents_item"/>
|
4218
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="."/>
|
4219
4291
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4220
4292
|
<xsl:text> </xsl:text>
|
4221
4293
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -4241,6 +4313,7 @@
|
|
4241
4313
|
|
4242
4314
|
|
4243
4315
|
|
4316
|
+
|
4244
4317
|
|
4245
4318
|
|
4246
4319
|
|
@@ -4628,11 +4701,13 @@
|
|
4628
4701
|
</xsl:if>
|
4629
4702
|
</xsl:if>
|
4630
4703
|
|
4704
|
+
|
4631
4705
|
<fo:block-container margin-left="0mm">
|
4632
4706
|
|
4633
4707
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4634
4708
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4635
|
-
|
4709
|
+
|
4710
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4636
4711
|
</fo:block>
|
4637
4712
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4638
4713
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4784,6 +4859,7 @@
|
|
4784
4859
|
|
4785
4860
|
|
4786
4861
|
|
4862
|
+
|
4787
4863
|
|
4788
4864
|
|
4789
4865
|
|
@@ -4800,7 +4876,7 @@
|
|
4800
4876
|
|
4801
4877
|
|
4802
4878
|
|
4803
|
-
</xsl:template><xsl:template match="
|
4879
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4804
4880
|
<fo:block break-after="page"/>
|
4805
4881
|
<fo:block>
|
4806
4882
|
<xsl:call-template name="setId"/>
|
@@ -4808,7 +4884,8 @@
|
|
4808
4884
|
</fo:block>
|
4809
4885
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4810
4886
|
<fo:block>
|
4811
|
-
<xsl:call-template name="setId"/>
|
4887
|
+
<xsl:call-template name="setId"/>
|
4888
|
+
|
4812
4889
|
|
4813
4890
|
<xsl:apply-templates/>
|
4814
4891
|
</fo:block>
|
@@ -5096,6 +5173,8 @@
|
|
5096
5173
|
<xsl:value-of select="translate(.,'. ','')"/>
|
5097
5174
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
5098
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>
|
5099
5178
|
</xsl:template><xsl:template name="convertDate">
|
5100
5179
|
<xsl:param name="date"/>
|
5101
5180
|
<xsl:param name="format" select="'short'"/>
|
@@ -5120,6 +5199,57 @@
|
|
5120
5199
|
</xsl:variable>
|
5121
5200
|
<xsl:variable name="result">
|
5122
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>
|
5123
5253
|
<xsl:when test="$format = 'short' or $day = ''">
|
5124
5254
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5125
5255
|
</xsl:when>
|
@@ -5135,7 +5265,7 @@
|
|
5135
5265
|
<xsl:param name="charDelim" select="', '"/>
|
5136
5266
|
<xsl:choose>
|
5137
5267
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
5138
|
-
<xsl:for-each select="
|
5268
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5139
5269
|
<xsl:sort data-type="text" order="ascending"/>
|
5140
5270
|
<xsl:call-template name="insertKeyword">
|
5141
5271
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -5144,7 +5274,7 @@
|
|
5144
5274
|
</xsl:for-each>
|
5145
5275
|
</xsl:when>
|
5146
5276
|
<xsl:otherwise>
|
5147
|
-
<xsl:for-each select="
|
5277
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5148
5278
|
<xsl:call-template name="insertKeyword">
|
5149
5279
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
5150
5280
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -5161,6 +5291,9 @@
|
|
5161
5291
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
5162
5292
|
</xsl:choose>
|
5163
5293
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
5294
|
+
<xsl:variable name="lang">
|
5295
|
+
<xsl:call-template name="getLang"/>
|
5296
|
+
</xsl:variable>
|
5164
5297
|
<fo:declarations>
|
5165
5298
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
5166
5299
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -5173,13 +5306,16 @@
|
|
5173
5306
|
<!-- Dublin Core properties go here -->
|
5174
5307
|
<dc:title>
|
5175
5308
|
<xsl:variable name="title">
|
5176
|
-
|
5177
|
-
|
5178
|
-
|
5179
|
-
|
5180
|
-
|
5181
|
-
|
5182
|
-
|
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>
|
5183
5319
|
</xsl:variable>
|
5184
5320
|
<xsl:choose>
|
5185
5321
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -5191,17 +5327,21 @@
|
|
5191
5327
|
</xsl:choose>
|
5192
5328
|
</dc:title>
|
5193
5329
|
<dc:creator>
|
5194
|
-
|
5195
|
-
|
5196
|
-
|
5197
|
-
|
5198
|
-
|
5199
|
-
|
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>
|
5200
5336
|
|
5201
5337
|
|
5202
5338
|
|
5339
|
+
</xsl:for-each>
|
5340
|
+
</dc:creator>
|
5341
|
+
<dc:description>
|
5342
|
+
<xsl:variable name="abstract">
|
5203
5343
|
|
5204
|
-
<xsl:copy-of select="
|
5344
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
5205
5345
|
|
5206
5346
|
|
5207
5347
|
</xsl:variable>
|
@@ -5314,6 +5454,7 @@
|
|
5314
5454
|
|
5315
5455
|
|
5316
5456
|
|
5457
|
+
|
5317
5458
|
</xsl:variable>
|
5318
5459
|
<xsl:if test="$documentNS != $XSLNS">
|
5319
5460
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5373,6 +5514,11 @@
|
|
5373
5514
|
<xsl:call-template name="getLang"/>
|
5374
5515
|
</xsl:variable>
|
5375
5516
|
|
5376
|
-
<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>
|
5377
5523
|
|
5378
5524
|
</xsl:template></xsl:stylesheet>
|