metanorma-cc 1.7.7 → 1.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/cc/isodoc.rng +52 -11
- data/lib/asciidoctor/cc/reqt.rng +15 -4
- data/lib/asciidoctor/cc/validate_section.rb +35 -27
- data/lib/isodoc/cc/cc.standard.xsl +323 -100
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a6ac48185b38e14f7918b96cd5a3e2380c791e5550a9fe15c742603226e95bd
|
4
|
+
data.tar.gz: '07259b1161b45eb3597833e8af35528f96fb7cef886ac6f44f5ed9f795165743'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5be76dd1739b18c9e7b08d1a47a9ef73b5fe94c6f42228bb64db24abe9faa96f8e324217fbbb5a67fb0c04930e9d0026ef4c667e29c20d516f0535ed2c20e30f
|
7
|
+
data.tar.gz: 9f7775c02f07d64d9a51f7425210ce947e795341a15c2ee8975532640ca92a9e421da63969f9dfd3f7441260f6b24b0dfd4cd01d5817c443cb5556c61f1b96d5
|
@@ -32,6 +32,18 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="section-title">
|
36
|
+
<element name="title">
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="TextElement"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</element>
|
41
|
+
<zeroOrMore>
|
42
|
+
<element name="variant-title">
|
43
|
+
<ref name="TypedTitleString"/>
|
44
|
+
</element>
|
45
|
+
</zeroOrMore>
|
46
|
+
</define>
|
35
47
|
<define name="hyperlink">
|
36
48
|
<element name="link">
|
37
49
|
<attribute name="target">
|
@@ -158,15 +170,17 @@
|
|
158
170
|
<data type="boolean"/>
|
159
171
|
</attribute>
|
160
172
|
</optional>
|
161
|
-
<
|
162
|
-
<
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
173
|
+
<optional>
|
174
|
+
<attribute name="type">
|
175
|
+
<choice>
|
176
|
+
<value>roman</value>
|
177
|
+
<value>alphabet</value>
|
178
|
+
<value>arabic</value>
|
179
|
+
<value>roman_upper</value>
|
180
|
+
<value>alphabet_upper</value>
|
181
|
+
</choice>
|
182
|
+
</attribute>
|
183
|
+
</optional>
|
170
184
|
<oneOrMore>
|
171
185
|
<ref name="li"/>
|
172
186
|
</oneOrMore>
|
@@ -976,6 +990,16 @@
|
|
976
990
|
<data type="boolean"/>
|
977
991
|
</attribute>
|
978
992
|
</optional>
|
993
|
+
<optional>
|
994
|
+
<attribute name="linkmention">
|
995
|
+
<data type="boolean"/>
|
996
|
+
</attribute>
|
997
|
+
</optional>
|
998
|
+
<optional>
|
999
|
+
<attribute name="linkref">
|
1000
|
+
<data type="boolean"/>
|
1001
|
+
</attribute>
|
1002
|
+
</optional>
|
979
1003
|
<optional>
|
980
1004
|
<element name="refterm">
|
981
1005
|
<zeroOrMore>
|
@@ -1011,8 +1035,14 @@
|
|
1011
1035
|
<ref name="imagemap"/>
|
1012
1036
|
<ref name="svgmap"/>
|
1013
1037
|
<ref name="inputform"/>
|
1038
|
+
<ref name="toc"/>
|
1014
1039
|
</choice>
|
1015
1040
|
</define>
|
1041
|
+
<define name="toc">
|
1042
|
+
<element name="toc">
|
1043
|
+
<ref name="ul"/>
|
1044
|
+
</element>
|
1045
|
+
</define>
|
1016
1046
|
<define name="inputform">
|
1017
1047
|
<element name="form">
|
1018
1048
|
<attribute name="id">
|
@@ -1254,6 +1284,12 @@
|
|
1254
1284
|
<optional>
|
1255
1285
|
<attribute name="type"/>
|
1256
1286
|
</optional>
|
1287
|
+
<optional>
|
1288
|
+
<attribute name="identifier"/>
|
1289
|
+
</optional>
|
1290
|
+
<optional>
|
1291
|
+
<attribute name="prefix"/>
|
1292
|
+
</optional>
|
1257
1293
|
<text/>
|
1258
1294
|
</define>
|
1259
1295
|
<define name="ics">
|
@@ -1674,7 +1710,9 @@
|
|
1674
1710
|
<zeroOrMore>
|
1675
1711
|
<ref name="termgrammar"/>
|
1676
1712
|
</zeroOrMore>
|
1677
|
-
<
|
1713
|
+
<oneOrMore>
|
1714
|
+
<ref name="termdefinition"/>
|
1715
|
+
</oneOrMore>
|
1678
1716
|
<zeroOrMore>
|
1679
1717
|
<ref name="termnote"/>
|
1680
1718
|
</zeroOrMore>
|
@@ -1737,7 +1775,7 @@
|
|
1737
1775
|
</oneOrMore>
|
1738
1776
|
</element>
|
1739
1777
|
</define>
|
1740
|
-
<define name="
|
1778
|
+
<define name="termdefinition">
|
1741
1779
|
<element name="definition">
|
1742
1780
|
<oneOrMore>
|
1743
1781
|
<choice>
|
@@ -1746,6 +1784,9 @@
|
|
1746
1784
|
<ref name="formula"/>
|
1747
1785
|
</choice>
|
1748
1786
|
</oneOrMore>
|
1787
|
+
<zeroOrMore>
|
1788
|
+
<ref name="termsource"/>
|
1789
|
+
</zeroOrMore>
|
1749
1790
|
</element>
|
1750
1791
|
</define>
|
1751
1792
|
<define name="termnote">
|
data/lib/asciidoctor/cc/reqt.rng
CHANGED
@@ -64,9 +64,9 @@
|
|
64
64
|
<optional>
|
65
65
|
<ref name="label"/>
|
66
66
|
</optional>
|
67
|
-
<
|
67
|
+
<zeroOrMore>
|
68
68
|
<ref name="subject"/>
|
69
|
-
</
|
69
|
+
</zeroOrMore>
|
70
70
|
<zeroOrMore>
|
71
71
|
<ref name="reqinherit"/>
|
72
72
|
</zeroOrMore>
|
@@ -80,6 +80,7 @@
|
|
80
80
|
<ref name="verification"/>
|
81
81
|
<ref name="import"/>
|
82
82
|
<ref name="description"/>
|
83
|
+
<ref name="component"/>
|
83
84
|
</choice>
|
84
85
|
</zeroOrMore>
|
85
86
|
<optional>
|
@@ -105,12 +106,16 @@
|
|
105
106
|
</define>
|
106
107
|
<define name="subject">
|
107
108
|
<element name="subject">
|
108
|
-
<
|
109
|
+
<oneOrMore>
|
110
|
+
<ref name="TextElement"/>
|
111
|
+
</oneOrMore>
|
109
112
|
</element>
|
110
113
|
</define>
|
111
114
|
<define name="reqinherit">
|
112
115
|
<element name="inherit">
|
113
|
-
<
|
116
|
+
<oneOrMore>
|
117
|
+
<ref name="TextElement"/>
|
118
|
+
</oneOrMore>
|
114
119
|
</element>
|
115
120
|
</define>
|
116
121
|
<define name="measurementtarget">
|
@@ -138,6 +143,12 @@
|
|
138
143
|
<ref name="RequirementSubpart"/>
|
139
144
|
</element>
|
140
145
|
</define>
|
146
|
+
<define name="component">
|
147
|
+
<element name="component">
|
148
|
+
<attribute name="class"/>
|
149
|
+
<ref name="RequirementSubpart"/>
|
150
|
+
</element>
|
151
|
+
</define>
|
141
152
|
<define name="reqt_references">
|
142
153
|
<element name="references">
|
143
154
|
<oneOrMore>
|
@@ -12,10 +12,10 @@ module Asciidoctor
|
|
12
12
|
end
|
13
13
|
|
14
14
|
ONE_SYMBOLS_WARNING = "Only one Symbols and Abbreviated "\
|
15
|
-
|
15
|
+
"Terms section in the standard".freeze
|
16
16
|
|
17
17
|
NON_DL_SYMBOLS_WARNING = "Symbols and Abbreviated Terms can "\
|
18
|
-
|
18
|
+
"only contain a definition list".freeze
|
19
19
|
|
20
20
|
def symbols_validate(root)
|
21
21
|
f = root.xpath("//definitions")
|
@@ -32,8 +32,9 @@ module Asciidoctor
|
|
32
32
|
def seqcheck(names, msg, accepted)
|
33
33
|
n = names.shift
|
34
34
|
return [] if n.nil?
|
35
|
+
|
35
36
|
test = accepted.map { |a| n.at(a) }
|
36
|
-
if test.all?
|
37
|
+
if test.all?(&:nil?)
|
37
38
|
@log.add("Style", nil, msg)
|
38
39
|
end
|
39
40
|
names
|
@@ -45,77 +46,84 @@ module Asciidoctor
|
|
45
46
|
[
|
46
47
|
{
|
47
48
|
msg: "Initial section must be (content) Foreword",
|
48
|
-
val:
|
49
|
+
val: ["./self::foreword"],
|
49
50
|
},
|
50
51
|
{
|
51
52
|
msg: "Prefatory material must be followed by (clause) Scope",
|
52
|
-
val:
|
53
|
+
val: ["./self::introduction", "./self::clause[@type = 'scope']"],
|
53
54
|
},
|
54
55
|
{
|
55
56
|
msg: "Prefatory material must be followed by (clause) Scope",
|
56
|
-
val: ["./self::clause[@type = 'scope']"
|
57
|
+
val: ["./self::clause[@type = 'scope']"],
|
57
58
|
},
|
58
59
|
{
|
59
60
|
msg: "Normative References must be followed by "\
|
60
|
-
|
61
|
-
val: ["./self::terms | .//terms"]
|
61
|
+
"Terms and Definitions",
|
62
|
+
val: ["./self::terms | .//terms"],
|
62
63
|
},
|
63
|
-
|
64
|
+
].freeze
|
64
65
|
|
65
66
|
SECTIONS_XPATH =
|
66
67
|
"//foreword | //introduction | //sections/terms | .//annex | "\
|
67
|
-
"//sections/definitions | //sections/clause |
|
68
|
+
"//sections/definitions | //sections/clause | "\
|
69
|
+
"//references[not(parent::clause)] | "\
|
68
70
|
"//clause[descendant::references][not(parent::clause)]".freeze
|
69
71
|
|
70
72
|
def sections_sequence_validate(root)
|
71
73
|
names = root.xpath(SECTIONS_XPATH)
|
72
|
-
names = seqcheck(names, SEQ[0][:msg], SEQ[0][:val])
|
74
|
+
names = seqcheck(names, SEQ[0][:msg], SEQ[0][:val])
|
73
75
|
n = names[0]
|
74
76
|
names = seqcheck(names, SEQ[1][:msg], SEQ[1][:val])
|
75
77
|
if n&.at("./self::introduction")
|
76
|
-
names = seqcheck(names, SEQ[2][:msg], SEQ[2][:val])
|
78
|
+
names = seqcheck(names, SEQ[2][:msg], SEQ[2][:val])
|
77
79
|
end
|
78
|
-
names = seqcheck(names, SEQ[3][:msg], SEQ[3][:val])
|
80
|
+
names = seqcheck(names, SEQ[3][:msg], SEQ[3][:val])
|
79
81
|
n = names.shift
|
80
82
|
if n&.at("./self::definitions")
|
81
|
-
n = names.shift
|
83
|
+
n = names.shift
|
82
84
|
end
|
83
85
|
if n.nil? || n.name != "clause"
|
84
86
|
@log.add("Style", nil, "Document must contain at least one clause")
|
85
87
|
end
|
86
88
|
n&.at("./self::clause") ||
|
87
89
|
@log.add("Style", nil, "Document must contain clause after "\
|
88
|
-
|
90
|
+
"Terms and Definitions")
|
89
91
|
n&.at("./self::clause[@type = 'scope']") &&
|
90
|
-
@log.add("Style", nil,
|
91
|
-
|
92
|
+
@log.add("Style", nil,
|
93
|
+
"Scope must occur before Terms and Definitions")
|
94
|
+
n = names.shift
|
92
95
|
while n&.name == "clause"
|
93
96
|
n&.at("./self::clause[@type = 'scope']")
|
94
|
-
|
95
|
-
|
97
|
+
@log.add("Style", nil,
|
98
|
+
"Scope must occur before Terms and Definitions")
|
99
|
+
n = names.shift
|
96
100
|
end
|
97
|
-
|
98
|
-
@log.add("Style", nil,
|
101
|
+
unless %w(annex references).include? n&.name
|
102
|
+
@log.add("Style", nil,
|
103
|
+
"Only annexes and references can follow clauses")
|
99
104
|
end
|
100
|
-
|
105
|
+
while n&.name == "annex"
|
101
106
|
n = names.shift
|
102
107
|
if n.nil?
|
103
108
|
@log.add("Style", nil, "Document must include (references) "\
|
104
|
-
|
109
|
+
"Normative References")
|
105
110
|
end
|
106
111
|
end
|
107
|
-
|
112
|
+
n&.at("./self::references[@normative = 'true']") ||
|
108
113
|
@log.add("Style", nil, "Document must include (references) "\
|
109
|
-
|
114
|
+
"Normative References")
|
110
115
|
n = names&.shift
|
111
116
|
n&.at("./self::references[@normative = 'false']") ||
|
112
|
-
@log.add("Style", nil,
|
117
|
+
@log.add("Style", nil,
|
118
|
+
"Final section must be (references) Bibliography")
|
113
119
|
names.empty? ||
|
114
|
-
@log.add("Style", nil,
|
120
|
+
@log.add("Style", nil,
|
121
|
+
"There are sections after the final Bibliography")
|
115
122
|
end
|
116
123
|
|
117
124
|
def style_warning(node, msg, text = nil)
|
118
125
|
return if @novalid
|
126
|
+
|
119
127
|
w = msg
|
120
128
|
w += ": #{text}" if text
|
121
129
|
@log.add("Style", node, w)
|
@@ -151,7 +151,7 @@
|
|
151
151
|
<xsl:text> </xsl:text>
|
152
152
|
</fo:block>
|
153
153
|
</fo:block>
|
154
|
-
<fo:block font-size="24pt" font-weight="bold" text-align="center">
|
154
|
+
<fo:block font-size="24pt" font-weight="bold" text-align="center" role="H1">
|
155
155
|
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:title[@language = 'en']"/>
|
156
156
|
<xsl:value-of select="$linebreak"/>
|
157
157
|
</fo:block>
|
@@ -230,50 +230,52 @@
|
|
230
230
|
<fo:block break-after="page"/>
|
231
231
|
|
232
232
|
<fo:block-container font-weight="bold" line-height="115%">
|
233
|
-
<
|
234
|
-
<xsl:
|
235
|
-
<xsl:
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
233
|
+
<fo:block role="TOC">
|
234
|
+
<xsl:variable name="title-toc">
|
235
|
+
<xsl:call-template name="getTitle">
|
236
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
237
|
+
</xsl:call-template>
|
238
|
+
</xsl:variable>
|
239
|
+
<fo:block font-size="14pt" margin-bottom="15.5pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
241
240
|
|
242
|
-
<
|
243
|
-
<xsl:if test="@level = 1">
|
244
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
245
|
-
</xsl:if>
|
241
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
246
242
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
243
|
+
<fo:block role="TOCI">
|
244
|
+
<xsl:if test="@level = 1">
|
245
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
246
|
+
</xsl:if>
|
247
|
+
|
248
|
+
|
249
|
+
<fo:list-block>
|
250
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
251
|
+
<xsl:choose>
|
252
|
+
<!-- skip 0 section without subsections -->
|
253
|
+
<xsl:when test="@section != ''">8mm</xsl:when> <!-- and not(@display-section = 'false') -->
|
254
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
255
|
+
</xsl:choose>
|
256
|
+
</xsl:attribute>
|
257
|
+
<fo:list-item>
|
258
|
+
<fo:list-item-label end-indent="label-end()">
|
259
|
+
<fo:block>
|
260
|
+
<xsl:value-of select="@section"/>
|
261
|
+
</fo:block>
|
262
|
+
</fo:list-item-label>
|
263
|
+
<fo:list-item-body start-indent="body-start()">
|
264
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
265
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
266
|
+
<xsl:apply-templates select="title"/>
|
267
|
+
<fo:inline keep-together.within-line="always">
|
268
|
+
<fo:leader leader-pattern="dots"/>
|
269
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
270
|
+
</fo:inline>
|
271
|
+
</fo:basic-link>
|
272
|
+
</fo:block>
|
273
|
+
</fo:list-item-body>
|
274
|
+
</fo:list-item>
|
275
|
+
</fo:list-block>
|
276
|
+
</fo:block>
|
277
|
+
</xsl:for-each>
|
278
|
+
</fo:block>
|
277
279
|
</fo:block-container>
|
278
280
|
|
279
281
|
<!-- Foreword, Introduction -->
|
@@ -292,7 +294,7 @@
|
|
292
294
|
</fo:static-content>
|
293
295
|
<xsl:call-template name="insertHeaderFooter"/>
|
294
296
|
<fo:flow flow-name="xsl-region-body">
|
295
|
-
<fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt">
|
297
|
+
<fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
|
296
298
|
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:title[@language = 'en']"/>
|
297
299
|
</fo:block>
|
298
300
|
<fo:block>
|
@@ -366,7 +368,10 @@
|
|
366
368
|
|
367
369
|
|
368
370
|
<xsl:template match="csd:license-statement//csd:title">
|
369
|
-
<
|
371
|
+
<xsl:variable name="level">
|
372
|
+
<xsl:call-template name="getLevel"/>
|
373
|
+
</xsl:variable>
|
374
|
+
<fo:block text-align="center" font-weight="bold" role="H{$level}">
|
370
375
|
<xsl:apply-templates/>
|
371
376
|
</fo:block>
|
372
377
|
</xsl:template>
|
@@ -446,7 +451,9 @@
|
|
446
451
|
<xsl:if test="ancestor::csd:sections">
|
447
452
|
<xsl:attribute name="margin-top">13.5pt</xsl:attribute>
|
448
453
|
</xsl:if>
|
454
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
449
455
|
<xsl:apply-templates/>
|
456
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
450
457
|
</xsl:element>
|
451
458
|
</xsl:template>
|
452
459
|
|
@@ -637,7 +644,10 @@
|
|
637
644
|
<xsl:otherwise>12pt</xsl:otherwise>
|
638
645
|
</xsl:choose>
|
639
646
|
</xsl:variable>
|
640
|
-
<
|
647
|
+
<xsl:variable name="levelTerm">
|
648
|
+
<xsl:call-template name="getLevelTermName"/>
|
649
|
+
</xsl:variable>
|
650
|
+
<fo:block font-size="{$font-size}" line-height="1.1" role="H{$levelTerm}">
|
641
651
|
<fo:block font-weight="bold" keep-with-next="always">
|
642
652
|
<xsl:apply-templates select="ancestor::csd:term/csd:name" mode="presentation"/>
|
643
653
|
</fo:block>
|
@@ -754,14 +764,14 @@
|
|
754
764
|
|
755
765
|
|
756
766
|
<xsl:template name="insertHeaderFooter">
|
757
|
-
<fo:static-content flow-name="header-even">
|
767
|
+
<fo:static-content flow-name="header-even" role="artifact">
|
758
768
|
<fo:block-container height="17mm" display-align="before">
|
759
769
|
<fo:block padding-top="12.5mm">
|
760
770
|
<xsl:value-of select="$header"/>
|
761
771
|
</fo:block>
|
762
772
|
</fo:block-container>
|
763
773
|
</fo:static-content>
|
764
|
-
<fo:static-content flow-name="footer-even">
|
774
|
+
<fo:static-content flow-name="footer-even" role="artifact">
|
765
775
|
<fo:block-container font-size="10pt" height="100%" display-align="after">
|
766
776
|
<fo:table table-layout="fixed" width="100%">
|
767
777
|
<fo:table-column column-width="10%"/>
|
@@ -779,14 +789,14 @@
|
|
779
789
|
</fo:table>
|
780
790
|
</fo:block-container>
|
781
791
|
</fo:static-content>
|
782
|
-
<fo:static-content flow-name="header-odd">
|
792
|
+
<fo:static-content flow-name="header-odd" role="artifact">
|
783
793
|
<fo:block-container height="17mm" display-align="before">
|
784
794
|
<fo:block text-align="right" padding-top="12.5mm">
|
785
795
|
<xsl:value-of select="$header"/>
|
786
796
|
</fo:block>
|
787
797
|
</fo:block-container>
|
788
798
|
</fo:static-content>
|
789
|
-
<fo:static-content flow-name="footer-odd">
|
799
|
+
<fo:static-content flow-name="footer-odd" role="artifact">
|
790
800
|
<fo:block-container font-size="10pt" height="100%" display-align="after">
|
791
801
|
<fo:table table-layout="fixed" width="100%">
|
792
802
|
<fo:table-column column-width="90%"/>
|
@@ -978,6 +988,7 @@
|
|
978
988
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
979
989
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
980
990
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
991
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
981
992
|
|
982
993
|
|
983
994
|
|
@@ -1003,8 +1014,13 @@
|
|
1003
1014
|
|
1004
1015
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1005
1016
|
|
1006
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1007
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1017
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1018
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1019
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1020
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1021
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1022
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1023
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1008
1024
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1009
1025
|
|
1010
1026
|
|
@@ -1083,6 +1099,7 @@
|
|
1083
1099
|
|
1084
1100
|
|
1085
1101
|
|
1102
|
+
|
1086
1103
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1087
1104
|
|
1088
1105
|
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
@@ -1091,7 +1108,9 @@
|
|
1091
1108
|
|
1092
1109
|
|
1093
1110
|
|
1094
|
-
</xsl:attribute-set><xsl:
|
1111
|
+
</xsl:attribute-set><xsl:variable name="table-border_">
|
1112
|
+
|
1113
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
|
1095
1114
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1096
1115
|
|
1097
1116
|
|
@@ -1214,7 +1233,8 @@
|
|
1214
1233
|
|
1215
1234
|
|
1216
1235
|
|
1217
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1236
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1237
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1218
1238
|
|
1219
1239
|
|
1220
1240
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1409,11 +1429,15 @@
|
|
1409
1429
|
<fo:block> </fo:block>
|
1410
1430
|
</xsl:if> -->
|
1411
1431
|
|
1432
|
+
|
1433
|
+
<!-- Display table's name before table as standalone block -->
|
1412
1434
|
<!-- $namespace = 'iso' or -->
|
1413
1435
|
|
1414
1436
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1415
1437
|
|
1416
|
-
|
1438
|
+
|
1439
|
+
|
1440
|
+
|
1417
1441
|
|
1418
1442
|
<xsl:call-template name="fn_name_display"/>
|
1419
1443
|
|
@@ -1486,6 +1510,12 @@
|
|
1486
1510
|
|
1487
1511
|
|
1488
1512
|
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
1517
|
+
|
1518
|
+
|
1489
1519
|
<xsl:variable name="table_width">
|
1490
1520
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1491
1521
|
100%
|
@@ -1504,6 +1534,7 @@
|
|
1504
1534
|
|
1505
1535
|
|
1506
1536
|
|
1537
|
+
|
1507
1538
|
|
1508
1539
|
|
1509
1540
|
|
@@ -1527,6 +1558,8 @@
|
|
1527
1558
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1528
1559
|
</xsl:if>
|
1529
1560
|
|
1561
|
+
|
1562
|
+
|
1530
1563
|
<xsl:choose>
|
1531
1564
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1532
1565
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1814,9 +1847,9 @@
|
|
1814
1847
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1815
1848
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1816
1849
|
</xsl:apply-templates>
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1850
|
+
|
1851
|
+
|
1852
|
+
|
1820
1853
|
|
1821
1854
|
</fo:table-cell>
|
1822
1855
|
</fo:table-row>
|
@@ -1898,7 +1931,11 @@
|
|
1898
1931
|
|
1899
1932
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1900
1933
|
|
1901
|
-
<xsl:
|
1934
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
1935
|
+
|
1936
|
+
</xsl:variable>
|
1937
|
+
|
1938
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
1902
1939
|
|
1903
1940
|
<xsl:variable name="cols-count">
|
1904
1941
|
<xsl:choose>
|
@@ -1927,6 +1964,8 @@
|
|
1927
1964
|
</xsl:choose>
|
1928
1965
|
</xsl:for-each>
|
1929
1966
|
|
1967
|
+
|
1968
|
+
|
1930
1969
|
<xsl:choose>
|
1931
1970
|
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
1932
1971
|
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
@@ -1963,6 +2002,7 @@
|
|
1963
2002
|
|
1964
2003
|
|
1965
2004
|
|
2005
|
+
|
1966
2006
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
1967
2007
|
|
1968
2008
|
|
@@ -2036,6 +2076,19 @@
|
|
2036
2076
|
|
2037
2077
|
</fo:table-body>
|
2038
2078
|
|
2079
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2080
|
+
<xsl:choose>
|
2081
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2082
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2083
|
+
</xsl:when>
|
2084
|
+
<xsl:otherwise>
|
2085
|
+
<xsl:value-of select="."/>
|
2086
|
+
</xsl:otherwise>
|
2087
|
+
</xsl:choose>
|
2088
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2089
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2090
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2091
|
+
<xsl:apply-templates select="."/>
|
2039
2092
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2040
2093
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2041
2094
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2048,6 +2101,8 @@
|
|
2048
2101
|
|
2049
2102
|
|
2050
2103
|
|
2104
|
+
|
2105
|
+
|
2051
2106
|
</xsl:if>
|
2052
2107
|
<xsl:if test="$parent-name = 'tfoot'">
|
2053
2108
|
|
@@ -2062,6 +2117,8 @@
|
|
2062
2117
|
|
2063
2118
|
|
2064
2119
|
|
2120
|
+
|
2121
|
+
|
2065
2122
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2066
2123
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2067
2124
|
</xsl:if> -->
|
@@ -2204,14 +2261,12 @@
|
|
2204
2261
|
<xsl:apply-templates/>
|
2205
2262
|
</xsl:template><xsl:template name="fn_display">
|
2206
2263
|
<xsl:variable name="references">
|
2264
|
+
|
2207
2265
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2208
|
-
<
|
2209
|
-
|
2210
|
-
|
2211
|
-
<xsl:apply-templates/>
|
2212
|
-
</fn>
|
2266
|
+
<xsl:call-template name="create_fn"/>
|
2213
2267
|
</xsl:for-each>
|
2214
2268
|
</xsl:variable>
|
2269
|
+
|
2215
2270
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2216
2271
|
<xsl:variable name="reference" select="@reference"/>
|
2217
2272
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -2247,6 +2302,12 @@
|
|
2247
2302
|
</fo:block>
|
2248
2303
|
</xsl:if>
|
2249
2304
|
</xsl:for-each>
|
2305
|
+
</xsl:template><xsl:template name="create_fn">
|
2306
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2307
|
+
|
2308
|
+
|
2309
|
+
<xsl:apply-templates/>
|
2310
|
+
</fn>
|
2250
2311
|
</xsl:template><xsl:template name="fn_name_display">
|
2251
2312
|
<!-- <xsl:variable name="references">
|
2252
2313
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3228,16 +3289,68 @@
|
|
3228
3289
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3229
3290
|
</xsl:call-template>
|
3230
3291
|
|
3292
|
+
|
3293
|
+
|
3231
3294
|
<xsl:variable name="mathml">
|
3232
3295
|
<xsl:apply-templates select="." mode="mathml"/>
|
3233
3296
|
</xsl:variable>
|
3234
3297
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3235
3298
|
|
3236
3299
|
|
3300
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
3301
|
+
<xsl:variable name="comment_text_">
|
3302
|
+
<xsl:choose>
|
3303
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
3304
|
+
<xsl:value-of select="$comment_text_following"/>
|
3305
|
+
</xsl:when>
|
3306
|
+
<xsl:otherwise>
|
3307
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
3308
|
+
</xsl:otherwise>
|
3309
|
+
</xsl:choose>
|
3310
|
+
</xsl:variable>
|
3311
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
3312
|
+
|
3313
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
3314
|
+
<!-- put Mathin Alternate Text -->
|
3315
|
+
<xsl:attribute name="fox:alt-text">
|
3316
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
3317
|
+
</xsl:attribute>
|
3318
|
+
</xsl:if>
|
3319
|
+
|
3320
|
+
<xsl:variable name="mathml_content">
|
3321
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
3322
|
+
</xsl:variable>
|
3323
|
+
<!-- put MathML in Actual Text -->
|
3324
|
+
<xsl:attribute name="fox:actual-text">
|
3325
|
+
<xsl:value-of select="$mathml_content"/>
|
3326
|
+
</xsl:attribute>
|
3327
|
+
|
3328
|
+
|
3237
3329
|
<!-- <xsl:copy-of select="."/> -->
|
3238
3330
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3239
3331
|
</fo:instream-foreign-object>
|
3240
3332
|
</fo:inline>
|
3333
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
3334
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
3335
|
+
<xsl:text><</xsl:text>
|
3336
|
+
<xsl:value-of select="local-name()"/>
|
3337
|
+
<xsl:if test="local-name() = 'math'">
|
3338
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
3339
|
+
</xsl:if>
|
3340
|
+
<xsl:for-each select="@*">
|
3341
|
+
<xsl:text> </xsl:text>
|
3342
|
+
<xsl:value-of select="local-name()"/>
|
3343
|
+
<xsl:text>="</xsl:text>
|
3344
|
+
<xsl:value-of select="."/>
|
3345
|
+
<xsl:text>"</xsl:text>
|
3346
|
+
</xsl:for-each>
|
3347
|
+
<xsl:text>></xsl:text>
|
3348
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
3349
|
+
<xsl:text></</xsl:text>
|
3350
|
+
<xsl:value-of select="local-name()"/>
|
3351
|
+
<xsl:text>></xsl:text>
|
3352
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
3353
|
+
<xsl:value-of select="normalize-space()"/>
|
3241
3354
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3242
3355
|
<xsl:copy>
|
3243
3356
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3247,19 +3360,6 @@
|
|
3247
3360
|
<!-- replace start and end spaces to non-break space -->
|
3248
3361
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3249
3362
|
</xsl:copy>
|
3250
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3251
|
-
<xsl:copy>
|
3252
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3253
|
-
</xsl:copy>
|
3254
|
-
<xsl:choose>
|
3255
|
-
<!-- if in msub, then don't add space -->
|
3256
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3257
|
-
<!-- if next char in digit, don't add space -->
|
3258
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3259
|
-
<xsl:otherwise>
|
3260
|
-
<mathml:mspace width="0.5ex"/>
|
3261
|
-
</xsl:otherwise>
|
3262
|
-
</xsl:choose>
|
3263
3363
|
</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">
|
3264
3364
|
<xsl:variable name="target">
|
3265
3365
|
<xsl:choose>
|
@@ -3312,7 +3412,10 @@
|
|
3312
3412
|
</fo:block>
|
3313
3413
|
<xsl:apply-templates/>
|
3314
3414
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3315
|
-
<
|
3415
|
+
<xsl:variable name="level">
|
3416
|
+
<xsl:call-template name="getLevel"/>
|
3417
|
+
</xsl:variable>
|
3418
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3316
3419
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3317
3420
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3318
3421
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3347,9 +3450,10 @@
|
|
3347
3450
|
|
3348
3451
|
</xsl:variable>
|
3349
3452
|
|
3453
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3350
3454
|
<xsl:choose>
|
3351
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3352
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
3455
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3456
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3353
3457
|
</xsl:choose>
|
3354
3458
|
<xsl:apply-templates/>
|
3355
3459
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -3493,7 +3597,10 @@
|
|
3493
3597
|
</fo:block>
|
3494
3598
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
3495
3599
|
<xsl:if test="normalize-space() != ''">
|
3496
|
-
<
|
3600
|
+
<xsl:variable name="level">
|
3601
|
+
<xsl:call-template name="getLevelTermName"/>
|
3602
|
+
</xsl:variable>
|
3603
|
+
<fo:inline role="H{$level}">
|
3497
3604
|
<xsl:apply-templates/>
|
3498
3605
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3499
3606
|
<xsl:text>.</xsl:text>
|
@@ -3566,7 +3673,24 @@
|
|
3566
3673
|
</fo:instream-foreign-object>
|
3567
3674
|
</xsl:when>
|
3568
3675
|
<xsl:otherwise>
|
3569
|
-
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"
|
3676
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
3677
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
3678
|
+
|
3679
|
+
<xsl:variable name="img_src">
|
3680
|
+
<xsl:choose>
|
3681
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
3682
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
3683
|
+
</xsl:choose>
|
3684
|
+
</xsl:variable>
|
3685
|
+
|
3686
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
3687
|
+
<xsl:if test="number($scale) < 100">
|
3688
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
3689
|
+
</xsl:if>
|
3690
|
+
|
3691
|
+
</xsl:if>
|
3692
|
+
|
3693
|
+
</fo:external-graphic>
|
3570
3694
|
</xsl:otherwise>
|
3571
3695
|
</xsl:choose>
|
3572
3696
|
|
@@ -3737,11 +3861,13 @@
|
|
3737
3861
|
<xsl:attribute name="width">100%</xsl:attribute>
|
3738
3862
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3739
3863
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3864
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
3865
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
3740
3866
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
3741
3867
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
3742
3868
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
3743
|
-
<xsl:if test="
|
3744
|
-
<xsl:variable name="width" select="((
|
3869
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
3870
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
3745
3871
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
3746
3872
|
</xsl:if>
|
3747
3873
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -3758,6 +3884,23 @@
|
|
3758
3884
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
3759
3885
|
<xsl:value-of select="."/>
|
3760
3886
|
</xsl:attribute>
|
3887
|
+
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
3888
|
+
<xsl:copy>
|
3889
|
+
<xsl:apply-templates select="@*" mode="svg_update"/>
|
3890
|
+
<xsl:variable name="viewbox">
|
3891
|
+
<xsl:call-template name="split">
|
3892
|
+
<xsl:with-param name="pText" select="@viewBox"/>
|
3893
|
+
<xsl:with-param name="sep" select="' '"/>
|
3894
|
+
</xsl:call-template>
|
3895
|
+
</xsl:variable>
|
3896
|
+
<xsl:attribute name="width">
|
3897
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
|
3898
|
+
</xsl:attribute>
|
3899
|
+
<xsl:attribute name="height">
|
3900
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
|
3901
|
+
</xsl:attribute>
|
3902
|
+
<xsl:apply-templates mode="svg_update"/>
|
3903
|
+
</xsl:copy>
|
3761
3904
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3762
3905
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3763
3906
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4088,6 +4231,7 @@
|
|
4088
4231
|
</xsl:when>
|
4089
4232
|
<xsl:otherwise>
|
4090
4233
|
<xsl:apply-templates/>
|
4234
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4091
4235
|
</xsl:otherwise>
|
4092
4236
|
</xsl:choose>
|
4093
4237
|
</fo:block>
|
@@ -4228,14 +4372,6 @@
|
|
4228
4372
|
<fo:block>
|
4229
4373
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4230
4374
|
</fo:block>
|
4231
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4232
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4233
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4234
|
-
</fo:block>
|
4235
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4236
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4237
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4238
|
-
</fo:block>
|
4239
4375
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4240
4376
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4241
4377
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4252,6 +4388,38 @@
|
|
4252
4388
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4253
4389
|
<xsl:apply-templates/>
|
4254
4390
|
</fo:block>
|
4391
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4392
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4393
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4394
|
+
</fo:block>
|
4395
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4396
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4397
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4398
|
+
</fo:block>
|
4399
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
4400
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
4401
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4402
|
+
</fo:block>
|
4403
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
4404
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
4405
|
+
<xsl:apply-templates/>
|
4406
|
+
</fo:block>
|
4407
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
4408
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
4409
|
+
<xsl:apply-templates/>
|
4410
|
+
</fo:block>
|
4411
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
4412
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
4413
|
+
<xsl:apply-templates/>
|
4414
|
+
</fo:block>
|
4415
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
4416
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
4417
|
+
<xsl:apply-templates/>
|
4418
|
+
</fo:block>
|
4419
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
4420
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
4421
|
+
<xsl:apply-templates/>
|
4422
|
+
</fo:block>
|
4255
4423
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4256
4424
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4257
4425
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -4403,7 +4571,19 @@
|
|
4403
4571
|
</fo:inline>
|
4404
4572
|
</xsl:if>
|
4405
4573
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
4406
|
-
<
|
4574
|
+
<xsl:variable name="element">inline
|
4575
|
+
|
4576
|
+
</xsl:variable>
|
4577
|
+
<xsl:choose>
|
4578
|
+
<xsl:when test="contains($element, 'block')">
|
4579
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4580
|
+
<xsl:apply-templates/>
|
4581
|
+
</fo:block>
|
4582
|
+
</xsl:when>
|
4583
|
+
<xsl:otherwise>
|
4584
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4585
|
+
</xsl:otherwise>
|
4586
|
+
</xsl:choose>
|
4407
4587
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4408
4588
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4409
4589
|
|
@@ -4951,6 +5131,7 @@
|
|
4951
5131
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4952
5132
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4953
5133
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5134
|
+
|
4954
5135
|
<xsl:apply-templates/>
|
4955
5136
|
</fo:block>
|
4956
5137
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -4990,7 +5171,6 @@
|
|
4990
5171
|
</xsl:template><xsl:template name="processBibitem">
|
4991
5172
|
|
4992
5173
|
|
4993
|
-
<!-- end BIPM bibitem processing-->
|
4994
5174
|
|
4995
5175
|
|
4996
5176
|
|
@@ -5120,6 +5300,9 @@
|
|
5120
5300
|
<fo:block-container border="1pt solid black" width="50%">
|
5121
5301
|
<fo:block> </fo:block>
|
5122
5302
|
</fo:block-container>
|
5303
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5304
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
5305
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5123
5306
|
</xsl:template><xsl:template name="convertDate">
|
5124
5307
|
<xsl:param name="date"/>
|
5125
5308
|
<xsl:param name="format" select="'short'"/>
|
@@ -5358,6 +5541,26 @@
|
|
5358
5541
|
<xsl:value-of select="$level"/>
|
5359
5542
|
</xsl:otherwise>
|
5360
5543
|
</xsl:choose>
|
5544
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
5545
|
+
<xsl:choose>
|
5546
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
5547
|
+
<xsl:value-of select="../@depth"/>
|
5548
|
+
</xsl:when>
|
5549
|
+
<xsl:otherwise>
|
5550
|
+
<xsl:variable name="title_level_">
|
5551
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
5552
|
+
<xsl:call-template name="getLevel"/>
|
5553
|
+
</xsl:for-each>
|
5554
|
+
</xsl:variable>
|
5555
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
5556
|
+
<xsl:choose>
|
5557
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
5558
|
+
<xsl:otherwise>
|
5559
|
+
<xsl:call-template name="getLevel"/>
|
5560
|
+
</xsl:otherwise>
|
5561
|
+
</xsl:choose>
|
5562
|
+
</xsl:otherwise>
|
5563
|
+
</xsl:choose>
|
5361
5564
|
</xsl:template><xsl:template name="split">
|
5362
5565
|
<xsl:param name="pText" select="."/>
|
5363
5566
|
<xsl:param name="sep" select="','"/>
|
@@ -5455,20 +5658,40 @@
|
|
5455
5658
|
</xsl:call-template>
|
5456
5659
|
</xsl:if>
|
5457
5660
|
</xsl:template><xsl:template name="getLocalizedString">
|
5458
|
-
<xsl:param name="key"/>
|
5661
|
+
<xsl:param name="key"/>
|
5662
|
+
<xsl:param name="formatted">false</xsl:param>
|
5459
5663
|
|
5460
5664
|
<xsl:variable name="curr_lang">
|
5461
5665
|
<xsl:call-template name="getLang"/>
|
5462
5666
|
</xsl:variable>
|
5463
5667
|
|
5464
|
-
<xsl:variable name="data_value"
|
5668
|
+
<xsl:variable name="data_value">
|
5669
|
+
<xsl:choose>
|
5670
|
+
<xsl:when test="$formatted = 'true'">
|
5671
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5672
|
+
</xsl:when>
|
5673
|
+
<xsl:otherwise>
|
5674
|
+
<xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5675
|
+
</xsl:otherwise>
|
5676
|
+
</xsl:choose>
|
5677
|
+
</xsl:variable>
|
5465
5678
|
|
5466
5679
|
<xsl:choose>
|
5467
|
-
<xsl:when test="$data_value != ''">
|
5468
|
-
<xsl:
|
5680
|
+
<xsl:when test="normalize-space($data_value) != ''">
|
5681
|
+
<xsl:choose>
|
5682
|
+
<xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
|
5683
|
+
<xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
|
5684
|
+
</xsl:choose>
|
5469
5685
|
</xsl:when>
|
5470
5686
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5471
|
-
<xsl:
|
5687
|
+
<xsl:choose>
|
5688
|
+
<xsl:when test="$formatted = 'true'">
|
5689
|
+
<xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5690
|
+
</xsl:when>
|
5691
|
+
<xsl:otherwise>
|
5692
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5693
|
+
</xsl:otherwise>
|
5694
|
+
</xsl:choose>
|
5472
5695
|
</xsl:when>
|
5473
5696
|
<xsl:otherwise>
|
5474
5697
|
<xsl:variable name="key_">
|
@@ -5479,7 +5702,7 @@
|
|
5479
5702
|
<xsl:value-of select="$key_"/>
|
5480
5703
|
</xsl:otherwise>
|
5481
5704
|
</xsl:choose>
|
5482
|
-
|
5705
|
+
|
5483
5706
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5484
5707
|
<xsl:param name="isAdded"/>
|
5485
5708
|
<xsl:param name="isDeleted"/>
|
data/lib/metanorma/cc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|