metanorma-bipm 1.0.7 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +12 -11
- data/.gitignore +4 -1
- data/.hound.yml +5 -0
- data/.rubocop.yml +4 -8
- data/Gemfile +2 -2
- data/Rakefile +2 -2
- data/lib/asciidoctor/bipm/biblio.rng +1 -0
- data/lib/asciidoctor/bipm/bipm.rng +3 -0
- data/lib/asciidoctor/bipm/converter.rb +72 -33
- data/lib/asciidoctor/bipm/isodoc.rng +321 -4
- data/lib/isodoc/bipm/base_convert.rb +25 -11
- data/lib/isodoc/bipm/bipm.brochure.xsl +674 -85
- data/lib/isodoc/bipm/bipm.guide.xsl +674 -85
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +674 -85
- data/lib/isodoc/bipm/bipm.rapport.xsl +674 -85
- data/lib/isodoc/bipm/html/html_bipm_titlepage.html +2 -0
- data/lib/isodoc/bipm/html/htmlstyle.css +7 -0
- data/lib/isodoc/bipm/i18n-en.yaml +11 -0
- data/lib/isodoc/bipm/i18n-fr.yaml +8 -0
- data/lib/isodoc/bipm/index.rb +30 -19
- data/lib/isodoc/bipm/init.rb +1 -2
- data/lib/isodoc/bipm/jcgm.standard.xsl +713 -129
- data/lib/isodoc/bipm/metadata.rb +15 -7
- data/lib/isodoc/bipm/pdf_convert.rb +12 -9
- data/lib/isodoc/bipm/presentation_xml_convert.rb +149 -48
- data/lib/isodoc/bipm/xref.rb +122 -51
- data/lib/metanorma-bipm.rb +4 -4
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +5 -4
- metadata +29 -14
@@ -35,6 +35,8 @@
|
|
35
35
|
{% if partid_alt %}<span class="title-second">{{ partid_alt}}: {{ partsubtitle }}</span>{% endif %}
|
36
36
|
{% if subparttitle %}<span class="title-first">{{ subparttitle }}</span><br/>{% endif %}
|
37
37
|
{% if subpartsubtitle %}<span class="title-second">{{ subpartsubtitle }}</span><br/>{% endif %}
|
38
|
+
{% if provenancetitle %}<span class="title-first">{{ provenancetitle }}</span><br/>{% endif %}
|
39
|
+
{% if provenancesubtitle %}<span class="title-second">{{ provenancesubtitle }}</span><br/>{% endif %}
|
38
40
|
{% if appendixid %}<span class="title-first">{{ appendixid}}: {{ appendixtitle }}</span><br/>{% endif %}
|
39
41
|
{% if appendixid_alt %}<span class="title-second">{{ appendixid_alt}}: {{ appendixsubtitle }}</span>{% endif %}
|
40
42
|
{% if annexid %}<span class="title-first">{{ annexid}}: {{ annextitle }}</span><br/>{% endif %}
|
@@ -116,6 +116,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
116
116
|
content: ", ";
|
117
117
|
vertical-align: super; }
|
118
118
|
|
119
|
+
.addition {
|
120
|
+
color: blue; }
|
121
|
+
|
122
|
+
.deletion {
|
123
|
+
color: red;
|
124
|
+
text-decoration: line-through; }
|
125
|
+
|
119
126
|
#brochure-band {
|
120
127
|
background-color: #0AC442; }
|
121
128
|
|
@@ -1,10 +1,21 @@
|
|
1
1
|
annex: Appendix
|
2
2
|
appendix: Annex
|
3
|
+
iso_annex: Annex
|
3
4
|
see: see
|
4
5
|
see_also: see also
|
5
6
|
clause: Chapter
|
6
7
|
subclause: Section
|
8
|
+
clause_jcgm: Clause
|
9
|
+
subclause_jcgm: Clause
|
7
10
|
formula: Equation
|
8
11
|
inequality: Inequality
|
9
12
|
bibliography: References
|
10
13
|
index: Index
|
14
|
+
norm_with_refs_pref:
|
15
|
+
The following referenced documents are indispensable for the application of this document.
|
16
|
+
For dated references, only the edition cited applies.
|
17
|
+
For undated references, the latest edition of the referenced
|
18
|
+
document (including any amendments) applies.
|
19
|
+
all_rights_reserved: All rights reserved
|
20
|
+
table_of_contents: Contents
|
21
|
+
source: Adapted from
|
@@ -1,9 +1,12 @@
|
|
1
1
|
annex: Annexe
|
2
2
|
appendix: Appendice
|
3
|
+
iso_annex: Annexe
|
3
4
|
see: voir
|
4
5
|
see_also: voir aussi
|
5
6
|
clause: chapître
|
6
7
|
subclause: section
|
8
|
+
clause_jcgm: Article
|
9
|
+
subclause_jcgm: Article
|
7
10
|
formula: équation
|
8
11
|
inequality: inégalité
|
9
12
|
bibliography: Références
|
@@ -34,3 +37,8 @@ stage_dict:
|
|
34
37
|
draft-development: projet-de-développement
|
35
38
|
in-force: en-vigeur
|
36
39
|
retired: retiré
|
40
|
+
norm_with_refs_pref:
|
41
|
+
Les documents suivants cités dans le texte sont indispensables pour l'application de ce document. Pour les références datées, seule l’édition citée s’applique. Pour les références non datées, la dernière édition du document de référence s’applique (y compris les éventuels amendements).
|
42
|
+
all_rights_reserved: Tous droits réservés
|
43
|
+
table_of_contents: Table des matières
|
44
|
+
source: Adapté de
|
data/lib/isodoc/bipm/index.rb
CHANGED
@@ -4,19 +4,23 @@ require "sterile"
|
|
4
4
|
module IsoDoc
|
5
5
|
module BIPM
|
6
6
|
class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
|
7
|
-
|
7
|
+
def add_id
|
8
8
|
%(id="_#{UUIDTools::UUID.random_create}")
|
9
9
|
end
|
10
10
|
|
11
11
|
def index(docxml)
|
12
12
|
unless docxml.at(ns("//index"))
|
13
|
-
docxml.xpath(ns("//indexsect")).each
|
13
|
+
docxml.xpath(ns("//indexsect")).each(&:remove)
|
14
14
|
return
|
15
15
|
end
|
16
16
|
i = docxml.at(ns("//indexsect")) ||
|
17
|
-
docxml.root.add_child("<indexsect #{add_id}><title>#{@i18n.index}
|
18
|
-
|
19
|
-
|
17
|
+
docxml.root.add_child("<indexsect #{add_id}><title>#{@i18n.index}"\
|
18
|
+
"</title></indexsect>").first
|
19
|
+
index = sort_indexterms(
|
20
|
+
docxml.xpath(ns("//index")),
|
21
|
+
docxml.xpath(ns("//index-xref[@also = 'false']")),
|
22
|
+
docxml.xpath(ns("//index-xref[@also = 'true']"))
|
23
|
+
)
|
20
24
|
index1(docxml, i, index)
|
21
25
|
end
|
22
26
|
|
@@ -32,8 +36,8 @@ module IsoDoc
|
|
32
36
|
@xrefs.bookmark_anchor_names(docxml)
|
33
37
|
end
|
34
38
|
|
35
|
-
def sortable(
|
36
|
-
HTMLEntities.new.decode(Nokogiri::XML.fragment(
|
39
|
+
def sortable(str)
|
40
|
+
HTMLEntities.new.decode(Nokogiri::XML.fragment(str).text)
|
37
41
|
end
|
38
42
|
|
39
43
|
def index_entries_opt
|
@@ -41,8 +45,11 @@ module IsoDoc
|
|
41
45
|
end
|
42
46
|
|
43
47
|
def index_entries(words, index, primary)
|
44
|
-
ret = index_entries_head(words[primary],
|
45
|
-
|
48
|
+
ret = index_entries_head(words[primary],
|
49
|
+
index.dig(words[primary], nil, nil),
|
50
|
+
index_entries_opt)
|
51
|
+
words2 = index[words[primary]]&.keys&.compact
|
52
|
+
&.each_with_object({}) { |w, v| v[w.downcase] = w }
|
46
53
|
unless words2.empty?
|
47
54
|
ret += "<ul>"
|
48
55
|
words2.keys.localize(@lang.to_sym).sort.to_a.each do |w|
|
@@ -50,12 +57,15 @@ module IsoDoc
|
|
50
57
|
end
|
51
58
|
ret += "</ul>"
|
52
59
|
end
|
53
|
-
ret
|
60
|
+
"#{ret}</li>"
|
54
61
|
end
|
55
62
|
|
56
63
|
def index_entries2(words, index, secondary)
|
57
|
-
ret = index_entries_head(words[secondary],
|
58
|
-
|
64
|
+
ret = index_entries_head(words[secondary],
|
65
|
+
index.dig(words[secondary], nil),
|
66
|
+
index_entries_opt)
|
67
|
+
words3 = index[words[secondary]]&.keys&.reject { |k| k.nil? }
|
68
|
+
&.each_with_object({}) { |w, v| v[w.downcase] = w }
|
59
69
|
unless words3.empty?
|
60
70
|
ret += "<ul>"
|
61
71
|
words3.keys.localize(@lang.to_sym).sort.to_a.each do |w|
|
@@ -63,7 +73,7 @@ module IsoDoc
|
|
63
73
|
end
|
64
74
|
ret += "</ul>"
|
65
75
|
end
|
66
|
-
ret
|
76
|
+
"#{ret}</li>"
|
67
77
|
end
|
68
78
|
|
69
79
|
def index_entries_head(head, entries, opt)
|
@@ -111,8 +121,9 @@ module IsoDoc
|
|
111
121
|
end
|
112
122
|
end
|
113
123
|
|
114
|
-
def xml_encode_attr(
|
115
|
-
HTMLEntities.new.encode(
|
124
|
+
def xml_encode_attr(str)
|
125
|
+
HTMLEntities.new.encode(str, :basic, :hexadecimal)
|
126
|
+
.gsub(/&#x([^;]+);/) { |_x| "&#x#{$1.upcase};" }
|
116
127
|
end
|
117
128
|
|
118
129
|
# attributes are decoded into UTF-8, elements in extract_indexsee are still in entities
|
@@ -131,10 +142,10 @@ module IsoDoc
|
|
131
142
|
end
|
132
143
|
end
|
133
144
|
|
134
|
-
def index2bookmark(
|
135
|
-
|
136
|
-
|
137
|
-
|
145
|
+
def index2bookmark(node)
|
146
|
+
node.name = "bookmark"
|
147
|
+
node.children.each(&:remove)
|
148
|
+
node["id"] = "_#{UUIDTools::UUID.random_create}"
|
138
149
|
end
|
139
150
|
end
|
140
151
|
end
|
data/lib/isodoc/bipm/init.rb
CHANGED
@@ -10,7 +10,7 @@ module IsoDoc
|
|
10
10
|
@meta = Metadata.new(lang, script, labels)
|
11
11
|
end
|
12
12
|
|
13
|
-
def xref_init(lang, script,
|
13
|
+
def xref_init(lang, script, _klass, labels, options)
|
14
14
|
html = HtmlConvert.new(language: lang, script: script)
|
15
15
|
@xrefs = Xref.new(lang, script, html, labels, options)
|
16
16
|
end
|
@@ -21,4 +21,3 @@ module IsoDoc
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
6
|
<xsl:variable name="images" select="document($svg_images)"/>
|
7
|
+
<xsl:param name="basepath"/>
|
7
8
|
|
8
9
|
<!-- <item id="#">N_page</item> -->
|
9
10
|
<!-- param for second pass -->
|
@@ -213,7 +214,7 @@
|
|
213
214
|
<xsl:call-template name="printEdition"/>
|
214
215
|
<xsl:text> </xsl:text>
|
215
216
|
<xsl:call-template name="convertDate">
|
216
|
-
<xsl:with-param name="date" select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:
|
217
|
+
<xsl:with-param name="date" select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:date[@type = 'published']/jcgm:on"/>
|
217
218
|
</xsl:call-template>
|
218
219
|
</fo:block>
|
219
220
|
<!-- Example © JCGM 2009 -->
|
@@ -227,13 +228,16 @@
|
|
227
228
|
<fo:flow flow-name="xsl-region-body">
|
228
229
|
<xsl:call-template name="insert_Logo-BIPM-Metro"/>
|
229
230
|
<fo:block-container font-weight="bold">
|
230
|
-
<fo:block font-size="16.5pt"
|
231
|
+
<fo:block font-size="16.5pt">
|
231
232
|
<xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:ext/jcgm:editorialgroup/jcgm:committee/@acronym"/>
|
232
233
|
<xsl:text> </xsl:text>
|
233
234
|
<xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:docnumber"/>
|
234
235
|
<fo:inline font-weight="normal">:</fo:inline>
|
235
236
|
<xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:copyright/jcgm:from"/>
|
236
237
|
</fo:block>
|
238
|
+
<fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
|
239
|
+
<xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:title[@type = 'provenance']"/>
|
240
|
+
</fo:block>
|
237
241
|
<fo:block border-bottom="1pt solid black"> </fo:block>
|
238
242
|
<fo:block font-size="16.5pt" margin-left="-0.5mm" padding-top="3.5mm" space-after="7mm" margin-right="7mm" line-height="105%">
|
239
243
|
<xsl:apply-templates select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:title[@language = $lang and @type = 'main']" mode="title"/>
|
@@ -597,7 +601,7 @@
|
|
597
601
|
|
598
602
|
<xsl:template name="getListItemFormat">
|
599
603
|
<xsl:choose>
|
600
|
-
<xsl:when test="local-name(..) = 'ul' and ../ancestor::
|
604
|
+
<xsl:when test="local-name(..) = 'ul' and ../ancestor::jcgm:ul">−</xsl:when> <!-- − - minus sign. — - dash -->
|
601
605
|
<xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!-- — dash -->
|
602
606
|
<xsl:otherwise> <!-- for ordered lists -->
|
603
607
|
<xsl:variable name="start_value">
|
@@ -807,6 +811,42 @@
|
|
807
811
|
</fo:footnote>
|
808
812
|
</xsl:template>
|
809
813
|
|
814
|
+
|
815
|
+
<!--
|
816
|
+
<fn reference="1">
|
817
|
+
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
818
|
+
</fn>
|
819
|
+
-->
|
820
|
+
<xsl:template match="jcgm:title//jcgm:fn | jcgm:name//jcgm:fn | jcgm:p/jcgm:fn[not(ancestor::jcgm:table)] | jcgm:p/*/jcgm:fn[not(ancestor::jcgm:table)] | jcgm:sourcecode/jcgm:fn[not(ancestor::jcgm:table)]" priority="2" name="fn">
|
821
|
+
<fo:footnote keep-with-previous.within-line="always">
|
822
|
+
<xsl:variable name="number">
|
823
|
+
<xsl:number count="jcgm:fn[not(ancestor::jcgm:table)]" level="any"/>
|
824
|
+
</xsl:variable>
|
825
|
+
<xsl:variable name="gen_id" select="generate-id()"/>
|
826
|
+
<xsl:variable name="lang" select="ancestor::jcgm:bipm-standard/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
827
|
+
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
828
|
+
<fo:basic-link internal-destination="{$lang}_footnote_{@reference}_{$number}_{$gen_id}" fox:alt-text="footnote {@reference}">
|
829
|
+
<xsl:value-of select="$number"/>
|
830
|
+
</fo:basic-link>
|
831
|
+
</fo:inline>
|
832
|
+
<fo:footnote-body>
|
833
|
+
<fo:block font-size="9pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" line-height="124%" text-align="justify">
|
834
|
+
<fo:inline id="{$lang}_footnote_{@reference}_{$number}_{$gen_id}" keep-with-next.within-line="always" font-size="60%" vertical-align="super" padding-right="1mm"> <!-- baseline-shift="30%" padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
|
835
|
+
<xsl:value-of select="$number "/>
|
836
|
+
</fo:inline>
|
837
|
+
<xsl:for-each select="jcgm:p">
|
838
|
+
<xsl:apply-templates/>
|
839
|
+
</xsl:for-each>
|
840
|
+
</fo:block>
|
841
|
+
</fo:footnote-body>
|
842
|
+
</fo:footnote>
|
843
|
+
</xsl:template>
|
844
|
+
|
845
|
+
<xsl:template match="jcgm:fn/jcgm:p">
|
846
|
+
<fo:block>
|
847
|
+
<xsl:apply-templates/>
|
848
|
+
</fo:block>
|
849
|
+
</xsl:template>
|
810
850
|
|
811
851
|
|
812
852
|
<xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="ul_ol">
|
@@ -982,6 +1022,12 @@
|
|
982
1022
|
<xsl:apply-templates select="." mode="mathml"/>
|
983
1023
|
</xsl:variable>
|
984
1024
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1025
|
+
<xsl:if test="local-name(../..) = 'formula' or (local-name(../..) = 'td' and count(../../*) = 1)">
|
1026
|
+
<xsl:attribute name="width">95%</xsl:attribute>
|
1027
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
1028
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
1029
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1030
|
+
</xsl:if>
|
985
1031
|
<!-- <xsl:copy-of select="."/> -->
|
986
1032
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
987
1033
|
</fo:instream-foreign-object>
|
@@ -1082,6 +1128,17 @@
|
|
1082
1128
|
</xsl:template>
|
1083
1129
|
|
1084
1130
|
|
1131
|
+
<xsl:template match="*[local-name()='td' or local-name()='th']/*[local-name()='formula']/*[local-name()='stem']" priority="2">
|
1132
|
+
<fo:block>
|
1133
|
+
<xsl:if test="ancestor::*[local-name()='td' or local-name()='th'][1][@align]">
|
1134
|
+
<xsl:attribute name="text-align">
|
1135
|
+
<xsl:value-of select="ancestor::*[local-name()='td' or local-name()='th'][1]/@align"/>
|
1136
|
+
</xsl:attribute>
|
1137
|
+
</xsl:if>
|
1138
|
+
<xsl:apply-templates/>
|
1139
|
+
</fo:block>
|
1140
|
+
</xsl:template>
|
1141
|
+
|
1085
1142
|
<xsl:template match="*[local-name()='formula']/*[local-name()='stem']">
|
1086
1143
|
<fo:block margin-top="6pt" margin-bottom="12pt">
|
1087
1144
|
<fo:table table-layout="fixed" width="100%">
|
@@ -1320,6 +1377,7 @@
|
|
1320
1377
|
<xsl:variable name="font-size">
|
1321
1378
|
<xsl:choose>
|
1322
1379
|
<xsl:when test="ancestor::jcgm:preface">15pt</xsl:when>
|
1380
|
+
<xsl:when test="parent::jcgm:annex">15pt</xsl:when>
|
1323
1381
|
<xsl:when test="../@inline-header = 'true' or @inline-header = 'true'">10.5pt</xsl:when>
|
1324
1382
|
<xsl:when test="$level = 2">11.5pt</xsl:when>
|
1325
1383
|
<xsl:when test="$level >= 3">10.5pt</xsl:when>
|
@@ -1351,6 +1409,8 @@
|
|
1351
1409
|
<xsl:attribute name="space-after">
|
1352
1410
|
<xsl:choose>
|
1353
1411
|
<xsl:when test="ancestor::jcgm:preface">12pt</xsl:when>
|
1412
|
+
<xsl:when test="parent::jcgm:annex">30pt</xsl:when>
|
1413
|
+
<xsl:when test="following-sibling::*[1][local-name() = 'admitted']">0pt</xsl:when>
|
1354
1414
|
<!-- <xsl:otherwise>12pt</xsl:otherwise> -->
|
1355
1415
|
<xsl:otherwise>12pt</xsl:otherwise>
|
1356
1416
|
</xsl:choose>
|
@@ -1364,6 +1424,10 @@
|
|
1364
1424
|
</xsl:choose>
|
1365
1425
|
</xsl:attribute>
|
1366
1426
|
</xsl:if>
|
1427
|
+
<xsl:if test="parent::jcgm:annex">
|
1428
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1429
|
+
<xsl:attribute name="line-height">130%</xsl:attribute>
|
1430
|
+
</xsl:if>
|
1367
1431
|
<xsl:apply-templates/>
|
1368
1432
|
</xsl:element>
|
1369
1433
|
|
@@ -1380,41 +1444,43 @@
|
|
1380
1444
|
<xsl:param name="font-size" select="'65%'"/>
|
1381
1445
|
<xsl:param name="baseline-shift" select="'30%'"/>
|
1382
1446
|
<xsl:param name="curr_lang" select="'fr'"/>
|
1383
|
-
<
|
1384
|
-
<
|
1385
|
-
<xsl:
|
1386
|
-
<xsl:
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
<
|
1393
|
-
<xsl:
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
<xsl:
|
1398
|
-
<xsl:
|
1399
|
-
<xsl:
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
<xsl:
|
1405
|
-
<xsl:
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1447
|
+
<xsl:if test="normalize-space (.) != '1'">
|
1448
|
+
<fo:inline>
|
1449
|
+
<xsl:variable name="title-edition">
|
1450
|
+
<xsl:call-template name="getTitle">
|
1451
|
+
<xsl:with-param name="name" select="'title-edition'"/>
|
1452
|
+
<xsl:with-param name="lang" select="$curr_lang"/>
|
1453
|
+
</xsl:call-template>
|
1454
|
+
</xsl:variable>
|
1455
|
+
<xsl:value-of select="."/>
|
1456
|
+
<fo:inline font-size="{$font-size}" baseline-shift="{$baseline-shift}">
|
1457
|
+
<xsl:if test="$curr_lang = 'en'">
|
1458
|
+
<xsl:attribute name="baseline-shift">0%</xsl:attribute>
|
1459
|
+
<xsl:attribute name="font-size">100%</xsl:attribute>
|
1460
|
+
</xsl:if>
|
1461
|
+
<xsl:choose>
|
1462
|
+
<xsl:when test="$curr_lang = 'fr'">
|
1463
|
+
<xsl:choose>
|
1464
|
+
<xsl:when test=". = '1'">re</xsl:when>
|
1465
|
+
<xsl:otherwise>e</xsl:otherwise>
|
1466
|
+
</xsl:choose>
|
1467
|
+
</xsl:when>
|
1468
|
+
<xsl:otherwise>
|
1469
|
+
<xsl:choose>
|
1470
|
+
<xsl:when test=". = '1'">st</xsl:when>
|
1471
|
+
<xsl:when test=". = '2'">nd</xsl:when>
|
1472
|
+
<xsl:when test=". = '3'">rd</xsl:when>
|
1473
|
+
<xsl:otherwise>th</xsl:otherwise>
|
1474
|
+
</xsl:choose>
|
1475
|
+
</xsl:otherwise>
|
1476
|
+
</xsl:choose>
|
1477
|
+
|
1478
|
+
</fo:inline>
|
1479
|
+
<xsl:text> </xsl:text>
|
1480
|
+
<xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/>
|
1481
|
+
<xsl:text/>
|
1413
1482
|
</fo:inline>
|
1414
|
-
|
1415
|
-
<xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/>
|
1416
|
-
<xsl:text/>
|
1417
|
-
</fo:inline>
|
1483
|
+
</xsl:if>
|
1418
1484
|
</xsl:template>
|
1419
1485
|
|
1420
1486
|
|
@@ -1443,7 +1509,7 @@
|
|
1443
1509
|
|
1444
1510
|
<fo:flow flow-name="xsl-region-body">
|
1445
1511
|
<fo:block id="{@id}" span="all">
|
1446
|
-
<xsl:apply-templates select="
|
1512
|
+
<xsl:apply-templates select="jcgm:title"/>
|
1447
1513
|
</fo:block>
|
1448
1514
|
<fo:block>
|
1449
1515
|
<xsl:apply-templates select="*[not(local-name() = 'title')]"/>
|
@@ -2145,6 +2211,9 @@
|
|
2145
2211
|
<title-continued lang="en">(continued)</title-continued>
|
2146
2212
|
<title-continued lang="fr">(continué)</title-continued>
|
2147
2213
|
|
2214
|
+
</xsl:variable><xsl:variable name="bibdata">
|
2215
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
2216
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
2148
2217
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2149
2218
|
<xsl:param name="name"/>
|
2150
2219
|
<xsl:param name="lang"/>
|
@@ -2173,13 +2242,16 @@
|
|
2173
2242
|
<xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
|
2174
2243
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
2175
2244
|
|
2245
|
+
|
2176
2246
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2177
2247
|
|
2248
|
+
|
2178
2249
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2179
2250
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2180
2251
|
|
2181
2252
|
|
2182
2253
|
|
2254
|
+
|
2183
2255
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2184
2256
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2185
2257
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -2229,7 +2301,7 @@
|
|
2229
2301
|
|
2230
2302
|
|
2231
2303
|
|
2232
|
-
|
2304
|
+
|
2233
2305
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
2234
2306
|
|
2235
2307
|
|
@@ -2246,6 +2318,7 @@
|
|
2246
2318
|
|
2247
2319
|
|
2248
2320
|
|
2321
|
+
|
2249
2322
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
2250
2323
|
|
2251
2324
|
|
@@ -2255,9 +2328,7 @@
|
|
2255
2328
|
|
2256
2329
|
|
2257
2330
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2331
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2261
2332
|
|
2262
2333
|
|
2263
2334
|
|
@@ -2268,6 +2339,7 @@
|
|
2268
2339
|
|
2269
2340
|
|
2270
2341
|
|
2342
|
+
|
2271
2343
|
|
2272
2344
|
|
2273
2345
|
|
@@ -2297,8 +2369,10 @@
|
|
2297
2369
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2298
2370
|
|
2299
2371
|
|
2372
|
+
|
2300
2373
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
2301
2374
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2375
|
+
|
2302
2376
|
|
2303
2377
|
|
2304
2378
|
|
@@ -2317,6 +2391,9 @@
|
|
2317
2391
|
|
2318
2392
|
|
2319
2393
|
|
2394
|
+
|
2395
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
2396
|
+
|
2320
2397
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2321
2398
|
|
2322
2399
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -2337,19 +2414,23 @@
|
|
2337
2414
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
2338
2415
|
|
2339
2416
|
|
2417
|
+
|
2340
2418
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2341
2419
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2342
2420
|
|
2343
2421
|
|
2422
|
+
|
2344
2423
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2345
2424
|
|
2346
2425
|
|
2347
2426
|
|
2348
2427
|
|
2428
|
+
|
2349
2429
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
2350
2430
|
|
2351
2431
|
|
2352
2432
|
|
2433
|
+
|
2353
2434
|
|
2354
2435
|
|
2355
2436
|
|
@@ -2366,6 +2447,7 @@
|
|
2366
2447
|
|
2367
2448
|
|
2368
2449
|
|
2450
|
+
|
2369
2451
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2370
2452
|
|
2371
2453
|
|
@@ -2373,6 +2455,7 @@
|
|
2373
2455
|
|
2374
2456
|
|
2375
2457
|
|
2458
|
+
|
2376
2459
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2377
2460
|
|
2378
2461
|
|
@@ -2402,6 +2485,7 @@
|
|
2402
2485
|
|
2403
2486
|
|
2404
2487
|
|
2488
|
+
|
2405
2489
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2406
2490
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
2407
2491
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -2409,9 +2493,12 @@
|
|
2409
2493
|
|
2410
2494
|
|
2411
2495
|
|
2496
|
+
|
2412
2497
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2498
|
+
|
2413
2499
|
|
2414
2500
|
|
2501
|
+
|
2415
2502
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2416
2503
|
|
2417
2504
|
|
@@ -2438,18 +2525,22 @@
|
|
2438
2525
|
|
2439
2526
|
|
2440
2527
|
|
2528
|
+
|
2441
2529
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2442
2530
|
|
2531
|
+
|
2443
2532
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2444
2533
|
|
2445
2534
|
|
2446
2535
|
|
2536
|
+
|
2447
2537
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2448
2538
|
|
2449
2539
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
2450
2540
|
|
2451
2541
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2452
2542
|
|
2543
|
+
|
2453
2544
|
|
2454
2545
|
|
2455
2546
|
|
@@ -2469,6 +2560,7 @@
|
|
2469
2560
|
|
2470
2561
|
|
2471
2562
|
|
2563
|
+
|
2472
2564
|
|
2473
2565
|
|
2474
2566
|
|
@@ -2482,10 +2574,12 @@
|
|
2482
2574
|
|
2483
2575
|
|
2484
2576
|
|
2577
|
+
|
2485
2578
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
2486
2579
|
|
2487
2580
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
2488
2581
|
|
2582
|
+
|
2489
2583
|
<xsl:attribute name="width">100%</xsl:attribute>
|
2490
2584
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
2491
2585
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -2511,15 +2605,40 @@
|
|
2511
2605
|
|
2512
2606
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
2513
2607
|
|
2514
|
-
|
2608
|
+
|
2609
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2610
|
+
|
2611
|
+
|
2515
2612
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
2516
2613
|
|
2614
|
+
|
2517
2615
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
2518
2616
|
|
2519
2617
|
|
2520
2618
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2521
2619
|
|
2522
|
-
|
2620
|
+
|
2621
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2622
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2623
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
2624
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2625
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2626
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2627
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2628
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2629
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2630
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
2631
|
+
<xsl:text>red</xsl:text>
|
2632
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
2633
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
2634
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
2635
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
2636
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
2637
|
+
|
2638
|
+
|
2639
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2640
|
+
|
2641
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2523
2642
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2524
2643
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2525
2644
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -2564,18 +2683,19 @@
|
|
2564
2683
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2565
2684
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2566
2685
|
|
2686
|
+
<xsl:variable name="table-preamble">
|
2687
|
+
|
2688
|
+
|
2689
|
+
</xsl:variable>
|
2690
|
+
|
2567
2691
|
<xsl:variable name="table">
|
2568
2692
|
|
2569
2693
|
<xsl:variable name="simple-table">
|
2570
|
-
<xsl:call-template name="getSimpleTable"/>
|
2694
|
+
<xsl:call-template name="getSimpleTable"/>
|
2571
2695
|
</xsl:variable>
|
2572
2696
|
|
2573
|
-
|
2574
|
-
|
2575
|
-
|
2576
|
-
|
2577
2697
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2578
|
-
<fo:block> </fo:block>
|
2698
|
+
<fo:block> </fo:block>
|
2579
2699
|
</xsl:if> -->
|
2580
2700
|
|
2581
2701
|
<!-- $namespace = 'iso' or -->
|
@@ -2584,7 +2704,7 @@
|
|
2584
2704
|
|
2585
2705
|
|
2586
2706
|
|
2587
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
2707
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
2588
2708
|
|
2589
2709
|
<!-- <xsl:variable name="cols-count">
|
2590
2710
|
<xsl:choose>
|
@@ -2603,8 +2723,6 @@
|
|
2603
2723
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2604
2724
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2605
2725
|
|
2606
|
-
|
2607
|
-
|
2608
2726
|
<xsl:variable name="colwidths">
|
2609
2727
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2610
2728
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2632,8 +2750,10 @@
|
|
2632
2750
|
</xsl:choose>
|
2633
2751
|
</xsl:variable>
|
2634
2752
|
|
2753
|
+
|
2635
2754
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2636
2755
|
|
2756
|
+
|
2637
2757
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2638
2758
|
|
2639
2759
|
|
@@ -2645,6 +2765,7 @@
|
|
2645
2765
|
|
2646
2766
|
|
2647
2767
|
|
2768
|
+
|
2648
2769
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2649
2770
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2650
2771
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -2654,6 +2775,7 @@
|
|
2654
2775
|
|
2655
2776
|
|
2656
2777
|
|
2778
|
+
|
2657
2779
|
<xsl:variable name="table_width">
|
2658
2780
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2659
2781
|
100%
|
@@ -2667,6 +2789,7 @@
|
|
2667
2789
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2668
2790
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2669
2791
|
|
2792
|
+
|
2670
2793
|
<attribute name="border">1.5pt solid black</attribute>
|
2671
2794
|
<xsl:if test="*[local-name()='thead']">
|
2672
2795
|
<attribute name="border-top">1pt solid black</attribute>
|
@@ -2675,6 +2798,7 @@
|
|
2675
2798
|
|
2676
2799
|
|
2677
2800
|
|
2801
|
+
|
2678
2802
|
<attribute name="margin-left">0mm</attribute>
|
2679
2803
|
<attribute name="margin-right">0mm</attribute>
|
2680
2804
|
|
@@ -2684,6 +2808,7 @@
|
|
2684
2808
|
|
2685
2809
|
|
2686
2810
|
|
2811
|
+
|
2687
2812
|
</xsl:variable>
|
2688
2813
|
|
2689
2814
|
|
@@ -2767,7 +2892,8 @@
|
|
2767
2892
|
</fo:block-container>
|
2768
2893
|
</xsl:variable>
|
2769
2894
|
|
2770
|
-
|
2895
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2896
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2771
2897
|
|
2772
2898
|
<xsl:choose>
|
2773
2899
|
<xsl:when test="@width">
|
@@ -2781,7 +2907,14 @@
|
|
2781
2907
|
<fo:table-body>
|
2782
2908
|
<fo:table-row>
|
2783
2909
|
<fo:table-cell column-number="2">
|
2784
|
-
<
|
2910
|
+
<xsl:copy-of select="$table-preamble"/>
|
2911
|
+
<fo:block>
|
2912
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2913
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2914
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2915
|
+
</xsl:call-template>
|
2916
|
+
<xsl:copy-of select="$table"/>
|
2917
|
+
</fo:block>
|
2785
2918
|
</fo:table-cell>
|
2786
2919
|
</fo:table-row>
|
2787
2920
|
</fo:table-body>
|
@@ -2792,18 +2925,49 @@
|
|
2792
2925
|
|
2793
2926
|
</xsl:when>
|
2794
2927
|
<xsl:otherwise>
|
2795
|
-
<xsl:
|
2928
|
+
<xsl:choose>
|
2929
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
2930
|
+
<xsl:copy-of select="$table-preamble"/>
|
2931
|
+
<fo:block>
|
2932
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2933
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2934
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2935
|
+
</xsl:call-template>
|
2936
|
+
<xsl:copy-of select="$table"/>
|
2937
|
+
</fo:block>
|
2938
|
+
</xsl:when>
|
2939
|
+
<xsl:otherwise>
|
2940
|
+
<xsl:copy-of select="$table-preamble"/>
|
2941
|
+
<xsl:copy-of select="$table"/>
|
2942
|
+
</xsl:otherwise>
|
2943
|
+
</xsl:choose>
|
2796
2944
|
</xsl:otherwise>
|
2797
2945
|
</xsl:choose>
|
2798
2946
|
|
2799
2947
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2948
|
+
<xsl:param name="continued"/>
|
2800
2949
|
<xsl:if test="normalize-space() != ''">
|
2801
2950
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2802
2951
|
|
2803
2952
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2804
2953
|
|
2805
2954
|
|
2806
|
-
|
2955
|
+
|
2956
|
+
|
2957
|
+
|
2958
|
+
<xsl:choose>
|
2959
|
+
<xsl:when test="$continued = 'true'">
|
2960
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
2961
|
+
|
2962
|
+
<xsl:apply-templates/>
|
2963
|
+
|
2964
|
+
</xsl:when>
|
2965
|
+
<xsl:otherwise>
|
2966
|
+
<xsl:apply-templates/>
|
2967
|
+
</xsl:otherwise>
|
2968
|
+
</xsl:choose>
|
2969
|
+
|
2970
|
+
|
2807
2971
|
</fo:block>
|
2808
2972
|
</xsl:if>
|
2809
2973
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -2855,7 +3019,7 @@
|
|
2855
3019
|
</xsl:for-each>
|
2856
3020
|
</xsl:when>
|
2857
3021
|
<xsl:otherwise>
|
2858
|
-
<xsl:for-each select="xalan:nodeset($table)
|
3022
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
2859
3023
|
<xsl:variable name="td_text">
|
2860
3024
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2861
3025
|
|
@@ -2944,21 +3108,27 @@
|
|
2944
3108
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2945
3109
|
</xsl:call-template>
|
2946
3110
|
|
3111
|
+
|
2947
3112
|
<xsl:apply-templates/>
|
2948
3113
|
</fo:table-header>
|
2949
3114
|
</xsl:template><xsl:template name="table-header-title">
|
2950
|
-
<xsl:param name="cols-count"/>
|
3115
|
+
<xsl:param name="cols-count"/>
|
2951
3116
|
<!-- row for title -->
|
2952
3117
|
<fo:table-row>
|
2953
3118
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
2954
|
-
|
3119
|
+
|
3120
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3121
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
3122
|
+
</xsl:apply-templates>
|
2955
3123
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2956
3124
|
<xsl:call-template name="fn_name_display"/>
|
2957
|
-
</xsl:for-each>
|
2958
|
-
|
2959
|
-
<
|
2960
|
-
|
2961
|
-
|
3125
|
+
</xsl:for-each>
|
3126
|
+
|
3127
|
+
<fo:block text-align="right" font-style="italic">
|
3128
|
+
<xsl:text> </xsl:text>
|
3129
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
3130
|
+
</fo:block>
|
3131
|
+
|
2962
3132
|
</fo:table-cell>
|
2963
3133
|
</fo:table-row>
|
2964
3134
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -3179,20 +3349,26 @@
|
|
3179
3349
|
<xsl:call-template name="getTitle">
|
3180
3350
|
<xsl:with-param name="name" select="'title-continued'"/>
|
3181
3351
|
</xsl:call-template>
|
3182
|
-
</xsl:variable>
|
3352
|
+
</xsl:variable>
|
3353
|
+
|
3354
|
+
<xsl:variable name="title_start" select="ancestor::*[local-name()='table'][1]/*[local-name()='name']/node()[1][self::text()]"/>
|
3355
|
+
<xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
|
3356
|
+
|
3183
3357
|
<fo:table-row height="0" keep-with-next.within-page="always">
|
3184
3358
|
<fo:table-cell>
|
3185
|
-
|
3359
|
+
|
3360
|
+
|
3361
|
+
<fo:marker marker-class-name="table_continued"/>
|
3362
|
+
|
3186
3363
|
<fo:block/>
|
3187
3364
|
</fo:table-cell>
|
3188
3365
|
</fo:table-row>
|
3189
3366
|
<fo:table-row height="0" keep-with-next.within-page="always">
|
3190
3367
|
<fo:table-cell>
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
</fo:marker>
|
3368
|
+
|
3369
|
+
<fo:marker marker-class-name="table_continued">
|
3370
|
+
<xsl:value-of select="$title_continued"/>
|
3371
|
+
</fo:marker>
|
3196
3372
|
<fo:block/>
|
3197
3373
|
</fo:table-cell>
|
3198
3374
|
</fo:table-row>
|
@@ -3229,6 +3405,7 @@
|
|
3229
3405
|
|
3230
3406
|
|
3231
3407
|
|
3408
|
+
|
3232
3409
|
</xsl:if>
|
3233
3410
|
<xsl:if test="$parent-name = 'tfoot'">
|
3234
3411
|
|
@@ -3242,6 +3419,10 @@
|
|
3242
3419
|
|
3243
3420
|
|
3244
3421
|
|
3422
|
+
|
3423
|
+
|
3424
|
+
|
3425
|
+
|
3245
3426
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
3246
3427
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
3247
3428
|
</xsl:if> -->
|
@@ -3253,12 +3434,14 @@
|
|
3253
3434
|
<xsl:attribute name="text-align">
|
3254
3435
|
<xsl:choose>
|
3255
3436
|
<xsl:when test="@align">
|
3256
|
-
<xsl:
|
3437
|
+
<xsl:call-template name="setAlignment"/>
|
3438
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3257
3439
|
</xsl:when>
|
3258
3440
|
<xsl:otherwise>center</xsl:otherwise>
|
3259
3441
|
</xsl:choose>
|
3260
3442
|
</xsl:attribute>
|
3261
3443
|
|
3444
|
+
|
3262
3445
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
3263
3446
|
|
3264
3447
|
|
@@ -3271,6 +3454,10 @@
|
|
3271
3454
|
|
3272
3455
|
|
3273
3456
|
|
3457
|
+
|
3458
|
+
<xsl:if test="$lang = 'ar'">
|
3459
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3460
|
+
</xsl:if>
|
3274
3461
|
<xsl:if test="@colspan">
|
3275
3462
|
<xsl:attribute name="number-columns-spanned">
|
3276
3463
|
<xsl:value-of select="@colspan"/>
|
@@ -3302,15 +3489,24 @@
|
|
3302
3489
|
<xsl:attribute name="text-align">
|
3303
3490
|
<xsl:choose>
|
3304
3491
|
<xsl:when test="@align">
|
3305
|
-
<xsl:
|
3492
|
+
<xsl:call-template name="setAlignment"/>
|
3493
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3306
3494
|
</xsl:when>
|
3307
3495
|
<xsl:otherwise>left</xsl:otherwise>
|
3308
3496
|
</xsl:choose>
|
3309
3497
|
</xsl:attribute>
|
3498
|
+
<xsl:if test="$lang = 'ar'">
|
3499
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3500
|
+
</xsl:if>
|
3310
3501
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
3311
3502
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3312
3503
|
|
3313
3504
|
|
3505
|
+
<xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
|
3506
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3507
|
+
</xsl:if>
|
3508
|
+
|
3509
|
+
|
3314
3510
|
|
3315
3511
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
3316
3512
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
@@ -3324,6 +3520,12 @@
|
|
3324
3520
|
|
3325
3521
|
|
3326
3522
|
|
3523
|
+
|
3524
|
+
|
3525
|
+
|
3526
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
3527
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3528
|
+
</xsl:if>
|
3327
3529
|
<xsl:if test="@colspan">
|
3328
3530
|
<xsl:attribute name="number-columns-spanned">
|
3329
3531
|
<xsl:value-of select="@colspan"/>
|
@@ -3457,13 +3659,13 @@
|
|
3457
3659
|
</xsl:choose>
|
3458
3660
|
</xsl:variable>
|
3459
3661
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3460
|
-
<xsl:element name="{$ns}:table">
|
3662
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
3461
3663
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3462
3664
|
<tbody>
|
3463
3665
|
<xsl:apply-templates mode="dl"/>
|
3464
3666
|
</tbody>
|
3465
3667
|
</xsl:for-each>
|
3466
|
-
</xsl:element>
|
3668
|
+
<!-- </xsl:element> -->
|
3467
3669
|
</xsl:variable>
|
3468
3670
|
|
3469
3671
|
<xsl:call-template name="calculate-column-widths">
|
@@ -3548,6 +3750,7 @@
|
|
3548
3750
|
|
3549
3751
|
|
3550
3752
|
|
3753
|
+
|
3551
3754
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3552
3755
|
|
3553
3756
|
|
@@ -3560,6 +3763,8 @@
|
|
3560
3763
|
<xsl:apply-templates/>
|
3561
3764
|
</fo:inline>
|
3562
3765
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3766
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3767
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3563
3768
|
<fo:block-container>
|
3564
3769
|
|
3565
3770
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -3576,6 +3781,12 @@
|
|
3576
3781
|
</xsl:attribute>
|
3577
3782
|
|
3578
3783
|
</xsl:if>
|
3784
|
+
|
3785
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3786
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3787
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3788
|
+
</xsl:call-template>
|
3789
|
+
|
3579
3790
|
<fo:block-container>
|
3580
3791
|
|
3581
3792
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -3640,6 +3851,7 @@
|
|
3640
3851
|
|
3641
3852
|
|
3642
3853
|
|
3854
|
+
|
3643
3855
|
<xsl:variable name="title-key">
|
3644
3856
|
|
3645
3857
|
<xsl:call-template name="getLocalizedString">
|
@@ -3697,11 +3909,11 @@
|
|
3697
3909
|
</xsl:choose>
|
3698
3910
|
</xsl:variable>
|
3699
3911
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3700
|
-
<xsl:element name="{$ns}:table">
|
3912
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
3701
3913
|
<tbody>
|
3702
3914
|
<xsl:apply-templates mode="dl"/>
|
3703
3915
|
</tbody>
|
3704
|
-
</xsl:element>
|
3916
|
+
<!-- </xsl:element> -->
|
3705
3917
|
</xsl:variable>
|
3706
3918
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3707
3919
|
<xsl:variable name="colwidths">
|
@@ -3855,6 +4067,7 @@
|
|
3855
4067
|
|
3856
4068
|
<fo:table-row>
|
3857
4069
|
|
4070
|
+
|
3858
4071
|
<fo:table-cell>
|
3859
4072
|
|
3860
4073
|
<fo:block margin-top="6pt">
|
@@ -3872,6 +4085,7 @@
|
|
3872
4085
|
|
3873
4086
|
|
3874
4087
|
|
4088
|
+
|
3875
4089
|
<xsl:apply-templates/>
|
3876
4090
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3877
4091
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3928,6 +4142,8 @@
|
|
3928
4142
|
|
3929
4143
|
<xsl:apply-templates/>
|
3930
4144
|
</fo:inline>
|
4145
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
4146
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
3931
4147
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
3932
4148
|
<fo:inline font-size="80%" vertical-align="super">
|
3933
4149
|
<xsl:apply-templates/>
|
@@ -3945,6 +4161,7 @@
|
|
3945
4161
|
|
3946
4162
|
|
3947
4163
|
|
4164
|
+
|
3948
4165
|
10
|
3949
4166
|
|
3950
4167
|
|
@@ -3970,8 +4187,74 @@
|
|
3970
4187
|
<fo:inline text-decoration="underline">
|
3971
4188
|
<xsl:apply-templates/>
|
3972
4189
|
</fo:inline>
|
4190
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
4191
|
+
<xsl:choose>
|
4192
|
+
<xsl:when test="@amendment">
|
4193
|
+
<fo:inline>
|
4194
|
+
<xsl:call-template name="insertTag">
|
4195
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4196
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4197
|
+
</xsl:call-template>
|
4198
|
+
<xsl:apply-templates/>
|
4199
|
+
<xsl:call-template name="insertTag">
|
4200
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4201
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4202
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4203
|
+
</xsl:call-template>
|
4204
|
+
</fo:inline>
|
4205
|
+
</xsl:when>
|
4206
|
+
<xsl:when test="@corrigenda">
|
4207
|
+
<fo:inline>
|
4208
|
+
<xsl:call-template name="insertTag">
|
4209
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4210
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4211
|
+
</xsl:call-template>
|
4212
|
+
<xsl:apply-templates/>
|
4213
|
+
<xsl:call-template name="insertTag">
|
4214
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4215
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4216
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4217
|
+
</xsl:call-template>
|
4218
|
+
</fo:inline>
|
4219
|
+
</xsl:when>
|
4220
|
+
<xsl:otherwise>
|
4221
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
4222
|
+
<xsl:apply-templates/>
|
4223
|
+
</fo:inline>
|
4224
|
+
</xsl:otherwise>
|
4225
|
+
</xsl:choose>
|
4226
|
+
|
4227
|
+
</xsl:template><xsl:template name="insertTag">
|
4228
|
+
<xsl:param name="type"/>
|
4229
|
+
<xsl:param name="kind"/>
|
4230
|
+
<xsl:param name="value"/>
|
4231
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
4232
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
4233
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
4234
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
4235
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
4236
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
4237
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4238
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4239
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4240
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
4241
|
+
<g>
|
4242
|
+
<xsl:if test="$type = 'closing'">
|
4243
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
4244
|
+
</xsl:if>
|
4245
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
4246
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
4247
|
+
</g>
|
4248
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
4249
|
+
<xsl:if test="$type = 'closing'">
|
4250
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
4251
|
+
</xsl:if>
|
4252
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
4253
|
+
</text>
|
4254
|
+
</svg>
|
4255
|
+
</fo:instream-foreign-object>
|
3973
4256
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3974
|
-
<fo:inline
|
4257
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
3975
4258
|
<xsl:apply-templates/>
|
3976
4259
|
</fo:inline>
|
3977
4260
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -4268,11 +4551,15 @@
|
|
4268
4551
|
</xsl:apply-templates>
|
4269
4552
|
</xsl:template><xsl:template name="getLang">
|
4270
4553
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4554
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4271
4555
|
<xsl:variable name="language">
|
4272
4556
|
<xsl:choose>
|
4273
4557
|
<xsl:when test="$language_current != ''">
|
4274
4558
|
<xsl:value-of select="$language_current"/>
|
4275
4559
|
</xsl:when>
|
4560
|
+
<xsl:when test="$language_current_2 != ''">
|
4561
|
+
<xsl:value-of select="$language_current_2"/>
|
4562
|
+
</xsl:when>
|
4276
4563
|
<xsl:otherwise>
|
4277
4564
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4278
4565
|
</xsl:otherwise>
|
@@ -4312,13 +4599,23 @@
|
|
4312
4599
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
4313
4600
|
<xsl:value-of select="substring($str, 2)"/>
|
4314
4601
|
</xsl:template><xsl:template match="mathml:math">
|
4315
|
-
<
|
4602
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4603
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4604
|
+
|
4605
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
4606
|
+
|
4607
|
+
|
4608
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4609
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4610
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4611
|
+
</xsl:call-template>
|
4316
4612
|
|
4317
4613
|
<xsl:variable name="mathml">
|
4318
4614
|
<xsl:apply-templates select="." mode="mathml"/>
|
4319
4615
|
</xsl:variable>
|
4320
4616
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4321
4617
|
|
4618
|
+
|
4322
4619
|
<!-- <xsl:copy-of select="."/> -->
|
4323
4620
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4324
4621
|
</fo:instream-foreign-object>
|
@@ -4336,9 +4633,27 @@
|
|
4336
4633
|
<xsl:copy>
|
4337
4634
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4338
4635
|
</xsl:copy>
|
4339
|
-
<
|
4636
|
+
<xsl:choose>
|
4637
|
+
<!-- if in msub, then don't add space -->
|
4638
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
4639
|
+
<!-- if next char in digit, don't add space -->
|
4640
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
4641
|
+
<xsl:otherwise>
|
4642
|
+
<mathml:mspace width="0.5ex"/>
|
4643
|
+
</xsl:otherwise>
|
4644
|
+
</xsl:choose>
|
4340
4645
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4341
4646
|
<xsl:variable name="target">
|
4647
|
+
<xsl:choose>
|
4648
|
+
<xsl:when test="@updatetype = 'true'">
|
4649
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
4650
|
+
</xsl:when>
|
4651
|
+
<xsl:otherwise>
|
4652
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
4653
|
+
</xsl:otherwise>
|
4654
|
+
</xsl:choose>
|
4655
|
+
</xsl:variable>
|
4656
|
+
<xsl:variable name="target_text">
|
4342
4657
|
<xsl:choose>
|
4343
4658
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
4344
4659
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -4350,20 +4665,21 @@
|
|
4350
4665
|
</xsl:variable>
|
4351
4666
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4352
4667
|
|
4668
|
+
|
4353
4669
|
<xsl:choose>
|
4354
|
-
<xsl:when test="$
|
4670
|
+
<xsl:when test="$target_text = ''">
|
4355
4671
|
<xsl:apply-templates/>
|
4356
4672
|
</xsl:when>
|
4357
4673
|
<xsl:otherwise>
|
4358
|
-
<fo:basic-link external-destination="{
|
4674
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
4359
4675
|
<xsl:choose>
|
4360
4676
|
<xsl:when test="normalize-space(.) = ''">
|
4361
|
-
<!-- <xsl:value-of select="$target"/> -->
|
4362
4677
|
<xsl:call-template name="add-zero-spaces-link-java">
|
4363
|
-
<xsl:with-param name="text" select="$
|
4678
|
+
<xsl:with-param name="text" select="$target_text"/>
|
4364
4679
|
</xsl:call-template>
|
4365
4680
|
</xsl:when>
|
4366
4681
|
<xsl:otherwise>
|
4682
|
+
<!-- output text from <link>text</link> -->
|
4367
4683
|
<xsl:apply-templates/>
|
4368
4684
|
</xsl:otherwise>
|
4369
4685
|
</xsl:choose>
|
@@ -4475,6 +4791,7 @@
|
|
4475
4791
|
|
4476
4792
|
|
4477
4793
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
4794
|
+
|
4478
4795
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4479
4796
|
</fo:inline>
|
4480
4797
|
<xsl:apply-templates/>
|
@@ -4500,7 +4817,9 @@
|
|
4500
4817
|
</xsl:choose>
|
4501
4818
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
4502
4819
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
4820
|
+
|
4503
4821
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4822
|
+
|
4504
4823
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4505
4824
|
</fo:inline>
|
4506
4825
|
<xsl:apply-templates/>
|
@@ -4564,16 +4883,27 @@
|
|
4564
4883
|
</fo:inline>
|
4565
4884
|
</xsl:if>
|
4566
4885
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
4886
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4887
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4567
4888
|
<fo:block-container id="{@id}">
|
4568
4889
|
|
4890
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4891
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4892
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4893
|
+
</xsl:call-template>
|
4894
|
+
|
4569
4895
|
<fo:block>
|
4896
|
+
|
4570
4897
|
<xsl:apply-templates/>
|
4571
4898
|
</fo:block>
|
4572
4899
|
<xsl:call-template name="fn_display_figure"/>
|
4573
4900
|
<xsl:for-each select="*[local-name() = 'note']">
|
4574
4901
|
<xsl:call-template name="note"/>
|
4575
4902
|
</xsl:for-each>
|
4576
|
-
|
4903
|
+
|
4904
|
+
|
4905
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4906
|
+
|
4577
4907
|
</fo:block-container>
|
4578
4908
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
4579
4909
|
<fo:block id="{@id}">
|
@@ -4585,37 +4915,122 @@
|
|
4585
4915
|
<xsl:apply-templates/>
|
4586
4916
|
</fo:block>
|
4587
4917
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
4588
|
-
<
|
4589
|
-
|
4590
|
-
|
4591
|
-
<xsl:
|
4592
|
-
<
|
4593
|
-
<xsl:
|
4594
|
-
<xsl:
|
4595
|
-
</xsl:
|
4596
|
-
<
|
4597
|
-
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4603
|
-
|
4918
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
4919
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
4920
|
+
<xsl:choose>
|
4921
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
4922
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
4923
|
+
<xsl:variable name="src">
|
4924
|
+
<xsl:call-template name="image_src"/>
|
4925
|
+
</xsl:variable>
|
4926
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
4927
|
+
</fo:inline>
|
4928
|
+
</xsl:when>
|
4929
|
+
<xsl:otherwise>
|
4930
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
4931
|
+
|
4932
|
+
<xsl:variable name="src">
|
4933
|
+
<xsl:call-template name="image_src"/>
|
4934
|
+
</xsl:variable>
|
4935
|
+
|
4936
|
+
<xsl:choose>
|
4937
|
+
<xsl:when test="$isDeleted = 'true'">
|
4938
|
+
<!-- enclose in svg -->
|
4939
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
4940
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
4941
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
4942
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4943
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4944
|
+
|
4945
|
+
|
4946
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
4947
|
+
|
4948
|
+
</fo:instream-foreign-object>
|
4949
|
+
</xsl:when>
|
4950
|
+
<xsl:otherwise>
|
4951
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4952
|
+
</xsl:otherwise>
|
4953
|
+
</xsl:choose>
|
4954
|
+
|
4955
|
+
</fo:block>
|
4956
|
+
</xsl:otherwise>
|
4957
|
+
</xsl:choose>
|
4958
|
+
</xsl:template><xsl:template name="image_src">
|
4959
|
+
<xsl:choose>
|
4960
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
4961
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
4962
|
+
</xsl:when>
|
4963
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
4964
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
4965
|
+
</xsl:when>
|
4966
|
+
<xsl:otherwise>
|
4967
|
+
<xsl:value-of select="@src"/>
|
4968
|
+
</xsl:otherwise>
|
4969
|
+
</xsl:choose>
|
4970
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
4971
|
+
<xsl:choose>
|
4972
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
4973
|
+
<xsl:variable name="src">
|
4974
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
4975
|
+
</xsl:variable>
|
4976
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
4977
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
4978
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
4979
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
4980
|
+
</svg>
|
4981
|
+
</xsl:when>
|
4982
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
4983
|
+
<xsl:variable name="src">
|
4984
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
4985
|
+
</xsl:variable>
|
4986
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
4987
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
4988
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
4989
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
4990
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
4991
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
4992
|
+
</svg>
|
4993
|
+
</xsl:when>
|
4994
|
+
<xsl:otherwise>
|
4995
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
4996
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
4997
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
4998
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
4999
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
5000
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
5001
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
5002
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
5003
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
5004
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
5005
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
5006
|
+
<xsl:call-template name="svg_cross">
|
5007
|
+
<xsl:with-param name="width" select="$width"/>
|
5008
|
+
<xsl:with-param name="height" select="$height"/>
|
5009
|
+
</xsl:call-template>
|
5010
|
+
</svg>
|
5011
|
+
</xsl:otherwise>
|
5012
|
+
</xsl:choose>
|
5013
|
+
|
5014
|
+
</xsl:template><xsl:template name="svg_cross">
|
5015
|
+
<xsl:param name="width"/>
|
5016
|
+
<xsl:param name="height"/>
|
5017
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
5018
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
4604
5019
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4605
5020
|
<xsl:apply-templates mode="contents"/>
|
4606
5021
|
<xsl:text> </xsl:text>
|
4607
5022
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
4608
5023
|
<xsl:apply-templates mode="bookmarks"/>
|
4609
5024
|
<xsl:text> </xsl:text>
|
4610
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5025
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4611
5026
|
<xsl:value-of select="."/>
|
4612
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
5027
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4613
5028
|
<xsl:value-of select="."/>
|
4614
5029
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4615
5030
|
<xsl:apply-templates mode="contents"/>
|
4616
5031
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4617
5032
|
<xsl:apply-templates mode="bookmarks"/>
|
4618
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
5033
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
4619
5034
|
<xsl:apply-templates select="."/>
|
4620
5035
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4621
5036
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -4763,6 +5178,7 @@
|
|
4763
5178
|
<xsl:if test="normalize-space() != ''">
|
4764
5179
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4765
5180
|
|
5181
|
+
|
4766
5182
|
<xsl:apply-templates/>
|
4767
5183
|
</fo:block>
|
4768
5184
|
</xsl:if>
|
@@ -4814,6 +5230,8 @@
|
|
4814
5230
|
</fo:list-item-body>
|
4815
5231
|
</fo:list-item>
|
4816
5232
|
</fo:list-block>
|
5233
|
+
</xsl:template><xsl:template name="extractSection">
|
5234
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4817
5235
|
</xsl:template><xsl:template name="extractTitle">
|
4818
5236
|
<xsl:choose>
|
4819
5237
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -4840,6 +5258,8 @@
|
|
4840
5258
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4841
5259
|
|
4842
5260
|
<fo:block-container margin-left="0mm">
|
5261
|
+
<xsl:copy-of select="@id"/>
|
5262
|
+
|
4843
5263
|
<xsl:if test="parent::*[local-name() = 'note']">
|
4844
5264
|
<xsl:attribute name="margin-left">
|
4845
5265
|
<xsl:choose>
|
@@ -4850,7 +5270,9 @@
|
|
4850
5270
|
|
4851
5271
|
</xsl:if>
|
4852
5272
|
<fo:block-container margin-left="0mm">
|
4853
|
-
|
5273
|
+
|
5274
|
+
|
5275
|
+
|
4854
5276
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4855
5277
|
<xsl:variable name="_font-size">
|
4856
5278
|
|
@@ -4859,6 +5281,7 @@
|
|
4859
5281
|
|
4860
5282
|
|
4861
5283
|
|
5284
|
+
|
4862
5285
|
9
|
4863
5286
|
|
4864
5287
|
|
@@ -4878,10 +5301,14 @@
|
|
4878
5301
|
</xsl:choose>
|
4879
5302
|
</xsl:attribute>
|
4880
5303
|
</xsl:if>
|
4881
|
-
|
4882
|
-
|
5304
|
+
|
5305
|
+
<xsl:apply-templates/>
|
5306
|
+
</fo:block>
|
5307
|
+
|
5308
|
+
|
4883
5309
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4884
5310
|
|
5311
|
+
|
4885
5312
|
</fo:block-container>
|
4886
5313
|
</fo:block-container>
|
4887
5314
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -5116,11 +5543,12 @@
|
|
5116
5543
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
5117
5544
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
5118
5545
|
|
5546
|
+
|
5119
5547
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
5120
5548
|
|
5121
5549
|
<xsl:variable name="element">
|
5122
|
-
|
5123
|
-
|
5550
|
+
|
5551
|
+
inline
|
5124
5552
|
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
5125
5553
|
</xsl:variable>
|
5126
5554
|
|
@@ -5143,6 +5571,7 @@
|
|
5143
5571
|
<xsl:variable name="element">
|
5144
5572
|
|
5145
5573
|
inline
|
5574
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5146
5575
|
</xsl:variable>
|
5147
5576
|
<xsl:choose>
|
5148
5577
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -5150,7 +5579,7 @@
|
|
5150
5579
|
<xsl:apply-templates/>
|
5151
5580
|
</fo:inline>
|
5152
5581
|
</xsl:when>
|
5153
|
-
<xsl:when test="normalize-space($element)
|
5582
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
5154
5583
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5155
5584
|
<xsl:apply-templates/>
|
5156
5585
|
</fo:block>
|
@@ -5165,7 +5594,12 @@
|
|
5165
5594
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5166
5595
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5167
5596
|
<xsl:variable name="element">
|
5168
|
-
|
5597
|
+
|
5598
|
+
|
5599
|
+
<xsl:choose>
|
5600
|
+
<xsl:when test="$num = 1">inline</xsl:when>
|
5601
|
+
<xsl:otherwise>block</xsl:otherwise>
|
5602
|
+
</xsl:choose>
|
5169
5603
|
|
5170
5604
|
|
5171
5605
|
</xsl:variable>
|
@@ -5182,7 +5616,7 @@
|
|
5182
5616
|
</fo:inline>
|
5183
5617
|
</xsl:otherwise>
|
5184
5618
|
</xsl:choose>
|
5185
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
5619
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
5186
5620
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5187
5621
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
5188
5622
|
<xsl:variable name="termsource_text">
|
@@ -5191,13 +5625,15 @@
|
|
5191
5625
|
|
5192
5626
|
<xsl:choose>
|
5193
5627
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5194
|
-
<xsl:apply-templates/>
|
5628
|
+
<!-- <xsl:apply-templates /> -->
|
5629
|
+
<xsl:copy-of select="$termsource_text"/>
|
5195
5630
|
</xsl:when>
|
5196
5631
|
<xsl:otherwise>
|
5197
5632
|
|
5198
5633
|
<xsl:text>[</xsl:text>
|
5199
5634
|
|
5200
|
-
<xsl:apply-templates/>
|
5635
|
+
<!-- <xsl:apply-templates /> -->
|
5636
|
+
<xsl:copy-of select="$termsource_text"/>
|
5201
5637
|
|
5202
5638
|
<xsl:text>]</xsl:text>
|
5203
5639
|
|
@@ -5208,20 +5644,27 @@
|
|
5208
5644
|
<xsl:if test="normalize-space() != ''">
|
5209
5645
|
<xsl:value-of select="."/>
|
5210
5646
|
</xsl:if>
|
5211
|
-
</xsl:template><xsl:
|
5647
|
+
</xsl:template><xsl:variable name="localized.source">
|
5648
|
+
<xsl:call-template name="getLocalizedString">
|
5649
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5650
|
+
</xsl:call-template>
|
5651
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5212
5652
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5653
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5654
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5655
|
+
</xsl:if>
|
5213
5656
|
|
5214
5657
|
<fo:inline>
|
5215
5658
|
|
5216
5659
|
|
5217
5660
|
|
5218
|
-
|
5219
|
-
|
5220
|
-
|
5661
|
+
|
5662
|
+
|
5663
|
+
<xsl:value-of select="$localized.source"/>
|
5664
|
+
<xsl:text> </xsl:text>
|
5221
5665
|
|
5222
5666
|
|
5223
5667
|
|
5224
|
-
<xsl:text>: </xsl:text>
|
5225
5668
|
</fo:inline>
|
5226
5669
|
|
5227
5670
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
@@ -5337,6 +5780,7 @@
|
|
5337
5780
|
|
5338
5781
|
|
5339
5782
|
|
5783
|
+
|
5340
5784
|
<xsl:choose>
|
5341
5785
|
<xsl:when test="$depth = 2">3</xsl:when>
|
5342
5786
|
<xsl:otherwise>4</xsl:otherwise>
|
@@ -5379,7 +5823,8 @@
|
|
5379
5823
|
</fo:inline>
|
5380
5824
|
</xsl:when>
|
5381
5825
|
<xsl:otherwise>
|
5382
|
-
<
|
5826
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
5827
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
5383
5828
|
</xsl:otherwise>
|
5384
5829
|
</xsl:choose>
|
5385
5830
|
|
@@ -5438,7 +5883,6 @@
|
|
5438
5883
|
|
5439
5884
|
|
5440
5885
|
|
5441
|
-
|
5442
5886
|
<xsl:apply-templates/>
|
5443
5887
|
</fo:block>
|
5444
5888
|
|
@@ -5455,6 +5899,11 @@
|
|
5455
5899
|
<xsl:call-template name="setId"/>
|
5456
5900
|
|
5457
5901
|
|
5902
|
+
|
5903
|
+
<xsl:if test="@inline-header='true'">
|
5904
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5905
|
+
</xsl:if>
|
5906
|
+
|
5458
5907
|
<xsl:apply-templates/>
|
5459
5908
|
</fo:block>
|
5460
5909
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -5481,7 +5930,7 @@
|
|
5481
5930
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5482
5931
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5483
5932
|
<xsl:choose>
|
5484
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
5933
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
5485
5934
|
<fo:block-container>
|
5486
5935
|
<xsl:attribute name="margin-left">
|
5487
5936
|
<xsl:choose>
|
@@ -5491,6 +5940,7 @@
|
|
5491
5940
|
</xsl:attribute>
|
5492
5941
|
|
5493
5942
|
|
5943
|
+
|
5494
5944
|
<fo:block-container margin-left="0mm">
|
5495
5945
|
<fo:block>
|
5496
5946
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -5692,21 +6142,25 @@
|
|
5692
6142
|
|
5693
6143
|
|
5694
6144
|
|
6145
|
+
|
6146
|
+
|
6147
|
+
|
6148
|
+
|
5695
6149
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5696
6150
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
5697
6151
|
<xsl:choose>
|
5698
6152
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5699
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
6153
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
5700
6154
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
5701
6155
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5702
|
-
</xsl:if>
|
6156
|
+
</xsl:if> -->
|
5703
6157
|
<xsl:value-of select="$_doc_ident"/>
|
5704
6158
|
</xsl:when>
|
5705
6159
|
<xsl:otherwise>
|
5706
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
6160
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5707
6161
|
<xsl:if test="$type != ''">
|
5708
6162
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5709
|
-
</xsl:if>
|
6163
|
+
</xsl:if> -->
|
5710
6164
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5711
6165
|
</xsl:otherwise>
|
5712
6166
|
</xsl:choose>
|
@@ -5748,6 +6202,70 @@
|
|
5748
6202
|
<xsl:value-of select="substring(.,1,1)"/>
|
5749
6203
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5750
6204
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6205
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
6206
|
+
<fo:block>
|
6207
|
+
<xsl:apply-templates/>
|
6208
|
+
</fo:block>
|
6209
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
6210
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6211
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
6212
|
+
<fo:inline>
|
6213
|
+
<xsl:call-template name="text_input"/>
|
6214
|
+
</fo:inline>
|
6215
|
+
</xsl:template><xsl:template name="text_input">
|
6216
|
+
<xsl:variable name="count">
|
6217
|
+
<xsl:choose>
|
6218
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
6219
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
6220
|
+
<xsl:otherwise>10</xsl:otherwise>
|
6221
|
+
</xsl:choose>
|
6222
|
+
</xsl:variable>
|
6223
|
+
<xsl:call-template name="repeat">
|
6224
|
+
<xsl:with-param name="char" select="'_'"/>
|
6225
|
+
<xsl:with-param name="count" select="$count"/>
|
6226
|
+
</xsl:call-template>
|
6227
|
+
<xsl:text> </xsl:text>
|
6228
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
6229
|
+
<xsl:variable name="caption">
|
6230
|
+
<xsl:choose>
|
6231
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
6232
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
6233
|
+
</xsl:choose>
|
6234
|
+
</xsl:variable>
|
6235
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
6236
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
6237
|
+
<fo:inline padding-right="1mm">
|
6238
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6239
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6240
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6241
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6242
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6243
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6244
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
6245
|
+
</svg>
|
6246
|
+
</fo:instream-foreign-object>
|
6247
|
+
</fo:inline>
|
6248
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
6249
|
+
<fo:inline padding-right="1mm">
|
6250
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6251
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6252
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6253
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6254
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6255
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6256
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
6257
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
6258
|
+
</svg>
|
6259
|
+
</fo:instream-foreign-object>
|
6260
|
+
</fo:inline>
|
6261
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
6262
|
+
<fo:inline>
|
6263
|
+
<xsl:call-template name="text_input"/>
|
6264
|
+
</fo:inline>
|
6265
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
6266
|
+
<fo:block-container border="1pt solid black" width="50%">
|
6267
|
+
<fo:block> </fo:block>
|
6268
|
+
</fo:block-container>
|
5751
6269
|
</xsl:template><xsl:template name="convertDate">
|
5752
6270
|
<xsl:param name="date"/>
|
5753
6271
|
<xsl:param name="format" select="'short'"/>
|
@@ -5952,6 +6470,9 @@
|
|
5952
6470
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
5953
6471
|
<xsl:value-of select="$level_total - 1"/>
|
5954
6472
|
</xsl:when>
|
6473
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
6474
|
+
<xsl:value-of select="$level_total - 1"/>
|
6475
|
+
</xsl:when>
|
5955
6476
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5956
6477
|
<xsl:value-of select="$level_total - 2"/>
|
5957
6478
|
</xsl:when>
|
@@ -6016,6 +6537,7 @@
|
|
6016
6537
|
|
6017
6538
|
|
6018
6539
|
|
6540
|
+
|
6019
6541
|
|
6020
6542
|
|
6021
6543
|
|
@@ -6076,17 +6598,79 @@
|
|
6076
6598
|
</xsl:call-template>
|
6077
6599
|
</xsl:if>
|
6078
6600
|
</xsl:template><xsl:template name="getLocalizedString">
|
6079
|
-
<xsl:param name="key"/>
|
6601
|
+
<xsl:param name="key"/>
|
6080
6602
|
|
6081
6603
|
<xsl:variable name="curr_lang">
|
6082
6604
|
<xsl:call-template name="getLang"/>
|
6083
6605
|
</xsl:variable>
|
6084
6606
|
|
6607
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6608
|
+
|
6085
6609
|
<xsl:choose>
|
6610
|
+
<xsl:when test="$data_value != ''">
|
6611
|
+
<xsl:value-of select="$data_value"/>
|
6612
|
+
</xsl:when>
|
6086
6613
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6087
6614
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6088
6615
|
</xsl:when>
|
6089
|
-
<xsl:otherwise
|
6616
|
+
<xsl:otherwise>
|
6617
|
+
<xsl:variable name="key_">
|
6618
|
+
<xsl:call-template name="capitalize">
|
6619
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
6620
|
+
</xsl:call-template>
|
6621
|
+
</xsl:variable>
|
6622
|
+
<xsl:value-of select="$key_"/>
|
6623
|
+
</xsl:otherwise>
|
6090
6624
|
</xsl:choose>
|
6091
6625
|
|
6626
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6627
|
+
<xsl:param name="isAdded"/>
|
6628
|
+
<xsl:param name="isDeleted"/>
|
6629
|
+
<xsl:choose>
|
6630
|
+
<xsl:when test="local-name() = 'math'">
|
6631
|
+
<xsl:if test="$isAdded = 'true'">
|
6632
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
6633
|
+
</xsl:if>
|
6634
|
+
<xsl:if test="$isDeleted = 'true'">
|
6635
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
6636
|
+
</xsl:if>
|
6637
|
+
</xsl:when>
|
6638
|
+
<xsl:otherwise>
|
6639
|
+
<xsl:if test="$isAdded = 'true'">
|
6640
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
6641
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6642
|
+
</xsl:if>
|
6643
|
+
<xsl:if test="$isDeleted = 'true'">
|
6644
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
6645
|
+
<xsl:if test="local-name() = 'table'">
|
6646
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
6647
|
+
</xsl:if>
|
6648
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
6649
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6650
|
+
</xsl:if>
|
6651
|
+
</xsl:otherwise>
|
6652
|
+
</xsl:choose>
|
6653
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
6654
|
+
<xsl:if test="$lang = 'ar'">
|
6655
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
6656
|
+
</xsl:if>
|
6657
|
+
</xsl:template><xsl:template name="setAlignment">
|
6658
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
6659
|
+
<xsl:choose>
|
6660
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
6661
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
6662
|
+
<xsl:when test="$align != ''">
|
6663
|
+
<xsl:value-of select="$align"/>
|
6664
|
+
</xsl:when>
|
6665
|
+
</xsl:choose>
|
6666
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
6667
|
+
<xsl:param name="default">left</xsl:param>
|
6668
|
+
<xsl:attribute name="text-align">
|
6669
|
+
<xsl:choose>
|
6670
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
6671
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
6672
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
6673
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
6674
|
+
</xsl:choose>
|
6675
|
+
</xsl:attribute>
|
6092
6676
|
</xsl:template></xsl:stylesheet>
|