metanorma-m3d 1.3.20 → 1.3.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/m3d/biblio.rng +13 -3
- data/lib/asciidoctor/m3d/converter.rb +7 -0
- data/lib/asciidoctor/m3d/isodoc.rng +17 -1
- data/lib/isodoc/m3d/m3d.report.xsl +2883 -0
- data/lib/isodoc/m3d/pdf_convert.rb +31 -0
- data/lib/metanorma-m3d.rb +1 -0
- data/lib/metanorma/m3d/processor.rb +5 -1
- data/lib/metanorma/m3d/version.rb +1 -1
- data/metanorma-m3d.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e673cd6afe74ba0707d278d5d0a33b501502f1c5bfbaa74e248c548d429763d
|
4
|
+
data.tar.gz: eaf30d30f370dcaeb767bb981c30423f2e24c874add55e2e6cb8f1566958afa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 816eba11da7455e7531ab03b97e73606f51160364ad2c6c4be77e7e1af59e403bb9785420279d860d45903940301168634741b062d2f84b477bac5b17bddd838
|
7
|
+
data.tar.gz: 282990ad453c07bdd88bc22fd26f9adfb6f72138cbbed0726352b9cf088746b3158e0b2d755b45a514e593b3dd729f8a66f5486efc1354c424322a03a69e1ebd
|
@@ -661,9 +661,9 @@
|
|
661
661
|
<optional>
|
662
662
|
<ref name="status"/>
|
663
663
|
</optional>
|
664
|
-
<
|
664
|
+
<zeroOrMore>
|
665
665
|
<ref name="copyright"/>
|
666
|
-
</
|
666
|
+
</zeroOrMore>
|
667
667
|
<zeroOrMore>
|
668
668
|
<ref name="docrelation"/>
|
669
669
|
</zeroOrMore>
|
@@ -1021,7 +1021,17 @@
|
|
1021
1021
|
<optional>
|
1022
1022
|
<ref name="to"/>
|
1023
1023
|
</optional>
|
1024
|
-
<
|
1024
|
+
<oneOrMore>
|
1025
|
+
<ref name="owner"/>
|
1026
|
+
</oneOrMore>
|
1027
|
+
<optional>
|
1028
|
+
<ref name="copyright_scope"/>
|
1029
|
+
</optional>
|
1030
|
+
</element>
|
1031
|
+
</define>
|
1032
|
+
<define name="copyright_scope">
|
1033
|
+
<element name="scope">
|
1034
|
+
<text/>
|
1025
1035
|
</element>
|
1026
1036
|
</define>
|
1027
1037
|
<define name="from">
|
@@ -2,6 +2,7 @@ require "asciidoctor"
|
|
2
2
|
require "metanorma/m3d/version"
|
3
3
|
require "isodoc/m3d/html_convert"
|
4
4
|
require "isodoc/m3d/word_convert"
|
5
|
+
require "isodoc/m3d/pdf_convert"
|
5
6
|
require "asciidoctor/standoc/converter"
|
6
7
|
require "fileutils"
|
7
8
|
require_relative "./validate.rb"
|
@@ -105,6 +106,7 @@ module Asciidoctor
|
|
105
106
|
File.open(filename, "w") { |f| f.write(ret) }
|
106
107
|
html_converter(node).convert filename unless node.attr("nodoc")
|
107
108
|
word_converter(node).convert filename unless node.attr("nodoc")
|
109
|
+
pdf_converter(node)&.convert filename unless node.attr("nodoc")
|
108
110
|
end
|
109
111
|
@log.write(@localdir + @filename + ".err") unless @novalid
|
110
112
|
@files_to_delete.each { |f| FileUtils.rm f }
|
@@ -135,6 +137,11 @@ module Asciidoctor
|
|
135
137
|
def word_converter(node)
|
136
138
|
IsoDoc::M3d::WordConvert.new(doc_extract_attributes(node))
|
137
139
|
end
|
140
|
+
|
141
|
+
def pdf_converter(node)
|
142
|
+
return nil if node.attr("no-pdf")
|
143
|
+
IsoDoc::M3d::PdfConvert.new(doc_extract_attributes(node))
|
144
|
+
end
|
138
145
|
end
|
139
146
|
end
|
140
147
|
end
|
@@ -53,6 +53,14 @@
|
|
53
53
|
<optional>
|
54
54
|
<attribute name="alt"/>
|
55
55
|
</optional>
|
56
|
+
<optional>
|
57
|
+
<attribute name="case">
|
58
|
+
<choice>
|
59
|
+
<value>capital</value>
|
60
|
+
<value>lowercase</value>
|
61
|
+
</choice>
|
62
|
+
</attribute>
|
63
|
+
</optional>
|
56
64
|
<text/>
|
57
65
|
</element>
|
58
66
|
</define>
|
@@ -902,7 +910,15 @@
|
|
902
910
|
<attribute name="id">
|
903
911
|
<data type="ID"/>
|
904
912
|
</attribute>
|
905
|
-
<
|
913
|
+
<oneOrMore>
|
914
|
+
<choice>
|
915
|
+
<ref name="paragraph"/>
|
916
|
+
<ref name="ul"/>
|
917
|
+
<ref name="ol"/>
|
918
|
+
<ref name="dl"/>
|
919
|
+
<ref name="formula"/>
|
920
|
+
</choice>
|
921
|
+
</oneOrMore>
|
906
922
|
</element>
|
907
923
|
</define>
|
908
924
|
<define name="termexample">
|
@@ -0,0 +1,2883 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:m3d="https://www.metanorma.org/ns/m3d" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" version="1.0">
|
2
|
+
|
3
|
+
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
|
+
|
5
|
+
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:variable name="images" select="document($svg_images)"/>
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
<xsl:key name="kfn" match="m3d:p/m3d:fn" use="@reference"/>
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
<xsl:variable name="debug">true</xsl:variable>
|
15
|
+
<xsl:variable name="pageWidth" select="'215.9mm'"/>
|
16
|
+
<xsl:variable name="pageHeight" select="'279.4mm'"/>
|
17
|
+
|
18
|
+
<xsl:variable name="title-en" select="/m3d:m3d-standard/m3d:bibdata/m3d:title[@language = 'en']"/>
|
19
|
+
<!-- Example:
|
20
|
+
<item level="1" id="Foreword" display="true">Foreword</item>
|
21
|
+
<item id="term-script" display="false">3.2</item>
|
22
|
+
-->
|
23
|
+
<xsl:variable name="contents">
|
24
|
+
<contents>
|
25
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()" mode="contents"/>
|
26
|
+
|
27
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
|
28
|
+
<xsl:with-param name="sectionNum" select="'1'"/>
|
29
|
+
</xsl:apply-templates>
|
30
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
|
31
|
+
<xsl:with-param name="sectionNum" select="'2'"/>
|
32
|
+
</xsl:apply-templates>
|
33
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() > 1]" mode="contents"> <!-- @id != '_scope' -->
|
34
|
+
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
35
|
+
</xsl:apply-templates>
|
36
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:annex" mode="contents"/>
|
37
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
38
|
+
|
39
|
+
<xsl:apply-templates select="//m3d:figure" mode="contents"/>
|
40
|
+
|
41
|
+
<xsl:apply-templates select="//m3d:table" mode="contents"/>
|
42
|
+
</contents>
|
43
|
+
</xsl:variable>
|
44
|
+
|
45
|
+
<xsl:variable name="lang">
|
46
|
+
<xsl:call-template name="getLang"/>
|
47
|
+
</xsl:variable>
|
48
|
+
|
49
|
+
<xsl:template match="/">
|
50
|
+
<xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
|
51
|
+
<fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
|
52
|
+
<fo:layout-master-set>
|
53
|
+
|
54
|
+
<!-- cover page -->
|
55
|
+
<fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
56
|
+
<fo:region-body margin-top="31mm" margin-bottom="32mm" margin-left="17.3mm" margin-right="22mm"/>
|
57
|
+
<fo:region-before region-name="cover-header" extent="31mm"/>
|
58
|
+
<fo:region-after region-name="cover-footer" extent="32mm"/>
|
59
|
+
<fo:region-start region-name="cover-left-region" extent="17.3mm"/>
|
60
|
+
<fo:region-end region-name="cover-right-region" extent="22mm"/>
|
61
|
+
</fo:simple-page-master>
|
62
|
+
|
63
|
+
<!-- contents pages -->
|
64
|
+
<fo:simple-page-master master-name="page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
65
|
+
<fo:region-body margin-top="20mm" margin-bottom="23mm" margin-left="17.3mm" margin-right="17.3mm"/>
|
66
|
+
<fo:region-before region-name="header" extent="35mm"/>
|
67
|
+
<fo:region-after region-name="footer" extent="23mm"/>
|
68
|
+
<fo:region-start region-name="left-region" extent="17.3mm"/>
|
69
|
+
<fo:region-end region-name="right-region" extent="17.3mm"/>
|
70
|
+
</fo:simple-page-master>
|
71
|
+
|
72
|
+
<fo:simple-page-master master-name="last" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
73
|
+
<fo:region-body margin-top="20mm" margin-bottom="53mm" margin-left="17.3mm" margin-right="17.3mm"/>
|
74
|
+
<fo:region-before region-name="header" extent="35mm"/>
|
75
|
+
<fo:region-after region-name="footer-last" extent="53mm"/>
|
76
|
+
<fo:region-start region-name="left-region" extent="17.3mm"/>
|
77
|
+
<fo:region-end region-name="right-region" extent="17.3mm"/>
|
78
|
+
</fo:simple-page-master>
|
79
|
+
|
80
|
+
<fo:page-sequence-master master-name="document">
|
81
|
+
<fo:repeatable-page-master-alternatives>
|
82
|
+
<fo:conditional-page-master-reference page-position="first" master-reference="cover"/>
|
83
|
+
<fo:conditional-page-master-reference page-position="last" master-reference="last"/>
|
84
|
+
<fo:conditional-page-master-reference page-position="any" master-reference="page"/>
|
85
|
+
</fo:repeatable-page-master-alternatives>
|
86
|
+
</fo:page-sequence-master>
|
87
|
+
|
88
|
+
|
89
|
+
</fo:layout-master-set>
|
90
|
+
|
91
|
+
<fo:declarations>
|
92
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
93
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
94
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
95
|
+
</pdf:dictionary>
|
96
|
+
</pdf:catalog>
|
97
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
98
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
99
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
100
|
+
<!-- Dublin Core properties go here -->
|
101
|
+
<dc:title><xsl:value-of select="/m3d:m3d-standard/m3d:bibdata/m3d:title"/> </dc:title>
|
102
|
+
<dc:creator><xsl:value-of select="/m3d:m3d-standard/m3d:bibdata/m3d:contributor[m3d:role/@type='author']/m3d:organization/m3d:name"/></dc:creator>
|
103
|
+
<dc:description>
|
104
|
+
<xsl:variable name="abstract">
|
105
|
+
<xsl:text> </xsl:text>
|
106
|
+
</xsl:variable>
|
107
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
108
|
+
</dc:description>
|
109
|
+
<pdf:Keywords>
|
110
|
+
<xsl:call-template name="insertKeywords"/>
|
111
|
+
</pdf:Keywords>
|
112
|
+
</rdf:Description>
|
113
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
114
|
+
<!-- XMP properties go here -->
|
115
|
+
<xmp:CreatorTool/>
|
116
|
+
</rdf:Description>
|
117
|
+
</rdf:RDF>
|
118
|
+
</x:xmpmeta>
|
119
|
+
</fo:declarations>
|
120
|
+
|
121
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
122
|
+
|
123
|
+
<fo:static-content flow-name="cover-header">
|
124
|
+
<fo:block-container height="18mm" border-bottom="0.5pt solid red">
|
125
|
+
<fo:block-container height="100%" display-align="after">
|
126
|
+
<fo:block margin-bottom="-1mm">
|
127
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-M3AAWG-Logo))}" width="85.4mm" content-height="11mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image M3AAWG Logo"/>
|
128
|
+
</fo:block>
|
129
|
+
</fo:block-container>
|
130
|
+
</fo:block-container>
|
131
|
+
</fo:static-content>
|
132
|
+
<fo:static-content flow-name="cover-footer">
|
133
|
+
<fo:block-container height="31mm" border-top="0.5pt solid red" font-family="Arial" text-align="center">
|
134
|
+
<fo:block font-size="12pt" font-weight="bold" color="rgb(51, 169, 207)" margin-top="2mm">
|
135
|
+
<fo:inline>M<fo:inline font-size="8pt" vertical-align="super">3</fo:inline>AAWG</fo:inline>
|
136
|
+
</fo:block>
|
137
|
+
<fo:block font-size="9pt">
|
138
|
+
<xsl:value-of select="/m3d:m3d-standard/m3d:bibdata/m3d:contributor[m3d:role/@type='author']/m3d:organization/m3d:name"/>
|
139
|
+
<xsl:value-of select="$linebreak"/>
|
140
|
+
<fo:inline>781 Beach Street, Suite 302</fo:inline>
|
141
|
+
<fo:inline font-size="11pt" color="rgb(51, 169, 207)" baseline-shift="5%" padding-left="1mm" padding-right="1mm">■</fo:inline>
|
142
|
+
<fo:inline>San Francisco, California 94109 U.S.A.</fo:inline>
|
143
|
+
<fo:inline font-size="11pt" color="rgb(51, 169, 207)" baseline-shift="5%" padding-left="1mm" padding-right="1mm">■</fo:inline>
|
144
|
+
<fo:inline color="blue" text-decoration="underline">www.m3aawg.org</fo:inline>
|
145
|
+
</fo:block>
|
146
|
+
</fo:block-container>
|
147
|
+
</fo:static-content>
|
148
|
+
<fo:static-content flow-name="footer">
|
149
|
+
<fo:block-container height="31mm" font-size="10pt">
|
150
|
+
<fo:block text-align-last="justify" margin-top="2mm">
|
151
|
+
<fo:inline font-weight="bold">
|
152
|
+
<fo:inline>M<fo:inline font-size="6.5pt" vertical-align="super">3</fo:inline>AAWG </fo:inline>
|
153
|
+
<xsl:value-of select="$title-en"/>
|
154
|
+
</fo:inline>
|
155
|
+
<fo:leader font-weight="normal" leader-pattern="space"/>
|
156
|
+
<fo:inline font-size="9pt"><fo:page-number/></fo:inline>
|
157
|
+
</fo:block>
|
158
|
+
</fo:block-container>
|
159
|
+
</fo:static-content>
|
160
|
+
|
161
|
+
<fo:static-content flow-name="footer-last">
|
162
|
+
<fo:block-container height="53mm" border-top="0.5pt solid rgb(103, 141, 207)" display-align="after">
|
163
|
+
<fo:block-container padding-bottom="16mm">
|
164
|
+
<fo:block text-align="justify">
|
165
|
+
<fo:inline>As with all M3AAWG documents that we publish, please check the M3AAWG website (<fo:inline color="blue" text-decoration="underline">www.m3aawg.org</fo:inline>) for updates to this paper.</fo:inline>
|
166
|
+
</fo:block>
|
167
|
+
<fo:block> </fo:block>
|
168
|
+
<fo:block> </fo:block>
|
169
|
+
<fo:block>
|
170
|
+
<xsl:text>© </xsl:text>
|
171
|
+
<xsl:value-of select="/m3d:m3d-standard/m3d:bibdata/m3d:copyright/m3d:from"/>
|
172
|
+
<xsl:text> copyright by the </xsl:text>
|
173
|
+
<xsl:value-of select="/m3d:m3d-standard/m3d:bibdata/m3d:copyright/m3d:owner/m3d:organization/m3d:name"/>
|
174
|
+
<xsl:text> (</xsl:text>
|
175
|
+
<xsl:value-of select="/m3d:m3d-standard/m3d:bibdata/m3d:copyright/m3d:owner/m3d:organization/m3d:abbreviation"/>
|
176
|
+
<xsl:text>)</xsl:text>
|
177
|
+
</fo:block>
|
178
|
+
<fo:block font-size="10pt">
|
179
|
+
<fo:block text-align-last="justify" margin-top="2mm">
|
180
|
+
<fo:inline font-weight="bold">
|
181
|
+
<fo:inline>M<fo:inline font-size="6.5pt" vertical-align="super">3</fo:inline>AAWG </fo:inline>
|
182
|
+
<xsl:value-of select="$title-en"/>
|
183
|
+
</fo:inline>
|
184
|
+
<fo:leader font-weight="normal" leader-pattern="space"/>
|
185
|
+
<fo:inline font-size="9pt"><fo:page-number/></fo:inline>
|
186
|
+
</fo:block>
|
187
|
+
</fo:block>
|
188
|
+
</fo:block-container>
|
189
|
+
</fo:block-container>
|
190
|
+
</fo:static-content>
|
191
|
+
|
192
|
+
<fo:flow flow-name="xsl-region-body">
|
193
|
+
<fo:block-container font-weight="bold" text-align="center">
|
194
|
+
<!-- Messaging, Malware and Mobile Anti-Abuse Working Group -->
|
195
|
+
<fo:block font-size="16pt">
|
196
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:boilerplate/m3d:feedback-statement/m3d:p[@id = 'boilerplate-name']/node()"/>
|
197
|
+
</fo:block>
|
198
|
+
<!-- M 3 AAWG Companion Document:
|
199
|
+
Recipes for Encrypting
|
200
|
+
DNS Stub Resolver-to-Recursive Resolver Traffic -->
|
201
|
+
<fo:block font-size="22pt" margin-top="16pt">
|
202
|
+
<fo:inline border-bottom="1pt solid black">
|
203
|
+
<fo:inline>M</fo:inline><fo:inline font-size="13pt" vertical-align="super">3</fo:inline><fo:inline>AAWG Companion Document: </fo:inline>
|
204
|
+
</fo:inline>
|
205
|
+
</fo:block>
|
206
|
+
|
207
|
+
<fo:block font-size="22pt" margin-bottom="12pt">
|
208
|
+
<xsl:value-of select="$title-en"/>
|
209
|
+
</fo:block>
|
210
|
+
<!-- Version 1.0 -->
|
211
|
+
<fo:block font-size="12pt" margin-bottom="6pt">
|
212
|
+
<xsl:text>Version: </xsl:text>
|
213
|
+
<xsl:variable name="edition" select="/m3d:m3d-standard/m3d:bibdata/m3d:edition"/>
|
214
|
+
<xsl:choose>
|
215
|
+
<xsl:when test="contains($edition, '.')">
|
216
|
+
<xsl:value-of select="$edition"/>
|
217
|
+
</xsl:when>
|
218
|
+
<xsl:otherwise>
|
219
|
+
<xsl:value-of select="$edition"/><xsl:text>.0</xsl:text>
|
220
|
+
</xsl:otherwise>
|
221
|
+
</xsl:choose>
|
222
|
+
</fo:block>
|
223
|
+
<fo:block font-size="12pt" margin-bottom="12pt">
|
224
|
+
<xsl:call-template name="convertDate">
|
225
|
+
<xsl:with-param name="date" select="/m3d:m3d-standard/m3d:bibdata/m3d:version/m3d:revision-date"/>
|
226
|
+
</xsl:call-template>
|
227
|
+
</fo:block>
|
228
|
+
</fo:block-container>
|
229
|
+
|
230
|
+
<fo:block-container font-size="12pt">
|
231
|
+
<fo:block text-align="center" font-weight="normal" margin-bottom="10pt">
|
232
|
+
<xsl:text>The direct URL to this paper is: </xsl:text><fo:inline color="blue" text-decoration="underline">www.m3aawg.org/dns-crypto-recipes</fo:inline>
|
233
|
+
</fo:block>
|
234
|
+
<fo:block margin-bottom="10pt">This document is intended to accompany and complement the companion document, “M<fo:inline font-size="7pt" vertical-align="super">3</fo:inline> AAWG Tutorial on Third Party Recursive Resolvers and Encrypting DNS Stub Resolver-to-Recursive Resolver Traffic”
|
235
|
+
(<fo:inline color="blue" text-decoration="underline">www.m3aawg.org/dns-crypto-tutorial</fo:inline>).
|
236
|
+
</fo:block>
|
237
|
+
<fo:block margin-bottom="12pt">This document was produced by the M<fo:inline font-size="7pt" vertical-align="super">3</fo:inline> AAWG Data and Identity Protection Committee. </fo:block>
|
238
|
+
</fo:block-container>
|
239
|
+
|
240
|
+
<xsl:if test="$debug = 'true'">
|
241
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
242
|
+
DEBUG
|
243
|
+
contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
|
244
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
245
|
+
</xsl:if>
|
246
|
+
|
247
|
+
<!-- Table of content -->
|
248
|
+
<fo:block-container>
|
249
|
+
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt">Table of Contents</fo:block>
|
250
|
+
<fo:table table-layout="fixed" width="100%" font-size="10pt">
|
251
|
+
<fo:table-column column-width="25mm"/>
|
252
|
+
<fo:table-column column-width="155mm"/>
|
253
|
+
<fo:table-body>
|
254
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'][not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
|
255
|
+
<fo:table-row height="6mm">
|
256
|
+
<fo:table-cell>
|
257
|
+
<fo:block font-weight="bold">
|
258
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
259
|
+
<xsl:choose>
|
260
|
+
<xsl:when test="@section = '0'">
|
261
|
+
<xsl:value-of select="text()"/>
|
262
|
+
</xsl:when>
|
263
|
+
<xsl:when test="@type = 'references' and @section = ''">
|
264
|
+
<xsl:value-of select="text()"/>
|
265
|
+
</xsl:when>
|
266
|
+
<xsl:when test="@level = 1">
|
267
|
+
<xsl:value-of select="@section"/>
|
268
|
+
</xsl:when>
|
269
|
+
<xsl:otherwise/>
|
270
|
+
</xsl:choose>
|
271
|
+
</fo:basic-link>
|
272
|
+
</fo:block>
|
273
|
+
</fo:table-cell>
|
274
|
+
<fo:table-cell>
|
275
|
+
<fo:block text-align-last="justify">
|
276
|
+
<xsl:if test="@level = 1">
|
277
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
278
|
+
</xsl:if>
|
279
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
280
|
+
<xsl:choose>
|
281
|
+
<xsl:when test="@section = '0'"/>
|
282
|
+
<xsl:when test="@type = 'references' and @section = ''"/>
|
283
|
+
<xsl:otherwise>
|
284
|
+
<xsl:value-of select="text()"/>
|
285
|
+
</xsl:otherwise>
|
286
|
+
</xsl:choose>
|
287
|
+
<fo:inline keep-together.within-line="always">
|
288
|
+
<fo:leader font-weight="normal" leader-pattern="dots"/>
|
289
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
290
|
+
</fo:inline>
|
291
|
+
</fo:basic-link>
|
292
|
+
</fo:block>
|
293
|
+
</fo:table-cell>
|
294
|
+
</fo:table-row>
|
295
|
+
</xsl:for-each>
|
296
|
+
</fo:table-body>
|
297
|
+
</fo:table>
|
298
|
+
</fo:block-container>
|
299
|
+
|
300
|
+
<fo:block break-after="page"/>
|
301
|
+
|
302
|
+
<fo:block>
|
303
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:boilerplate"/>
|
304
|
+
</fo:block>
|
305
|
+
|
306
|
+
<!-- Foreword, Introduction -->
|
307
|
+
<fo:block>
|
308
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()"/>
|
309
|
+
</fo:block>
|
310
|
+
|
311
|
+
<fo:block break-after="page"/>
|
312
|
+
|
313
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]"> <!-- Scope -->
|
314
|
+
<xsl:with-param name="sectionNum" select="'1'"/>
|
315
|
+
</xsl:apply-templates>
|
316
|
+
|
317
|
+
<!-- Normative references -->
|
318
|
+
<xsl:if test="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
|
319
|
+
<fo:block break-after="page"/>
|
320
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
|
321
|
+
<xsl:with-param name="sectionNum" select="'2'"/>
|
322
|
+
</xsl:apply-templates>
|
323
|
+
</xsl:if>
|
324
|
+
|
325
|
+
<!-- Main sections -->
|
326
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() > 1]">
|
327
|
+
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
328
|
+
</xsl:apply-templates>
|
329
|
+
|
330
|
+
<!-- Annex(s) -->
|
331
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:annex"/>
|
332
|
+
|
333
|
+
<!-- Bibliography -->
|
334
|
+
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() > 1]"/>
|
335
|
+
|
336
|
+
</fo:flow>
|
337
|
+
</fo:page-sequence>
|
338
|
+
|
339
|
+
</fo:root>
|
340
|
+
</xsl:template>
|
341
|
+
|
342
|
+
|
343
|
+
<xsl:template match="m3d:boilerplate//m3d:p">
|
344
|
+
<fo:block font-size="11pt" margin-bottom="12pt">
|
345
|
+
<xsl:apply-templates/>
|
346
|
+
</fo:block>
|
347
|
+
</xsl:template>
|
348
|
+
|
349
|
+
<!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
|
350
|
+
<xsl:template match="node()">
|
351
|
+
<xsl:param name="sectionNum"/>
|
352
|
+
<xsl:param name="sectionNumSkew"/>
|
353
|
+
<xsl:apply-templates>
|
354
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
355
|
+
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
356
|
+
</xsl:apply-templates>
|
357
|
+
</xsl:template>
|
358
|
+
|
359
|
+
<!-- ============================= -->
|
360
|
+
<!-- CONTENTS -->
|
361
|
+
<!-- ============================= -->
|
362
|
+
<xsl:template match="node()" mode="contents">
|
363
|
+
<xsl:param name="sectionNum"/>
|
364
|
+
<xsl:param name="sectionNumSkew"/>
|
365
|
+
<xsl:apply-templates mode="contents">
|
366
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
367
|
+
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
368
|
+
</xsl:apply-templates>
|
369
|
+
</xsl:template>
|
370
|
+
|
371
|
+
|
372
|
+
<!-- calculate main section number (1,2,3) and pass it deep into templates -->
|
373
|
+
<!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
|
374
|
+
<xsl:template match="m3d:m3d-standard/m3d:sections/*" mode="contents">
|
375
|
+
<xsl:param name="sectionNum"/>
|
376
|
+
<xsl:param name="sectionNumSkew" select="0"/>
|
377
|
+
<xsl:variable name="sectionNum_">
|
378
|
+
<xsl:choose>
|
379
|
+
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
380
|
+
<xsl:when test="$sectionNumSkew != 0">
|
381
|
+
<xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- m3d:sections/m3d:clause | m3d:sections/m3d:terms -->
|
382
|
+
<xsl:value-of select="$number + $sectionNumSkew"/>
|
383
|
+
</xsl:when>
|
384
|
+
<xsl:otherwise>
|
385
|
+
<xsl:number count="*"/>
|
386
|
+
</xsl:otherwise>
|
387
|
+
</xsl:choose>
|
388
|
+
</xsl:variable>
|
389
|
+
<xsl:apply-templates mode="contents">
|
390
|
+
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
391
|
+
</xsl:apply-templates>
|
392
|
+
</xsl:template>
|
393
|
+
|
394
|
+
<!-- Any node with title element - clause, definition, annex,... -->
|
395
|
+
<xsl:template match="m3d:title | m3d:preferred" mode="contents">
|
396
|
+
<xsl:param name="sectionNum"/>
|
397
|
+
<!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
|
398
|
+
<xsl:variable name="id">
|
399
|
+
<xsl:call-template name="getId"/>
|
400
|
+
</xsl:variable>
|
401
|
+
|
402
|
+
<xsl:variable name="level">
|
403
|
+
<xsl:call-template name="getLevel"/>
|
404
|
+
</xsl:variable>
|
405
|
+
|
406
|
+
<xsl:variable name="section">
|
407
|
+
<xsl:call-template name="getSection">
|
408
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
409
|
+
</xsl:call-template>
|
410
|
+
</xsl:variable>
|
411
|
+
|
412
|
+
<xsl:variable name="display">
|
413
|
+
<xsl:choose>
|
414
|
+
<xsl:when test="ancestor::m3d:bibitem">false</xsl:when>
|
415
|
+
<xsl:when test="ancestor::m3d:term">false</xsl:when>
|
416
|
+
<xsl:when test="ancestor::m3d:annex and $level >= 3">false</xsl:when>
|
417
|
+
<xsl:when test="$level <= 3">true</xsl:when>
|
418
|
+
<xsl:otherwise>false</xsl:otherwise>
|
419
|
+
</xsl:choose>
|
420
|
+
</xsl:variable>
|
421
|
+
|
422
|
+
<xsl:variable name="display-section">true</xsl:variable>
|
423
|
+
|
424
|
+
<xsl:variable name="type">
|
425
|
+
<xsl:value-of select="local-name(..)"/>
|
426
|
+
</xsl:variable>
|
427
|
+
|
428
|
+
<xsl:variable name="root">
|
429
|
+
<xsl:choose>
|
430
|
+
<xsl:when test="ancestor::m3d:annex">annex</xsl:when>
|
431
|
+
</xsl:choose>
|
432
|
+
</xsl:variable>
|
433
|
+
|
434
|
+
<item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
|
435
|
+
<xsl:attribute name="addon">
|
436
|
+
<xsl:if test="local-name(..) = 'annex'">
|
437
|
+
|
438
|
+
<xsl:variable name="obligation" select="../@obligation"/>
|
439
|
+
<xsl:value-of select="$obligation"/>
|
440
|
+
|
441
|
+
</xsl:if>
|
442
|
+
</xsl:attribute>
|
443
|
+
<xsl:value-of select="."/>
|
444
|
+
</item>
|
445
|
+
|
446
|
+
<xsl:apply-templates mode="contents">
|
447
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
448
|
+
</xsl:apply-templates>
|
449
|
+
|
450
|
+
</xsl:template>
|
451
|
+
|
452
|
+
|
453
|
+
<xsl:template match="m3d:figure" mode="contents">
|
454
|
+
<item level="" id="{@id}" display="false">
|
455
|
+
<xsl:attribute name="section">
|
456
|
+
<xsl:call-template name="getFigureNumber"/>
|
457
|
+
</xsl:attribute>
|
458
|
+
</item>
|
459
|
+
</xsl:template>
|
460
|
+
|
461
|
+
<xsl:template match="m3d:table" mode="contents">
|
462
|
+
<xsl:param name="sectionNum"/>
|
463
|
+
<xsl:variable name="annex-id" select="ancestor::m3d:annex/@id"/>
|
464
|
+
<item level="" id="{@id}" display="false" type="table">
|
465
|
+
<xsl:attribute name="section">
|
466
|
+
<xsl:value-of select="$title-table"/>
|
467
|
+
<xsl:choose>
|
468
|
+
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
469
|
+
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
|
470
|
+
</xsl:when>
|
471
|
+
<xsl:when test="ancestor::*[local-name()='annex']">
|
472
|
+
<xsl:number format="A-" count="m3d:annex"/>
|
473
|
+
<xsl:number format="1" level="any" count="m3d:table[ancestor::m3d:annex[@id = $annex-id]]"/>
|
474
|
+
</xsl:when>
|
475
|
+
<xsl:otherwise>
|
476
|
+
<!-- <xsl:number format="1"/> -->
|
477
|
+
<xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/>
|
478
|
+
</xsl:otherwise>
|
479
|
+
</xsl:choose>
|
480
|
+
</xsl:attribute>
|
481
|
+
<xsl:value-of select="m3d:name/text()"/>
|
482
|
+
</item>
|
483
|
+
</xsl:template>
|
484
|
+
|
485
|
+
<xsl:template match="m3d:formula" mode="contents">
|
486
|
+
<item level="" id="{@id}" display="false">
|
487
|
+
<xsl:attribute name="section">
|
488
|
+
<xsl:text>Formula (</xsl:text><xsl:number format="A.1" level="multiple" count="m3d:annex | m3d:formula"/><xsl:text>)</xsl:text>
|
489
|
+
</xsl:attribute>
|
490
|
+
</item>
|
491
|
+
</xsl:template>
|
492
|
+
|
493
|
+
<xsl:template match="m3d:li" mode="contents">
|
494
|
+
<xsl:param name="sectionNum"/>
|
495
|
+
<item level="" id="{@id}" display="false" type="li">
|
496
|
+
<xsl:attribute name="section">
|
497
|
+
<xsl:call-template name="getListItemFormat"/>
|
498
|
+
</xsl:attribute>
|
499
|
+
<xsl:attribute name="parent_section">
|
500
|
+
<xsl:for-each select="ancestor::*[not(local-name() = 'p' or local-name() = 'ol')][1]">
|
501
|
+
<xsl:call-template name="getSection">
|
502
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
503
|
+
</xsl:call-template>
|
504
|
+
</xsl:for-each>
|
505
|
+
</xsl:attribute>
|
506
|
+
</item>
|
507
|
+
<xsl:apply-templates mode="contents">
|
508
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
509
|
+
</xsl:apply-templates>
|
510
|
+
</xsl:template>
|
511
|
+
|
512
|
+
<xsl:template name="getListItemFormat">
|
513
|
+
<xsl:choose>
|
514
|
+
<xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- — dash -->
|
515
|
+
<xsl:otherwise> <!-- for ordered lists -->
|
516
|
+
<xsl:choose>
|
517
|
+
<xsl:when test="../@type = 'arabic'">
|
518
|
+
<xsl:number format="a)"/>
|
519
|
+
</xsl:when>
|
520
|
+
<xsl:when test="../@type = 'alphabet'">
|
521
|
+
<xsl:number format="1)"/>
|
522
|
+
</xsl:when>
|
523
|
+
<xsl:otherwise>
|
524
|
+
<xsl:number format="1."/>
|
525
|
+
</xsl:otherwise>
|
526
|
+
</xsl:choose>
|
527
|
+
</xsl:otherwise>
|
528
|
+
</xsl:choose>
|
529
|
+
</xsl:template>
|
530
|
+
|
531
|
+
<!-- ============================= -->
|
532
|
+
<!-- ============================= -->
|
533
|
+
|
534
|
+
|
535
|
+
<!-- Foreword, Introduction -->
|
536
|
+
<xsl:template match="m3d:m3d-standard/m3d:preface/*">
|
537
|
+
<fo:block break-after="page"/>
|
538
|
+
<xsl:apply-templates/>
|
539
|
+
</xsl:template>
|
540
|
+
|
541
|
+
|
542
|
+
<!-- clause, terms, clause, ...-->
|
543
|
+
<xsl:template match="m3d:m3d-standard/m3d:sections/*">
|
544
|
+
<xsl:param name="sectionNum"/>
|
545
|
+
<xsl:param name="sectionNumSkew" select="0"/>
|
546
|
+
<fo:block break-after="page"/>
|
547
|
+
<fo:block>
|
548
|
+
<xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
|
549
|
+
<xsl:if test="$pos >= 2">
|
550
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
551
|
+
</xsl:if>
|
552
|
+
<!-- pos=<xsl:value-of select="$pos" /> -->
|
553
|
+
<xsl:variable name="sectionNum_">
|
554
|
+
<xsl:choose>
|
555
|
+
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
556
|
+
<xsl:when test="$sectionNumSkew != 0">
|
557
|
+
<xsl:variable name="number"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
|
558
|
+
<xsl:value-of select="$number + $sectionNumSkew"/>
|
559
|
+
</xsl:when>
|
560
|
+
</xsl:choose>
|
561
|
+
</xsl:variable>
|
562
|
+
<xsl:if test="not(m3d:title)">
|
563
|
+
<fo:block margin-top="3pt" margin-bottom="12pt">
|
564
|
+
<xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="m3d:clause"/>
|
565
|
+
</fo:block>
|
566
|
+
</xsl:if>
|
567
|
+
<xsl:apply-templates>
|
568
|
+
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
569
|
+
</xsl:apply-templates>
|
570
|
+
</fo:block>
|
571
|
+
</xsl:template>
|
572
|
+
|
573
|
+
|
574
|
+
<xsl:template match="m3d:clause//m3d:clause[not(m3d:title)]">
|
575
|
+
<xsl:param name="sectionNum"/>
|
576
|
+
<xsl:variable name="section">
|
577
|
+
<xsl:call-template name="getSection">
|
578
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
579
|
+
</xsl:call-template>
|
580
|
+
</xsl:variable>
|
581
|
+
<fo:block margin-top="6pt" margin-bottom="6pt" keep-with-next="always">
|
582
|
+
<fo:inline>
|
583
|
+
<xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
|
584
|
+
</fo:inline>
|
585
|
+
</fo:block>
|
586
|
+
<xsl:apply-templates>
|
587
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
588
|
+
</xsl:apply-templates>
|
589
|
+
</xsl:template>
|
590
|
+
|
591
|
+
|
592
|
+
<xsl:template match="m3d:title">
|
593
|
+
<xsl:param name="sectionNum"/>
|
594
|
+
|
595
|
+
<xsl:variable name="parent-name" select="local-name(..)"/>
|
596
|
+
<xsl:variable name="references_num_current">
|
597
|
+
<xsl:number level="any" count="m3d:references"/>
|
598
|
+
</xsl:variable>
|
599
|
+
|
600
|
+
<xsl:variable name="id">
|
601
|
+
<xsl:call-template name="getId"/>
|
602
|
+
</xsl:variable>
|
603
|
+
|
604
|
+
<xsl:variable name="level">
|
605
|
+
<xsl:call-template name="getLevel"/>
|
606
|
+
</xsl:variable>
|
607
|
+
|
608
|
+
<xsl:variable name="section">
|
609
|
+
<xsl:call-template name="getSection">
|
610
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
611
|
+
</xsl:call-template>
|
612
|
+
</xsl:variable>
|
613
|
+
|
614
|
+
<xsl:variable name="font-size">
|
615
|
+
<xsl:choose>
|
616
|
+
<xsl:when test="ancestor::m3d:preface">14pt</xsl:when>
|
617
|
+
<xsl:when test="$level = 1">14pt</xsl:when>
|
618
|
+
<!-- <xsl:when test="@level = 2">12pt</xsl:when> -->
|
619
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
620
|
+
</xsl:choose>
|
621
|
+
</xsl:variable>
|
622
|
+
|
623
|
+
<xsl:variable name="element-name">
|
624
|
+
<xsl:choose>
|
625
|
+
<xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
|
626
|
+
<xsl:otherwise>fo:block</xsl:otherwise>
|
627
|
+
</xsl:choose>
|
628
|
+
</xsl:variable>
|
629
|
+
|
630
|
+
<xsl:choose>
|
631
|
+
<xsl:when test="ancestor::m3d:boilerplate">
|
632
|
+
<fo:block id="{$id}" font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
|
633
|
+
<xsl:apply-templates/>
|
634
|
+
</fo:block>
|
635
|
+
</xsl:when>
|
636
|
+
<xsl:when test="$parent-name = 'annex'">
|
637
|
+
<fo:block id="{$id}" font-size="{$font-size}" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
638
|
+
<xsl:value-of select="$section"/>
|
639
|
+
<xsl:if test=" ../@obligation">
|
640
|
+
<xsl:value-of select="$linebreak"/>
|
641
|
+
<fo:inline font-weight="normal">
|
642
|
+
<xsl:text>(</xsl:text>
|
643
|
+
<xsl:variable name="obligation" select="../@obligation"/>
|
644
|
+
<xsl:value-of select="$obligation"/>
|
645
|
+
|
646
|
+
<xsl:text>)</xsl:text>
|
647
|
+
</fo:inline>
|
648
|
+
</xsl:if>
|
649
|
+
<fo:block margin-top="14pt" margin-bottom="24pt"><xsl:apply-templates/></fo:block>
|
650
|
+
</fo:block>
|
651
|
+
</xsl:when>
|
652
|
+
<!-- Bibliography -->
|
653
|
+
<!-- <xsl:when test="$parent-name = 'references' and $references_num_current != 1">
|
654
|
+
<fo:block id="{$id}" text-align="center" margin-top="6pt" margin-bottom="16pt" keep-with-next="always">
|
655
|
+
<xsl:apply-templates />
|
656
|
+
</fo:block>
|
657
|
+
</xsl:when> -->
|
658
|
+
|
659
|
+
<xsl:otherwise>
|
660
|
+
<xsl:element name="{$element-name}">
|
661
|
+
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
|
662
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
663
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
664
|
+
<xsl:attribute name="margin-top">
|
665
|
+
<xsl:choose>
|
666
|
+
<xsl:when test="ancestor::m3d:preface">8pt</xsl:when>
|
667
|
+
<xsl:when test="$level = 2 and ancestor::m3d:annex">10pt</xsl:when>
|
668
|
+
<xsl:when test="$level = 1">0pt</xsl:when>
|
669
|
+
<xsl:when test="$level = ''">6pt</xsl:when>
|
670
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
671
|
+
</xsl:choose>
|
672
|
+
</xsl:attribute>
|
673
|
+
<xsl:attribute name="margin-bottom">
|
674
|
+
<xsl:choose>
|
675
|
+
<xsl:when test="ancestor::m3d:preface">6pt</xsl:when>
|
676
|
+
<xsl:when test="$level = 1">12pt</xsl:when>
|
677
|
+
<xsl:otherwise>8pt</xsl:otherwise>
|
678
|
+
</xsl:choose>
|
679
|
+
</xsl:attribute>
|
680
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
681
|
+
|
682
|
+
<xsl:choose>
|
683
|
+
<xsl:when test="(ancestor::m3d:sections and $level = 1) or ($parent-name = 'references' and $references_num_current = 1)">
|
684
|
+
<fo:table table-layout="fixed" width="100%">
|
685
|
+
<fo:table-column column-width="25mm"/>
|
686
|
+
<fo:table-column column-width="150mm"/>
|
687
|
+
<fo:table-body>
|
688
|
+
<fo:table-row>
|
689
|
+
<fo:table-cell>
|
690
|
+
<fo:block>
|
691
|
+
<xsl:value-of select="$section"/>
|
692
|
+
</fo:block>
|
693
|
+
</fo:table-cell>
|
694
|
+
<fo:table-cell>
|
695
|
+
<fo:block>
|
696
|
+
<xsl:apply-templates/>
|
697
|
+
</fo:block>
|
698
|
+
</fo:table-cell>
|
699
|
+
</fo:table-row>
|
700
|
+
</fo:table-body>
|
701
|
+
</fo:table>
|
702
|
+
</xsl:when>
|
703
|
+
<xsl:when test="ancestor::m3d:sections or ancestor::m3d:annex">
|
704
|
+
<fo:inline padding-right="3mm"><xsl:value-of select="$section"/></fo:inline>
|
705
|
+
<xsl:apply-templates/>
|
706
|
+
</xsl:when>
|
707
|
+
<xsl:otherwise>
|
708
|
+
<xsl:apply-templates/>
|
709
|
+
</xsl:otherwise>
|
710
|
+
</xsl:choose>
|
711
|
+
|
712
|
+
|
713
|
+
</xsl:element>
|
714
|
+
|
715
|
+
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::m3d:p)">
|
716
|
+
<!-- <fo:block> -->
|
717
|
+
<xsl:value-of select="$linebreak"/>
|
718
|
+
<!-- </fo:block> -->
|
719
|
+
</xsl:if>
|
720
|
+
</xsl:otherwise>
|
721
|
+
</xsl:choose>
|
722
|
+
</xsl:template>
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
<xsl:template match="m3d:p">
|
727
|
+
<xsl:param name="inline" select="'false'"/>
|
728
|
+
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
729
|
+
<xsl:variable name="element-name">
|
730
|
+
<xsl:choose>
|
731
|
+
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
732
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
733
|
+
<!-- <xsl:when test="local-name(..) = 'admonition'">fo:inline</xsl:when> -->
|
734
|
+
<xsl:otherwise>fo:block</xsl:otherwise>
|
735
|
+
</xsl:choose>
|
736
|
+
</xsl:variable>
|
737
|
+
<xsl:element name="{$element-name}">
|
738
|
+
<xsl:attribute name="text-align">
|
739
|
+
<xsl:choose>
|
740
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
741
|
+
<xsl:when test="ancestor::m3d:td/@align"><xsl:value-of select="ancestor::m3d:td/@align"/></xsl:when>
|
742
|
+
<xsl:when test="ancestor::m3d:th/@align"><xsl:value-of select="ancestor::m3d:th/@align"/></xsl:when>
|
743
|
+
<xsl:otherwise>justify</xsl:otherwise><!-- left -->
|
744
|
+
</xsl:choose>
|
745
|
+
</xsl:attribute>
|
746
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
747
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
748
|
+
<xsl:apply-templates/>
|
749
|
+
</xsl:element>
|
750
|
+
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
751
|
+
<xsl:choose>
|
752
|
+
<xsl:when test="ancestor::m3d:annex">
|
753
|
+
<xsl:value-of select="$linebreak"/>
|
754
|
+
</xsl:when>
|
755
|
+
<xsl:otherwise>
|
756
|
+
<fo:block margin-bottom="12pt">
|
757
|
+
<xsl:value-of select="$linebreak"/>
|
758
|
+
</fo:block>
|
759
|
+
</xsl:otherwise>
|
760
|
+
</xsl:choose>
|
761
|
+
</xsl:if>
|
762
|
+
<xsl:if test="$inline = 'true'">
|
763
|
+
<fo:block> </fo:block>
|
764
|
+
</xsl:if>
|
765
|
+
</xsl:template>
|
766
|
+
|
767
|
+
<xsl:template match="m3d:li//m3d:p//text()">
|
768
|
+
<xsl:choose>
|
769
|
+
<xsl:when test="contains(., '	')">
|
770
|
+
<fo:inline white-space="pre"><xsl:value-of select="."/></fo:inline>
|
771
|
+
</xsl:when>
|
772
|
+
<xsl:otherwise>
|
773
|
+
<xsl:value-of select="."/>
|
774
|
+
</xsl:otherwise>
|
775
|
+
</xsl:choose>
|
776
|
+
|
777
|
+
</xsl:template>
|
778
|
+
|
779
|
+
<!--
|
780
|
+
<fn reference="1">
|
781
|
+
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
782
|
+
</fn>
|
783
|
+
-->
|
784
|
+
|
785
|
+
<xsl:variable name="p_fn">
|
786
|
+
<xsl:for-each select="//m3d:p/m3d:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
787
|
+
<!-- copy unique fn -->
|
788
|
+
<fn gen_id="{generate-id(.)}">
|
789
|
+
<xsl:copy-of select="@*"/>
|
790
|
+
<xsl:copy-of select="node()"/>
|
791
|
+
</fn>
|
792
|
+
</xsl:for-each>
|
793
|
+
</xsl:variable>
|
794
|
+
|
795
|
+
<xsl:template match="m3d:p/m3d:fn" priority="2">
|
796
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
797
|
+
<xsl:variable name="reference" select="@reference"/>
|
798
|
+
<xsl:variable name="number">
|
799
|
+
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
800
|
+
</xsl:variable>
|
801
|
+
<xsl:choose>
|
802
|
+
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
803
|
+
<fo:footnote>
|
804
|
+
<fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
|
805
|
+
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
806
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
807
|
+
<xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@id='_normative_references' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
|
808
|
+
</fo:basic-link>
|
809
|
+
</fo:inline>
|
810
|
+
<fo:footnote-body>
|
811
|
+
<fo:block font-size="9pt" margin-bottom="12pt">
|
812
|
+
<fo:inline font-size="6pt" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super" padding-right="1mm">
|
813
|
+
<xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@id='_normative_references' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
|
814
|
+
</fo:inline>
|
815
|
+
<xsl:for-each select="m3d:p">
|
816
|
+
<xsl:apply-templates/>
|
817
|
+
</xsl:for-each>
|
818
|
+
</fo:block>
|
819
|
+
</fo:footnote-body>
|
820
|
+
</fo:footnote>
|
821
|
+
</xsl:when>
|
822
|
+
<xsl:otherwise>
|
823
|
+
<fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
|
824
|
+
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
825
|
+
<xsl:value-of select="$number + count(//m3d:bibitem/m3d:note)"/>
|
826
|
+
</fo:basic-link>
|
827
|
+
</fo:inline>
|
828
|
+
</xsl:otherwise>
|
829
|
+
</xsl:choose>
|
830
|
+
</xsl:template>
|
831
|
+
|
832
|
+
<xsl:template match="m3d:p/m3d:fn/m3d:p">
|
833
|
+
<xsl:apply-templates/>
|
834
|
+
</xsl:template>
|
835
|
+
|
836
|
+
<xsl:template match="m3d:review">
|
837
|
+
<!-- comment 2019-11-29 -->
|
838
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
839
|
+
<xsl:apply-templates /> -->
|
840
|
+
</xsl:template>
|
841
|
+
|
842
|
+
<xsl:template match="text()">
|
843
|
+
<xsl:value-of select="."/>
|
844
|
+
</xsl:template>
|
845
|
+
|
846
|
+
<xsl:template match="m3d:image">
|
847
|
+
<fo:block-container text-align="center">
|
848
|
+
<fo:block>
|
849
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
|
850
|
+
</fo:block>
|
851
|
+
<fo:block margin-top="12pt" margin-bottom="12pt">
|
852
|
+
<xsl:value-of select="$title-figure"/>
|
853
|
+
<xsl:call-template name="getFigureNumber"/>
|
854
|
+
</fo:block>
|
855
|
+
</fo:block-container>
|
856
|
+
</xsl:template>
|
857
|
+
|
858
|
+
<xsl:template match="m3d:figure">
|
859
|
+
<fo:block-container id="{@id}">
|
860
|
+
<fo:block>
|
861
|
+
<xsl:apply-templates/>
|
862
|
+
</fo:block>
|
863
|
+
<xsl:call-template name="fn_display_figure"/>
|
864
|
+
<xsl:for-each select="m3d:note//m3d:p">
|
865
|
+
<xsl:call-template name="note"/>
|
866
|
+
</xsl:for-each>
|
867
|
+
<fo:block text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
|
868
|
+
<xsl:call-template name="getFigureNumber"/>
|
869
|
+
<xsl:if test="m3d:name">
|
870
|
+
<!-- <xsl:if test="not(local-name(..) = 'figure')"> -->
|
871
|
+
<xsl:text> — </xsl:text>
|
872
|
+
<!-- </xsl:if> -->
|
873
|
+
<xsl:value-of select="m3d:name"/>
|
874
|
+
</xsl:if>
|
875
|
+
</fo:block>
|
876
|
+
</fo:block-container>
|
877
|
+
</xsl:template>
|
878
|
+
|
879
|
+
<xsl:template name="getFigureNumber">
|
880
|
+
<xsl:choose>
|
881
|
+
<xsl:when test="ancestor::m3d:annex">
|
882
|
+
<xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="m3d:annex | m3d:figure"/>
|
883
|
+
</xsl:when>
|
884
|
+
<xsl:otherwise>
|
885
|
+
<xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
|
886
|
+
</xsl:otherwise>
|
887
|
+
</xsl:choose>
|
888
|
+
</xsl:template>
|
889
|
+
|
890
|
+
<xsl:template match="m3d:figure/m3d:name"/>
|
891
|
+
<xsl:template match="m3d:figure/m3d:fn" priority="2"/>
|
892
|
+
<xsl:template match="m3d:figure/m3d:note"/>
|
893
|
+
|
894
|
+
|
895
|
+
<xsl:template match="m3d:figure/m3d:image">
|
896
|
+
<fo:block text-align="center">
|
897
|
+
<xsl:variable name="src">
|
898
|
+
<xsl:choose>
|
899
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
900
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
901
|
+
</xsl:when>
|
902
|
+
<xsl:otherwise>
|
903
|
+
<xsl:value-of select="@src"/>
|
904
|
+
</xsl:otherwise>
|
905
|
+
</xsl:choose>
|
906
|
+
</xsl:variable>
|
907
|
+
<fo:external-graphic src="{$src}" width="100%" content-height="100%" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- src="{@src}" -->
|
908
|
+
</fo:block>
|
909
|
+
</xsl:template>
|
910
|
+
|
911
|
+
|
912
|
+
<xsl:template match="m3d:bibitem">
|
913
|
+
<fo:block id="{@id}" margin-bottom="12pt" text-indent="-11.7mm" margin-left="11.7mm"> <!-- 12 pt -->
|
914
|
+
<!-- m3d:docidentifier -->
|
915
|
+
<xsl:if test="m3d:docidentifier">
|
916
|
+
<xsl:choose>
|
917
|
+
<xsl:when test="m3d:docidentifier/@type = 'metanorma'"/>
|
918
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="m3d:docidentifier"/></fo:inline></xsl:otherwise>
|
919
|
+
</xsl:choose>
|
920
|
+
</xsl:if>
|
921
|
+
<xsl:apply-templates select="m3d:note"/>
|
922
|
+
<xsl:if test="m3d:docidentifier">, </xsl:if>
|
923
|
+
<fo:inline font-style="italic">
|
924
|
+
<xsl:choose>
|
925
|
+
<xsl:when test="m3d:title[@type = 'main' and @language = 'en']">
|
926
|
+
<xsl:value-of select="m3d:title[@type = 'main' and @language = 'en']"/>
|
927
|
+
</xsl:when>
|
928
|
+
<xsl:otherwise>
|
929
|
+
<xsl:value-of select="m3d:title"/>
|
930
|
+
</xsl:otherwise>
|
931
|
+
</xsl:choose>
|
932
|
+
</fo:inline>
|
933
|
+
</fo:block>
|
934
|
+
</xsl:template>
|
935
|
+
|
936
|
+
|
937
|
+
<xsl:template match="m3d:bibitem/m3d:note">
|
938
|
+
<fo:footnote>
|
939
|
+
<xsl:variable name="number">
|
940
|
+
<xsl:number level="any" count="m3d:bibitem/m3d:note"/>
|
941
|
+
</xsl:variable>
|
942
|
+
<fo:inline font-size="7pt" keep-with-previous.within-line="always" baseline-shift="30%">
|
943
|
+
<fo:basic-link internal-destination="footnote_{../@id}" fox:alt-text="footnote {$number}">
|
944
|
+
<xsl:value-of select="$number"/>
|
945
|
+
</fo:basic-link>
|
946
|
+
</fo:inline>
|
947
|
+
<fo:footnote-body>
|
948
|
+
<fo:block font-size="9pt" margin-bottom="4pt" start-indent="0pt">
|
949
|
+
<fo:inline font-size="6pt" id="footnote_{../@id}" keep-with-next.within-line="always" baseline-shift="30%" padding-right="1mm"><!-- alignment-baseline="hanging" font-size="60%" -->
|
950
|
+
<xsl:value-of select="$number"/>
|
951
|
+
</fo:inline>
|
952
|
+
<xsl:apply-templates/>
|
953
|
+
</fo:block>
|
954
|
+
</fo:footnote-body>
|
955
|
+
</fo:footnote>
|
956
|
+
</xsl:template>
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
<xsl:template match="m3d:ul | m3d:ol">
|
961
|
+
<fo:block-container margin-left="6mm">
|
962
|
+
<fo:block-container margin-left="0mm">
|
963
|
+
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="6mm"> <!-- margin-bottom="8pt" -->
|
964
|
+
<xsl:if test="local-name() = 'ol'">
|
965
|
+
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
966
|
+
</xsl:if>
|
967
|
+
<xsl:apply-templates/>
|
968
|
+
</fo:list-block>
|
969
|
+
<xsl:for-each select="./m3d:note//m3d:p">
|
970
|
+
<xsl:call-template name="note"/>
|
971
|
+
</xsl:for-each>
|
972
|
+
</fo:block-container>
|
973
|
+
</fo:block-container>
|
974
|
+
</xsl:template>
|
975
|
+
|
976
|
+
<xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note"/>
|
977
|
+
|
978
|
+
<xsl:template match="m3d:li">
|
979
|
+
<fo:list-item id="{@id}">
|
980
|
+
<fo:list-item-label end-indent="label-end()">
|
981
|
+
<fo:block>
|
982
|
+
<xsl:if test="local-name(..) = 'ul'">
|
983
|
+
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
984
|
+
<xsl:attribute name="margin-top">-0.5mm</xsl:attribute><!-- to vertical align big dot -->
|
985
|
+
</xsl:if>
|
986
|
+
<xsl:call-template name="getListItemFormat"/>
|
987
|
+
</fo:block>
|
988
|
+
</fo:list-item-label>
|
989
|
+
<fo:list-item-body start-indent="body-start()">
|
990
|
+
<xsl:apply-templates/>
|
991
|
+
<xsl:apply-templates select=".//m3d:note" mode="process"/>
|
992
|
+
</fo:list-item-body>
|
993
|
+
</fo:list-item>
|
994
|
+
</xsl:template>
|
995
|
+
|
996
|
+
|
997
|
+
<xsl:template match="m3d:term">
|
998
|
+
<xsl:param name="sectionNum"/>
|
999
|
+
<fo:block id="{@id}" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
|
1000
|
+
<fo:inline>
|
1001
|
+
<xsl:variable name="section">
|
1002
|
+
<xsl:for-each select="*[1]">
|
1003
|
+
<xsl:call-template name="getSection">
|
1004
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1005
|
+
</xsl:call-template>
|
1006
|
+
</xsl:for-each>
|
1007
|
+
</xsl:variable>
|
1008
|
+
<xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
|
1009
|
+
</fo:inline>
|
1010
|
+
</fo:block>
|
1011
|
+
<fo:block>
|
1012
|
+
<xsl:apply-templates>
|
1013
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1014
|
+
</xsl:apply-templates>
|
1015
|
+
</fo:block>
|
1016
|
+
</xsl:template>
|
1017
|
+
|
1018
|
+
<xsl:template match="m3d:preferred">
|
1019
|
+
<xsl:param name="sectionNum"/>
|
1020
|
+
|
1021
|
+
<fo:inline>
|
1022
|
+
<xsl:apply-templates/>
|
1023
|
+
</fo:inline>
|
1024
|
+
|
1025
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'preferred'])">
|
1026
|
+
<xsl:value-of select="$linebreak"/>
|
1027
|
+
</xsl:if>
|
1028
|
+
|
1029
|
+
</xsl:template>
|
1030
|
+
|
1031
|
+
<xsl:template match="m3d:admitted">
|
1032
|
+
<xsl:param name="sectionNum"/>
|
1033
|
+
|
1034
|
+
<fo:inline>
|
1035
|
+
<xsl:apply-templates/>
|
1036
|
+
</fo:inline>
|
1037
|
+
|
1038
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'admitted'])">
|
1039
|
+
<xsl:value-of select="$linebreak"/>
|
1040
|
+
</xsl:if>
|
1041
|
+
|
1042
|
+
</xsl:template>
|
1043
|
+
|
1044
|
+
<xsl:template match="m3d:deprecates">
|
1045
|
+
<xsl:param name="sectionNum"/>
|
1046
|
+
<fo:inline>
|
1047
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'deprecates'])">
|
1048
|
+
<fo:inline>DEPRECATED: </fo:inline>
|
1049
|
+
</xsl:if>
|
1050
|
+
<xsl:apply-templates/>
|
1051
|
+
</fo:inline>
|
1052
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'deprecates'])">
|
1053
|
+
<xsl:value-of select="$linebreak"/>
|
1054
|
+
</xsl:if>
|
1055
|
+
|
1056
|
+
</xsl:template>
|
1057
|
+
|
1058
|
+
<xsl:template match="m3d:definition[preceding-sibling::m3d:domain]">
|
1059
|
+
<xsl:apply-templates/>
|
1060
|
+
</xsl:template>
|
1061
|
+
<xsl:template match="m3d:definition[preceding-sibling::m3d:domain]/m3d:p">
|
1062
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
1063
|
+
<fo:block> </fo:block>
|
1064
|
+
</xsl:template>
|
1065
|
+
|
1066
|
+
<xsl:template match="m3d:definition">
|
1067
|
+
<fo:block>
|
1068
|
+
<xsl:apply-templates/>
|
1069
|
+
</fo:block>
|
1070
|
+
</xsl:template>
|
1071
|
+
|
1072
|
+
<xsl:template match="m3d:termsource">
|
1073
|
+
<fo:block>
|
1074
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
1075
|
+
<fo:basic-link internal-destination="{m3d:origin/@bibitemid}" fox:alt-text="{m3d:origin/@citeas}">
|
1076
|
+
<xsl:text>[</xsl:text> <!-- SOURCE: -->
|
1077
|
+
<xsl:value-of select="m3d:origin/@citeas"/>
|
1078
|
+
|
1079
|
+
<xsl:apply-templates select="m3d:origin/m3d:localityStack"/>
|
1080
|
+
|
1081
|
+
</fo:basic-link>
|
1082
|
+
<xsl:apply-templates select="m3d:modification"/>
|
1083
|
+
<xsl:text>]</xsl:text>
|
1084
|
+
</fo:block>
|
1085
|
+
</xsl:template>
|
1086
|
+
|
1087
|
+
<xsl:template match="m3d:modification">
|
1088
|
+
<xsl:text>, modified — </xsl:text>
|
1089
|
+
<xsl:apply-templates/>
|
1090
|
+
</xsl:template>
|
1091
|
+
<xsl:template match="m3d:modification/m3d:p">
|
1092
|
+
<xsl:apply-templates/>
|
1093
|
+
</xsl:template>
|
1094
|
+
<xsl:template match="m3d:modification/text()">
|
1095
|
+
<xsl:apply-templates/>
|
1096
|
+
</xsl:template>
|
1097
|
+
|
1098
|
+
<xsl:template match="m3d:termnote">
|
1099
|
+
<fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
|
1100
|
+
<fo:block>
|
1101
|
+
<fo:inline padding-right="1mm">
|
1102
|
+
<xsl:text>Note </xsl:text>
|
1103
|
+
<xsl:number/>
|
1104
|
+
<xsl:text> to entry: </xsl:text>
|
1105
|
+
</fo:inline>
|
1106
|
+
<xsl:apply-templates/>
|
1107
|
+
</fo:block>
|
1108
|
+
</fo:block-container>
|
1109
|
+
</xsl:template>
|
1110
|
+
|
1111
|
+
<xsl:template match="m3d:termnote/m3d:p">
|
1112
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
1113
|
+
</xsl:template>
|
1114
|
+
|
1115
|
+
<xsl:template match="m3d:domain">
|
1116
|
+
<fo:inline><<xsl:apply-templates/>> </fo:inline>
|
1117
|
+
</xsl:template>
|
1118
|
+
|
1119
|
+
|
1120
|
+
<xsl:template match="m3d:termexample">
|
1121
|
+
<fo:block margin-top="14pt" margin-bottom="14pt" text-align="justify">
|
1122
|
+
<fo:inline padding-right="1mm" font-weight="bold">
|
1123
|
+
<xsl:value-of select="$title-example"/>
|
1124
|
+
<xsl:if test="count(ancestor::m3d:term[1]//m3d:termexample) > 1">
|
1125
|
+
<xsl:number/>
|
1126
|
+
</xsl:if>
|
1127
|
+
<xsl:text>:</xsl:text>
|
1128
|
+
</fo:inline>
|
1129
|
+
<xsl:apply-templates/>
|
1130
|
+
</fo:block>
|
1131
|
+
</xsl:template>
|
1132
|
+
|
1133
|
+
<xsl:template match="m3d:termexample/m3d:p">
|
1134
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
1135
|
+
</xsl:template>
|
1136
|
+
|
1137
|
+
|
1138
|
+
<xsl:template match="m3d:annex">
|
1139
|
+
<fo:block break-after="page"/>
|
1140
|
+
<xsl:apply-templates/>
|
1141
|
+
</xsl:template>
|
1142
|
+
|
1143
|
+
|
1144
|
+
<!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
|
1145
|
+
<xsl:template match="m3d:references[position() > 1]">
|
1146
|
+
<fo:block break-after="page"/>
|
1147
|
+
<xsl:apply-templates/>
|
1148
|
+
<fo:block-container text-align="center">
|
1149
|
+
<fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
|
1150
|
+
<fo:block> </fo:block>
|
1151
|
+
</fo:block-container>
|
1152
|
+
</fo:block-container>
|
1153
|
+
</xsl:template>
|
1154
|
+
|
1155
|
+
|
1156
|
+
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
1157
|
+
<!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem"> -->
|
1158
|
+
<xsl:template match="m3d:references[position() > 1]/m3d:bibitem">
|
1159
|
+
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
1160
|
+
<fo:list-item>
|
1161
|
+
<fo:list-item-label end-indent="label-end()">
|
1162
|
+
<fo:block>
|
1163
|
+
<fo:inline id="{@id}">
|
1164
|
+
<xsl:number format="[1]"/>
|
1165
|
+
</fo:inline>
|
1166
|
+
</fo:block>
|
1167
|
+
</fo:list-item-label>
|
1168
|
+
<fo:list-item-body start-indent="body-start()">
|
1169
|
+
<fo:block text-align="justify">
|
1170
|
+
<xsl:variable name="docidentifier">
|
1171
|
+
<xsl:if test="m3d:docidentifier">
|
1172
|
+
<xsl:choose>
|
1173
|
+
<xsl:when test="m3d:docidentifier/@type = 'metanorma'"/>
|
1174
|
+
<xsl:otherwise><xsl:value-of select="m3d:docidentifier"/></xsl:otherwise>
|
1175
|
+
</xsl:choose>
|
1176
|
+
</xsl:if>
|
1177
|
+
</xsl:variable>
|
1178
|
+
<fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
|
1179
|
+
<xsl:apply-templates select="m3d:note"/>
|
1180
|
+
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
1181
|
+
<xsl:choose>
|
1182
|
+
<xsl:when test="m3d:title[@type = 'main' and @language = 'en']">
|
1183
|
+
<xsl:apply-templates select="m3d:title[@type = 'main' and @language = 'en']"/>
|
1184
|
+
</xsl:when>
|
1185
|
+
<xsl:otherwise>
|
1186
|
+
<xsl:apply-templates select="m3d:title"/>
|
1187
|
+
</xsl:otherwise>
|
1188
|
+
</xsl:choose>
|
1189
|
+
<xsl:apply-templates select="m3d:formattedref"/>
|
1190
|
+
</fo:block>
|
1191
|
+
</fo:list-item-body>
|
1192
|
+
</fo:list-item>
|
1193
|
+
</fo:list-block>
|
1194
|
+
</xsl:template>
|
1195
|
+
|
1196
|
+
<!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem" mode="contents"/> -->
|
1197
|
+
<xsl:template match="m3d:references[position() > 1]/m3d:bibitem" mode="contents"/>
|
1198
|
+
|
1199
|
+
<!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem/m3d:title"> -->
|
1200
|
+
<xsl:template match="m3d:references[position() > 1]/m3d:bibitem/m3d:title">
|
1201
|
+
<fo:inline font-style="italic">
|
1202
|
+
<xsl:apply-templates/>
|
1203
|
+
</fo:inline>
|
1204
|
+
</xsl:template>
|
1205
|
+
|
1206
|
+
<xsl:template match="m3d:quote">
|
1207
|
+
<fo:block margin-top="12pt" margin-left="12mm" margin-right="12mm">
|
1208
|
+
<xsl:apply-templates select=".//m3d:p"/>
|
1209
|
+
</fo:block>
|
1210
|
+
<fo:block text-align="right">
|
1211
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
1212
|
+
<xsl:text>— </xsl:text><xsl:value-of select="m3d:author"/>
|
1213
|
+
<xsl:if test="m3d:source">
|
1214
|
+
<xsl:text>, </xsl:text>
|
1215
|
+
<xsl:apply-templates select="m3d:source"/>
|
1216
|
+
</xsl:if>
|
1217
|
+
</fo:block>
|
1218
|
+
</xsl:template>
|
1219
|
+
|
1220
|
+
<xsl:template match="m3d:source">
|
1221
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
1222
|
+
<xsl:value-of select="@citeas" disable-output-escaping="yes"/>
|
1223
|
+
<xsl:apply-templates select="m3d:localityStack"/>
|
1224
|
+
</fo:basic-link>
|
1225
|
+
</xsl:template>
|
1226
|
+
|
1227
|
+
|
1228
|
+
<xsl:template match="mathml:math" priority="2">
|
1229
|
+
<fo:inline font-family="Cambria Math">
|
1230
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
1231
|
+
<xsl:copy-of select="."/>
|
1232
|
+
</fo:instream-foreign-object>
|
1233
|
+
</fo:inline>
|
1234
|
+
</xsl:template>
|
1235
|
+
|
1236
|
+
<xsl:template match="m3d:xref">
|
1237
|
+
<xsl:param name="sectionNum"/>
|
1238
|
+
|
1239
|
+
<xsl:variable name="target" select="normalize-space(@target)"/>
|
1240
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
|
1241
|
+
<xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = $target]/@section"/>
|
1242
|
+
<!-- <xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))"> -->
|
1243
|
+
<!-- <xsl:attribute name="color">blue</xsl:attribute>
|
1244
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute> -->
|
1245
|
+
<!-- </xsl:if> -->
|
1246
|
+
<xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = $target]/@type"/>
|
1247
|
+
<xsl:variable name="root" select="xalan:nodeset($contents)//item[@id =$target]/@root"/>
|
1248
|
+
<xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =$target]/@level"/>
|
1249
|
+
<xsl:choose>
|
1250
|
+
<xsl:when test="$type = 'clause' and $root != 'annex' and $level = 1"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
|
1251
|
+
<xsl:when test="$type = 'clause' and $root = 'annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
1252
|
+
<xsl:when test="$type = 'li'">
|
1253
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
1254
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
1255
|
+
<xsl:variable name="parent_section" select="xalan:nodeset($contents)//item[@id =$target]/@parent_section"/>
|
1256
|
+
<xsl:variable name="currentSection">
|
1257
|
+
<xsl:call-template name="getSection"/>
|
1258
|
+
</xsl:variable>
|
1259
|
+
<xsl:if test="not(contains($parent_section, $currentSection))">
|
1260
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
|
1261
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1262
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1263
|
+
<xsl:value-of select="$parent_section"/><xsl:text> </xsl:text>
|
1264
|
+
</fo:basic-link>
|
1265
|
+
</xsl:if>
|
1266
|
+
</xsl:when>
|
1267
|
+
<xsl:when test="normalize-space($section) = ''">
|
1268
|
+
<xsl:text>[</xsl:text><xsl:value-of select="$target"/><xsl:text>]</xsl:text>
|
1269
|
+
</xsl:when>
|
1270
|
+
<xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
|
1271
|
+
</xsl:choose>
|
1272
|
+
<xsl:value-of select="$section"/>
|
1273
|
+
</fo:basic-link>
|
1274
|
+
</xsl:template>
|
1275
|
+
|
1276
|
+
<xsl:template match="m3d:example/m3d:p">
|
1277
|
+
<fo:block margin-top="8pt" margin-bottom="8pt">
|
1278
|
+
<xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
|
1279
|
+
<fo:inline padding-right="5mm" font-weight="bold">
|
1280
|
+
<xsl:value-of select="$title-example"/>
|
1281
|
+
<xsl:if test="count(ancestor::m3d:clause[1]//m3d:example) > 1">
|
1282
|
+
<xsl:number count="m3d:example[ancestor::m3d:clause[@id = $claims_id]]" level="any"/>
|
1283
|
+
</xsl:if>
|
1284
|
+
</fo:inline>
|
1285
|
+
<xsl:apply-templates/>
|
1286
|
+
</fo:block>
|
1287
|
+
</xsl:template>
|
1288
|
+
|
1289
|
+
<xsl:template match="m3d:note/m3d:p" name="note">
|
1290
|
+
<xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
|
1291
|
+
<fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
|
1292
|
+
<fo:block>
|
1293
|
+
<fo:inline padding-right="5mm" font-weight="bold">
|
1294
|
+
<xsl:value-of select="$title-note"/>
|
1295
|
+
<xsl:if test="count(ancestor::m3d:clause[1]//m3d:note) > 1">
|
1296
|
+
<xsl:text> </xsl:text><xsl:number count="m3d:note[ancestor::m3d:clause[@id = $claims_id]]" level="any"/>
|
1297
|
+
</xsl:if>
|
1298
|
+
<xsl:text>:</xsl:text>
|
1299
|
+
</fo:inline>
|
1300
|
+
<xsl:apply-templates/>
|
1301
|
+
</fo:block>
|
1302
|
+
</fo:block-container>
|
1303
|
+
</xsl:template>
|
1304
|
+
|
1305
|
+
<!-- <eref type="inline" bibitemid="IEC60050-113" citeas="IEC 60050-113:2011"><localityStack><locality type="clause"><referenceFrom>113-01-12</referenceFrom></locality></localityStack></eref> -->
|
1306
|
+
<xsl:template match="m3d:eref">
|
1307
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
|
1308
|
+
<xsl:if test="@type = 'footnote'">
|
1309
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1310
|
+
<xsl:attribute name="font-size">50%</xsl:attribute>
|
1311
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1312
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1313
|
+
</xsl:if>
|
1314
|
+
<!-- <xsl:if test="@type = 'inline'">
|
1315
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1316
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1317
|
+
</xsl:if> -->
|
1318
|
+
|
1319
|
+
<xsl:choose>
|
1320
|
+
<xsl:when test="@citeas and normalize-space(text()) = ''">
|
1321
|
+
<xsl:value-of select="@citeas" disable-output-escaping="yes"/>
|
1322
|
+
</xsl:when>
|
1323
|
+
<xsl:when test="@bibitemid and normalize-space(text()) = ''">
|
1324
|
+
<xsl:value-of select="//m3d:bibitem[@id = current()/@bibitemid]/m3d:docidentifier"/>
|
1325
|
+
</xsl:when>
|
1326
|
+
<xsl:otherwise/>
|
1327
|
+
</xsl:choose>
|
1328
|
+
<xsl:apply-templates select="m3d:localityStack"/>
|
1329
|
+
<xsl:apply-templates select="text()"/>
|
1330
|
+
</fo:basic-link>
|
1331
|
+
</xsl:template>
|
1332
|
+
|
1333
|
+
<xsl:template match="m3d:locality">
|
1334
|
+
<xsl:choose>
|
1335
|
+
<xsl:when test="@type ='section' and ancestor::m3d:termsource">SOURCE Section </xsl:when>
|
1336
|
+
<xsl:when test="ancestor::m3d:termsource"/>
|
1337
|
+
<xsl:when test="@type ='clause' and ancestor::m3d:eref"/>
|
1338
|
+
<xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1339
|
+
<xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
1340
|
+
<xsl:when test="@type ='table'"><xsl:value-of select="$title-table"/></xsl:when>
|
1341
|
+
<xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
|
1342
|
+
</xsl:choose>
|
1343
|
+
<xsl:text> </xsl:text><xsl:value-of select="m3d:referenceFrom"/>
|
1344
|
+
</xsl:template>
|
1345
|
+
|
1346
|
+
<xsl:template match="m3d:admonition">
|
1347
|
+
<fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
|
1348
|
+
<xsl:value-of select="translate(@type, $lower, $upper)"/>
|
1349
|
+
</fo:block>
|
1350
|
+
<fo:block font-weight="bold">
|
1351
|
+
<xsl:apply-templates/>
|
1352
|
+
</fo:block>
|
1353
|
+
</xsl:template>
|
1354
|
+
|
1355
|
+
<xsl:template match="m3d:formula/m3d:dt/m3d:stem">
|
1356
|
+
<fo:inline>
|
1357
|
+
<xsl:apply-templates/>
|
1358
|
+
</fo:inline>
|
1359
|
+
</xsl:template>
|
1360
|
+
|
1361
|
+
<xsl:template match="m3d:formula/m3d:stem">
|
1362
|
+
<fo:block id="{../@id}" margin-top="14pt" margin-bottom="14pt">
|
1363
|
+
<fo:table table-layout="fixed" width="170mm">
|
1364
|
+
<fo:table-column column-width="165mm"/>
|
1365
|
+
<fo:table-column column-width="5mm"/>
|
1366
|
+
<fo:table-body>
|
1367
|
+
<fo:table-row>
|
1368
|
+
<fo:table-cell display-align="center">
|
1369
|
+
<fo:block text-align="center">
|
1370
|
+
<xsl:apply-templates/>
|
1371
|
+
</fo:block>
|
1372
|
+
</fo:table-cell>
|
1373
|
+
<fo:table-cell display-align="center">
|
1374
|
+
<fo:block text-align="left">
|
1375
|
+
<xsl:choose>
|
1376
|
+
<xsl:when test="ancestor::m3d:annex">
|
1377
|
+
<xsl:text>(</xsl:text><xsl:number format="A.1" level="multiple" count="m3d:annex | m3d:formula"/><xsl:text>)</xsl:text>
|
1378
|
+
</xsl:when>
|
1379
|
+
<xsl:otherwise> <!-- not(ancestor::m3d:annex) -->
|
1380
|
+
<xsl:text>(</xsl:text><xsl:number level="any" count="m3d:formula"/><xsl:text>)</xsl:text>
|
1381
|
+
</xsl:otherwise>
|
1382
|
+
</xsl:choose>
|
1383
|
+
</fo:block>
|
1384
|
+
</fo:table-cell>
|
1385
|
+
</fo:table-row>
|
1386
|
+
</fo:table-body>
|
1387
|
+
</fo:table>
|
1388
|
+
<fo:inline keep-together.within-line="always">
|
1389
|
+
</fo:inline>
|
1390
|
+
</fo:block>
|
1391
|
+
</xsl:template>
|
1392
|
+
|
1393
|
+
<xsl:template match="m3d:br" priority="2">
|
1394
|
+
<xsl:value-of select="$linebreak"/>
|
1395
|
+
</xsl:template>
|
1396
|
+
|
1397
|
+
|
1398
|
+
<xsl:template name="getId">
|
1399
|
+
<xsl:choose>
|
1400
|
+
<xsl:when test="../@id">
|
1401
|
+
<xsl:value-of select="../@id"/>
|
1402
|
+
</xsl:when>
|
1403
|
+
<xsl:otherwise>
|
1404
|
+
<xsl:value-of select="text()"/>
|
1405
|
+
</xsl:otherwise>
|
1406
|
+
</xsl:choose>
|
1407
|
+
</xsl:template>
|
1408
|
+
|
1409
|
+
<xsl:template name="getLevel">
|
1410
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
1411
|
+
<xsl:variable name="level">
|
1412
|
+
<xsl:choose>
|
1413
|
+
<xsl:when test="ancestor::m3d:preface">
|
1414
|
+
<xsl:value-of select="$level_total - 2"/>
|
1415
|
+
</xsl:when>
|
1416
|
+
<xsl:when test="ancestor::m3d:sections">
|
1417
|
+
<xsl:value-of select="$level_total - 2"/>
|
1418
|
+
</xsl:when>
|
1419
|
+
<xsl:when test="ancestor::m3d:bibliography">
|
1420
|
+
<xsl:value-of select="$level_total - 2"/>
|
1421
|
+
</xsl:when>
|
1422
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
1423
|
+
<xsl:otherwise>
|
1424
|
+
<xsl:value-of select="$level_total - 1"/>
|
1425
|
+
</xsl:otherwise>
|
1426
|
+
</xsl:choose>
|
1427
|
+
</xsl:variable>
|
1428
|
+
<xsl:value-of select="$level"/>
|
1429
|
+
</xsl:template>
|
1430
|
+
|
1431
|
+
<xsl:template name="getSection">
|
1432
|
+
<xsl:param name="sectionNum"/>
|
1433
|
+
<xsl:variable name="level">
|
1434
|
+
<xsl:call-template name="getLevel"/>
|
1435
|
+
</xsl:variable>
|
1436
|
+
<xsl:variable name="references_num_current">
|
1437
|
+
<xsl:number level="any" count="m3d:references"/>
|
1438
|
+
</xsl:variable>
|
1439
|
+
<xsl:variable name="section">
|
1440
|
+
<xsl:choose>
|
1441
|
+
<xsl:when test="ancestor::m3d:bibliography and $references_num_current = 1"><!-- Normative references -->
|
1442
|
+
<xsl:text>Section </xsl:text><xsl:value-of select="$sectionNum"/><xsl:text>.</xsl:text>
|
1443
|
+
</xsl:when>
|
1444
|
+
<xsl:when test="ancestor::m3d:bibliography">
|
1445
|
+
<xsl:value-of select="$sectionNum"/>
|
1446
|
+
</xsl:when>
|
1447
|
+
<xsl:when test="ancestor::m3d:sections">
|
1448
|
+
<!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
|
1449
|
+
<xsl:if test="$level = 1">
|
1450
|
+
<xsl:text>Section </xsl:text>
|
1451
|
+
</xsl:if>
|
1452
|
+
<xsl:choose>
|
1453
|
+
<xsl:when test="$level = 1">
|
1454
|
+
<xsl:value-of select="$sectionNum"/><xsl:text>.</xsl:text>
|
1455
|
+
</xsl:when>
|
1456
|
+
<xsl:when test="$level >= 2">
|
1457
|
+
<xsl:variable name="num">
|
1458
|
+
<xsl:number format=".1" level="multiple" count="m3d:clause/m3d:clause | m3d:clause/m3d:terms | m3d:terms/m3d:term | m3d:clause/m3d:term | m3d:terms/m3d:clause | m3d:terms/m3d:definitions | m3d:definitions/m3d:clause | m3d:clause/m3d:definitions"/>
|
1459
|
+
</xsl:variable>
|
1460
|
+
<xsl:value-of select="concat($sectionNum, $num)"/><xsl:text>.</xsl:text>
|
1461
|
+
</xsl:when>
|
1462
|
+
<xsl:otherwise>
|
1463
|
+
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
1464
|
+
</xsl:otherwise>
|
1465
|
+
</xsl:choose>
|
1466
|
+
</xsl:when>
|
1467
|
+
<xsl:when test="ancestor::m3d:annex">
|
1468
|
+
<xsl:variable name="annexid" select="normalize-space(/m3d:m3d-standard/m3d:bibdata/m3d:ext/m3d:structuredidentifier/m3d:annexid)"/>
|
1469
|
+
<xsl:choose>
|
1470
|
+
<xsl:when test="$level = 1">
|
1471
|
+
<xsl:text>Annex </xsl:text>
|
1472
|
+
<xsl:choose>
|
1473
|
+
<xsl:when test="count(//m3d:annex) = 1 and $annexid != ''">
|
1474
|
+
<xsl:value-of select="$annexid"/>
|
1475
|
+
</xsl:when>
|
1476
|
+
<xsl:otherwise>
|
1477
|
+
<xsl:number format="A" level="any" count="m3d:annex"/>
|
1478
|
+
</xsl:otherwise>
|
1479
|
+
</xsl:choose>
|
1480
|
+
</xsl:when>
|
1481
|
+
<xsl:otherwise>
|
1482
|
+
<xsl:choose>
|
1483
|
+
<xsl:when test="count(//m3d:annex) = 1 and $annexid != ''">
|
1484
|
+
<xsl:value-of select="$annexid"/><xsl:number format=".1" level="multiple" count="m3d:clause"/>
|
1485
|
+
</xsl:when>
|
1486
|
+
<xsl:otherwise>
|
1487
|
+
<xsl:number format="A.1" level="multiple" count="m3d:annex | m3d:clause"/>
|
1488
|
+
</xsl:otherwise>
|
1489
|
+
</xsl:choose>
|
1490
|
+
</xsl:otherwise>
|
1491
|
+
</xsl:choose>
|
1492
|
+
</xsl:when>
|
1493
|
+
<!-- if preface and there is clause(s) -->
|
1494
|
+
<xsl:when test="ancestor::m3d:preface">0</xsl:when>
|
1495
|
+
<!-- <xsl:choose>
|
1496
|
+
<xsl:when test="$level = 1 and ..//m3d:clause">0</xsl:when>
|
1497
|
+
<xsl:when test="$level >= 2">
|
1498
|
+
<xsl:variable name="num">
|
1499
|
+
<xsl:number format=".1" level="multiple" count="m3d:clause"/>
|
1500
|
+
</xsl:variable>
|
1501
|
+
<xsl:value-of select="concat('0', $num)"/>
|
1502
|
+
</xsl:when>
|
1503
|
+
<xsl:otherwise>
|
1504
|
+
</xsl:otherwise>
|
1505
|
+
</xsl:choose>
|
1506
|
+
</xsl:when> -->
|
1507
|
+
<xsl:otherwise>
|
1508
|
+
</xsl:otherwise>
|
1509
|
+
</xsl:choose>
|
1510
|
+
</xsl:variable>
|
1511
|
+
<xsl:value-of select="$section"/>
|
1512
|
+
</xsl:template>
|
1513
|
+
|
1514
|
+
<xsl:variable name="Image-M3AAWG-Logo">
|
1515
|
+
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbn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519
|
+
<xsl:param name="text"/>
|
1520
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
1521
|
+
<xsl:if test="string-length($text) > 0">
|
1522
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
1523
|
+
<fo:inline padding-right="{$letter-spacing}mm"><xsl:value-of select="$char"/></fo:inline>
|
1524
|
+
<xsl:call-template name="addLetterSpacing">
|
1525
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
1526
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
1527
|
+
</xsl:call-template>
|
1528
|
+
</xsl:if>
|
1529
|
+
</xsl:template>
|
1530
|
+
|
1531
|
+
<xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-table">
|
1532
|
+
|
1533
|
+
<xsl:text>Table </xsl:text>
|
1534
|
+
|
1535
|
+
|
1536
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
|
1537
|
+
|
1538
|
+
<xsl:text>NOTE </xsl:text>
|
1539
|
+
|
1540
|
+
|
1541
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-figure">
|
1542
|
+
|
1543
|
+
<xsl:text>Figure </xsl:text>
|
1544
|
+
|
1545
|
+
|
1546
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-example">
|
1547
|
+
|
1548
|
+
<xsl:text>EXAMPLE </xsl:text>
|
1549
|
+
|
1550
|
+
|
1551
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-inequality">Inequality </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-equation">Equation </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-annex">
|
1552
|
+
|
1553
|
+
<xsl:text>Annex </xsl:text>
|
1554
|
+
|
1555
|
+
|
1556
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-appendix">
|
1557
|
+
<xsl:text>Appendix </xsl:text>
|
1558
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
|
1559
|
+
|
1560
|
+
<xsl:text>Clause </xsl:text>
|
1561
|
+
|
1562
|
+
|
1563
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-edition">
|
1564
|
+
<xsl:text>Edition </xsl:text>
|
1565
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
|
1566
|
+
|
1567
|
+
|
1568
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-page">Page</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-key">Key</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-where">where</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-descriptors">Descriptors</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-en">Part </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-fr">Partie </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note-to-entry">Note # to entry: </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-modified">modified</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-source">SOURCE</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-keywords">Keywords</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="linebreak" select="'
'"/><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="link-style">
|
1569
|
+
|
1570
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1571
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1572
|
+
|
1573
|
+
|
1574
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="sourcecode-style">
|
1575
|
+
|
1576
|
+
|
1577
|
+
|
1578
|
+
|
1579
|
+
|
1580
|
+
|
1581
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1582
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-style">
|
1587
|
+
|
1588
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1589
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1590
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1591
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1592
|
+
|
1593
|
+
|
1594
|
+
|
1595
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-example-style">
|
1596
|
+
|
1597
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1598
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1599
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1600
|
+
|
1601
|
+
|
1602
|
+
|
1603
|
+
</xsl:attribute-set><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()">
|
1604
|
+
<xsl:value-of select="."/>
|
1605
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='br']">
|
1606
|
+
<xsl:value-of select="$linebreak"/>
|
1607
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1608
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1609
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
1610
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']">
|
1611
|
+
|
1612
|
+
<xsl:variable name="simple-table">
|
1613
|
+
<!-- <xsl:copy> -->
|
1614
|
+
<xsl:call-template name="getSimpleTable"/>
|
1615
|
+
<!-- </xsl:copy> -->
|
1616
|
+
</xsl:variable>
|
1617
|
+
|
1618
|
+
<!-- DEBUG -->
|
1619
|
+
<!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
|
1620
|
+
<!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
|
1621
|
+
|
1622
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
1623
|
+
|
1624
|
+
<!-- <xsl:if test="$namespace = 'iso'">
|
1625
|
+
<fo:block space-before="6pt"> </fo:block>
|
1626
|
+
</xsl:if> -->
|
1627
|
+
|
1628
|
+
<xsl:choose>
|
1629
|
+
<xsl:when test="@unnumbered = 'true'"/>
|
1630
|
+
<xsl:otherwise>
|
1631
|
+
|
1632
|
+
|
1633
|
+
|
1634
|
+
<fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
|
1635
|
+
|
1636
|
+
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1640
|
+
|
1641
|
+
|
1642
|
+
|
1643
|
+
|
1644
|
+
<xsl:value-of select="$title-table"/>
|
1645
|
+
|
1646
|
+
<xsl:call-template name="getTableNumber"/>
|
1647
|
+
|
1648
|
+
|
1649
|
+
<xsl:if test="*[local-name()='name']">
|
1650
|
+
|
1651
|
+
|
1652
|
+
|
1653
|
+
<xsl:text> — </xsl:text>
|
1654
|
+
|
1655
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
1656
|
+
</xsl:if>
|
1657
|
+
</fo:block>
|
1658
|
+
|
1659
|
+
|
1660
|
+
<xsl:call-template name="fn_name_display"/>
|
1661
|
+
|
1662
|
+
</xsl:otherwise>
|
1663
|
+
</xsl:choose>
|
1664
|
+
|
1665
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1666
|
+
|
1667
|
+
<!-- <xsl:variable name="cols-count">
|
1668
|
+
<xsl:choose>
|
1669
|
+
<xsl:when test="*[local-name()='thead']">
|
1670
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1671
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1672
|
+
</xsl:call-template>
|
1673
|
+
</xsl:when>
|
1674
|
+
<xsl:otherwise>
|
1675
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1676
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1677
|
+
</xsl:call-template>
|
1678
|
+
</xsl:otherwise>
|
1679
|
+
</xsl:choose>
|
1680
|
+
</xsl:variable> -->
|
1681
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1682
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1683
|
+
|
1684
|
+
|
1685
|
+
|
1686
|
+
<xsl:variable name="colwidths">
|
1687
|
+
<xsl:call-template name="calculate-column-widths">
|
1688
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1689
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1690
|
+
</xsl:call-template>
|
1691
|
+
</xsl:variable>
|
1692
|
+
|
1693
|
+
<!-- <xsl:variable name="colwidths2">
|
1694
|
+
<xsl:call-template name="calculate-column-widths">
|
1695
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1696
|
+
</xsl:call-template>
|
1697
|
+
</xsl:variable> -->
|
1698
|
+
|
1699
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1700
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1701
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1702
|
+
|
1703
|
+
<xsl:variable name="margin-left">
|
1704
|
+
<xsl:choose>
|
1705
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1706
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1707
|
+
</xsl:choose>
|
1708
|
+
</xsl:variable>
|
1709
|
+
|
1710
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1711
|
+
|
1712
|
+
|
1713
|
+
|
1714
|
+
|
1715
|
+
|
1716
|
+
|
1717
|
+
|
1718
|
+
|
1719
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1720
|
+
|
1721
|
+
|
1722
|
+
|
1723
|
+
|
1724
|
+
|
1725
|
+
|
1726
|
+
|
1727
|
+
|
1728
|
+
|
1729
|
+
|
1730
|
+
|
1731
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1732
|
+
<xsl:choose>
|
1733
|
+
<xsl:when test=". = 1 or . = 0">
|
1734
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1735
|
+
</xsl:when>
|
1736
|
+
<xsl:otherwise>
|
1737
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1738
|
+
</xsl:otherwise>
|
1739
|
+
</xsl:choose>
|
1740
|
+
</xsl:for-each>
|
1741
|
+
<xsl:apply-templates/>
|
1742
|
+
</fo:table>
|
1743
|
+
|
1744
|
+
|
1745
|
+
|
1746
|
+
</fo:block-container>
|
1747
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getTableNumber">
|
1748
|
+
<xsl:choose>
|
1749
|
+
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
1750
|
+
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
|
1751
|
+
</xsl:when>
|
1752
|
+
<xsl:when test="ancestor::*[local-name()='annex']">
|
1753
|
+
|
1754
|
+
|
1755
|
+
|
1756
|
+
|
1757
|
+
|
1758
|
+
|
1759
|
+
|
1760
|
+
|
1761
|
+
</xsl:when>
|
1762
|
+
<xsl:otherwise>
|
1763
|
+
|
1764
|
+
|
1765
|
+
<xsl:number format="A." count="*[local-name()='annex']"/>
|
1766
|
+
<xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
|
1767
|
+
|
1768
|
+
</xsl:otherwise>
|
1769
|
+
</xsl:choose>
|
1770
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
1771
|
+
<xsl:apply-templates/>
|
1772
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-columns-numbers">
|
1773
|
+
<xsl:param name="table-row"/>
|
1774
|
+
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
1775
|
+
<xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
|
1776
|
+
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
1777
|
+
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
1778
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-column-widths">
|
1779
|
+
<xsl:param name="table"/>
|
1780
|
+
<xsl:param name="cols-count"/>
|
1781
|
+
<xsl:param name="curr-col" select="1"/>
|
1782
|
+
<xsl:param name="width" select="0"/>
|
1783
|
+
|
1784
|
+
<xsl:if test="$curr-col <= $cols-count">
|
1785
|
+
<xsl:variable name="widths">
|
1786
|
+
<xsl:choose>
|
1787
|
+
<xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
|
1788
|
+
<xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
|
1789
|
+
<xsl:variable name="words">
|
1790
|
+
<xsl:call-template name="tokenize">
|
1791
|
+
<xsl:with-param name="text" select="translate(*[local-name()='th'][$curr-col],'- —:', ' ')"/>
|
1792
|
+
</xsl:call-template>
|
1793
|
+
</xsl:variable>
|
1794
|
+
<xsl:variable name="max_length">
|
1795
|
+
<xsl:call-template name="max_length">
|
1796
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
1797
|
+
</xsl:call-template>
|
1798
|
+
</xsl:variable>
|
1799
|
+
<width>
|
1800
|
+
<xsl:value-of select="$max_length"/>
|
1801
|
+
</width>
|
1802
|
+
</xsl:for-each>
|
1803
|
+
<xsl:for-each select="*[local-name()='tbody']//*[local-name()='tr']">
|
1804
|
+
<xsl:variable name="words">
|
1805
|
+
<xsl:call-template name="tokenize">
|
1806
|
+
<xsl:with-param name="text" select="translate(*[local-name()='td'][$curr-col],'- —:', ' ')"/>
|
1807
|
+
</xsl:call-template>
|
1808
|
+
</xsl:variable>
|
1809
|
+
<xsl:variable name="max_length">
|
1810
|
+
<xsl:call-template name="max_length">
|
1811
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
1812
|
+
</xsl:call-template>
|
1813
|
+
</xsl:variable>
|
1814
|
+
<width>
|
1815
|
+
<xsl:value-of select="$max_length"/>
|
1816
|
+
</width>
|
1817
|
+
|
1818
|
+
</xsl:for-each>
|
1819
|
+
</xsl:when>
|
1820
|
+
<xsl:otherwise>
|
1821
|
+
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1822
|
+
<xsl:variable name="td_text">
|
1823
|
+
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1824
|
+
</xsl:variable>
|
1825
|
+
<xsl:variable name="words">
|
1826
|
+
<xsl:variable name="string_with_added_zerospaces">
|
1827
|
+
<xsl:call-template name="add-zero-spaces-java">
|
1828
|
+
<xsl:with-param name="text" select="$td_text"/>
|
1829
|
+
</xsl:call-template>
|
1830
|
+
</xsl:variable>
|
1831
|
+
<xsl:call-template name="tokenize">
|
1832
|
+
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
1833
|
+
<!-- 2009 thinspace -->
|
1834
|
+
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
1835
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
|
1836
|
+
</xsl:call-template>
|
1837
|
+
</xsl:variable>
|
1838
|
+
<xsl:variable name="max_length">
|
1839
|
+
<xsl:call-template name="max_length">
|
1840
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
1841
|
+
</xsl:call-template>
|
1842
|
+
</xsl:variable>
|
1843
|
+
<width>
|
1844
|
+
<xsl:variable name="divider">
|
1845
|
+
<xsl:choose>
|
1846
|
+
<xsl:when test="td[$curr-col]/@divide">
|
1847
|
+
<xsl:value-of select="td[$curr-col]/@divide"/>
|
1848
|
+
</xsl:when>
|
1849
|
+
<xsl:otherwise>1</xsl:otherwise>
|
1850
|
+
</xsl:choose>
|
1851
|
+
</xsl:variable>
|
1852
|
+
<xsl:value-of select="$max_length div $divider"/>
|
1853
|
+
</width>
|
1854
|
+
|
1855
|
+
</xsl:for-each>
|
1856
|
+
|
1857
|
+
</xsl:otherwise>
|
1858
|
+
</xsl:choose>
|
1859
|
+
</xsl:variable>
|
1860
|
+
|
1861
|
+
|
1862
|
+
<column>
|
1863
|
+
<xsl:for-each select="xalan:nodeset($widths)//width">
|
1864
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
1865
|
+
<xsl:if test="position()=1">
|
1866
|
+
<xsl:value-of select="."/>
|
1867
|
+
</xsl:if>
|
1868
|
+
</xsl:for-each>
|
1869
|
+
</column>
|
1870
|
+
<xsl:call-template name="calculate-column-widths">
|
1871
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1872
|
+
<xsl:with-param name="curr-col" select="$curr-col +1"/>
|
1873
|
+
<xsl:with-param name="table" select="$table"/>
|
1874
|
+
</xsl:call-template>
|
1875
|
+
</xsl:if>
|
1876
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()" mode="td_text">
|
1877
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
1878
|
+
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
1879
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='termsource']" mode="td_text">
|
1880
|
+
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1881
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" mode="td_text">
|
1882
|
+
<xsl:value-of select="@target"/>
|
1883
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table2']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']" mode="process">
|
1884
|
+
<xsl:param name="cols-count"/>
|
1885
|
+
<!-- font-weight="bold" -->
|
1886
|
+
<fo:table-header>
|
1887
|
+
|
1888
|
+
<xsl:apply-templates/>
|
1889
|
+
</fo:table-header>
|
1890
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']" mode="process">
|
1891
|
+
<xsl:apply-templates/>
|
1892
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertTableFooter">
|
1893
|
+
<xsl:param name="cols-count"/>
|
1894
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1895
|
+
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
1896
|
+
|
1897
|
+
<fo:table-footer>
|
1898
|
+
|
1899
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1900
|
+
|
1901
|
+
<!-- if there are note(s) or fn(s) then create footer row -->
|
1902
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1903
|
+
|
1904
|
+
|
1905
|
+
|
1906
|
+
<fo:table-row>
|
1907
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1908
|
+
|
1909
|
+
|
1910
|
+
|
1911
|
+
<!-- fn will be processed inside 'note' processing -->
|
1912
|
+
|
1913
|
+
|
1914
|
+
<!-- except gb -->
|
1915
|
+
|
1916
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1917
|
+
|
1918
|
+
|
1919
|
+
<!-- horizontal row separator -->
|
1920
|
+
|
1921
|
+
|
1922
|
+
<!-- fn processing -->
|
1923
|
+
<xsl:call-template name="fn_display"/>
|
1924
|
+
|
1925
|
+
</fo:table-cell>
|
1926
|
+
</fo:table-row>
|
1927
|
+
|
1928
|
+
</xsl:if>
|
1929
|
+
</fo:table-footer>
|
1930
|
+
|
1931
|
+
</xsl:if>
|
1932
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tbody']">
|
1933
|
+
|
1934
|
+
<xsl:variable name="cols-count">
|
1935
|
+
<xsl:choose>
|
1936
|
+
<xsl:when test="../*[local-name()='thead']">
|
1937
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1938
|
+
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1939
|
+
</xsl:call-template>
|
1940
|
+
</xsl:when>
|
1941
|
+
<xsl:otherwise>
|
1942
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1943
|
+
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
1944
|
+
</xsl:call-template>
|
1945
|
+
</xsl:otherwise>
|
1946
|
+
</xsl:choose>
|
1947
|
+
</xsl:variable>
|
1948
|
+
|
1949
|
+
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1950
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1951
|
+
</xsl:apply-templates>
|
1952
|
+
|
1953
|
+
<xsl:call-template name="insertTableFooter">
|
1954
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1955
|
+
</xsl:call-template>
|
1956
|
+
|
1957
|
+
<fo:table-body>
|
1958
|
+
<xsl:apply-templates/>
|
1959
|
+
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1960
|
+
|
1961
|
+
</fo:table-body>
|
1962
|
+
|
1963
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']">
|
1964
|
+
<xsl:variable name="parent-name" select="local-name(..)"/>
|
1965
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
1966
|
+
<fo:table-row min-height="4mm">
|
1967
|
+
<xsl:if test="$parent-name = 'thead'">
|
1968
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1969
|
+
|
1970
|
+
|
1971
|
+
|
1972
|
+
|
1973
|
+
|
1974
|
+
</xsl:if>
|
1975
|
+
<xsl:if test="$parent-name = 'tfoot'">
|
1976
|
+
|
1977
|
+
|
1978
|
+
</xsl:if>
|
1979
|
+
|
1980
|
+
|
1981
|
+
<xsl:apply-templates/>
|
1982
|
+
</fo:table-row>
|
1983
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th']">
|
1984
|
+
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
1985
|
+
|
1986
|
+
|
1987
|
+
|
1988
|
+
|
1989
|
+
|
1990
|
+
|
1991
|
+
|
1992
|
+
<xsl:if test="@colspan">
|
1993
|
+
<xsl:attribute name="number-columns-spanned">
|
1994
|
+
<xsl:value-of select="@colspan"/>
|
1995
|
+
</xsl:attribute>
|
1996
|
+
</xsl:if>
|
1997
|
+
<xsl:if test="@rowspan">
|
1998
|
+
<xsl:attribute name="number-rows-spanned">
|
1999
|
+
<xsl:value-of select="@rowspan"/>
|
2000
|
+
</xsl:attribute>
|
2001
|
+
</xsl:if>
|
2002
|
+
<fo:block>
|
2003
|
+
<xsl:apply-templates/>
|
2004
|
+
</fo:block>
|
2005
|
+
</fo:table-cell>
|
2006
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']">
|
2007
|
+
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2008
|
+
|
2009
|
+
|
2010
|
+
|
2011
|
+
|
2012
|
+
|
2013
|
+
|
2014
|
+
|
2015
|
+
|
2016
|
+
|
2017
|
+
<xsl:if test="@colspan">
|
2018
|
+
<xsl:attribute name="number-columns-spanned">
|
2019
|
+
<xsl:value-of select="@colspan"/>
|
2020
|
+
</xsl:attribute>
|
2021
|
+
</xsl:if>
|
2022
|
+
<xsl:if test="@rowspan">
|
2023
|
+
<xsl:attribute name="number-rows-spanned">
|
2024
|
+
<xsl:value-of select="@rowspan"/>
|
2025
|
+
</xsl:attribute>
|
2026
|
+
</xsl:if>
|
2027
|
+
<fo:block>
|
2028
|
+
|
2029
|
+
<xsl:apply-templates/>
|
2030
|
+
</fo:block>
|
2031
|
+
<!-- <xsl:choose>
|
2032
|
+
<xsl:when test="count(*) = 1 and *[local-name() = 'p']">
|
2033
|
+
<xsl:apply-templates />
|
2034
|
+
</xsl:when>
|
2035
|
+
<xsl:otherwise>
|
2036
|
+
<fo:block>
|
2037
|
+
<xsl:apply-templates />
|
2038
|
+
</fo:block>
|
2039
|
+
</xsl:otherwise>
|
2040
|
+
</xsl:choose> -->
|
2041
|
+
|
2042
|
+
|
2043
|
+
</fo:table-cell>
|
2044
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
2045
|
+
|
2046
|
+
|
2047
|
+
<fo:block font-size="10pt" margin-bottom="12pt">
|
2048
|
+
|
2049
|
+
|
2050
|
+
|
2051
|
+
|
2052
|
+
<fo:inline padding-right="2mm">
|
2053
|
+
|
2054
|
+
|
2055
|
+
<xsl:value-of select="$title-note"/>
|
2056
|
+
|
2057
|
+
<xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
|
2058
|
+
<xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) > 1">
|
2059
|
+
<xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
|
2060
|
+
</xsl:if>
|
2061
|
+
|
2062
|
+
|
2063
|
+
|
2064
|
+
|
2065
|
+
</fo:inline>
|
2066
|
+
<xsl:apply-templates mode="process"/>
|
2067
|
+
</fo:block>
|
2068
|
+
|
2069
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
2070
|
+
<xsl:apply-templates/>
|
2071
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display">
|
2072
|
+
<xsl:variable name="references">
|
2073
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2074
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2075
|
+
|
2076
|
+
|
2077
|
+
<xsl:apply-templates/>
|
2078
|
+
</fn>
|
2079
|
+
</xsl:for-each>
|
2080
|
+
</xsl:variable>
|
2081
|
+
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2082
|
+
<xsl:variable name="reference" select="@reference"/>
|
2083
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2084
|
+
<fo:block margin-bottom="12pt">
|
2085
|
+
|
2086
|
+
|
2087
|
+
|
2088
|
+
|
2089
|
+
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2090
|
+
|
2091
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2092
|
+
|
2093
|
+
|
2094
|
+
|
2095
|
+
|
2096
|
+
|
2097
|
+
|
2098
|
+
<xsl:value-of select="@reference"/>
|
2099
|
+
|
2100
|
+
</fo:inline>
|
2101
|
+
<fo:inline>
|
2102
|
+
|
2103
|
+
<xsl:apply-templates/>
|
2104
|
+
</fo:inline>
|
2105
|
+
</fo:block>
|
2106
|
+
</xsl:if>
|
2107
|
+
</xsl:for-each>
|
2108
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_name_display">
|
2109
|
+
<!-- <xsl:variable name="references">
|
2110
|
+
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
2111
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2112
|
+
<xsl:apply-templates />
|
2113
|
+
</fn>
|
2114
|
+
</xsl:for-each>
|
2115
|
+
</xsl:variable>
|
2116
|
+
$references=<xsl:copy-of select="$references"/> -->
|
2117
|
+
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
2118
|
+
<xsl:variable name="reference" select="@reference"/>
|
2119
|
+
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
2120
|
+
<fo:block margin-bottom="12pt">
|
2121
|
+
<xsl:apply-templates/>
|
2122
|
+
</fo:block>
|
2123
|
+
</xsl:for-each>
|
2124
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display_figure">
|
2125
|
+
<xsl:variable name="key_iso">
|
2126
|
+
<!-- and (not(@class) or @class !='pseudocode') -->
|
2127
|
+
</xsl:variable>
|
2128
|
+
<xsl:variable name="references">
|
2129
|
+
<xsl:for-each select=".//*[local-name()='fn']">
|
2130
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2131
|
+
<xsl:apply-templates/>
|
2132
|
+
</fn>
|
2133
|
+
</xsl:for-each>
|
2134
|
+
</xsl:variable>
|
2135
|
+
<xsl:if test="xalan:nodeset($references)//fn">
|
2136
|
+
<fo:block>
|
2137
|
+
<fo:table width="95%" table-layout="fixed">
|
2138
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2139
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2140
|
+
|
2141
|
+
</xsl:if>
|
2142
|
+
<fo:table-column column-width="15%"/>
|
2143
|
+
<fo:table-column column-width="85%"/>
|
2144
|
+
<fo:table-body>
|
2145
|
+
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2146
|
+
<xsl:variable name="reference" select="@reference"/>
|
2147
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2148
|
+
<fo:table-row>
|
2149
|
+
<fo:table-cell>
|
2150
|
+
<fo:block>
|
2151
|
+
<fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
|
2152
|
+
|
2153
|
+
<xsl:value-of select="@reference"/>
|
2154
|
+
</fo:inline>
|
2155
|
+
</fo:block>
|
2156
|
+
</fo:table-cell>
|
2157
|
+
<fo:table-cell>
|
2158
|
+
<fo:block text-align="justify" margin-bottom="12pt">
|
2159
|
+
|
2160
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2161
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2162
|
+
</xsl:if>
|
2163
|
+
|
2164
|
+
<xsl:apply-templates/>
|
2165
|
+
</fo:block>
|
2166
|
+
</fo:table-cell>
|
2167
|
+
</fo:table-row>
|
2168
|
+
</xsl:if>
|
2169
|
+
</xsl:for-each>
|
2170
|
+
</fo:table-body>
|
2171
|
+
</fo:table>
|
2172
|
+
</fo:block>
|
2173
|
+
</xsl:if>
|
2174
|
+
|
2175
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']">
|
2176
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
2177
|
+
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
2178
|
+
|
2179
|
+
|
2180
|
+
|
2181
|
+
|
2182
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2183
|
+
|
2184
|
+
<xsl:value-of select="@reference"/>
|
2185
|
+
</fo:basic-link>
|
2186
|
+
</fo:inline>
|
2187
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']/*[local-name()='p']">
|
2188
|
+
<fo:inline>
|
2189
|
+
<xsl:apply-templates/>
|
2190
|
+
</fo:inline>
|
2191
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']">
|
2192
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2193
|
+
|
2194
|
+
<xsl:variable name="key_iso">
|
2195
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2196
|
+
</xsl:variable>
|
2197
|
+
|
2198
|
+
<xsl:choose>
|
2199
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2200
|
+
|
2201
|
+
|
2202
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2203
|
+
|
2204
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2205
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2206
|
+
<xsl:text/>
|
2207
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2208
|
+
</fo:block>
|
2209
|
+
|
2210
|
+
</xsl:when>
|
2211
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2212
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2213
|
+
|
2214
|
+
|
2215
|
+
|
2216
|
+
|
2217
|
+
<xsl:value-of select="$title-where"/>
|
2218
|
+
</fo:block>
|
2219
|
+
</xsl:when>
|
2220
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2221
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
|
2222
|
+
|
2223
|
+
|
2224
|
+
|
2225
|
+
<xsl:value-of select="$title-key"/>
|
2226
|
+
</fo:block>
|
2227
|
+
</xsl:when>
|
2228
|
+
</xsl:choose>
|
2229
|
+
|
2230
|
+
<!-- a few components -->
|
2231
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2232
|
+
<fo:block>
|
2233
|
+
|
2234
|
+
|
2235
|
+
|
2236
|
+
|
2237
|
+
<fo:block>
|
2238
|
+
|
2239
|
+
|
2240
|
+
|
2241
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2242
|
+
<xsl:variable name="html-table">
|
2243
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
2244
|
+
<xsl:element name="{$ns}:table">
|
2245
|
+
<tbody>
|
2246
|
+
<xsl:apply-templates mode="dl"/>
|
2247
|
+
</tbody>
|
2248
|
+
</xsl:element>
|
2249
|
+
</xsl:variable>
|
2250
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2251
|
+
<xsl:variable name="colwidths">
|
2252
|
+
<xsl:call-template name="calculate-column-widths">
|
2253
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2254
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2255
|
+
</xsl:call-template>
|
2256
|
+
</xsl:variable>
|
2257
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2258
|
+
|
2259
|
+
<fo:table width="95%" table-layout="fixed">
|
2260
|
+
|
2261
|
+
<xsl:choose>
|
2262
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2263
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2264
|
+
</xsl:when>
|
2265
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2266
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2267
|
+
|
2268
|
+
</xsl:when>
|
2269
|
+
</xsl:choose>
|
2270
|
+
<xsl:choose>
|
2271
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
2272
|
+
<fo:table-column column-width="50%"/>
|
2273
|
+
<fo:table-column column-width="50%"/>
|
2274
|
+
</xsl:when>
|
2275
|
+
<xsl:otherwise>
|
2276
|
+
<xsl:choose>
|
2277
|
+
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2278
|
+
<fo:table-column column-width="60%"/>
|
2279
|
+
<fo:table-column column-width="40%"/>
|
2280
|
+
</xsl:when> -->
|
2281
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.3">
|
2282
|
+
<fo:table-column column-width="50%"/>
|
2283
|
+
<fo:table-column column-width="50%"/>
|
2284
|
+
</xsl:when>
|
2285
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
|
2286
|
+
<fo:table-column column-width="40%"/>
|
2287
|
+
<fo:table-column column-width="60%"/>
|
2288
|
+
</xsl:when>
|
2289
|
+
<xsl:otherwise>
|
2290
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2291
|
+
<xsl:choose>
|
2292
|
+
<xsl:when test=". = 1 or . = 0">
|
2293
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2294
|
+
</xsl:when>
|
2295
|
+
<xsl:otherwise>
|
2296
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2297
|
+
</xsl:otherwise>
|
2298
|
+
</xsl:choose>
|
2299
|
+
</xsl:for-each>
|
2300
|
+
</xsl:otherwise>
|
2301
|
+
</xsl:choose>
|
2302
|
+
<!-- <fo:table-column column-width="15%"/>
|
2303
|
+
<fo:table-column column-width="85%"/> -->
|
2304
|
+
</xsl:otherwise>
|
2305
|
+
</xsl:choose>
|
2306
|
+
<fo:table-body>
|
2307
|
+
<xsl:apply-templates>
|
2308
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2309
|
+
</xsl:apply-templates>
|
2310
|
+
</fo:table-body>
|
2311
|
+
</fo:table>
|
2312
|
+
</fo:block>
|
2313
|
+
</fo:block>
|
2314
|
+
</xsl:if>
|
2315
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']/*[local-name()='note']">
|
2316
|
+
<xsl:param name="key_iso"/>
|
2317
|
+
|
2318
|
+
<!-- <tr>
|
2319
|
+
<td>NOTE</td>
|
2320
|
+
<td>
|
2321
|
+
<xsl:apply-templates />
|
2322
|
+
</td>
|
2323
|
+
</tr>
|
2324
|
+
-->
|
2325
|
+
<fo:table-row>
|
2326
|
+
<fo:table-cell>
|
2327
|
+
<fo:block margin-top="6pt">
|
2328
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2329
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2330
|
+
</xsl:if>
|
2331
|
+
<xsl:value-of select="$title-note"/>
|
2332
|
+
</fo:block>
|
2333
|
+
</fo:table-cell>
|
2334
|
+
<fo:table-cell>
|
2335
|
+
<fo:block>
|
2336
|
+
<xsl:apply-templates/>
|
2337
|
+
</fo:block>
|
2338
|
+
</fo:table-cell>
|
2339
|
+
</fo:table-row>
|
2340
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']" mode="dl">
|
2341
|
+
<tr>
|
2342
|
+
<td>
|
2343
|
+
<xsl:apply-templates/>
|
2344
|
+
</td>
|
2345
|
+
<td>
|
2346
|
+
|
2347
|
+
|
2348
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2349
|
+
|
2350
|
+
</td>
|
2351
|
+
</tr>
|
2352
|
+
|
2353
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']">
|
2354
|
+
<xsl:param name="key_iso"/>
|
2355
|
+
|
2356
|
+
<fo:table-row>
|
2357
|
+
<fo:table-cell>
|
2358
|
+
|
2359
|
+
<fo:block margin-top="6pt">
|
2360
|
+
|
2361
|
+
|
2362
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2363
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2364
|
+
|
2365
|
+
</xsl:if>
|
2366
|
+
|
2367
|
+
|
2368
|
+
|
2369
|
+
|
2370
|
+
|
2371
|
+
<xsl:apply-templates/>
|
2372
|
+
|
2373
|
+
</fo:block>
|
2374
|
+
</fo:table-cell>
|
2375
|
+
<fo:table-cell>
|
2376
|
+
<fo:block>
|
2377
|
+
|
2378
|
+
|
2379
|
+
|
2380
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2381
|
+
|
2382
|
+
</fo:block>
|
2383
|
+
</fo:table-cell>
|
2384
|
+
</fo:table-row>
|
2385
|
+
|
2386
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl_process">
|
2387
|
+
<xsl:apply-templates/>
|
2388
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="process">
|
2389
|
+
<xsl:apply-templates/>
|
2390
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
2391
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
2392
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='em']">
|
2393
|
+
<fo:inline font-style="italic">
|
2394
|
+
<xsl:apply-templates/>
|
2395
|
+
</fo:inline>
|
2396
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='strong']">
|
2397
|
+
<fo:inline font-weight="bold">
|
2398
|
+
<xsl:apply-templates/>
|
2399
|
+
</fo:inline>
|
2400
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sup']">
|
2401
|
+
<fo:inline font-size="80%" vertical-align="super">
|
2402
|
+
<xsl:apply-templates/>
|
2403
|
+
</fo:inline>
|
2404
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sub']">
|
2405
|
+
<fo:inline font-size="80%" vertical-align="sub">
|
2406
|
+
<xsl:apply-templates/>
|
2407
|
+
</fo:inline>
|
2408
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tt']">
|
2409
|
+
<fo:inline font-family="Courier" font-size="10pt">
|
2410
|
+
<xsl:apply-templates/>
|
2411
|
+
</fo:inline>
|
2412
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='del']">
|
2413
|
+
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2414
|
+
<xsl:apply-templates/>
|
2415
|
+
</fo:inline>
|
2416
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()[ancestor::*[local-name()='smallcap']]">
|
2417
|
+
<xsl:variable name="text" select="normalize-space(.)"/>
|
2418
|
+
<fo:inline font-size="75%">
|
2419
|
+
<xsl:if test="string-length($text) > 0">
|
2420
|
+
<xsl:call-template name="recursiveSmallCaps">
|
2421
|
+
<xsl:with-param name="text" select="$text"/>
|
2422
|
+
</xsl:call-template>
|
2423
|
+
</xsl:if>
|
2424
|
+
</fo:inline>
|
2425
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="recursiveSmallCaps">
|
2426
|
+
<xsl:param name="text"/>
|
2427
|
+
<xsl:variable name="char" select="substring($text,1,1)"/>
|
2428
|
+
<xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
|
2429
|
+
<xsl:choose>
|
2430
|
+
<xsl:when test="$char=$upperCase">
|
2431
|
+
<fo:inline font-size="{100 div 0.75}%">
|
2432
|
+
<xsl:value-of select="$upperCase"/>
|
2433
|
+
</fo:inline>
|
2434
|
+
</xsl:when>
|
2435
|
+
<xsl:otherwise>
|
2436
|
+
<xsl:value-of select="$upperCase"/>
|
2437
|
+
</xsl:otherwise>
|
2438
|
+
</xsl:choose>
|
2439
|
+
<xsl:if test="string-length($text) > 1">
|
2440
|
+
<xsl:call-template name="recursiveSmallCaps">
|
2441
|
+
<xsl:with-param name="text" select="substring($text,2)"/>
|
2442
|
+
</xsl:call-template>
|
2443
|
+
</xsl:if>
|
2444
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="tokenize">
|
2445
|
+
<xsl:param name="text"/>
|
2446
|
+
<xsl:param name="separator" select="' '"/>
|
2447
|
+
<xsl:choose>
|
2448
|
+
<xsl:when test="not(contains($text, $separator))">
|
2449
|
+
<word>
|
2450
|
+
<xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
|
2451
|
+
<xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
|
2452
|
+
<xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
|
2453
|
+
<xsl:variable name="len_str">
|
2454
|
+
<xsl:choose>
|
2455
|
+
<xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
|
2456
|
+
<xsl:value-of select="$len_str_tmp * 1.5"/>
|
2457
|
+
</xsl:when>
|
2458
|
+
<xsl:otherwise>
|
2459
|
+
<xsl:value-of select="$len_str_tmp"/>
|
2460
|
+
</xsl:otherwise>
|
2461
|
+
</xsl:choose>
|
2462
|
+
</xsl:variable>
|
2463
|
+
|
2464
|
+
<!-- <xsl:if test="$len_str_no_en_chars div $len_str > 0.8">
|
2465
|
+
<xsl:message>
|
2466
|
+
div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
|
2467
|
+
len_str=<xsl:value-of select="$len_str"/>
|
2468
|
+
len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
|
2469
|
+
</xsl:message>
|
2470
|
+
</xsl:if> -->
|
2471
|
+
<!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
|
2472
|
+
<len_str><xsl:value-of select="$len_str"/></len_str> -->
|
2473
|
+
<xsl:choose>
|
2474
|
+
<xsl:when test="$len_str_no_en_chars div $len_str > 0.8"> <!-- means non-english string -->
|
2475
|
+
<xsl:value-of select="$len_str - $len_str_no_en_chars"/>
|
2476
|
+
</xsl:when>
|
2477
|
+
<xsl:otherwise>
|
2478
|
+
<xsl:value-of select="$len_str"/>
|
2479
|
+
</xsl:otherwise>
|
2480
|
+
</xsl:choose>
|
2481
|
+
</word>
|
2482
|
+
</xsl:when>
|
2483
|
+
<xsl:otherwise>
|
2484
|
+
<word>
|
2485
|
+
<xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
|
2486
|
+
</word>
|
2487
|
+
<xsl:call-template name="tokenize">
|
2488
|
+
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
2489
|
+
</xsl:call-template>
|
2490
|
+
</xsl:otherwise>
|
2491
|
+
</xsl:choose>
|
2492
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="max_length">
|
2493
|
+
<xsl:param name="words"/>
|
2494
|
+
<xsl:for-each select="$words//word">
|
2495
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2496
|
+
<xsl:if test="position()=1">
|
2497
|
+
<xsl:value-of select="."/>
|
2498
|
+
</xsl:if>
|
2499
|
+
</xsl:for-each>
|
2500
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-java">
|
2501
|
+
<xsl:param name="text" select="."/>
|
2502
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2503
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2504
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces">
|
2505
|
+
<xsl:param name="text" select="."/>
|
2506
|
+
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
2507
|
+
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
2508
|
+
<xsl:variable name="zero-space-after-colon">:</xsl:variable>
|
2509
|
+
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
2510
|
+
<xsl:variable name="zero-space-after-underscore">_</xsl:variable>
|
2511
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
2512
|
+
<xsl:choose>
|
2513
|
+
<xsl:when test="contains($text, $zero-space-after-chars)">
|
2514
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-chars)"/>
|
2515
|
+
<xsl:value-of select="$zero-space-after-chars"/>
|
2516
|
+
<xsl:value-of select="$zero-space"/>
|
2517
|
+
<xsl:call-template name="add-zero-spaces">
|
2518
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-chars)"/>
|
2519
|
+
</xsl:call-template>
|
2520
|
+
</xsl:when>
|
2521
|
+
<xsl:when test="contains($text, $zero-space-after-dot)">
|
2522
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-dot)"/>
|
2523
|
+
<xsl:value-of select="$zero-space-after-dot"/>
|
2524
|
+
<xsl:value-of select="$zero-space"/>
|
2525
|
+
<xsl:call-template name="add-zero-spaces">
|
2526
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-dot)"/>
|
2527
|
+
</xsl:call-template>
|
2528
|
+
</xsl:when>
|
2529
|
+
<xsl:when test="contains($text, $zero-space-after-colon)">
|
2530
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-colon)"/>
|
2531
|
+
<xsl:value-of select="$zero-space-after-colon"/>
|
2532
|
+
<xsl:value-of select="$zero-space"/>
|
2533
|
+
<xsl:call-template name="add-zero-spaces">
|
2534
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-colon)"/>
|
2535
|
+
</xsl:call-template>
|
2536
|
+
</xsl:when>
|
2537
|
+
<xsl:when test="contains($text, $zero-space-after-equal)">
|
2538
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
2539
|
+
<xsl:value-of select="$zero-space-after-equal"/>
|
2540
|
+
<xsl:value-of select="$zero-space"/>
|
2541
|
+
<xsl:call-template name="add-zero-spaces">
|
2542
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
2543
|
+
</xsl:call-template>
|
2544
|
+
</xsl:when>
|
2545
|
+
<xsl:when test="contains($text, $zero-space-after-underscore)">
|
2546
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
|
2547
|
+
<xsl:value-of select="$zero-space-after-underscore"/>
|
2548
|
+
<xsl:value-of select="$zero-space"/>
|
2549
|
+
<xsl:call-template name="add-zero-spaces">
|
2550
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
|
2551
|
+
</xsl:call-template>
|
2552
|
+
</xsl:when>
|
2553
|
+
<xsl:otherwise>
|
2554
|
+
<xsl:value-of select="$text"/>
|
2555
|
+
</xsl:otherwise>
|
2556
|
+
</xsl:choose>
|
2557
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-equal">
|
2558
|
+
<xsl:param name="text" select="."/>
|
2559
|
+
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
2560
|
+
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
2561
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
2562
|
+
<xsl:choose>
|
2563
|
+
<xsl:when test="contains($text, $zero-space-after-equals)">
|
2564
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
2565
|
+
<xsl:value-of select="$zero-space-after-equals"/>
|
2566
|
+
<xsl:value-of select="$zero-space"/>
|
2567
|
+
<xsl:call-template name="add-zero-spaces-equal">
|
2568
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
2569
|
+
</xsl:call-template>
|
2570
|
+
</xsl:when>
|
2571
|
+
<xsl:when test="contains($text, $zero-space-after-equal)">
|
2572
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
2573
|
+
<xsl:value-of select="$zero-space-after-equal"/>
|
2574
|
+
<xsl:value-of select="$zero-space"/>
|
2575
|
+
<xsl:call-template name="add-zero-spaces-equal">
|
2576
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
2577
|
+
</xsl:call-template>
|
2578
|
+
</xsl:when>
|
2579
|
+
<xsl:otherwise>
|
2580
|
+
<xsl:value-of select="$text"/>
|
2581
|
+
</xsl:otherwise>
|
2582
|
+
</xsl:choose>
|
2583
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getSimpleTable">
|
2584
|
+
<xsl:variable name="simple-table">
|
2585
|
+
|
2586
|
+
<!-- Step 1. colspan processing -->
|
2587
|
+
<xsl:variable name="simple-table-colspan">
|
2588
|
+
<tbody>
|
2589
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2590
|
+
</tbody>
|
2591
|
+
</xsl:variable>
|
2592
|
+
|
2593
|
+
<!-- Step 2. rowspan processing -->
|
2594
|
+
<xsl:variable name="simple-table-rowspan">
|
2595
|
+
<xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
|
2596
|
+
</xsl:variable>
|
2597
|
+
|
2598
|
+
<xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
|
2599
|
+
|
2600
|
+
<!-- <xsl:choose>
|
2601
|
+
<xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
|
2602
|
+
|
2603
|
+
</xsl:when>
|
2604
|
+
<xsl:otherwise>
|
2605
|
+
<xsl:copy-of select="current()"/>
|
2606
|
+
</xsl:otherwise>
|
2607
|
+
</xsl:choose> -->
|
2608
|
+
</xsl:variable>
|
2609
|
+
<xsl:copy-of select="$simple-table"/>
|
2610
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
2611
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2612
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
|
2613
|
+
<xsl:choose>
|
2614
|
+
<xsl:when test="@colspan">
|
2615
|
+
<xsl:variable name="td">
|
2616
|
+
<xsl:element name="td">
|
2617
|
+
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
2618
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
2619
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2620
|
+
</xsl:element>
|
2621
|
+
</xsl:variable>
|
2622
|
+
<xsl:call-template name="repeatNode">
|
2623
|
+
<xsl:with-param name="count" select="@colspan"/>
|
2624
|
+
<xsl:with-param name="node" select="$td"/>
|
2625
|
+
</xsl:call-template>
|
2626
|
+
</xsl:when>
|
2627
|
+
<xsl:otherwise>
|
2628
|
+
<xsl:element name="td">
|
2629
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
2630
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2631
|
+
</xsl:element>
|
2632
|
+
</xsl:otherwise>
|
2633
|
+
</xsl:choose>
|
2634
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@colspan" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']" mode="simple-table-colspan">
|
2635
|
+
<xsl:element name="tr">
|
2636
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
2637
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2638
|
+
</xsl:element>
|
2639
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-colspan">
|
2640
|
+
<xsl:copy>
|
2641
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
|
2642
|
+
</xsl:copy>
|
2643
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="repeatNode">
|
2644
|
+
<xsl:param name="count"/>
|
2645
|
+
<xsl:param name="node"/>
|
2646
|
+
|
2647
|
+
<xsl:if test="$count > 0">
|
2648
|
+
<xsl:call-template name="repeatNode">
|
2649
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
2650
|
+
<xsl:with-param name="node" select="$node"/>
|
2651
|
+
</xsl:call-template>
|
2652
|
+
<xsl:copy-of select="$node"/>
|
2653
|
+
</xsl:if>
|
2654
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-rowspan">
|
2655
|
+
<xsl:copy>
|
2656
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
|
2657
|
+
</xsl:copy>
|
2658
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tbody" mode="simple-table-rowspan">
|
2659
|
+
<xsl:copy>
|
2660
|
+
<xsl:copy-of select="tr[1]"/>
|
2661
|
+
<xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
|
2662
|
+
<xsl:with-param name="previousRow" select="tr[1]"/>
|
2663
|
+
</xsl:apply-templates>
|
2664
|
+
</xsl:copy>
|
2665
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tr" mode="simple-table-rowspan">
|
2666
|
+
<xsl:param name="previousRow"/>
|
2667
|
+
<xsl:variable name="currentRow" select="."/>
|
2668
|
+
|
2669
|
+
<xsl:variable name="normalizedTDs">
|
2670
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//td">
|
2671
|
+
<xsl:choose>
|
2672
|
+
<xsl:when test="@rowspan > 1">
|
2673
|
+
<xsl:copy>
|
2674
|
+
<xsl:attribute name="rowspan">
|
2675
|
+
<xsl:value-of select="@rowspan - 1"/>
|
2676
|
+
</xsl:attribute>
|
2677
|
+
<xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
|
2678
|
+
<xsl:copy-of select="node()"/>
|
2679
|
+
</xsl:copy>
|
2680
|
+
</xsl:when>
|
2681
|
+
<xsl:otherwise>
|
2682
|
+
<xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
|
2683
|
+
</xsl:otherwise>
|
2684
|
+
</xsl:choose>
|
2685
|
+
</xsl:for-each>
|
2686
|
+
</xsl:variable>
|
2687
|
+
|
2688
|
+
<xsl:variable name="newRow">
|
2689
|
+
<xsl:copy>
|
2690
|
+
<xsl:copy-of select="$currentRow/@*"/>
|
2691
|
+
<xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
|
2692
|
+
</xsl:copy>
|
2693
|
+
</xsl:variable>
|
2694
|
+
<xsl:copy-of select="$newRow"/>
|
2695
|
+
|
2696
|
+
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
2697
|
+
<xsl:with-param name="previousRow" select="$newRow"/>
|
2698
|
+
</xsl:apply-templates>
|
2699
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getLang">
|
2700
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2701
|
+
<xsl:choose>
|
2702
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
2703
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
2704
|
+
</xsl:choose>
|
2705
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="capitalizeWords">
|
2706
|
+
<xsl:param name="str"/>
|
2707
|
+
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
2708
|
+
<xsl:choose>
|
2709
|
+
<xsl:when test="contains($str2, ' ')">
|
2710
|
+
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
2711
|
+
<xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
2712
|
+
<xsl:value-of select="substring($substr, 2)"/>
|
2713
|
+
<xsl:text> </xsl:text>
|
2714
|
+
<xsl:call-template name="capitalizeWords">
|
2715
|
+
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
2716
|
+
</xsl:call-template>
|
2717
|
+
</xsl:when>
|
2718
|
+
<xsl:otherwise>
|
2719
|
+
<xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
2720
|
+
<xsl:value-of select="substring($str2, 2)"/>
|
2721
|
+
</xsl:otherwise>
|
2722
|
+
</xsl:choose>
|
2723
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="mathml:math">
|
2724
|
+
<fo:inline font-family="STIX2Math">
|
2725
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2726
|
+
<xsl:copy-of select="."/>
|
2727
|
+
</fo:instream-foreign-object>
|
2728
|
+
</fo:inline>
|
2729
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='localityStack']">
|
2730
|
+
<xsl:for-each select="*[local-name()='locality']">
|
2731
|
+
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
2732
|
+
<xsl:apply-templates select="."/>
|
2733
|
+
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
2734
|
+
</xsl:for-each>
|
2735
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" name="link">
|
2736
|
+
<xsl:variable name="target">
|
2737
|
+
<xsl:choose>
|
2738
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
2739
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
2740
|
+
</xsl:when>
|
2741
|
+
<xsl:otherwise>
|
2742
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
2743
|
+
</xsl:otherwise>
|
2744
|
+
</xsl:choose>
|
2745
|
+
</xsl:variable>
|
2746
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
2747
|
+
<xsl:choose>
|
2748
|
+
<xsl:when test="$target = ''">
|
2749
|
+
<xsl:apply-templates/>
|
2750
|
+
</xsl:when>
|
2751
|
+
<xsl:otherwise>
|
2752
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2753
|
+
<xsl:choose>
|
2754
|
+
<xsl:when test="normalize-space(.) = ''">
|
2755
|
+
<xsl:value-of select="$target"/>
|
2756
|
+
</xsl:when>
|
2757
|
+
<xsl:otherwise>
|
2758
|
+
<xsl:apply-templates/>
|
2759
|
+
</xsl:otherwise>
|
2760
|
+
</xsl:choose>
|
2761
|
+
</fo:basic-link>
|
2762
|
+
</xsl:otherwise>
|
2763
|
+
</xsl:choose>
|
2764
|
+
</fo:inline>
|
2765
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sourcecode']" name="sourcecode">
|
2766
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
2767
|
+
<!-- <xsl:choose>
|
2768
|
+
<xsl:when test="@lang = 'en'"></xsl:when>
|
2769
|
+
<xsl:otherwise> -->
|
2770
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2771
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2772
|
+
<!-- </xsl:otherwise>
|
2773
|
+
</xsl:choose> -->
|
2774
|
+
<xsl:apply-templates/>
|
2775
|
+
</fo:block>
|
2776
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='bookmark']">
|
2777
|
+
<fo:inline id="{@id}"/>
|
2778
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']">
|
2779
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
2780
|
+
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
2781
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
2782
|
+
</fo:block>
|
2783
|
+
<xsl:apply-templates/>
|
2784
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
2785
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2786
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']">
|
2787
|
+
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
2788
|
+
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
2789
|
+
<xsl:value-of select="$title-example"/>
|
2790
|
+
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
2791
|
+
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
2792
|
+
</xsl:if>
|
2793
|
+
<xsl:if test="*[local-name()='name']">
|
2794
|
+
<xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
2795
|
+
</xsl:if>
|
2796
|
+
</fo:block>
|
2797
|
+
<xsl:apply-templates/>
|
2798
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
|
2799
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2800
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'callout']">
|
2801
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
2802
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']">
|
2803
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
2804
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
2805
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
2806
|
+
<fo:inline>
|
2807
|
+
<xsl:apply-templates>
|
2808
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
2809
|
+
</xsl:apply-templates>
|
2810
|
+
</fo:inline>
|
2811
|
+
</fo:block>
|
2812
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
2813
|
+
<xsl:param name="callout"/>
|
2814
|
+
<fo:inline id="{@id}">
|
2815
|
+
<!-- for first p in annotation, put <x> -->
|
2816
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
2817
|
+
<xsl:apply-templates/>
|
2818
|
+
</fo:inline>
|
2819
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="convertDate">
|
2820
|
+
<xsl:param name="date"/>
|
2821
|
+
<xsl:param name="format" select="'short'"/>
|
2822
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
2823
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
2824
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
2825
|
+
<xsl:variable name="monthStr">
|
2826
|
+
<xsl:choose>
|
2827
|
+
<xsl:when test="$month = '01'">January</xsl:when>
|
2828
|
+
<xsl:when test="$month = '02'">February</xsl:when>
|
2829
|
+
<xsl:when test="$month = '03'">March</xsl:when>
|
2830
|
+
<xsl:when test="$month = '04'">April</xsl:when>
|
2831
|
+
<xsl:when test="$month = '05'">May</xsl:when>
|
2832
|
+
<xsl:when test="$month = '06'">June</xsl:when>
|
2833
|
+
<xsl:when test="$month = '07'">July</xsl:when>
|
2834
|
+
<xsl:when test="$month = '08'">August</xsl:when>
|
2835
|
+
<xsl:when test="$month = '09'">September</xsl:when>
|
2836
|
+
<xsl:when test="$month = '10'">October</xsl:when>
|
2837
|
+
<xsl:when test="$month = '11'">November</xsl:when>
|
2838
|
+
<xsl:when test="$month = '12'">December</xsl:when>
|
2839
|
+
</xsl:choose>
|
2840
|
+
</xsl:variable>
|
2841
|
+
<xsl:variable name="result">
|
2842
|
+
<xsl:choose>
|
2843
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
2844
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
2845
|
+
</xsl:when>
|
2846
|
+
<xsl:otherwise>
|
2847
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
2848
|
+
</xsl:otherwise>
|
2849
|
+
</xsl:choose>
|
2850
|
+
</xsl:variable>
|
2851
|
+
<xsl:value-of select="$result"/>
|
2852
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeywords">
|
2853
|
+
<xsl:param name="sorting" select="'true'"/>
|
2854
|
+
<xsl:param name="charAtEnd" select="'.'"/>
|
2855
|
+
<xsl:param name="charDelim" select="', '"/>
|
2856
|
+
<xsl:choose>
|
2857
|
+
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
2858
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
2859
|
+
<xsl:sort data-type="text" order="ascending"/>
|
2860
|
+
<xsl:call-template name="insertKeyword">
|
2861
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
2862
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
2863
|
+
</xsl:call-template>
|
2864
|
+
</xsl:for-each>
|
2865
|
+
</xsl:when>
|
2866
|
+
<xsl:otherwise>
|
2867
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
2868
|
+
<xsl:call-template name="insertKeyword">
|
2869
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
2870
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
2871
|
+
</xsl:call-template>
|
2872
|
+
</xsl:for-each>
|
2873
|
+
</xsl:otherwise>
|
2874
|
+
</xsl:choose>
|
2875
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeyword">
|
2876
|
+
<xsl:param name="charAtEnd"/>
|
2877
|
+
<xsl:param name="charDelim"/>
|
2878
|
+
<xsl:apply-templates/>
|
2879
|
+
<xsl:choose>
|
2880
|
+
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
2881
|
+
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
2882
|
+
</xsl:choose>
|
2883
|
+
</xsl:template></xsl:stylesheet>
|