metanorma-m3aawg 1.4.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,8 @@
1
1
  <div class="coverpage">
2
2
  <p class="coverpage-title">Messaging, Malware and Mobile Anti-Abuse Working Group</p>
3
3
  <p class="coverpage-doc-identity">{{doctitle}}</p>
4
- <p class="coverpage-date">{{revdate_monthyear}}</p>
4
+ {% if edition %}<p class="coverpage-date">{{edition}}</p>{% endif %}
5
+ {% if revdate_monthyear %}<p class="coverpage-date">{{revdate_monthyear}}</p>{% endif %}
5
6
  </div>
6
7
 
7
8
  <nav>
@@ -3,7 +3,7 @@
3
3
  </div>
4
4
 
5
5
  <div class="document-type-band" id="standard-band">
6
- <p class="document-type">Ribose {{ doctype }}</p>
6
+ <p class="document-type">M3AAWG {{ doctype }}</p>
7
7
  </div>
8
8
 
9
9
 
@@ -31,11 +31,10 @@
31
31
  </div>
32
32
 
33
33
  <div class="docinfo">
34
+ {% if edition %}Version {{edition}}<br/>{% endif %}
34
35
  {% if revdate_monthyear -%}Updated <span class="date">{{ revdate_monthyear }}</span>{%- endif -%}{%- if revdate_monthyear and draft -%},{%- endif -%}{%- if draft -%}Version <span class="version">{{ draft }}</span>{%- endif -%}
35
36
  <br/>
36
- {% if url %}
37
- Shortened URL to this document: <a href="{{ url }}">{{ url }}</a>
38
- {% endif %}
37
+ {% if url %}Shortened URL to this document: <a href="{{ url }}">{{ url }}</a>{% endif %}
39
38
  </div>
40
39
 
41
40
  {% if tc %}
@@ -238,6 +238,9 @@ body {
238
238
  main {
239
239
  margin: 0 3em 0 6em; }
240
240
 
241
+ div.colophon {
242
+ margin: 0 3em 0 6em; }
243
+
241
244
  #toc {
242
245
  font-family: {{bodyfont}};
243
246
  font-weight: 400; }
@@ -28,6 +28,9 @@ body {
28
28
  main {
29
29
  margin: 0 3em 0 6em;
30
30
  }
31
+ div.colophon {
32
+ margin: 0 3em 0 6em;
33
+ }
31
34
 
32
35
  #toc {
33
36
  @include toc(#69C5DC, #69C5DC, #69C5DC);
@@ -562,7 +562,7 @@ table.dl {
562
562
  margin-bottom: 11.0pt;
563
563
  margin-left: 20.15pt; }
564
564
 
565
- table.MsoISOTable {
565
+ table.MsoISOTable, table.MsoISOTableBig {
566
566
  mso-style-name: "Table ISO";
567
567
  mso-tstyle-rowband-size: 0;
568
568
  mso-tstyle-colband-size: 0;
@@ -583,17 +583,17 @@ table.MsoISOTable {
583
583
  font-size: 10.0pt;
584
584
  font-family: {{bodyfont}}; }
585
585
 
586
- table.MsoISOTable th {
586
+ table.MsoISOTable th, table.MsoISOTableBig th {
587
587
  border: solid windowtext 1pt;
588
588
  mso-border-alt: solid windowtext 1pt;
589
589
  padding: 0cm 2.85pt 0cm 2.85pt; }
590
590
 
591
- table.MsoISOTable td {
591
+ table.MsoISOTable td, table.MsoISOTableBig td {
592
592
  border: solid windowtext 1pt;
593
593
  mso-border-alt: solid windowtext 1pt;
594
594
  padding: 0cm 2.85pt 0cm 2.85pt; }
595
595
 
596
- table.MsoISOTable p {
596
+ table.MsoISOTable p, table.MsoISOTableBig p {
597
597
  font-size: 10.0pt; }
598
598
 
599
599
  table.MsoTableGrid {
@@ -751,8 +751,20 @@ div.example p.MsoListParagraph {
751
751
  font-size: 10.0pt; }
752
752
 
753
753
  div.Note p.MsoListParagraph {
754
+ font-size: 10.0pt;
755
+ margin-left: 1.0cm; }
756
+
757
+ div.Note span.stem {
754
758
  font-size: 10.0pt; }
755
759
 
760
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
761
+ font-size: 8.0pt;
762
+ margin-left: 1.0cm; }
763
+
764
+ div.Note table.dl {
765
+ font-size: 10.0pt;
766
+ margin-left: 1.0cm; }
767
+
756
768
  span.note_label, span.example_label, td.example_label, td.note_label {
757
769
  font-size: 10.0pt;
758
770
  font-family: {{bodyfont}}; }
@@ -534,7 +534,7 @@ table.dl
534
534
  margin-right:0cm;
535
535
  margin-bottom:11.0pt;
536
536
  margin-left:20.15pt;}
537
- table.MsoISOTable
537
+ table.MsoISOTable, table.MsoISOTableBig
538
538
  {mso-style-name:"Table ISO";
539
539
  mso-tstyle-rowband-size:0;
540
540
  mso-tstyle-colband-size:0;
@@ -554,15 +554,15 @@ table.MsoISOTable
554
554
  mso-border-insidev:.75pt solid windowtext;
555
555
  font-size:10.0pt;
556
556
  font-family:$bodyfont;}
557
- table.MsoISOTable th
557
+ table.MsoISOTable th, table.MsoISOTableBig th
558
558
  {border:solid windowtext 1pt;
559
559
  mso-border-alt:solid windowtext 1pt;
560
560
  padding:0cm 2.85pt 0cm 2.85pt;}
561
- table.MsoISOTable td
561
+ table.MsoISOTable td, table.MsoISOTableBig td
562
562
  {border:solid windowtext 1pt;
563
563
  mso-border-alt:solid windowtext 1pt;
564
564
  padding:0cm 2.85pt 0cm 2.85pt;}
565
- table.MsoISOTable p
565
+ table.MsoISOTable p, table.MsoISOTableBig p
566
566
  {font-size:10.0pt; }
567
567
  table.MsoTableGrid
568
568
  {mso-style-name:"Table Grid";
@@ -733,6 +733,20 @@ div.example p.MsoListParagraph {
733
733
 
734
734
  div.Note p.MsoListParagraph {
735
735
  font-size: 10.0pt;
736
+ margin-left: 1.0cm;
737
+ }
738
+
739
+ div.Note span.stem {
740
+ font-size: 10.0pt; }
741
+
742
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
743
+ font-size: 8.0pt;
744
+ margin-left: 1.0cm;
745
+ }
746
+
747
+ div.Note table.dl {
748
+ font-size: 10.0pt;
749
+ margin-left: 1.0cm;
736
750
  }
737
751
 
738
752
  span.note_label, span.example_label, td.example_label, td.note_label
@@ -1,7 +1,9 @@
1
1
  <div class="coverpage">
2
2
  <p class="zzSTDPreTitle">Messaging, Malware and Mobile Anti-Abuse Working Group</p>
3
3
  <p class="zzSTDTitle1">{{doctitle}}</p>
4
- <p><b>{{revdate_monthyear}}</b></p>
4
+ {% if edition %}<p><b>Version {{edition}}</b></p>{% endif %}
5
+ {% if revdate_monthyear %}<p><b>{{revdate_monthyear}}</b></p>{% endif %}
6
+ {% if url %}<p align='center' style="margin-top:12pt;">The direct URL to this paper is: <a href="{{url}}">{{url}}</a></p>{% endif %}
5
7
  </div>
6
8
 
7
9
 
@@ -26,6 +26,12 @@ lang="EN-GB" style='font-size:40.0pt'>{% if unpublished %}{{ stage }}{% endif %}
26
26
 
27
27
  </div>
28
28
 
29
+ {% if url %}
30
+ <p class="MsoNormal" align="center" style='text-align:center'><span
31
+ lang="EN-GB" style='font-size:12.0pt'>The direct URL to this paper is: <a href='{{url}}'>{{url}}</a></span></p>
32
+ {% endif %}
33
+
34
+
29
35
  <p class="MsoNormal" style='margin-bottom:6.0pt'><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
30
36
 
31
37
  {% if unpublished %}
@@ -1,5 +1,6 @@
1
1
  require "isodoc"
2
2
  require_relative "base_convert"
3
+ require_relative "init"
3
4
 
4
5
  module IsoDoc
5
6
  module M3AAWG
@@ -13,8 +14,10 @@ module IsoDoc
13
14
 
14
15
  def default_fonts(options)
15
16
  {
16
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Overpass",sans-serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Overpass",sans-serif'),
17
+ bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
18
+ '"Overpass",sans-serif'),
19
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
20
+ '"Overpass",sans-serif'),
18
21
  monospacefont: '"Space Mono",monospace'
19
22
  }
20
23
  end
@@ -32,9 +35,12 @@ module IsoDoc
32
35
  def colophon(body, docxml)
33
36
  body.div **{ class: "colophon" } do |div|
34
37
  div << <<~"COLOPHON"
35
- <p>As with all M3AAWG documents that we publish, please check the M3AAWG website
36
- (<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to this paper.</p>
37
- <p>&copy; {{ docyear }} copyright by the Messaging, Malware and Mobile Anti-Abuse Working Group (M3AAWG)</p>
38
+ <p>As with all M<sup>3</sup>AAWG documents that we publish,
39
+ please check the M<sup>3</sup>AAWG website
40
+ (<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to
41
+ this paper.</p>
42
+ <p>&copy; #{@meta.get[:docyear]} copyright by the Messaging, Malware
43
+ and Mobile Anti-Abuse Working Group (M<sup>3</sup>AAWG)</p>
38
44
  COLOPHON
39
45
  end
40
46
  end
@@ -47,7 +53,8 @@ module IsoDoc
47
53
  end
48
54
 
49
55
  def make_body(xml, docxml)
50
- body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
56
+ body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
57
+ "xml:lang": "EN-US", class: "container" }
51
58
  xml.body **body_attr do |body|
52
59
  make_body1(body, docxml)
53
60
  make_body2(body, docxml)
@@ -57,6 +64,7 @@ module IsoDoc
57
64
  end
58
65
 
59
66
  include BaseRender
67
+ include Init
60
68
  end
61
69
  end
62
70
  end
@@ -0,0 +1 @@
1
+ annex: Appendix
@@ -0,0 +1,10 @@
1
+ module IsoDoc
2
+ module M3AAWG
3
+ class I18n < IsoDoc::I18n
4
+ def load_yaml1(lang, script)
5
+ y = YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
6
+ super.merge(y)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,27 @@
1
+ require "isodoc"
2
+ require_relative "metadata"
3
+ require_relative "xref"
4
+ require_relative "i18n"
5
+
6
+ module IsoDoc
7
+ module M3AAWG
8
+ module Init
9
+ def metadata_init(lang, script, labels)
10
+ @meta = Metadata.new(lang, script, labels)
11
+ end
12
+
13
+ def xref_init(lang, script, klass, labels, options)
14
+ @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), labels, options)
15
+ end
16
+
17
+ def i18n_init(lang, script, i18nyaml = nil)
18
+ @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
19
+ end
20
+
21
+ def fileloc(loc)
22
+ File.join(File.dirname(__FILE__), loc)
23
+ end
24
+ end
25
+ end
26
+ end
27
+
@@ -22,23 +22,8 @@
22
22
  -->
23
23
  <xsl:variable name="contents">
24
24
  <contents>
25
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()" mode="contents"/>
26
-
27
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
28
- <xsl:with-param name="sectionNum" select="'1'"/>
29
- </xsl:apply-templates>
30
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
31
- <xsl:with-param name="sectionNum" select="'2'"/>
32
- </xsl:apply-templates>
33
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() &gt; 1]" mode="contents"> <!-- @id != '_scope' -->
34
- <xsl:with-param name="sectionNumSkew" select="'1'"/>
35
- </xsl:apply-templates>
36
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:annex" mode="contents"/>
37
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() &gt; 1]" mode="contents"/> <!-- @id = '_bibliography' -->
38
-
39
- <xsl:apply-templates select="//m3d:figure" mode="contents"/>
40
-
41
- <xsl:apply-templates select="//m3d:table" mode="contents"/>
25
+ <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
26
+ <xsl:call-template name="processMainSectionsDefault_Contents"/>
42
27
  </contents>
43
28
  </xsl:variable>
44
29
 
@@ -47,7 +32,7 @@
47
32
  </xsl:variable>
48
33
 
49
34
  <xsl:template match="/">
50
- <xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
35
+ <xsl:call-template name="namespaceCheck"/>
51
36
  <fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
52
37
  <fo:layout-master-set>
53
38
 
@@ -90,6 +75,10 @@
90
75
 
91
76
  <xsl:call-template name="addPDFUAmeta"/>
92
77
 
78
+ <xsl:call-template name="addBookmarks">
79
+ <xsl:with-param name="contents" select="$contents"/>
80
+ </xsl:call-template>
81
+
93
82
  <fo:page-sequence master-reference="document" force-page-count="no-force">
94
83
 
95
84
  <fo:static-content flow-name="cover-header">
@@ -233,17 +222,17 @@
233
222
  <fo:table-column column-width="25mm"/>
234
223
  <fo:table-column column-width="155mm"/>
235
224
  <fo:table-body>
236
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'][not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
225
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
237
226
  <fo:table-row height="6mm">
238
227
  <fo:table-cell>
239
228
  <fo:block font-weight="bold">
240
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
229
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
241
230
  <xsl:choose>
242
- <xsl:when test="@section = '0'">
243
- <xsl:value-of select="text()"/>
231
+ <xsl:when test="@section = ''">
232
+ <xsl:apply-templates select="title"/>
244
233
  </xsl:when>
245
234
  <xsl:when test="@type = 'references' and @section = ''">
246
- <xsl:value-of select="text()"/>
235
+ <xsl:apply-templates select="title"/>
247
236
  </xsl:when>
248
237
  <xsl:when test="@level = 1">
249
238
  <xsl:value-of select="@section"/>
@@ -258,14 +247,15 @@
258
247
  <xsl:if test="@level = 1">
259
248
  <xsl:attribute name="font-weight">bold</xsl:attribute>
260
249
  </xsl:if>
261
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
250
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
262
251
  <xsl:choose>
263
- <xsl:when test="@section = '0'"/>
252
+ <xsl:when test="@section = ''"/>
264
253
  <xsl:when test="@type = 'references' and @section = ''"/>
265
254
  <xsl:otherwise>
266
- <xsl:value-of select="text()"/>
255
+ <xsl:apply-templates select="title"/>
267
256
  </xsl:otherwise>
268
257
  </xsl:choose>
258
+
269
259
  <fo:inline keep-together.within-line="always">
270
260
  <fo:leader font-weight="normal" leader-pattern="dots"/>
271
261
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -286,35 +276,14 @@
286
276
  </fo:block>
287
277
 
288
278
  <!-- Foreword, Introduction -->
289
- <fo:block>
290
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()"/>
279
+ <fo:block>
280
+ <xsl:call-template name="processPrefaceSectionsDefault"/>
291
281
  </fo:block>
292
282
 
293
283
  <fo:block break-after="page"/>
294
284
 
295
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]"> <!-- Scope -->
296
- <xsl:with-param name="sectionNum" select="'1'"/>
297
- </xsl:apply-templates>
298
-
299
- <!-- Normative references -->
300
- <xsl:if test="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
301
- <fo:block break-after="page"/>
302
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
303
- <xsl:with-param name="sectionNum" select="'2'"/>
304
- </xsl:apply-templates>
305
- </xsl:if>
306
-
307
- <!-- Main sections -->
308
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() &gt; 1]">
309
- <xsl:with-param name="sectionNumSkew" select="'1'"/>
310
- </xsl:apply-templates>
285
+ <xsl:call-template name="processMainSectionsDefault"/>
311
286
 
312
- <!-- Annex(s) -->
313
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:annex"/>
314
-
315
- <!-- Bibliography -->
316
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() &gt; 1]"/>
317
-
318
287
  </fo:flow>
319
288
  </fo:page-sequence>
320
289
 
@@ -328,178 +297,67 @@
328
297
  </fo:block>
329
298
  </xsl:template>
330
299
 
331
- <!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
332
- <xsl:template match="node()">
333
- <xsl:param name="sectionNum"/>
334
- <xsl:param name="sectionNumSkew"/>
335
- <xsl:apply-templates>
336
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
337
- <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
338
- </xsl:apply-templates>
300
+ <xsl:template match="node()">
301
+ <xsl:apply-templates/>
339
302
  </xsl:template>
340
303
 
341
304
  <!-- ============================= -->
342
305
  <!-- CONTENTS -->
343
306
  <!-- ============================= -->
344
- <xsl:template match="node()" mode="contents">
345
- <xsl:param name="sectionNum"/>
346
- <xsl:param name="sectionNumSkew"/>
347
- <xsl:apply-templates mode="contents">
348
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
349
- <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
350
- </xsl:apply-templates>
307
+ <xsl:template match="node()" mode="contents">
308
+ <xsl:apply-templates mode="contents"/>
351
309
  </xsl:template>
352
310
 
353
-
354
- <!-- calculate main section number (1,2,3) and pass it deep into templates -->
355
- <!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
356
- <xsl:template match="m3d:m3d-standard/m3d:sections/*" mode="contents">
357
- <xsl:param name="sectionNum"/>
358
- <xsl:param name="sectionNumSkew" select="0"/>
359
- <xsl:variable name="sectionNum_">
360
- <xsl:choose>
361
- <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
362
- <xsl:when test="$sectionNumSkew != 0">
363
- <xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- m3d:sections/m3d:clause | m3d:sections/m3d:terms -->
364
- <xsl:value-of select="$number + $sectionNumSkew"/>
365
- </xsl:when>
366
- <xsl:otherwise>
367
- <xsl:number count="*"/>
368
- </xsl:otherwise>
369
- </xsl:choose>
370
- </xsl:variable>
371
- <xsl:apply-templates mode="contents">
372
- <xsl:with-param name="sectionNum" select="$sectionNum_"/>
373
- </xsl:apply-templates>
374
- </xsl:template>
375
-
376
- <!-- Any node with title element - clause, definition, annex,... -->
377
- <xsl:template match="m3d:title | m3d:preferred" mode="contents">
378
- <xsl:param name="sectionNum"/>
379
- <!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
380
- <xsl:variable name="id">
381
- <xsl:call-template name="getId"/>
382
- </xsl:variable>
383
-
311
+
312
+ <!-- element with title -->
313
+ <xsl:template match="*[m3d:title]" mode="contents">
384
314
  <xsl:variable name="level">
385
- <xsl:call-template name="getLevel"/>
386
- </xsl:variable>
387
-
388
- <xsl:variable name="section">
389
- <xsl:call-template name="getSection">
390
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
315
+ <xsl:call-template name="getLevel">
316
+ <xsl:with-param name="depth" select="m3d:title/@depth"/>
391
317
  </xsl:call-template>
392
318
  </xsl:variable>
393
319
 
394
320
  <xsl:variable name="display">
395
- <xsl:choose>
396
- <xsl:when test="ancestor::m3d:bibitem">false</xsl:when>
397
- <xsl:when test="ancestor::m3d:term">false</xsl:when>
321
+ <xsl:choose>
322
+ <xsl:when test="ancestor-or-self::m3d:preface and $level &gt;= 2">false</xsl:when>
398
323
  <xsl:when test="ancestor::m3d:annex and $level &gt;= 3">false</xsl:when>
399
324
  <xsl:when test="$level &lt;= 3">true</xsl:when>
400
325
  <xsl:otherwise>false</xsl:otherwise>
401
326
  </xsl:choose>
402
327
  </xsl:variable>
403
328
 
404
- <xsl:variable name="display-section">true</xsl:variable>
405
-
406
- <xsl:variable name="type">
407
- <xsl:value-of select="local-name(..)"/>
408
- </xsl:variable>
409
-
410
- <xsl:variable name="root">
329
+ <xsl:variable name="skip">
411
330
  <xsl:choose>
412
- <xsl:when test="ancestor::m3d:annex">annex</xsl:when>
331
+ <xsl:when test="ancestor-or-self::m3d:bibitem">true</xsl:when>
332
+ <xsl:when test="ancestor-or-self::m3d:term">true</xsl:when>
333
+ <xsl:otherwise>false</xsl:otherwise>
413
334
  </xsl:choose>
414
335
  </xsl:variable>
415
336
 
416
- <item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
417
- <xsl:attribute name="addon">
418
- <xsl:if test="local-name(..) = 'annex'">
419
-
420
- <xsl:variable name="obligation" select="../@obligation"/>
421
- <xsl:value-of select="$obligation"/>
422
-
423
- </xsl:if>
424
- </xsl:attribute>
425
- <xsl:value-of select="."/>
426
- </item>
427
-
428
- <xsl:apply-templates mode="contents">
429
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
430
- </xsl:apply-templates>
337
+ <xsl:if test="$skip = 'false'">
431
338
 
339
+ <xsl:variable name="section">
340
+ <xsl:call-template name="getSection"/>
341
+ </xsl:variable>
342
+
343
+ <xsl:variable name="title">
344
+ <xsl:call-template name="getName"/>
345
+ </xsl:variable>
346
+
347
+ <xsl:variable name="type">
348
+ <xsl:value-of select="local-name()"/>
349
+ </xsl:variable>
350
+
351
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
352
+ <title>
353
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
354
+ </title>
355
+ <xsl:apply-templates mode="contents"/>
356
+ </item>
357
+ </xsl:if>
432
358
  </xsl:template>
433
359
 
434
-
435
- <xsl:template match="m3d:figure" mode="contents">
436
- <item level="" id="{@id}" display="false">
437
- <xsl:attribute name="section">
438
- <xsl:call-template name="getFigureNumber"/>
439
- </xsl:attribute>
440
- </item>
441
- </xsl:template>
442
-
443
- <xsl:template match="m3d:table" mode="contents">
444
- <xsl:param name="sectionNum"/>
445
- <xsl:variable name="annex-id" select="ancestor::m3d:annex/@id"/>
446
- <item level="" id="{@id}" display="false" type="table">
447
- <xsl:attribute name="section">
448
- <xsl:variable name="title-table">
449
- <xsl:call-template name="getTitle">
450
- <xsl:with-param name="name" select="'title-table'"/>
451
- </xsl:call-template>
452
- </xsl:variable>
453
- <xsl:value-of select="$title-table"/>
454
- <xsl:choose>
455
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
456
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
457
- </xsl:when>
458
- <xsl:when test="ancestor::*[local-name()='annex']">
459
- <xsl:number format="A-" count="m3d:annex"/>
460
- <xsl:number format="1" level="any" count="m3d:table[ancestor::m3d:annex[@id = $annex-id]]"/>
461
- </xsl:when>
462
- <xsl:otherwise>
463
- <!-- <xsl:number format="1"/> -->
464
- <xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/>
465
- </xsl:otherwise>
466
- </xsl:choose>
467
- </xsl:attribute>
468
- <xsl:value-of select="m3d:name/text()"/>
469
- </item>
470
- </xsl:template>
471
-
472
- <xsl:template match="m3d:formula" mode="contents">
473
- <item level="" id="{@id}" display="false">
474
- <xsl:attribute name="section">
475
- <xsl:variable name="title-formula">
476
- <xsl:call-template name="getTitle">
477
- <xsl:with-param name="name" select="'title-formula'"/>
478
- </xsl:call-template>
479
- </xsl:variable>
480
- <xsl:value-of select="$title-formula"/><xsl:number format="(A.1)" level="multiple" count="m3d:annex | m3d:formula"/>
481
- </xsl:attribute>
482
- </item>
483
- </xsl:template>
484
-
485
- <xsl:template match="m3d:li" mode="contents">
486
- <xsl:param name="sectionNum"/>
487
- <item level="" id="{@id}" display="false" type="li">
488
- <xsl:attribute name="section">
489
- <xsl:call-template name="getListItemFormat"/>
490
- </xsl:attribute>
491
- <xsl:attribute name="parent_section">
492
- <xsl:for-each select="ancestor::*[not(local-name() = 'p' or local-name() = 'ol')][1]">
493
- <xsl:call-template name="getSection">
494
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
495
- </xsl:call-template>
496
- </xsl:for-each>
497
- </xsl:attribute>
498
- </item>
499
- <xsl:apply-templates mode="contents">
500
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
501
- </xsl:apply-templates>
502
- </xsl:template>
360
+
503
361
 
504
362
  <xsl:template name="getListItemFormat">
505
363
  <xsl:choose>
@@ -523,47 +381,9 @@
523
381
  <!-- ============================= -->
524
382
  <!-- ============================= -->
525
383
 
384
+
526
385
 
527
- <!-- Foreword, Introduction -->
528
- <xsl:template match="m3d:m3d-standard/m3d:preface/*">
529
- <fo:block break-after="page"/>
530
- <xsl:apply-templates/>
531
- </xsl:template>
532
-
533
-
534
- <!-- clause, terms, clause, ...-->
535
- <xsl:template match="m3d:m3d-standard/m3d:sections/*">
536
- <xsl:param name="sectionNum"/>
537
- <xsl:param name="sectionNumSkew" select="0"/>
538
- <fo:block break-after="page"/>
539
- <fo:block>
540
- <xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
541
- <xsl:if test="$pos &gt;= 2">
542
- <xsl:attribute name="space-before">18pt</xsl:attribute>
543
- </xsl:if>
544
- <!-- pos=<xsl:value-of select="$pos" /> -->
545
- <xsl:variable name="sectionNum_">
546
- <xsl:choose>
547
- <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
548
- <xsl:when test="$sectionNumSkew != 0">
549
- <xsl:variable name="number"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
550
- <xsl:value-of select="$number + $sectionNumSkew"/>
551
- </xsl:when>
552
- </xsl:choose>
553
- </xsl:variable>
554
- <xsl:if test="not(m3d:title)">
555
- <fo:block margin-top="3pt" margin-bottom="12pt">
556
- <xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="m3d:clause"/>
557
- </fo:block>
558
- </xsl:if>
559
- <xsl:apply-templates>
560
- <xsl:with-param name="sectionNum" select="$sectionNum_"/>
561
- </xsl:apply-templates>
562
- </fo:block>
563
- </xsl:template>
564
-
565
-
566
- <xsl:template match="m3d:clause//m3d:clause[not(m3d:title)]">
386
+ <!-- <xsl:template match="m3d:clause//m3d:clause[not(m3d:title)]">
567
387
  <xsl:param name="sectionNum"/>
568
388
  <xsl:variable name="section">
569
389
  <xsl:call-template name="getSection">
@@ -572,37 +392,47 @@
572
392
  </xsl:variable>
573
393
  <fo:block margin-top="6pt" margin-bottom="6pt" keep-with-next="always">
574
394
  <fo:inline>
575
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
395
+ <xsl:value-of select="$section"/>
576
396
  </fo:inline>
577
397
  </fo:block>
578
398
  <xsl:apply-templates>
579
399
  <xsl:with-param name="sectionNum" select="$sectionNum"/>
580
400
  </xsl:apply-templates>
581
- </xsl:template>
401
+ </xsl:template> -->
582
402
 
403
+ <!-- ====== -->
404
+ <!-- title -->
405
+ <!-- ====== -->
583
406
 
584
- <xsl:template match="m3d:title">
585
- <xsl:param name="sectionNum"/>
586
-
587
- <xsl:variable name="parent-name" select="local-name(..)"/>
588
- <xsl:variable name="references_num_current">
589
- <xsl:number level="any" count="m3d:references"/>
407
+ <xsl:template match="m3d:boilerplate//m3d:title">
408
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
409
+ <xsl:apply-templates/>
410
+ </fo:block>
411
+ </xsl:template>
412
+
413
+
414
+ <xsl:template match="m3d:annex/m3d:title">
415
+ <xsl:variable name="level">
416
+ <xsl:call-template name="getLevel"/>
590
417
  </xsl:variable>
591
-
592
- <xsl:variable name="id">
593
- <xsl:call-template name="getId"/>
418
+ <xsl:variable name="font-size">
419
+ <xsl:choose>
420
+ <xsl:when test="$level = 1">14pt</xsl:when>
421
+ <xsl:otherwise>12pt</xsl:otherwise>
422
+ </xsl:choose>
594
423
  </xsl:variable>
424
+ <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
425
+ <xsl:apply-templates/>
426
+ </fo:block>
427
+ </xsl:template>
428
+
429
+
430
+ <xsl:template match="m3d:title">
595
431
 
596
432
  <xsl:variable name="level">
597
433
  <xsl:call-template name="getLevel"/>
598
434
  </xsl:variable>
599
-
600
- <xsl:variable name="section">
601
- <xsl:call-template name="getSection">
602
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
603
- </xsl:call-template>
604
- </xsl:variable>
605
-
435
+
606
436
  <xsl:variable name="font-size">
607
437
  <xsl:choose>
608
438
  <xsl:when test="ancestor::m3d:preface">14pt</xsl:when>
@@ -619,98 +449,40 @@
619
449
  </xsl:choose>
620
450
  </xsl:variable>
621
451
 
622
- <xsl:choose>
623
- <xsl:when test="ancestor::m3d:boilerplate">
624
- <fo:block id="{$id}" font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
625
- <xsl:apply-templates/>
626
- </fo:block>
627
- </xsl:when>
628
- <xsl:when test="$parent-name = 'annex'">
629
- <fo:block id="{$id}" font-size="{$font-size}" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
630
- <xsl:value-of select="$section"/>
631
- <xsl:if test=" ../@obligation">
632
- <xsl:value-of select="$linebreak"/>
633
- <fo:inline font-weight="normal">
634
- <xsl:text>(</xsl:text>
635
- <xsl:value-of select="../@obligation"/>
636
- <xsl:text>)</xsl:text>
637
- </fo:inline>
638
- </xsl:if>
639
- <fo:block margin-top="14pt" margin-bottom="24pt"><xsl:apply-templates/></fo:block>
640
- </fo:block>
641
- </xsl:when>
642
- <!-- Bibliography -->
643
- <!-- <xsl:when test="$parent-name = 'references' and $references_num_current != 1">
644
- <fo:block id="{$id}" text-align="center" margin-top="6pt" margin-bottom="16pt" keep-with-next="always">
645
- <xsl:apply-templates />
646
- </fo:block>
647
- </xsl:when> -->
452
+ <xsl:element name="{$element-name}">
453
+ <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
454
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
455
+ <xsl:attribute name="margin-top">
456
+ <xsl:choose>
457
+ <xsl:when test="ancestor::m3d:preface">8pt</xsl:when>
458
+ <xsl:when test="$level = 2 and ancestor::m3d:annex">10pt</xsl:when>
459
+ <xsl:when test="$level = 1">0pt</xsl:when>
460
+ <xsl:when test="$level = ''">6pt</xsl:when>
461
+ <xsl:otherwise>12pt</xsl:otherwise>
462
+ </xsl:choose>
463
+ </xsl:attribute>
464
+ <xsl:attribute name="margin-bottom">
465
+ <xsl:choose>
466
+ <xsl:when test="ancestor::m3d:preface">6pt</xsl:when>
467
+ <xsl:when test="$level = 1">12pt</xsl:when>
468
+ <xsl:otherwise>8pt</xsl:otherwise>
469
+ </xsl:choose>
470
+ </xsl:attribute>
471
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
472
+
473
+ <xsl:apply-templates/>
474
+
475
+ </xsl:element>
476
+
477
+ <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::m3d:p)">
478
+ <!-- <fo:block> -->
479
+ <xsl:value-of select="$linebreak"/>
480
+ <!-- </fo:block> -->
481
+ </xsl:if>
648
482
 
649
- <xsl:otherwise>
650
- <xsl:element name="{$element-name}">
651
- <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
652
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
653
- <xsl:attribute name="font-weight">bold</xsl:attribute>
654
- <xsl:attribute name="margin-top">
655
- <xsl:choose>
656
- <xsl:when test="ancestor::m3d:preface">8pt</xsl:when>
657
- <xsl:when test="$level = 2 and ancestor::m3d:annex">10pt</xsl:when>
658
- <xsl:when test="$level = 1">0pt</xsl:when>
659
- <xsl:when test="$level = ''">6pt</xsl:when>
660
- <xsl:otherwise>12pt</xsl:otherwise>
661
- </xsl:choose>
662
- </xsl:attribute>
663
- <xsl:attribute name="margin-bottom">
664
- <xsl:choose>
665
- <xsl:when test="ancestor::m3d:preface">6pt</xsl:when>
666
- <xsl:when test="$level = 1">12pt</xsl:when>
667
- <xsl:otherwise>8pt</xsl:otherwise>
668
- </xsl:choose>
669
- </xsl:attribute>
670
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
671
-
672
- <xsl:choose>
673
- <xsl:when test="(ancestor::m3d:sections and $level = 1) or ($parent-name = 'references' and $references_num_current = 1)">
674
- <fo:table table-layout="fixed" width="100%">
675
- <fo:table-column column-width="25mm"/>
676
- <fo:table-column column-width="150mm"/>
677
- <fo:table-body>
678
- <fo:table-row>
679
- <fo:table-cell>
680
- <fo:block>
681
- <xsl:value-of select="$section"/>
682
- </fo:block>
683
- </fo:table-cell>
684
- <fo:table-cell>
685
- <fo:block>
686
- <xsl:apply-templates/>
687
- </fo:block>
688
- </fo:table-cell>
689
- </fo:table-row>
690
- </fo:table-body>
691
- </fo:table>
692
- </xsl:when>
693
- <xsl:when test="ancestor::m3d:sections or ancestor::m3d:annex">
694
- <fo:inline padding-right="3mm"><xsl:value-of select="$section"/></fo:inline>
695
- <xsl:apply-templates/>
696
- </xsl:when>
697
- <xsl:otherwise>
698
- <xsl:apply-templates/>
699
- </xsl:otherwise>
700
- </xsl:choose>
701
-
702
-
703
- </xsl:element>
704
-
705
- <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::m3d:p)">
706
- <!-- <fo:block> -->
707
- <xsl:value-of select="$linebreak"/>
708
- <!-- </fo:block> -->
709
- </xsl:if>
710
- </xsl:otherwise>
711
- </xsl:choose>
712
483
  </xsl:template>
713
-
484
+ <!-- ====== -->
485
+ <!-- ====== -->
714
486
 
715
487
 
716
488
  <xsl:template match="m3d:p">
@@ -794,13 +566,13 @@
794
566
  <fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
795
567
  <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
796
568
  <!-- <xsl:value-of select="@reference"/> -->
797
- <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@id='_normative_references' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
569
+ <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@normative='true' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
798
570
  </fo:basic-link>
799
571
  </fo:inline>
800
572
  <fo:footnote-body>
801
573
  <fo:block font-size="9pt" margin-bottom="12pt">
802
574
  <fo:inline font-size="6pt" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super" padding-right="1mm">
803
- <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@id='_normative_references' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
575
+ <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@normative='true' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
804
576
  </fo:inline>
805
577
  <xsl:for-each select="m3d:p">
806
578
  <xsl:apply-templates/>
@@ -823,90 +595,6 @@
823
595
  <xsl:apply-templates/>
824
596
  </xsl:template>
825
597
 
826
- <xsl:template match="m3d:review">
827
- <!-- comment 2019-11-29 -->
828
- <!-- <fo:block font-weight="bold">Review:</fo:block>
829
- <xsl:apply-templates /> -->
830
- </xsl:template>
831
-
832
- <xsl:template match="text()">
833
- <xsl:value-of select="."/>
834
- </xsl:template>
835
-
836
- <xsl:template match="m3d:image">
837
- <fo:block-container text-align="center">
838
- <fo:block>
839
- <fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
840
- </fo:block>
841
- <fo:block margin-top="12pt" margin-bottom="12pt">
842
- <xsl:variable name="title-figure">
843
- <xsl:call-template name="getTitle">
844
- <xsl:with-param name="name" select="'title-figure'"/>
845
- </xsl:call-template>
846
- </xsl:variable>
847
- <xsl:value-of select="$title-figure"/>
848
- <xsl:call-template name="getFigureNumber"/>
849
- </fo:block>
850
- </fo:block-container>
851
- </xsl:template>
852
-
853
- <xsl:template match="m3d:figure">
854
- <fo:block-container id="{@id}">
855
- <fo:block>
856
- <xsl:apply-templates/>
857
- </fo:block>
858
- <xsl:call-template name="fn_display_figure"/>
859
- <xsl:for-each select="m3d:note//m3d:p">
860
- <xsl:call-template name="note"/>
861
- </xsl:for-each>
862
- <fo:block text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
863
- <xsl:call-template name="getFigureNumber"/>
864
- <xsl:if test="m3d:name">
865
- <!-- <xsl:if test="not(local-name(..) = 'figure')"> -->
866
- <xsl:text> — </xsl:text>
867
- <!-- </xsl:if> -->
868
- <xsl:value-of select="m3d:name"/>
869
- </xsl:if>
870
- </fo:block>
871
- </fo:block-container>
872
- </xsl:template>
873
-
874
- <xsl:template name="getFigureNumber">
875
- <xsl:variable name="title-figure">
876
- <xsl:call-template name="getTitle">
877
- <xsl:with-param name="name" select="'title-figure'"/>
878
- </xsl:call-template>
879
- </xsl:variable>
880
- <xsl:choose>
881
- <xsl:when test="ancestor::m3d:annex">
882
- <xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="m3d:annex | m3d:figure"/>
883
- </xsl:when>
884
- <xsl:otherwise>
885
- <xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
886
- </xsl:otherwise>
887
- </xsl:choose>
888
- </xsl:template>
889
-
890
- <xsl:template match="m3d:figure/m3d:name"/>
891
- <xsl:template match="m3d:figure/m3d:fn" priority="2"/>
892
- <xsl:template match="m3d:figure/m3d:note"/>
893
-
894
-
895
- <xsl:template match="m3d:figure/m3d:image">
896
- <fo:block text-align="center">
897
- <xsl:variable name="src">
898
- <xsl:choose>
899
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
900
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
901
- </xsl:when>
902
- <xsl:otherwise>
903
- <xsl:value-of select="@src"/>
904
- </xsl:otherwise>
905
- </xsl:choose>
906
- </xsl:variable>
907
- <fo:external-graphic src="{$src}" width="100%" content-height="100%" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- src="{@src}" -->
908
- </fo:block>
909
- </xsl:template>
910
598
 
911
599
 
912
600
  <xsl:template match="m3d:bibitem">
@@ -934,7 +622,7 @@
934
622
  </xsl:template>
935
623
 
936
624
 
937
- <xsl:template match="m3d:bibitem/m3d:note">
625
+ <xsl:template match="m3d:bibitem/m3d:note" priority="2">
938
626
  <fo:footnote>
939
627
  <xsl:variable name="number">
940
628
  <xsl:number level="any" count="m3d:bibitem/m3d:note"/>
@@ -957,7 +645,7 @@
957
645
 
958
646
 
959
647
 
960
- <xsl:template match="m3d:ul | m3d:ol">
648
+ <xsl:template match="m3d:ul | m3d:ol" mode="ul_ol">
961
649
  <fo:block-container margin-left="6mm">
962
650
  <fo:block-container margin-left="0mm">
963
651
  <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="6mm"> <!-- margin-bottom="8pt" -->
@@ -966,14 +654,14 @@
966
654
  </xsl:if>
967
655
  <xsl:apply-templates/>
968
656
  </fo:list-block>
969
- <xsl:for-each select="./m3d:note//m3d:p">
657
+ <xsl:for-each select="./m3d:note">
970
658
  <xsl:call-template name="note"/>
971
659
  </xsl:for-each>
972
660
  </fo:block-container>
973
661
  </fo:block-container>
974
662
  </xsl:template>
975
663
 
976
- <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note"/>
664
+ <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note" priority="2"/>
977
665
 
978
666
  <xsl:template match="m3d:li">
979
667
  <fo:list-item id="{@id}">
@@ -987,36 +675,19 @@
987
675
  </fo:block>
988
676
  </fo:list-item-label>
989
677
  <fo:list-item-body start-indent="body-start()">
990
- <xsl:apply-templates/>
991
- <xsl:apply-templates select=".//m3d:note" mode="process"/>
678
+ <fo:block>
679
+ <xsl:apply-templates/>
680
+ <xsl:apply-templates select=".//m3d:note" mode="process"/>
681
+ </fo:block>
992
682
  </fo:list-item-body>
993
683
  </fo:list-item>
994
684
  </xsl:template>
995
685
 
996
-
997
- <xsl:template match="m3d:term">
998
- <xsl:param name="sectionNum"/>
999
- <fo:block id="{@id}" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
1000
- <fo:inline>
1001
- <xsl:variable name="section">
1002
- <xsl:for-each select="*[1]">
1003
- <xsl:call-template name="getSection">
1004
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1005
- </xsl:call-template>
1006
- </xsl:for-each>
1007
- </xsl:variable>
1008
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
1009
- </fo:inline>
1010
- </fo:block>
1011
- <fo:block>
1012
- <xsl:apply-templates>
1013
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1014
- </xsl:apply-templates>
1015
- </fo:block>
686
+ <xsl:template match="m3d:note" mode="process">
687
+ <xsl:call-template name="note"/>
1016
688
  </xsl:template>
1017
-
689
+
1018
690
  <xsl:template match="m3d:preferred">
1019
- <xsl:param name="sectionNum"/>
1020
691
 
1021
692
  <fo:inline>
1022
693
  <xsl:apply-templates/>
@@ -1027,135 +698,34 @@
1027
698
  </xsl:if>
1028
699
 
1029
700
  </xsl:template>
1030
-
1031
- <xsl:template match="m3d:admitted">
1032
- <xsl:param name="sectionNum"/>
1033
-
1034
- <fo:inline>
1035
- <xsl:apply-templates/>
1036
- </fo:inline>
1037
-
1038
- <xsl:if test="not(following-sibling::*[1][local-name() = 'admitted'])">
1039
- <xsl:value-of select="$linebreak"/>
1040
- </xsl:if>
1041
-
1042
- </xsl:template>
1043
-
1044
- <xsl:template match="m3d:deprecates">
1045
- <xsl:param name="sectionNum"/>
1046
- <fo:inline>
1047
- <xsl:if test="not(preceding-sibling::*[1][local-name() = 'deprecates'])">
1048
- <xsl:variable name="title-deprecated">
1049
- <xsl:call-template name="getTitle">
1050
- <xsl:with-param name="name" select="'title-deprecated'"/>
1051
- </xsl:call-template>
1052
- </xsl:variable>
1053
- <fo:inline><xsl:value-of select="$title-deprecated"/>: </fo:inline>
1054
- </xsl:if>
1055
- <xsl:apply-templates/>
1056
- </fo:inline>
1057
- <xsl:if test="not(following-sibling::*[1][local-name() = 'deprecates'])">
1058
- <xsl:value-of select="$linebreak"/>
1059
- </xsl:if>
1060
-
1061
- </xsl:template>
1062
-
1063
- <xsl:template match="m3d:definition[preceding-sibling::m3d:domain]">
1064
- <xsl:apply-templates/>
1065
- </xsl:template>
1066
- <xsl:template match="m3d:definition[preceding-sibling::m3d:domain]/m3d:p">
1067
- <fo:inline> <xsl:apply-templates/></fo:inline>
1068
- <fo:block> </fo:block>
1069
- </xsl:template>
1070
-
1071
- <xsl:template match="m3d:definition">
1072
- <fo:block>
1073
- <xsl:apply-templates/>
1074
- </fo:block>
1075
- </xsl:template>
1076
-
1077
- <xsl:template match="m3d:termsource">
1078
- <fo:block>
1079
- <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
1080
- <fo:basic-link internal-destination="{m3d:origin/@bibitemid}" fox:alt-text="{m3d:origin/@citeas}">
1081
- <xsl:text>[</xsl:text> <!-- SOURCE: -->
1082
- <xsl:value-of select="m3d:origin/@citeas"/>
1083
-
1084
- <xsl:apply-templates select="m3d:origin/m3d:localityStack"/>
1085
-
1086
- </fo:basic-link>
1087
- <xsl:apply-templates select="m3d:modification"/>
1088
- <xsl:text>]</xsl:text>
1089
- </fo:block>
1090
- </xsl:template>
1091
-
1092
701
 
1093
- <xsl:template match="m3d:modification/m3d:p">
1094
- <xsl:apply-templates/>
1095
- </xsl:template>
1096
- <xsl:template match="m3d:modification/text()">
1097
- <xsl:apply-templates/>
1098
- </xsl:template>
702
+
1099
703
 
1100
- <xsl:template match="m3d:termnote">
704
+ <xsl:template match="m3d:termnote" priority="2">
1101
705
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1102
706
  <fo:block>
1103
707
  <fo:inline padding-right="1mm">
1104
- <xsl:variable name="num"><xsl:number/></xsl:variable>
1105
- <xsl:variable name="title-note-to-entry">
1106
- <xsl:call-template name="getTitle">
1107
- <xsl:with-param name="name" select="'title-note-to-entry'"/>
1108
- </xsl:call-template>
1109
- </xsl:variable>
1110
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
708
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
1111
709
  </fo:inline>
1112
710
  <xsl:apply-templates/>
1113
711
  </fo:block>
1114
712
  </fo:block-container>
1115
713
  </xsl:template>
1116
714
 
1117
- <xsl:template match="m3d:termnote/m3d:p">
1118
- <fo:inline><xsl:apply-templates/></fo:inline>
1119
- </xsl:template>
1120
-
1121
- <xsl:template match="m3d:domain">
1122
- <fo:inline>&lt;<xsl:apply-templates/>&gt; </fo:inline>
1123
- </xsl:template>
1124
-
1125
-
1126
- <xsl:template match="m3d:termexample">
1127
- <fo:block margin-top="14pt" margin-bottom="14pt" text-align="justify">
1128
- <fo:inline padding-right="1mm" font-weight="bold">
1129
- <xsl:variable name="title-example">
1130
- <xsl:call-template name="getTitle">
1131
- <xsl:with-param name="name" select="'title-example'"/>
1132
- </xsl:call-template>
1133
- </xsl:variable>
1134
- <xsl:value-of select="$title-example"/>
1135
- <xsl:if test="count(ancestor::m3d:term[1]//m3d:termexample) &gt; 1">
1136
- <xsl:number/>
1137
- </xsl:if>
1138
- <xsl:text>:</xsl:text>
1139
- </fo:inline>
715
+ <xsl:template match="m3d:example/m3d:p" priority="2">
716
+ <fo:inline xsl:use-attribute-sets="example-p-style">
1140
717
  <xsl:apply-templates/>
1141
- </fo:block>
1142
- </xsl:template>
1143
-
1144
- <xsl:template match="m3d:termexample/m3d:p">
1145
- <fo:inline><xsl:apply-templates/></fo:inline>
718
+ </fo:inline>
1146
719
  </xsl:template>
1147
720
 
1148
-
1149
- <xsl:template match="m3d:annex">
1150
- <fo:block break-after="page"/>
1151
- <xsl:apply-templates/>
1152
- </xsl:template>
1153
721
 
1154
722
 
1155
723
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
1156
- <xsl:template match="m3d:references[position() &gt; 1]">
724
+ <xsl:template match="m3d:references[not(@normative='true')]">
1157
725
  <fo:block break-after="page"/>
1158
- <xsl:apply-templates/>
726
+ <fo:block id="{@id}">
727
+ <xsl:apply-templates/>
728
+ </fo:block>
1159
729
  <fo:block-container text-align="center">
1160
730
  <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
1161
731
  <fo:block> </fo:block>
@@ -1166,7 +736,7 @@
1166
736
 
1167
737
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1168
738
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem"> -->
1169
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem">
739
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem">
1170
740
  <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
1171
741
  <fo:list-item>
1172
742
  <fo:list-item-label end-indent="label-end()">
@@ -1205,191 +775,45 @@
1205
775
  </xsl:template>
1206
776
 
1207
777
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem" mode="contents"/> -->
1208
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem" mode="contents"/>
778
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem" mode="contents"/>
1209
779
 
1210
780
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem/m3d:title"> -->
1211
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem/m3d:title">
781
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem/m3d:title">
1212
782
  <fo:inline font-style="italic">
1213
783
  <xsl:apply-templates/>
1214
784
  </fo:inline>
1215
785
  </xsl:template>
1216
786
 
1217
- <xsl:template match="m3d:quote">
1218
- <fo:block margin-top="12pt" margin-left="12mm" margin-right="12mm">
1219
- <xsl:apply-templates select=".//m3d:p"/>
1220
- </fo:block>
1221
- <fo:block text-align="right">
1222
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
1223
- <xsl:text>— </xsl:text><xsl:value-of select="m3d:author"/>
1224
- <xsl:if test="m3d:source">
1225
- <xsl:text>, </xsl:text>
1226
- <xsl:apply-templates select="m3d:source"/>
1227
- </xsl:if>
1228
- </fo:block>
1229
- </xsl:template>
1230
-
1231
- <xsl:template match="m3d:source">
1232
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
1233
- <xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
1234
- <xsl:apply-templates select="m3d:localityStack"/>
1235
- </fo:basic-link>
1236
- </xsl:template>
1237
-
787
+
788
+
1238
789
 
1239
790
  <xsl:template match="mathml:math" priority="2">
1240
791
  <fo:inline font-family="Cambria Math">
792
+ <xsl:variable name="mathml">
793
+ <xsl:apply-templates select="." mode="mathml"/>
794
+ </xsl:variable>
1241
795
  <fo:instream-foreign-object fox:alt-text="Math">
1242
- <xsl:copy-of select="."/>
796
+ <!-- <xsl:copy-of select="."/> -->
797
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
1243
798
  </fo:instream-foreign-object>
1244
799
  </fo:inline>
1245
800
  </xsl:template>
1246
801
 
1247
- <xsl:template match="m3d:xref">
1248
- <xsl:param name="sectionNum"/>
1249
-
1250
- <xsl:variable name="target" select="normalize-space(@target)"/>
1251
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
1252
- <xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = $target]/@section"/>
1253
- <!-- <xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))"> -->
1254
- <!-- <xsl:attribute name="color">blue</xsl:attribute>
1255
- <xsl:attribute name="text-decoration">underline</xsl:attribute> -->
1256
- <!-- </xsl:if> -->
1257
- <xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = $target]/@type"/>
1258
- <xsl:variable name="root" select="xalan:nodeset($contents)//item[@id =$target]/@root"/>
1259
- <xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =$target]/@level"/>
1260
-
1261
- <xsl:variable name="title-clause">
1262
- <xsl:call-template name="getTitle">
1263
- <xsl:with-param name="name" select="'title-clause'"/>
1264
- </xsl:call-template>
1265
- </xsl:variable>
1266
- <xsl:variable name="title-annex">
1267
- <xsl:call-template name="getTitle">
1268
- <xsl:with-param name="name" select="'title-annex'"/>
1269
- </xsl:call-template>
1270
- </xsl:variable>
1271
-
1272
- <xsl:choose>
1273
- <xsl:when test="$type = 'clause' and $root != 'annex' and $level = 1"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
1274
- <xsl:when test="$type = 'clause' and $root = 'annex'"><xsl:value-of select="$title-annex"/></xsl:when>
1275
- <xsl:when test="$type = 'li'">
1276
- <xsl:attribute name="color">black</xsl:attribute>
1277
- <xsl:attribute name="text-decoration">none</xsl:attribute>
1278
- <xsl:variable name="parent_section" select="xalan:nodeset($contents)//item[@id =$target]/@parent_section"/>
1279
- <xsl:variable name="currentSection">
1280
- <xsl:call-template name="getSection"/>
1281
- </xsl:variable>
1282
- <xsl:if test="not(contains($parent_section, $currentSection))">
1283
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
1284
- <xsl:attribute name="color">blue</xsl:attribute>
1285
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1286
- <xsl:value-of select="$parent_section"/><xsl:text> </xsl:text>
1287
- </fo:basic-link>
1288
- </xsl:if>
1289
- </xsl:when>
1290
- <xsl:when test="normalize-space($section) = ''">
1291
- <xsl:text>[</xsl:text><xsl:value-of select="$target"/><xsl:text>]</xsl:text>
1292
- </xsl:when>
1293
- <xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
1294
- </xsl:choose>
1295
- <xsl:value-of select="$section"/>
1296
- </fo:basic-link>
1297
- </xsl:template>
1298
-
1299
- <xsl:template match="m3d:example/m3d:p">
1300
- <fo:block margin-top="8pt" margin-bottom="8pt">
1301
- <xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
1302
- <fo:inline padding-right="5mm" font-weight="bold">
1303
- <xsl:variable name="title-example">
1304
- <xsl:call-template name="getTitle">
1305
- <xsl:with-param name="name" select="'title-example'"/>
1306
- </xsl:call-template>
1307
- </xsl:variable>
1308
- <xsl:value-of select="$title-example"/>
1309
- <xsl:if test="count(ancestor::m3d:clause[1]//m3d:example) &gt; 1">
1310
- <xsl:number count="m3d:example[ancestor::m3d:clause[@id = $claims_id]]" level="any"/>
1311
- </xsl:if>
1312
- </fo:inline>
1313
- <xsl:apply-templates/>
1314
- </fo:block>
1315
- </xsl:template>
1316
802
 
1317
- <xsl:template match="m3d:note/m3d:p" name="note">
1318
- <xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
803
+ <!-- <xsl:template match="m3d:note/m3d:p" name="note">
1319
804
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1320
805
  <fo:block>
1321
- <fo:inline padding-right="5mm" font-weight="bold">
1322
- <xsl:variable name="title-note">
1323
- <xsl:call-template name="getTitle">
1324
- <xsl:with-param name="name" select="'title-note'"/>
1325
- </xsl:call-template>
1326
- </xsl:variable>
1327
- <xsl:value-of select="$title-note"/>
1328
- <xsl:if test="count(ancestor::m3d:clause[1]//m3d:note) &gt; 1">
1329
- <xsl:text> </xsl:text><xsl:number count="m3d:note[ancestor::m3d:clause[@id = $claims_id]]" level="any"/>
1330
- </xsl:if>
1331
- <xsl:text>:</xsl:text>
806
+ <fo:inline >
807
+ <xsl:apply-templates select="../m3d:name" mode="presentation">
808
+ <xsl:with-param name="sfx" select="':'"/>
809
+ </xsl:apply-templates>
1332
810
  </fo:inline>
1333
- <xsl:apply-templates/>
811
+ <xsl:apply-templates />
1334
812
  </fo:block>
1335
813
  </fo:block-container>
1336
- </xsl:template>
814
+ </xsl:template> -->
815
+
1337
816
 
1338
- <!-- <eref type="inline" bibitemid="IEC60050-113" citeas="IEC 60050-113:2011"><localityStack><locality type="clause"><referenceFrom>113-01-12</referenceFrom></locality></localityStack></eref> -->
1339
- <xsl:template match="m3d:eref">
1340
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
1341
- <xsl:if test="@type = 'footnote'">
1342
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
1343
- <xsl:attribute name="font-size">50%</xsl:attribute>
1344
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1345
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1346
- </xsl:if>
1347
- <!-- <xsl:if test="@type = 'inline'">
1348
- <xsl:attribute name="color">blue</xsl:attribute>
1349
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1350
- </xsl:if> -->
1351
-
1352
- <xsl:choose>
1353
- <xsl:when test="@citeas and normalize-space(text()) = ''">
1354
- <xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
1355
- </xsl:when>
1356
- <xsl:when test="@bibitemid and normalize-space(text()) = ''">
1357
- <xsl:value-of select="//m3d:bibitem[@id = current()/@bibitemid]/m3d:docidentifier"/>
1358
- </xsl:when>
1359
- <xsl:otherwise/>
1360
- </xsl:choose>
1361
- <xsl:apply-templates select="m3d:localityStack"/>
1362
- <xsl:apply-templates select="text()"/>
1363
- </fo:basic-link>
1364
- </xsl:template>
1365
-
1366
- <xsl:template match="m3d:locality">
1367
- <xsl:variable name="title-clause">
1368
- <xsl:call-template name="getTitle">
1369
- <xsl:with-param name="name" select="'title-clause'"/>
1370
- </xsl:call-template>
1371
- </xsl:variable>
1372
- <xsl:variable name="title-annex">
1373
- <xsl:call-template name="getTitle">
1374
- <xsl:with-param name="name" select="'title-annex'"/>
1375
- </xsl:call-template>
1376
- </xsl:variable>
1377
- <xsl:variable name="title-table">
1378
- <xsl:call-template name="getTitle">
1379
- <xsl:with-param name="name" select="'title-table'"/>
1380
- </xsl:call-template>
1381
- </xsl:variable>
1382
- <xsl:choose>
1383
- <xsl:when test="@type ='section' and ancestor::m3d:termsource">SOURCE Section </xsl:when>
1384
- <xsl:when test="ancestor::m3d:termsource"/>
1385
- <xsl:when test="@type ='clause' and ancestor::m3d:eref"/>
1386
- <xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
1387
- <xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
1388
- <xsl:when test="@type ='table'"><xsl:value-of select="$title-table"/></xsl:when>
1389
- <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
1390
- </xsl:choose>
1391
- <xsl:text> </xsl:text><xsl:value-of select="m3d:referenceFrom"/>
1392
- </xsl:template>
1393
817
 
1394
818
  <xsl:template match="m3d:admonition">
1395
819
  <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
@@ -1400,23 +824,12 @@
1400
824
  </fo:block>
1401
825
  </xsl:template>
1402
826
 
1403
- <xsl:template match="m3d:formula">
1404
- <fo:block id="{@id}">
1405
- <xsl:apply-templates/>
1406
- </fo:block>
1407
- </xsl:template>
1408
-
1409
- <xsl:template match="m3d:formula/m3d:dt/m3d:stem">
1410
- <fo:inline>
1411
- <xsl:apply-templates/>
1412
- </fo:inline>
1413
- </xsl:template>
1414
827
 
1415
828
  <xsl:template match="m3d:formula/m3d:stem">
1416
829
  <fo:block margin-top="14pt" margin-bottom="14pt">
1417
- <fo:table table-layout="fixed" width="170mm">
1418
- <fo:table-column column-width="165mm"/>
1419
- <fo:table-column column-width="5mm"/>
830
+ <fo:table table-layout="fixed" width="100%"> <!-- 170mm -->
831
+ <fo:table-column column-width="95%"/> <!-- 165mm -->
832
+ <fo:table-column column-width="5%"/> <!-- 5mm -->
1420
833
  <fo:table-body>
1421
834
  <fo:table-row>
1422
835
  <fo:table-cell display-align="center">
@@ -1426,179 +839,21 @@
1426
839
  </fo:table-cell>
1427
840
  <fo:table-cell display-align="center">
1428
841
  <fo:block text-align="left">
1429
- <xsl:choose>
1430
- <xsl:when test="ancestor::m3d:annex">
1431
- <xsl:number format="(A.1)" level="multiple" count="m3d:annex | m3d:formula"/>
1432
- </xsl:when>
1433
- <xsl:otherwise> <!-- not(ancestor::m3d:annex) -->
1434
- <xsl:text>(</xsl:text><xsl:number level="any" count="m3d:formula"/><xsl:text>)</xsl:text>
1435
- </xsl:otherwise>
1436
- </xsl:choose>
842
+ <xsl:apply-templates select="../m3d:name" mode="presentation"/>
1437
843
  </fo:block>
1438
844
  </fo:table-cell>
1439
845
  </fo:table-row>
1440
846
  </fo:table-body>
1441
- </fo:table>
1442
- <fo:inline keep-together.within-line="always">
1443
- </fo:inline>
847
+ </fo:table>
1444
848
  </fo:block>
1445
849
  </xsl:template>
1446
850
 
1447
- <xsl:template match="m3d:br" priority="2">
1448
- <xsl:value-of select="$linebreak"/>
1449
- </xsl:template>
1450
-
1451
- <xsl:template name="getSection">
1452
- <xsl:param name="sectionNum"/>
1453
- <xsl:variable name="level">
1454
- <xsl:call-template name="getLevel"/>
1455
- </xsl:variable>
1456
- <xsl:variable name="references_num_current">
1457
- <xsl:number level="any" count="m3d:references"/>
1458
- </xsl:variable>
1459
- <xsl:variable name="section">
1460
- <xsl:variable name="title-section">
1461
- <xsl:call-template name="getTitle">
1462
- <xsl:with-param name="name" select="'title-section'"/>
1463
- </xsl:call-template>
1464
- </xsl:variable>
1465
- <xsl:choose>
1466
- <xsl:when test="ancestor::m3d:bibliography and $references_num_current = 1"><!-- Normative references -->
1467
- <xsl:value-of select="$title-section"/><xsl:value-of select="$sectionNum"/><xsl:text>.</xsl:text>
1468
- </xsl:when>
1469
- <xsl:when test="ancestor::m3d:bibliography">
1470
- <xsl:value-of select="$sectionNum"/>
1471
- </xsl:when>
1472
- <xsl:when test="ancestor::m3d:sections">
1473
- <!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
1474
- <xsl:if test="$level = 1">
1475
- <xsl:value-of select="$title-section"/>
1476
- </xsl:if>
1477
- <xsl:choose>
1478
- <xsl:when test="$level = 1">
1479
- <xsl:value-of select="$sectionNum"/><xsl:text>.</xsl:text>
1480
- </xsl:when>
1481
- <xsl:when test="$level &gt;= 2">
1482
- <xsl:variable name="num">
1483
- <xsl:call-template name="getSubSection"/>
1484
- </xsl:variable>
1485
- <xsl:value-of select="concat($sectionNum, $num)"/><xsl:text>.</xsl:text>
1486
- </xsl:when>
1487
- <xsl:otherwise>
1488
- <!-- z<xsl:value-of select="$sectionNum"/>z -->
1489
- </xsl:otherwise>
1490
- </xsl:choose>
1491
- </xsl:when>
1492
- <xsl:when test="ancestor::m3d:annex">
1493
- <xsl:variable name="annexid" select="normalize-space(/m3d:m3d-standard/m3d:bibdata/m3d:ext/m3d:structuredidentifier/m3d:annexid)"/>
1494
- <xsl:choose>
1495
- <xsl:when test="$level = 1">
1496
- <xsl:variable name="title-annex">
1497
- <xsl:call-template name="getTitle">
1498
- <xsl:with-param name="name" select="'title-annex'"/>
1499
- </xsl:call-template>
1500
- </xsl:variable>
1501
- <xsl:value-of select="$title-annex"/>
1502
- <xsl:choose>
1503
- <xsl:when test="count(//m3d:annex) = 1 and $annexid != ''">
1504
- <xsl:value-of select="$annexid"/>
1505
- </xsl:when>
1506
- <xsl:otherwise>
1507
- <xsl:number format="A" level="any" count="m3d:annex"/>
1508
- </xsl:otherwise>
1509
- </xsl:choose>
1510
- </xsl:when>
1511
- <xsl:otherwise>
1512
- <xsl:choose>
1513
- <xsl:when test="count(//m3d:annex) = 1 and $annexid != ''">
1514
- <xsl:value-of select="$annexid"/><xsl:number format=".1" level="multiple" count="m3d:clause"/>
1515
- </xsl:when>
1516
- <xsl:otherwise>
1517
- <xsl:number format="A.1" level="multiple" count="m3d:annex | m3d:clause"/>
1518
- </xsl:otherwise>
1519
- </xsl:choose>
1520
- </xsl:otherwise>
1521
- </xsl:choose>
1522
- </xsl:when>
1523
- <!-- if preface and there is clause(s) -->
1524
- <xsl:when test="ancestor::m3d:preface">0</xsl:when>
1525
- <!-- <xsl:choose>
1526
- <xsl:when test="$level = 1 and ..//m3d:clause">0</xsl:when>
1527
- <xsl:when test="$level &gt;= 2">
1528
- <xsl:variable name="num">
1529
- <xsl:number format=".1" level="multiple" count="m3d:clause"/>
1530
- </xsl:variable>
1531
- <xsl:value-of select="concat('0', $num)"/>
1532
- </xsl:when>
1533
- <xsl:otherwise>
1534
- </xsl:otherwise>
1535
- </xsl:choose>
1536
- </xsl:when> -->
1537
- <xsl:otherwise>
1538
- </xsl:otherwise>
1539
- </xsl:choose>
1540
- </xsl:variable>
1541
- <xsl:value-of select="$section"/>
1542
- </xsl:template>
1543
851
 
1544
852
  <xsl:variable name="Image-M3AAWG-Logo">
1545
853
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0W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XBTBqhR3AXAaFzOI7nKfc9pMjR44KTNh+cmc/OaqTRBCxpIbrgO2dVXWoz6DF+ZLJkSNHjuodOZduR44cOXLkyJEDNY4cOXLkyJEjR7WF/O2nDbnvXd9oIzfEjhw5cuTI0W8L1CAA0DauOxw5clQA6khe84PrCkeOHBWS/l+AAQACYD7v73Ou8wAAAABJRU5ErkJggg==</xsl:text>
1546
854
  </xsl:variable>
1547
-
1548
- <xsl:template name="addLetterSpacing">
1549
- <xsl:param name="text"/>
1550
- <xsl:param name="letter-spacing" select="'0.15'"/>
1551
- <xsl:if test="string-length($text) &gt; 0">
1552
- <xsl:variable name="char" select="substring($text, 1, 1)"/>
1553
- <fo:inline padding-right="{$letter-spacing}mm"><xsl:value-of select="$char"/></fo:inline>
1554
- <xsl:call-template name="addLetterSpacing">
1555
- <xsl:with-param name="text" select="substring($text, 2)"/>
1556
- <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
1557
- </xsl:call-template>
1558
- </xsl:if>
1559
- </xsl:template>
1560
-
855
+
1561
856
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1562
-
1563
- <title-table lang="en">Table </title-table>
1564
- <title-table lang="fr">Tableau </title-table>
1565
-
1566
- <title-table lang="zh">Table </title-table>
1567
-
1568
-
1569
-
1570
- <title-note lang="en">NOTE </title-note>
1571
- <title-note lang="fr">NOTE </title-note>
1572
-
1573
- <title-note lang="zh">NOTE </title-note>
1574
-
1575
-
1576
-
1577
- <title-figure lang="en">Figure </title-figure>
1578
- <title-figure lang="fr">Figure </title-figure>
1579
-
1580
- <title-figure lang="zh">Figure </title-figure>
1581
-
1582
-
1583
-
1584
- <title-example lang="en">EXAMPLE </title-example>
1585
- <title-example lang="fr">EXEMPLE </title-example>
1586
-
1587
- <title-example lang="zh">EXAMPLE </title-example>
1588
-
1589
-
1590
-
1591
- <title-example-xref lang="en">Example </title-example-xref>
1592
- <title-example-xref lang="fr">Exemple </title-example-xref>
1593
-
1594
- <title-section lang="en">Section </title-section>
1595
- <title-section lang="fr">Section </title-section>
1596
-
1597
- <title-inequality lang="en">Inequality </title-inequality>
1598
- <title-inequality lang="fr">Inequality </title-inequality>
1599
-
1600
- <title-equation lang="en">Equation </title-equation>
1601
- <title-equation lang="fr">Equation </title-equation>
1602
857
 
1603
858
  <title-annex lang="en">Annex </title-annex>
1604
859
  <title-annex lang="fr">Annexe </title-annex>
@@ -1606,17 +861,7 @@
1606
861
  <title-annex lang="zh">Annex </title-annex>
1607
862
 
1608
863
 
1609
-
1610
- <title-appendix lang="en">Appendix </title-appendix>
1611
- <title-appendix lang="fr">Appendix </title-appendix>
1612
-
1613
- <title-clause lang="en">Clause </title-clause>
1614
- <title-clause lang="fr">Article </title-clause>
1615
-
1616
- <title-clause lang="zh">Clause </title-clause>
1617
-
1618
-
1619
-
864
+
1620
865
  <title-edition lang="en">
1621
866
 
1622
867
 
@@ -1624,9 +869,13 @@
1624
869
 
1625
870
  </title-edition>
1626
871
 
1627
- <title-formula lang="en">Formula </title-formula>
1628
- <title-formula lang="fr">Formula </title-formula>
872
+ <title-edition lang="fr">
873
+
874
+ <xsl:text>Édition </xsl:text>
875
+
876
+ </title-edition>
1629
877
 
878
+
1630
879
  <title-toc lang="en">
1631
880
 
1632
881
 
@@ -1661,13 +910,6 @@
1661
910
  </title-part>
1662
911
  <title-part lang="zh">第 # 部分:</title-part>
1663
912
 
1664
- <title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
1665
- <title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
1666
-
1667
- <title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
1668
-
1669
-
1670
-
1671
913
  <title-modified lang="en">modified</title-modified>
1672
914
  <title-modified lang="fr">modifiée</title-modified>
1673
915
 
@@ -1675,20 +917,23 @@
1675
917
 
1676
918
 
1677
919
 
1678
- <title-source lang="en">SOURCE</title-source>
920
+ <title-source lang="en">
921
+
922
+ <xsl:text>SOURCE</xsl:text>
923
+
924
+
925
+ </title-source>
1679
926
 
1680
927
  <title-keywords lang="en">Keywords</title-keywords>
1681
928
 
1682
929
  <title-deprecated lang="en">DEPRECATED</title-deprecated>
1683
930
  <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1684
-
1685
- <title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
1686
-
931
+
1687
932
  <title-list-tables lang="en">List of Tables</title-list-tables>
1688
933
 
1689
934
  <title-list-figures lang="en">List of Figures</title-list-figures>
1690
935
 
1691
- <title-recommendation lang="en">Recommendation </title-recommendation>
936
+ <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1692
937
 
1693
938
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1694
939
 
@@ -1698,8 +943,6 @@
1698
943
 
1699
944
  <title-in lang="en">in </title-in>
1700
945
 
1701
- <title-box lang="en">Box </title-box>
1702
-
1703
946
  <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1704
947
  <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1705
948
 
@@ -1722,7 +965,11 @@
1722
965
  <title-warning lang="zh">警告</title-warning>
1723
966
 
1724
967
  <title-amendment lang="en">AMENDMENT</title-amendment>
1725
- </xsl:variable><xsl:template name="getTitle">
968
+
969
+ <title-continued lang="en">(continued)</title-continued>
970
+ <title-continued lang="fr">(continué)</title-continued>
971
+
972
+ </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1726
973
  <xsl:param name="name"/>
1727
974
  <xsl:variable name="lang">
1728
975
  <xsl:call-template name="getLang"/>
@@ -1736,13 +983,18 @@
1736
983
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1737
984
  </xsl:otherwise>
1738
985
  </xsl:choose>
1739
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
986
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
987
+
988
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1740
989
 
1741
990
  <xsl:attribute name="color">blue</xsl:attribute>
1742
991
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1743
992
 
1744
993
 
994
+
1745
995
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
996
+ <xsl:attribute name="white-space">pre</xsl:attribute>
997
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1746
998
 
1747
999
 
1748
1000
 
@@ -1754,6 +1006,124 @@
1754
1006
 
1755
1007
 
1756
1008
 
1009
+
1010
+ </xsl:attribute-set><xsl:attribute-set name="permission-style">
1011
+
1012
+ </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
1013
+
1014
+ </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
1015
+
1016
+ </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1017
+
1018
+ </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1019
+
1020
+ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1021
+
1022
+ </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
1023
+ </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
1024
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
1025
+
1026
+
1027
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
1028
+
1029
+
1030
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
1031
+
1032
+ </xsl:attribute-set><xsl:attribute-set name="termexample-style">
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
1039
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1040
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1041
+
1042
+
1043
+
1044
+ </xsl:attribute-set><xsl:attribute-set name="example-style">
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1052
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+ </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1060
+
1061
+
1062
+
1063
+ </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1072
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+ </xsl:attribute-set><xsl:attribute-set name="example-p-style">
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1093
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1103
+
1104
+
1105
+
1106
+
1107
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1108
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1109
+
1110
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1111
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1112
+
1113
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1114
+ <xsl:attribute name="text-align">center</xsl:attribute>
1115
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1757
1127
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1758
1128
 
1759
1129
  <xsl:attribute name="font-size">12pt</xsl:attribute>
@@ -1771,7 +1141,213 @@
1771
1141
 
1772
1142
 
1773
1143
 
1774
- </xsl:attribute-set><xsl:template match="text()">
1144
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1145
+
1146
+
1147
+
1148
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1149
+
1150
+
1151
+
1152
+
1153
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1163
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1164
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1165
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+ </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">
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1182
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1189
+
1190
+
1191
+
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1198
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1212
+
1213
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1214
+
1215
+
1216
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1217
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
1218
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1225
+
1226
+
1227
+ <xsl:attribute name="text-align">right</xsl:attribute>
1228
+
1229
+
1230
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1237
+
1238
+
1239
+
1240
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1241
+
1242
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ <xsl:attribute name="text-align">center</xsl:attribute>
1254
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1255
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1256
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+
1264
+
1265
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1266
+
1267
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1268
+ <xsl:attribute name="text-align">center</xsl:attribute>
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1275
+
1276
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1277
+
1278
+
1279
+ <xsl:attribute name="width">100%</xsl:attribute>
1280
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1281
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1282
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1283
+
1284
+
1285
+
1286
+
1287
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1288
+
1289
+
1290
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1291
+
1292
+
1293
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1294
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1295
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1296
+ <xsl:attribute name="text-align">center</xsl:attribute>
1297
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1298
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1299
+
1300
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1301
+
1302
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1303
+
1304
+
1305
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1306
+
1307
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1308
+
1309
+
1310
+ </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1311
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1312
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1313
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1314
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1315
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1316
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1317
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1318
+
1319
+ <!-- Normative references -->
1320
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
1321
+ <!-- Terms and definitions -->
1322
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
1323
+ <!-- Another main sections -->
1324
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
1325
+ <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1326
+ <!-- Bibliography -->
1327
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
1328
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1329
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1330
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1331
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1332
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1333
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1334
+ </xsl:template><xsl:template name="processMainSectionsDefault">
1335
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1336
+
1337
+ <xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1338
+ <fo:block break-after="page"/>
1339
+ </xsl:if>
1340
+
1341
+ <!-- Normative references -->
1342
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1343
+ <!-- Terms and definitions -->
1344
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
1345
+ <!-- Another main sections -->
1346
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
1347
+ <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1348
+ <!-- Bibliography -->
1349
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1350
+ </xsl:template><xsl:template match="text()">
1775
1351
  <xsl:value-of select="."/>
1776
1352
  </xsl:template><xsl:template match="*[local-name()='br']">
1777
1353
  <xsl:value-of select="$linebreak"/>
@@ -1780,62 +1356,23 @@
1780
1356
  <xsl:call-template name="add-zero-spaces-java"/>
1781
1357
  </xsl:template><xsl:template match="*[local-name()='table']">
1782
1358
 
1783
- <xsl:variable name="simple-table">
1784
- <!-- <xsl:copy> -->
1785
- <xsl:call-template name="getSimpleTable"/>
1786
- <!-- </xsl:copy> -->
1359
+ <xsl:variable name="simple-table">
1360
+ <xsl:call-template name="getSimpleTable"/>
1787
1361
  </xsl:variable>
1788
1362
 
1789
- <!-- DEBUG -->
1790
- <!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
1791
- <!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
1792
-
1793
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
1794
1363
 
1795
- <!-- <xsl:if test="$namespace = 'iso'">
1796
- <fo:block space-before="6pt">&#xA0;</fo:block>
1797
- </xsl:if> -->
1798
1364
 
1799
- <xsl:choose>
1800
- <xsl:when test="@unnumbered = 'true'"/>
1801
- <xsl:otherwise>
1802
-
1803
-
1804
-
1805
- <fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
1806
-
1807
-
1808
-
1809
-
1810
-
1811
-
1812
-
1813
-
1814
- <xsl:variable name="title-table">
1815
- <xsl:call-template name="getTitle">
1816
- <xsl:with-param name="name" select="'title-table'"/>
1817
- </xsl:call-template>
1818
- </xsl:variable>
1819
- <xsl:value-of select="$title-table"/>
1820
-
1821
- <xsl:call-template name="getTableNumber"/>
1822
-
1823
-
1824
- <xsl:if test="*[local-name()='name']">
1825
-
1826
-
1827
-
1828
- <xsl:text> — </xsl:text>
1829
-
1830
- <xsl:apply-templates select="*[local-name()='name']" mode="process"/>
1831
- </xsl:if>
1832
- </fo:block>
1833
-
1834
-
1835
- <xsl:call-template name="fn_name_display"/>
1365
+
1366
+
1367
+ <!-- $namespace = 'iso' or -->
1368
+
1369
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1370
+
1836
1371
 
1837
- </xsl:otherwise>
1838
- </xsl:choose>
1372
+
1373
+ <xsl:call-template name="fn_name_display"/>
1374
+
1375
+
1839
1376
 
1840
1377
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1841
1378
 
@@ -1888,6 +1425,7 @@
1888
1425
 
1889
1426
 
1890
1427
 
1428
+
1891
1429
 
1892
1430
 
1893
1431
 
@@ -1903,6 +1441,9 @@
1903
1441
 
1904
1442
 
1905
1443
 
1444
+
1445
+
1446
+
1906
1447
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1907
1448
  <xsl:choose>
1908
1449
  <xsl:when test=". = 1 or . = 0">
@@ -1927,32 +1468,16 @@
1927
1468
 
1928
1469
 
1929
1470
 
1471
+
1472
+
1930
1473
  </fo:block-container>
1931
- </xsl:template><xsl:template name="getTableNumber">
1932
- <xsl:choose>
1933
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
1934
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
1935
- </xsl:when>
1936
- <xsl:when test="ancestor::*[local-name()='annex']">
1937
-
1938
-
1939
-
1940
-
1941
-
1942
-
1474
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1475
+ <xsl:if test="normalize-space() != ''">
1476
+ <fo:block xsl:use-attribute-sets="table-name-style">
1943
1477
 
1944
-
1945
- </xsl:when>
1946
- <xsl:otherwise>
1947
-
1948
-
1949
- <xsl:number format="A." count="*[local-name()='annex']"/>
1950
- <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
1951
-
1952
- </xsl:otherwise>
1953
- </xsl:choose>
1954
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
1955
- <xsl:apply-templates/>
1478
+ <xsl:apply-templates/>
1479
+ </fo:block>
1480
+ </xsl:if>
1956
1481
  </xsl:template><xsl:template name="calculate-columns-numbers">
1957
1482
  <xsl:param name="table-row"/>
1958
1483
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -2067,10 +1592,25 @@
2067
1592
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2068
1593
  <xsl:param name="cols-count"/>
2069
1594
  <!-- font-weight="bold" -->
2070
- <fo:table-header>
2071
-
1595
+ <fo:table-header>
1596
+
2072
1597
  <xsl:apply-templates/>
2073
1598
  </fo:table-header>
1599
+ </xsl:template><xsl:template name="table-header-title">
1600
+ <xsl:param name="cols-count"/>
1601
+ <!-- row for title -->
1602
+ <fo:table-row>
1603
+ <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">
1604
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1605
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1606
+ <xsl:call-template name="fn_name_display"/>
1607
+ </xsl:for-each>
1608
+ <fo:block text-align="right" font-style="italic">
1609
+ <xsl:text> </xsl:text>
1610
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1611
+ </fo:block>
1612
+ </fo:table-cell>
1613
+ </fo:table-row>
2074
1614
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2075
1615
  <fo:table-body>
2076
1616
  <xsl:apply-templates/>
@@ -2134,6 +1674,8 @@
2134
1674
  </xsl:choose>
2135
1675
  </xsl:variable>
2136
1676
 
1677
+
1678
+
2137
1679
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2138
1680
  <xsl:with-param name="cols-count" select="$cols-count"/>
2139
1681
  </xsl:apply-templates>
@@ -2143,6 +1685,8 @@
2143
1685
  </xsl:call-template>
2144
1686
 
2145
1687
  <fo:table-body>
1688
+
1689
+
2146
1690
  <xsl:apply-templates/>
2147
1691
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2148
1692
 
@@ -2165,11 +1709,24 @@
2165
1709
 
2166
1710
  </xsl:if>
2167
1711
 
1712
+
1713
+
2168
1714
 
2169
1715
  <xsl:apply-templates/>
2170
1716
  </fo:table-row>
2171
1717
  </xsl:template><xsl:template match="*[local-name()='th']">
2172
1718
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
1719
+ <xsl:attribute name="text-align">
1720
+ <xsl:choose>
1721
+ <xsl:when test="@align">
1722
+ <xsl:value-of select="@align"/>
1723
+ </xsl:when>
1724
+ <xsl:otherwise>center</xsl:otherwise>
1725
+ </xsl:choose>
1726
+ </xsl:attribute>
1727
+
1728
+
1729
+
2173
1730
 
2174
1731
 
2175
1732
 
@@ -2187,15 +1744,36 @@
2187
1744
  <xsl:value-of select="@rowspan"/>
2188
1745
  </xsl:attribute>
2189
1746
  </xsl:if>
1747
+ <xsl:call-template name="display-align"/>
2190
1748
  <fo:block>
2191
1749
  <xsl:apply-templates/>
2192
1750
  </fo:block>
2193
1751
  </fo:table-cell>
1752
+ </xsl:template><xsl:template name="display-align">
1753
+ <xsl:if test="@valign">
1754
+ <xsl:attribute name="display-align">
1755
+ <xsl:choose>
1756
+ <xsl:when test="@valign = 'top'">before</xsl:when>
1757
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
1758
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
1759
+ <xsl:otherwise>before</xsl:otherwise>
1760
+ </xsl:choose>
1761
+ </xsl:attribute>
1762
+ </xsl:if>
2194
1763
  </xsl:template><xsl:template match="*[local-name()='td']">
2195
1764
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1765
+ <xsl:attribute name="text-align">
1766
+ <xsl:choose>
1767
+ <xsl:when test="@align">
1768
+ <xsl:value-of select="@align"/>
1769
+ </xsl:when>
1770
+ <xsl:otherwise>left</xsl:otherwise>
1771
+ </xsl:choose>
1772
+ </xsl:attribute>
2196
1773
 
2197
1774
 
2198
1775
 
1776
+
2199
1777
 
2200
1778
 
2201
1779
 
@@ -2212,24 +1790,12 @@
2212
1790
  <xsl:value-of select="@rowspan"/>
2213
1791
  </xsl:attribute>
2214
1792
  </xsl:if>
2215
- <fo:block>
2216
-
1793
+ <xsl:call-template name="display-align"/>
1794
+ <fo:block>
2217
1795
  <xsl:apply-templates/>
2218
- </fo:block>
2219
- <!-- <xsl:choose>
2220
- <xsl:when test="count(*) = 1 and *[local-name() = 'p']">
2221
- <xsl:apply-templates />
2222
- </xsl:when>
2223
- <xsl:otherwise>
2224
- <fo:block>
2225
- <xsl:apply-templates />
2226
- </fo:block>
2227
- </xsl:otherwise>
2228
- </xsl:choose> -->
2229
-
2230
-
1796
+ </fo:block>
2231
1797
  </fo:table-cell>
2232
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
1798
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2233
1799
 
2234
1800
 
2235
1801
  <fo:block font-size="10pt" margin-bottom="12pt">
@@ -2241,26 +1807,14 @@
2241
1807
 
2242
1808
 
2243
1809
 
2244
- <xsl:variable name="title-note">
2245
- <xsl:call-template name="getTitle">
2246
- <xsl:with-param name="name" select="'title-note'"/>
2247
- </xsl:call-template>
2248
- </xsl:variable>
2249
- <xsl:value-of select="$title-note"/>
2250
-
2251
- <xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
2252
- <xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) &gt; 1">
2253
- <xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
2254
- </xsl:if>
1810
+
1811
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2255
1812
 
2256
-
2257
-
2258
-
2259
1813
  </fo:inline>
2260
1814
  <xsl:apply-templates mode="process"/>
2261
1815
  </fo:block>
2262
1816
 
2263
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1817
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2264
1818
  <xsl:apply-templates/>
2265
1819
  </xsl:template><xsl:template name="fn_display">
2266
1820
  <xsl:variable name="references">
@@ -2320,7 +1874,7 @@
2320
1874
  <!-- and (not(@class) or @class !='pseudocode') -->
2321
1875
  </xsl:variable>
2322
1876
  <xsl:variable name="references">
2323
- <xsl:for-each select=".//*[local-name()='fn']">
1877
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2324
1878
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2325
1879
  <xsl:apply-templates/>
2326
1880
  </fn>
@@ -2414,6 +1968,7 @@
2414
1968
 
2415
1969
 
2416
1970
 
1971
+
2417
1972
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2418
1973
 
2419
1974
  <xsl:value-of select="@reference"/>
@@ -2424,115 +1979,129 @@
2424
1979
  <xsl:apply-templates/>
2425
1980
  </fo:inline>
2426
1981
  </xsl:template><xsl:template match="*[local-name()='dl']">
2427
- <xsl:variable name="parent" select="local-name(..)"/>
2428
-
2429
- <xsl:variable name="key_iso">
2430
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
2431
- </xsl:variable>
2432
-
2433
- <xsl:choose>
2434
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2435
-
2436
-
2437
- <fo:block margin-bottom="12pt" text-align="left">
2438
-
2439
- <xsl:variable name="title-where">
2440
- <xsl:call-template name="getTitle">
2441
- <xsl:with-param name="name" select="'title-where'"/>
2442
- </xsl:call-template>
2443
- </xsl:variable>
2444
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2445
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2446
- <xsl:text/>
2447
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2448
- </fo:block>
2449
-
2450
- </xsl:when>
2451
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2452
- <fo:block margin-bottom="12pt" text-align="left">
2453
-
2454
-
2455
-
2456
-
2457
- <xsl:variable name="title-where">
2458
- <xsl:call-template name="getTitle">
2459
- <xsl:with-param name="name" select="'title-where'"/>
2460
- </xsl:call-template>
2461
- </xsl:variable>
2462
- <xsl:value-of select="$title-where"/>
2463
- </fo:block>
2464
- </xsl:when>
2465
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2466
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2467
-
2468
-
2469
-
2470
- <xsl:variable name="title-key">
2471
- <xsl:call-template name="getTitle">
2472
- <xsl:with-param name="name" select="'title-key'"/>
2473
- </xsl:call-template>
2474
- </xsl:variable>
2475
- <xsl:value-of select="$title-key"/>
2476
- </fo:block>
2477
- </xsl:when>
2478
- </xsl:choose>
2479
-
2480
- <!-- a few components -->
2481
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2482
- <fo:block>
1982
+ <fo:block-container margin-left="0mm">
1983
+ <xsl:if test="parent::*[local-name() = 'note']">
1984
+ <xsl:attribute name="margin-left">
1985
+ <xsl:choose>
1986
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
1987
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
1988
+ </xsl:choose>
1989
+ </xsl:attribute>
2483
1990
 
1991
+ </xsl:if>
1992
+ <fo:block-container margin-left="0mm">
1993
+
1994
+ <xsl:variable name="parent" select="local-name(..)"/>
2484
1995
 
1996
+ <xsl:variable name="key_iso">
1997
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
1998
+ </xsl:variable>
2485
1999
 
2000
+ <xsl:choose>
2001
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2002
+
2003
+
2004
+ <fo:block margin-bottom="12pt" text-align="left">
2005
+
2006
+ <xsl:variable name="title-where">
2007
+ <xsl:call-template name="getTitle">
2008
+ <xsl:with-param name="name" select="'title-where'"/>
2009
+ </xsl:call-template>
2010
+ </xsl:variable>
2011
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2012
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2013
+ <xsl:text/>
2014
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2015
+ </fo:block>
2016
+
2017
+ </xsl:when>
2018
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2019
+ <fo:block margin-bottom="12pt" text-align="left">
2020
+
2021
+
2022
+
2023
+
2024
+ <xsl:variable name="title-where">
2025
+ <xsl:call-template name="getTitle">
2026
+ <xsl:with-param name="name" select="'title-where'"/>
2027
+ </xsl:call-template>
2028
+ </xsl:variable>
2029
+ <xsl:value-of select="$title-where"/>
2030
+ </fo:block>
2031
+ </xsl:when>
2032
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2033
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2034
+
2035
+
2036
+
2037
+ <xsl:variable name="title-key">
2038
+ <xsl:call-template name="getTitle">
2039
+ <xsl:with-param name="name" select="'title-key'"/>
2040
+ </xsl:call-template>
2041
+ </xsl:variable>
2042
+ <xsl:value-of select="$title-key"/>
2043
+ </fo:block>
2044
+ </xsl:when>
2045
+ </xsl:choose>
2486
2046
 
2487
- <fo:block>
2488
-
2489
-
2490
-
2491
-
2492
- <fo:table width="95%" table-layout="fixed">
2047
+ <!-- a few components -->
2048
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2049
+ <fo:block>
2493
2050
 
2494
- <xsl:choose>
2495
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2496
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2497
- </xsl:when>
2498
- <xsl:when test="normalize-space($key_iso) = 'true'">
2499
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2051
+
2052
+
2053
+
2054
+ <fo:block>
2055
+
2056
+
2057
+
2058
+
2059
+ <fo:table width="95%" table-layout="fixed">
2500
2060
 
2501
- </xsl:when>
2502
- </xsl:choose>
2503
- <!-- create virtual html table for dl/[dt and dd] -->
2504
- <xsl:variable name="html-table">
2505
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2506
- <xsl:element name="{$ns}:table">
2507
- <tbody>
2508
- <xsl:apply-templates mode="dl"/>
2509
- </tbody>
2510
- </xsl:element>
2511
- </xsl:variable>
2512
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2513
- <xsl:variable name="colwidths">
2514
- <xsl:call-template name="calculate-column-widths">
2515
- <xsl:with-param name="cols-count" select="2"/>
2516
- <xsl:with-param name="table" select="$html-table"/>
2517
- </xsl:call-template>
2518
- </xsl:variable>
2519
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2520
- <xsl:variable name="maxlength_dt">
2521
- <xsl:call-template name="getMaxLength_dt"/>
2522
- </xsl:variable>
2523
- <xsl:call-template name="setColumnWidth_dl">
2524
- <xsl:with-param name="colwidths" select="$colwidths"/>
2525
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2526
- </xsl:call-template>
2527
- <fo:table-body>
2528
- <xsl:apply-templates>
2529
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2530
- </xsl:apply-templates>
2531
- </fo:table-body>
2532
- </fo:table>
2533
- </fo:block>
2534
- </fo:block>
2535
- </xsl:if>
2061
+ <xsl:choose>
2062
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2063
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2064
+ </xsl:when>
2065
+ <xsl:when test="normalize-space($key_iso) = 'true'">
2066
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2067
+
2068
+ </xsl:when>
2069
+ </xsl:choose>
2070
+ <!-- create virtual html table for dl/[dt and dd] -->
2071
+ <xsl:variable name="html-table">
2072
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2073
+ <xsl:element name="{$ns}:table">
2074
+ <tbody>
2075
+ <xsl:apply-templates mode="dl"/>
2076
+ </tbody>
2077
+ </xsl:element>
2078
+ </xsl:variable>
2079
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2080
+ <xsl:variable name="colwidths">
2081
+ <xsl:call-template name="calculate-column-widths">
2082
+ <xsl:with-param name="cols-count" select="2"/>
2083
+ <xsl:with-param name="table" select="$html-table"/>
2084
+ </xsl:call-template>
2085
+ </xsl:variable>
2086
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2087
+ <xsl:variable name="maxlength_dt">
2088
+ <xsl:call-template name="getMaxLength_dt"/>
2089
+ </xsl:variable>
2090
+ <xsl:call-template name="setColumnWidth_dl">
2091
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2092
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2093
+ </xsl:call-template>
2094
+ <fo:table-body>
2095
+ <xsl:apply-templates>
2096
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2097
+ </xsl:apply-templates>
2098
+ </fo:table-body>
2099
+ </fo:table>
2100
+ </fo:block>
2101
+ </fo:block>
2102
+ </xsl:if>
2103
+ </fo:block-container>
2104
+ </fo:block-container>
2536
2105
  </xsl:template><xsl:template name="setColumnWidth_dl">
2537
2106
  <xsl:param name="colwidths"/>
2538
2107
  <xsl:param name="maxlength_dt"/>
@@ -2587,7 +2156,7 @@
2587
2156
  <xsl:value-of select="string-length(normalize-space(.))"/>
2588
2157
  </xsl:if>
2589
2158
  </xsl:for-each>
2590
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
2159
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2591
2160
  <xsl:param name="key_iso"/>
2592
2161
 
2593
2162
  <!-- <tr>
@@ -2603,12 +2172,7 @@
2603
2172
  <xsl:if test="normalize-space($key_iso) = 'true'">
2604
2173
  <xsl:attribute name="margin-top">0</xsl:attribute>
2605
2174
  </xsl:if>
2606
- <xsl:variable name="title-note">
2607
- <xsl:call-template name="getTitle">
2608
- <xsl:with-param name="name" select="'title-note'"/>
2609
- </xsl:call-template>
2610
- </xsl:variable>
2611
- <xsl:value-of select="$title-note"/>
2175
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2612
2176
  </fo:block>
2613
2177
  </fo:table-cell>
2614
2178
  <fo:table-cell>
@@ -2634,6 +2198,7 @@
2634
2198
  <xsl:param name="key_iso"/>
2635
2199
 
2636
2200
  <fo:table-row>
2201
+
2637
2202
  <fo:table-cell>
2638
2203
 
2639
2204
  <fo:block margin-top="6pt">
@@ -2659,14 +2224,36 @@
2659
2224
  <fo:table-cell>
2660
2225
  <fo:block>
2661
2226
 
2662
-
2227
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2228
+ <xsl:if test="local-name(*[1]) != 'stem'">
2229
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2230
+ </xsl:if>
2231
+ </xsl:if> -->
2663
2232
 
2664
2233
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2665
2234
 
2666
2235
  </fo:block>
2667
2236
  </fo:table-cell>
2668
2237
  </fo:table-row>
2669
-
2238
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2239
+ <xsl:if test="local-name(*[1]) = 'stem'">
2240
+ <fo:table-row>
2241
+ <fo:table-cell>
2242
+ <fo:block margin-top="6pt">
2243
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2244
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2245
+ </xsl:if>
2246
+ <xsl:text>&#xA0;</xsl:text>
2247
+ </fo:block>
2248
+ </fo:table-cell>
2249
+ <fo:table-cell>
2250
+ <fo:block>
2251
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2252
+ </fo:block>
2253
+ </fo:table-cell>
2254
+ </fo:table-row>
2255
+ </xsl:if>
2256
+ </xsl:if> -->
2670
2257
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2671
2258
  <xsl:apply-templates/>
2672
2259
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -2677,7 +2264,7 @@
2677
2264
  <fo:inline font-style="italic">
2678
2265
  <xsl:apply-templates/>
2679
2266
  </fo:inline>
2680
- </xsl:template><xsl:template match="*[local-name()='strong']">
2267
+ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2681
2268
  <fo:inline font-weight="bold">
2682
2269
  <xsl:apply-templates/>
2683
2270
  </fo:inline>
@@ -2690,7 +2277,37 @@
2690
2277
  <xsl:apply-templates/>
2691
2278
  </fo:inline>
2692
2279
  </xsl:template><xsl:template match="*[local-name()='tt']">
2693
- <fo:inline font-family="Courier" font-size="10pt">
2280
+ <fo:inline xsl:use-attribute-sets="tt-style">
2281
+ <xsl:variable name="_font-size">
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+
2289
+
2290
+ <xsl:choose>
2291
+ <xsl:when test="not(ancestor::*[local-name()='note'])">10</xsl:when>
2292
+ <xsl:otherwise>11</xsl:otherwise>
2293
+ </xsl:choose>
2294
+
2295
+
2296
+
2297
+
2298
+
2299
+
2300
+
2301
+ </xsl:variable>
2302
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2303
+ <xsl:if test="$font-size != ''">
2304
+ <xsl:attribute name="font-size">
2305
+ <xsl:choose>
2306
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2307
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2308
+ </xsl:choose>
2309
+ </xsl:attribute>
2310
+ </xsl:if>
2694
2311
  <xsl:apply-templates/>
2695
2312
  </fo:inline>
2696
2313
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2969,169 +2586,1198 @@
2969
2586
  </xsl:choose>
2970
2587
  </xsl:for-each>
2971
2588
  </xsl:variable>
2972
-
2973
- <xsl:variable name="newRow">
2974
- <xsl:copy>
2975
- <xsl:copy-of select="$currentRow/@*"/>
2976
- <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
2977
- </xsl:copy>
2589
+
2590
+ <xsl:variable name="newRow">
2591
+ <xsl:copy>
2592
+ <xsl:copy-of select="$currentRow/@*"/>
2593
+ <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
2594
+ </xsl:copy>
2595
+ </xsl:variable>
2596
+ <xsl:copy-of select="$newRow"/>
2597
+
2598
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
2599
+ <xsl:with-param name="previousRow" select="$newRow"/>
2600
+ </xsl:apply-templates>
2601
+ </xsl:template><xsl:template name="getLang">
2602
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2603
+ <xsl:choose>
2604
+ <xsl:when test="$language = 'English'">en</xsl:when>
2605
+ <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
2606
+ </xsl:choose>
2607
+ </xsl:template><xsl:template name="capitalizeWords">
2608
+ <xsl:param name="str"/>
2609
+ <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
2610
+ <xsl:choose>
2611
+ <xsl:when test="contains($str2, ' ')">
2612
+ <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
2613
+ <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
2614
+ <xsl:value-of select="substring($substr, 2)"/> -->
2615
+ <xsl:call-template name="capitalize">
2616
+ <xsl:with-param name="str" select="$substr"/>
2617
+ </xsl:call-template>
2618
+ <xsl:text> </xsl:text>
2619
+ <xsl:call-template name="capitalizeWords">
2620
+ <xsl:with-param name="str" select="substring-after($str2, ' ')"/>
2621
+ </xsl:call-template>
2622
+ </xsl:when>
2623
+ <xsl:otherwise>
2624
+ <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
2625
+ <xsl:value-of select="substring($str2, 2)"/> -->
2626
+ <xsl:call-template name="capitalize">
2627
+ <xsl:with-param name="str" select="$str2"/>
2628
+ </xsl:call-template>
2629
+ </xsl:otherwise>
2630
+ </xsl:choose>
2631
+ </xsl:template><xsl:template name="capitalize">
2632
+ <xsl:param name="str"/>
2633
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2634
+ <xsl:value-of select="substring($str, 2)"/>
2635
+ </xsl:template><xsl:template match="mathml:math">
2636
+ <fo:inline font-family="STIX2Math">
2637
+ <xsl:variable name="mathml">
2638
+ <xsl:apply-templates select="." mode="mathml"/>
2639
+ </xsl:variable>
2640
+ <fo:instream-foreign-object fox:alt-text="Math">
2641
+ <!-- <xsl:copy-of select="."/> -->
2642
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
2643
+ </fo:instream-foreign-object>
2644
+ </fo:inline>
2645
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
2646
+ <xsl:copy>
2647
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2648
+ </xsl:copy>
2649
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
2650
+ <xsl:copy>
2651
+ <!-- replace start and end spaces to non-break space -->
2652
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2653
+ </xsl:copy>
2654
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2655
+ <xsl:variable name="target">
2656
+ <xsl:choose>
2657
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2658
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2659
+ </xsl:when>
2660
+ <xsl:otherwise>
2661
+ <xsl:value-of select="normalize-space(@target)"/>
2662
+ </xsl:otherwise>
2663
+ </xsl:choose>
2664
+ </xsl:variable>
2665
+ <fo:inline xsl:use-attribute-sets="link-style">
2666
+ <xsl:choose>
2667
+ <xsl:when test="$target = ''">
2668
+ <xsl:apply-templates/>
2669
+ </xsl:when>
2670
+ <xsl:otherwise>
2671
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2672
+ <xsl:choose>
2673
+ <xsl:when test="normalize-space(.) = ''">
2674
+ <xsl:value-of select="$target"/>
2675
+ </xsl:when>
2676
+ <xsl:otherwise>
2677
+ <xsl:apply-templates/>
2678
+ </xsl:otherwise>
2679
+ </xsl:choose>
2680
+ </fo:basic-link>
2681
+ </xsl:otherwise>
2682
+ </xsl:choose>
2683
+ </fo:inline>
2684
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
2685
+ <fo:inline id="{@id}"/>
2686
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
2687
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2688
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2689
+ </fo:block>
2690
+ <xsl:apply-templates/>
2691
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2692
+ <fo:inline><xsl:apply-templates/></fo:inline>
2693
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
2694
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
2695
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2696
+ </fo:block>
2697
+ <xsl:apply-templates/>
2698
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
2699
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2700
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
2701
+ <xsl:variable name="annotation-id" select="@id"/>
2702
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2703
+ <fo:block id="{$annotation-id}" white-space="nowrap">
2704
+ <fo:inline>
2705
+ <xsl:apply-templates>
2706
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2707
+ </xsl:apply-templates>
2708
+ </fo:inline>
2709
+ </fo:block>
2710
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2711
+ <xsl:param name="callout"/>
2712
+ <fo:inline id="{@id}">
2713
+ <!-- for first p in annotation, put <x> -->
2714
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2715
+ <xsl:apply-templates/>
2716
+ </fo:inline>
2717
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
2718
+ <xsl:variable name="title-modified">
2719
+ <xsl:call-template name="getTitle">
2720
+ <xsl:with-param name="name" select="'title-modified'"/>
2721
+ </xsl:call-template>
2722
+ </xsl:variable>
2723
+ <xsl:choose>
2724
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2725
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
2726
+ </xsl:choose>
2727
+ <xsl:apply-templates/>
2728
+ </xsl:template><xsl:template match="*[local-name() = 'xref']">
2729
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2730
+
2731
+ <xsl:apply-templates/>
2732
+ </fo:basic-link>
2733
+ </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2734
+ <fo:block-container margin-left="0mm">
2735
+ <xsl:if test="parent::*[local-name() = 'note']">
2736
+ <xsl:attribute name="margin-left">
2737
+ <xsl:choose>
2738
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2739
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2740
+ </xsl:choose>
2741
+ </xsl:attribute>
2742
+
2743
+ </xsl:if>
2744
+ <fo:block-container margin-left="0mm">
2745
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2746
+ <xsl:apply-templates/>
2747
+ </fo:block>
2748
+ </fo:block-container>
2749
+ </fo:block-container>
2750
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2751
+ <fo:inline>
2752
+ <xsl:apply-templates/>
2753
+ </fo:inline>
2754
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
2755
+ <fo:inline>
2756
+ <xsl:apply-templates/>
2757
+ </fo:inline>
2758
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
2759
+ <xsl:if test="normalize-space() != ''">
2760
+ <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
2761
+ </xsl:if>
2762
+ </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
2763
+
2764
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
2765
+
2766
+
2767
+
2768
+
2769
+ <fo:block-container margin-left="0mm">
2770
+
2771
+
2772
+
2773
+
2774
+
2775
+
2776
+
2777
+
2778
+ <fo:block>
2779
+
2780
+
2781
+
2782
+
2783
+ <fo:inline xsl:use-attribute-sets="note-name-style">
2784
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2785
+ </fo:inline>
2786
+ <xsl:apply-templates/>
2787
+ </fo:block>
2788
+
2789
+
2790
+ </fo:block-container>
2791
+ </fo:block-container>
2792
+
2793
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
2794
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
2795
+ <xsl:choose>
2796
+ <xsl:when test="$num = 1">
2797
+ <fo:inline xsl:use-attribute-sets="note-p-style">
2798
+ <xsl:apply-templates/>
2799
+ </fo:inline>
2800
+ </xsl:when>
2801
+ <xsl:otherwise>
2802
+ <fo:block xsl:use-attribute-sets="note-p-style">
2803
+ <xsl:apply-templates/>
2804
+ </fo:block>
2805
+ </xsl:otherwise>
2806
+ </xsl:choose>
2807
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2808
+ <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2809
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
2810
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2811
+ </fo:inline>
2812
+ <xsl:apply-templates/>
2813
+ </fo:block>
2814
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
2815
+ <xsl:param name="sfx"/>
2816
+ <xsl:variable name="suffix">
2817
+ <xsl:choose>
2818
+ <xsl:when test="$sfx != ''">
2819
+ <xsl:value-of select="$sfx"/>
2820
+ </xsl:when>
2821
+ <xsl:otherwise>
2822
+
2823
+ <xsl:text>:</xsl:text>
2824
+
2825
+
2826
+ </xsl:otherwise>
2827
+ </xsl:choose>
2828
+ </xsl:variable>
2829
+ <xsl:if test="normalize-space() != ''">
2830
+ <xsl:apply-templates/>
2831
+ <xsl:value-of select="$suffix"/>
2832
+ </xsl:if>
2833
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
2834
+ <xsl:param name="sfx"/>
2835
+ <xsl:variable name="suffix">
2836
+ <xsl:choose>
2837
+ <xsl:when test="$sfx != ''">
2838
+ <xsl:value-of select="$sfx"/>
2839
+ </xsl:when>
2840
+ <xsl:otherwise>
2841
+
2842
+
2843
+ </xsl:otherwise>
2844
+ </xsl:choose>
2845
+ </xsl:variable>
2846
+ <xsl:if test="normalize-space() != ''">
2847
+ <xsl:apply-templates/>
2848
+ <xsl:value-of select="$suffix"/>
2849
+ </xsl:if>
2850
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
2851
+ <fo:inline><xsl:apply-templates/></fo:inline>
2852
+ </xsl:template><xsl:template match="*[local-name() = 'terms']">
2853
+ <fo:block id="{@id}">
2854
+ <xsl:apply-templates/>
2855
+ </fo:block>
2856
+ </xsl:template><xsl:template match="*[local-name() = 'term']">
2857
+ <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
2858
+
2859
+
2860
+ <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
2861
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
2862
+ </fo:block>
2863
+
2864
+
2865
+ <xsl:apply-templates/>
2866
+ </fo:block>
2867
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
2868
+ <xsl:if test="normalize-space() != ''">
2869
+ <fo:inline>
2870
+ <xsl:apply-templates/>
2871
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
2872
+ <xsl:text>.</xsl:text>
2873
+ </xsl:if> -->
2874
+ </fo:inline>
2875
+ </xsl:if>
2876
+ </xsl:template><xsl:template match="*[local-name() = 'figure']">
2877
+ <fo:block-container id="{@id}">
2878
+ <fo:block>
2879
+ <xsl:apply-templates/>
2880
+ </fo:block>
2881
+ <xsl:call-template name="fn_display_figure"/>
2882
+ <xsl:for-each select="*[local-name() = 'note']">
2883
+ <xsl:call-template name="note"/>
2884
+ </xsl:for-each>
2885
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2886
+ </fo:block-container>
2887
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
2888
+ <fo:block id="{@id}">
2889
+ <xsl:apply-templates/>
2890
+ </fo:block>
2891
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
2892
+ <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
2893
+ <xsl:apply-templates/>
2894
+ </fo:block>
2895
+ </xsl:template><xsl:template match="*[local-name() = 'image']">
2896
+ <fo:block xsl:use-attribute-sets="image-style">
2897
+
2898
+
2899
+ <xsl:variable name="src">
2900
+ <xsl:choose>
2901
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
2902
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
2903
+ </xsl:when>
2904
+ <xsl:otherwise>
2905
+ <xsl:value-of select="@src"/>
2906
+ </xsl:otherwise>
2907
+ </xsl:choose>
2908
+ </xsl:variable>
2909
+
2910
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
2911
+ </fo:block>
2912
+ </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">
2913
+ <xsl:apply-templates mode="contents"/>
2914
+ <xsl:text> </xsl:text>
2915
+ </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">
2916
+ <xsl:apply-templates mode="bookmarks"/>
2917
+ <xsl:text> </xsl:text>
2918
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
2919
+ <xsl:value-of select="."/>
2920
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
2921
+ <xsl:value-of select="."/>
2922
+ </xsl:template><xsl:template match="node()" mode="contents">
2923
+ <xsl:apply-templates mode="contents"/>
2924
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
2925
+ <xsl:apply-templates mode="bookmarks"/>
2926
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
2927
+ <xsl:apply-templates select="."/>
2928
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
2929
+ <xsl:apply-templates mode="bookmarks"/>
2930
+ </xsl:template><xsl:template name="addBookmarks">
2931
+ <xsl:param name="contents"/>
2932
+ <xsl:if test="xalan:nodeset($contents)//item">
2933
+ <fo:bookmark-tree>
2934
+ <xsl:choose>
2935
+ <xsl:when test="xalan:nodeset($contents)/doc">
2936
+ <xsl:choose>
2937
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
2938
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
2939
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
2940
+ <fo:bookmark-title>
2941
+ <xsl:variable name="bookmark-title_">
2942
+ <xsl:choose>
2943
+ <xsl:when test="@lang = 'en'">
2944
+
2945
+
2946
+ </xsl:when>
2947
+ <xsl:when test="@lang = 'fr'">
2948
+
2949
+
2950
+ </xsl:when>
2951
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
2952
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
2953
+ </xsl:choose>
2954
+ </xsl:variable>
2955
+ <xsl:choose>
2956
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
2957
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
2958
+ </xsl:when>
2959
+ <xsl:otherwise>
2960
+ <xsl:choose>
2961
+ <xsl:when test="@lang = 'en'">English</xsl:when>
2962
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
2963
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
2964
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
2965
+ </xsl:choose>
2966
+ </xsl:otherwise>
2967
+ </xsl:choose>
2968
+ </fo:bookmark-title>
2969
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
2970
+ </fo:bookmark>
2971
+
2972
+ </xsl:for-each>
2973
+ </xsl:when>
2974
+ <xsl:otherwise>
2975
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
2976
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
2977
+ </xsl:for-each>
2978
+ </xsl:otherwise>
2979
+ </xsl:choose>
2980
+ </xsl:when>
2981
+ <xsl:otherwise>
2982
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
2983
+ </xsl:otherwise>
2984
+ </xsl:choose>
2985
+
2986
+
2987
+
2988
+
2989
+
2990
+
2991
+
2992
+
2993
+ </fo:bookmark-tree>
2994
+ </xsl:if>
2995
+ </xsl:template><xsl:template match="item" mode="bookmark">
2996
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
2997
+ <fo:bookmark-title>
2998
+ <xsl:if test="@section != ''">
2999
+ <xsl:value-of select="@section"/>
3000
+ <xsl:text> </xsl:text>
3001
+ </xsl:if>
3002
+ <xsl:value-of select="normalize-space(title)"/>
3003
+ </fo:bookmark-title>
3004
+ <xsl:apply-templates mode="bookmark"/>
3005
+ </fo:bookmark>
3006
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3007
+ <xsl:if test="normalize-space() != ''">
3008
+ <fo:block xsl:use-attribute-sets="figure-name-style">
3009
+
3010
+ <xsl:apply-templates/>
3011
+ </fo:block>
3012
+ </xsl:if>
3013
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
3014
+ <xsl:apply-templates mode="contents_item"/>
3015
+ <!-- <xsl:text> </xsl:text> -->
3016
+ </xsl:template><xsl:template name="getSection">
3017
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3018
+ </xsl:template><xsl:template name="getName">
3019
+ <xsl:choose>
3020
+ <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
3021
+ <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
3022
+ </xsl:when>
3023
+ <xsl:otherwise>
3024
+ <xsl:copy-of select="*[local-name() = 'title']/node()"/>
3025
+ </xsl:otherwise>
3026
+ </xsl:choose>
3027
+ </xsl:template><xsl:template name="insertTitleAsListItem">
3028
+ <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
3029
+ <xsl:variable name="section">
3030
+ <xsl:for-each select="..">
3031
+ <xsl:call-template name="getSection"/>
3032
+ </xsl:for-each>
3033
+ </xsl:variable>
3034
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
3035
+ <fo:list-item>
3036
+ <fo:list-item-label end-indent="label-end()">
3037
+ <fo:block>
3038
+ <xsl:value-of select="$section"/>
3039
+ </fo:block>
3040
+ </fo:list-item-label>
3041
+ <fo:list-item-body start-indent="body-start()">
3042
+ <fo:block>
3043
+ <xsl:choose>
3044
+ <xsl:when test="*[local-name() = 'tab']">
3045
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
3046
+ </xsl:when>
3047
+ <xsl:otherwise>
3048
+ <xsl:apply-templates/>
3049
+ </xsl:otherwise>
3050
+ </xsl:choose>
3051
+ </fo:block>
3052
+ </fo:list-item-body>
3053
+ </fo:list-item>
3054
+ </fo:list-block>
3055
+ </xsl:template><xsl:template name="extractTitle">
3056
+ <xsl:choose>
3057
+ <xsl:when test="*[local-name() = 'tab']">
3058
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
3059
+ </xsl:when>
3060
+ <xsl:otherwise>
3061
+ <xsl:apply-templates/>
3062
+ </xsl:otherwise>
3063
+ </xsl:choose>
3064
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3065
+ <xsl:text> </xsl:text>
3066
+ </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3067
+ <xsl:copy>
3068
+ <xsl:apply-templates mode="contents_item"/>
3069
+ </xsl:copy>
3070
+ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3071
+ <xsl:text> </xsl:text>
3072
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3073
+
3074
+ <fo:block-container margin-left="0mm">
3075
+ <xsl:if test="parent::*[local-name() = 'note']">
3076
+ <xsl:attribute name="margin-left">
3077
+ <xsl:choose>
3078
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3079
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3080
+ </xsl:choose>
3081
+ </xsl:attribute>
3082
+
3083
+ </xsl:if>
3084
+ <fo:block-container margin-left="0mm">
3085
+
3086
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3087
+ <xsl:variable name="_font-size">
3088
+
3089
+
3090
+
3091
+
3092
+
3093
+
3094
+
3095
+
3096
+
3097
+
3098
+
3099
+
3100
+
3101
+
3102
+ </xsl:variable>
3103
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3104
+ <xsl:if test="$font-size != ''">
3105
+ <xsl:attribute name="font-size">
3106
+ <xsl:choose>
3107
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3108
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3109
+ </xsl:choose>
3110
+ </xsl:attribute>
3111
+ </xsl:if>
3112
+ <xsl:apply-templates/>
3113
+ </fo:block>
3114
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3115
+
3116
+ </fo:block-container>
3117
+ </fo:block-container>
3118
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
3119
+ <xsl:variable name="text">
3120
+ <xsl:call-template name="add-zero-spaces-equal"/>
3121
+ </xsl:variable>
3122
+ <xsl:call-template name="add-zero-spaces-java">
3123
+ <xsl:with-param name="text" select="$text"/>
3124
+ </xsl:call-template>
3125
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3126
+ <xsl:if test="normalize-space() != ''">
3127
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3128
+ <xsl:apply-templates/>
3129
+ </fo:block>
3130
+ </xsl:if>
3131
+ </xsl:template><xsl:template match="*[local-name() = 'permission']">
3132
+ <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3133
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3134
+ <xsl:apply-templates/>
3135
+ </fo:block>
3136
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
3137
+ <xsl:if test="normalize-space() != ''">
3138
+ <fo:block xsl:use-attribute-sets="permission-name-style">
3139
+ <xsl:apply-templates/>
3140
+
3141
+ </fo:block>
3142
+ </xsl:if>
3143
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
3144
+ <fo:block xsl:use-attribute-sets="permission-label-style">
3145
+ <xsl:apply-templates/>
3146
+ </fo:block>
3147
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']">
3148
+ <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3149
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3150
+ <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
3151
+ <xsl:apply-templates select="@obligation" mode="presentation"/>
3152
+ <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
3153
+ <xsl:apply-templates/>
3154
+ </fo:block>
3155
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
3156
+ <xsl:if test="normalize-space() != ''">
3157
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
3158
+
3159
+ <xsl:apply-templates/>
3160
+
3161
+ </fo:block>
3162
+ </xsl:if>
3163
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
3164
+ <fo:block xsl:use-attribute-sets="requirement-label-style">
3165
+ <xsl:apply-templates/>
3166
+ </fo:block>
3167
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
3168
+ <fo:block>
3169
+ <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
3170
+ </fo:block>
3171
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
3172
+ <fo:block xsl:use-attribute-sets="requirement-subject-style">
3173
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
3174
+ </fo:block>
3175
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
3176
+ <fo:block xsl:use-attribute-sets="requirement-inherit-style">
3177
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
3178
+ </fo:block>
3179
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
3180
+ <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3181
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3182
+ <xsl:apply-templates/>
3183
+ </fo:block>
3184
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
3185
+ <xsl:if test="normalize-space() != ''">
3186
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
3187
+ <xsl:apply-templates/>
3188
+
3189
+ </fo:block>
3190
+ </xsl:if>
3191
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
3192
+ <fo:block xsl:use-attribute-sets="recommendation-label-style">
3193
+ <xsl:apply-templates/>
3194
+ </fo:block>
3195
+ </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3196
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3197
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3198
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3199
+ </xsl:if>
3200
+ <fo:block-container margin-left="0mm" margin-right="0mm">
3201
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
3202
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3203
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
3204
+ </xsl:if>
3205
+ <xsl:variable name="simple-table">
3206
+ <xsl:call-template name="getSimpleTable"/>
3207
+ </xsl:variable>
3208
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3209
+ <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3210
+ <!-- <fo:table-column column-width="35mm"/>
3211
+ <fo:table-column column-width="115mm"/> -->
3212
+ <fo:table-column column-width="30%"/>
3213
+ <fo:table-column column-width="70%"/>
3214
+ </xsl:if>
3215
+ <xsl:apply-templates mode="requirement"/>
3216
+ </fo:table>
3217
+ <!-- fn processing -->
3218
+ <xsl:if test=".//*[local-name() = 'fn']">
3219
+ <xsl:for-each select="*[local-name() = 'tbody']">
3220
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3221
+ <xsl:call-template name="fn_display"/>
3222
+ </fo:block>
3223
+ </xsl:for-each>
3224
+ </xsl:if>
3225
+ </fo:block-container>
3226
+ </fo:block-container>
3227
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
3228
+ <fo:table-header>
3229
+ <xsl:apply-templates mode="requirement"/>
3230
+ </fo:table-header>
3231
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
3232
+ <fo:table-body>
3233
+ <xsl:apply-templates mode="requirement"/>
3234
+ </fo:table-body>
3235
+ </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3236
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3237
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3238
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3239
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3240
+ </xsl:if>
3241
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3242
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3243
+ </xsl:if>
3244
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3245
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
3246
+ </xsl:if>
3247
+ <xsl:apply-templates mode="requirement"/>
3248
+ </fo:table-row>
3249
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3250
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3251
+ <xsl:attribute name="text-align">
3252
+ <xsl:choose>
3253
+ <xsl:when test="@align">
3254
+ <xsl:value-of select="@align"/>
3255
+ </xsl:when>
3256
+ <xsl:otherwise>left</xsl:otherwise>
3257
+ </xsl:choose>
3258
+ </xsl:attribute>
3259
+ <xsl:if test="@colspan">
3260
+ <xsl:attribute name="number-columns-spanned">
3261
+ <xsl:value-of select="@colspan"/>
3262
+ </xsl:attribute>
3263
+ </xsl:if>
3264
+ <xsl:if test="@rowspan">
3265
+ <xsl:attribute name="number-rows-spanned">
3266
+ <xsl:value-of select="@rowspan"/>
3267
+ </xsl:attribute>
3268
+ </xsl:if>
3269
+ <xsl:call-template name="display-align"/>
3270
+
3271
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3272
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3273
+ <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3274
+ </xsl:if>
3275
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3276
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3277
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3278
+ </xsl:if> -->
3279
+
3280
+ <fo:block>
3281
+ <xsl:apply-templates/>
3282
+ </fo:block>
3283
+ </fo:table-cell>
3284
+ </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3285
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3286
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3287
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3288
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3289
+ </xsl:if>
3290
+ <xsl:attribute name="text-align">
3291
+ <xsl:choose>
3292
+ <xsl:when test="@align">
3293
+ <xsl:value-of select="@align"/>
3294
+ </xsl:when>
3295
+ <xsl:otherwise>left</xsl:otherwise>
3296
+ </xsl:choose>
3297
+ </xsl:attribute>
3298
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3299
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3300
+ </xsl:if>
3301
+ <xsl:if test="@colspan">
3302
+ <xsl:attribute name="number-columns-spanned">
3303
+ <xsl:value-of select="@colspan"/>
3304
+ </xsl:attribute>
3305
+ </xsl:if>
3306
+ <xsl:if test="@rowspan">
3307
+ <xsl:attribute name="number-rows-spanned">
3308
+ <xsl:value-of select="@rowspan"/>
3309
+ </xsl:attribute>
3310
+ </xsl:if>
3311
+ <xsl:call-template name="display-align"/>
3312
+
3313
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3314
+ <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3315
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3316
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3317
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3318
+ </xsl:if>
3319
+ </xsl:if> -->
3320
+ <!-- 2nd line and below -->
3321
+
3322
+ <fo:block>
3323
+ <xsl:apply-templates/>
3324
+ </fo:block>
3325
+ </fo:table-cell>
3326
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3327
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3328
+ <xsl:apply-templates/>
3329
+ </fo:block>
3330
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3331
+ <fo:block> <!-- margin-bottom="10pt" -->
3332
+ <xsl:apply-templates/>
3333
+ </fo:block>
3334
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']">
3335
+ <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
3336
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3337
+ <xsl:apply-templates/>
3338
+ </fo:block>
3339
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
3340
+ <xsl:if test="normalize-space() != ''">
3341
+ <fo:inline xsl:use-attribute-sets="termexample-name-style">
3342
+ <xsl:apply-templates/>
3343
+ </fo:inline>
3344
+ </xsl:if>
3345
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
3346
+ <fo:inline><xsl:apply-templates/></fo:inline>
3347
+ </xsl:template><xsl:template match="*[local-name() = 'example']">
3348
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
3349
+
3350
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3351
+
3352
+ <xsl:variable name="element">
3353
+
3354
+ inline
3355
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3356
+ </xsl:variable>
3357
+
3358
+ <xsl:choose>
3359
+ <xsl:when test="contains(normalize-space($element), 'block')">
3360
+ <fo:block xsl:use-attribute-sets="example-body-style">
3361
+ <xsl:apply-templates/>
3362
+ </fo:block>
3363
+ </xsl:when>
3364
+ <xsl:otherwise>
3365
+ <fo:inline>
3366
+ <xsl:apply-templates/>
3367
+ </fo:inline>
3368
+ </xsl:otherwise>
3369
+ </xsl:choose>
3370
+
3371
+ </fo:block>
3372
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
3373
+
3374
+ <xsl:variable name="element">
3375
+
3376
+ inline
3377
+ </xsl:variable>
3378
+ <xsl:choose>
3379
+ <xsl:when test="ancestor::*[local-name() = 'appendix']">
3380
+ <fo:inline>
3381
+ <xsl:apply-templates/>
3382
+ </fo:inline>
3383
+ </xsl:when>
3384
+ <xsl:when test="normalize-space($element) = 'block'">
3385
+ <fo:block xsl:use-attribute-sets="example-name-style">
3386
+ <xsl:apply-templates/>
3387
+ </fo:block>
3388
+ </xsl:when>
3389
+ <xsl:otherwise>
3390
+ <fo:inline xsl:use-attribute-sets="example-name-style">
3391
+ <xsl:apply-templates/>
3392
+ </fo:inline>
3393
+ </xsl:otherwise>
3394
+ </xsl:choose>
3395
+
3396
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3397
+
3398
+ <xsl:variable name="element">
3399
+ block
3400
+
3401
+ </xsl:variable>
3402
+ <xsl:choose>
3403
+ <xsl:when test="normalize-space($element) = 'block'">
3404
+ <fo:block xsl:use-attribute-sets="example-p-style">
3405
+
3406
+ <xsl:apply-templates/>
3407
+ </fo:block>
3408
+ </xsl:when>
3409
+ <xsl:otherwise>
3410
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3411
+ <xsl:apply-templates/>
3412
+ </fo:inline>
3413
+ </xsl:otherwise>
3414
+ </xsl:choose>
3415
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3416
+ <fo:block xsl:use-attribute-sets="termsource-style">
3417
+ <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3418
+ <xsl:variable name="termsource_text">
3419
+ <xsl:apply-templates/>
3420
+ </xsl:variable>
3421
+
3422
+ <xsl:choose>
3423
+ <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3424
+ <xsl:apply-templates/>
3425
+ </xsl:when>
3426
+ <xsl:otherwise>
3427
+
3428
+ <xsl:text>[</xsl:text>
3429
+
3430
+ <xsl:apply-templates/>
3431
+
3432
+ <xsl:text>]</xsl:text>
3433
+
3434
+ </xsl:otherwise>
3435
+ </xsl:choose>
3436
+ </fo:block>
3437
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
3438
+ <xsl:if test="normalize-space() != ''">
3439
+ <xsl:value-of select="."/>
3440
+ </xsl:if>
3441
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
3442
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3443
+
3444
+ <fo:inline xsl:use-attribute-sets="origin-style">
3445
+ <xsl:apply-templates/>
3446
+ </fo:inline>
3447
+ </fo:basic-link>
3448
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
3449
+ <fo:inline><xsl:apply-templates/></fo:inline>
3450
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
3451
+ <xsl:if test="normalize-space() != ''">
3452
+ <xsl:value-of select="."/>
3453
+ </xsl:if>
3454
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3455
+ <fo:block-container margin-left="0mm">
3456
+ <xsl:if test="parent::*[local-name() = 'note']">
3457
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3458
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3459
+ </xsl:if>
3460
+ </xsl:if>
3461
+
3462
+ <fo:block-container margin-left="0mm">
3463
+
3464
+ <fo:block xsl:use-attribute-sets="quote-style">
3465
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3466
+ </fo:block>
3467
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3468
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3469
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3470
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3471
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3472
+ </fo:block>
3473
+ </xsl:if>
3474
+
3475
+ </fo:block-container>
3476
+ </fo:block-container>
3477
+ </xsl:template><xsl:template match="*[local-name() = 'source']">
3478
+ <xsl:if test="../*[local-name() = 'author']">
3479
+ <xsl:text>, </xsl:text>
3480
+ </xsl:if>
3481
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3482
+ <xsl:apply-templates/>
3483
+ </fo:basic-link>
3484
+ </xsl:template><xsl:template match="*[local-name() = 'author']">
3485
+ <xsl:text>— </xsl:text>
3486
+ <xsl:apply-templates/>
3487
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
3488
+ <fo:inline xsl:use-attribute-sets="eref-style">
3489
+ <xsl:if test="@type = 'footnote'">
3490
+
3491
+
3492
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3493
+ <xsl:attribute name="font-size">50%</xsl:attribute>
3494
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3495
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3496
+
3497
+ </xsl:if>
3498
+
3499
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3500
+
3501
+ <xsl:if test="@type = 'inline'">
3502
+
3503
+
3504
+
3505
+ </xsl:if>
3506
+
3507
+
3508
+ <xsl:apply-templates/>
3509
+ </fo:basic-link>
3510
+ </fo:inline>
3511
+ </xsl:template><xsl:template match="*[local-name() = 'tab']">
3512
+ <!-- zero-space char -->
3513
+ <xsl:variable name="depth">
3514
+ <xsl:call-template name="getLevel">
3515
+ <xsl:with-param name="depth" select="../@depth"/>
3516
+ </xsl:call-template>
3517
+ </xsl:variable>
3518
+
3519
+ <xsl:variable name="padding">
3520
+
3521
+
3522
+
3523
+
3524
+
3525
+
3526
+
3527
+
3528
+ <xsl:variable name="references_num_current">
3529
+ <xsl:number level="any" count="m3d:references"/>
3530
+ </xsl:variable>
3531
+ <xsl:choose>
3532
+ <xsl:when test="(ancestor-or-self::m3d:sections and $depth = 1) or (local-name(../..) = 'references' and $references_num_current = 1)">25</xsl:when>
3533
+ <xsl:when test="ancestor-or-self::m3d:sections or ancestor-or-self::m3d:annex">3</xsl:when>
3534
+ </xsl:choose>
3535
+
3536
+
3537
+
3538
+
3539
+
3540
+
3541
+
3542
+
3543
+
3544
+
3545
+
3546
+ </xsl:variable>
3547
+
3548
+ <xsl:variable name="padding-right">
3549
+ <xsl:choose>
3550
+ <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
3551
+ <xsl:otherwise>
3552
+ <xsl:value-of select="normalize-space($padding)"/>
3553
+ </xsl:otherwise>
3554
+ </xsl:choose>
2978
3555
  </xsl:variable>
2979
- <xsl:copy-of select="$newRow"/>
2980
-
2981
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
2982
- <xsl:with-param name="previousRow" select="$newRow"/>
2983
- </xsl:apply-templates>
2984
- </xsl:template><xsl:template name="getLang">
3556
+
2985
3557
  <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3558
+
2986
3559
  <xsl:choose>
2987
- <xsl:when test="$language = 'English'">en</xsl:when>
2988
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
2989
- </xsl:choose>
2990
- </xsl:template><xsl:template name="capitalizeWords">
2991
- <xsl:param name="str"/>
2992
- <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
2993
- <xsl:choose>
2994
- <xsl:when test="contains($str2, ' ')">
2995
- <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
2996
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
2997
- <xsl:value-of select="substring($substr, 2)"/> -->
2998
- <xsl:call-template name="capitalize">
2999
- <xsl:with-param name="str" select="$substr"/>
3000
- </xsl:call-template>
3001
- <xsl:text> </xsl:text>
3002
- <xsl:call-template name="capitalizeWords">
3003
- <xsl:with-param name="str" select="substring-after($str2, ' ')"/>
3004
- </xsl:call-template>
3560
+ <xsl:when test="$language = 'zh'">
3561
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
3562
+ </xsl:when>
3563
+ <xsl:when test="../../@inline-header = 'true'">
3564
+ <fo:inline font-size="90%">
3565
+ <xsl:call-template name="insertNonBreakSpaces">
3566
+ <xsl:with-param name="count" select="$padding-right"/>
3567
+ </xsl:call-template>
3568
+ </fo:inline>
3005
3569
  </xsl:when>
3006
3570
  <xsl:otherwise>
3007
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3008
- <xsl:value-of select="substring($str2, 2)"/> -->
3009
- <xsl:call-template name="capitalize">
3010
- <xsl:with-param name="str" select="$str2"/>
3011
- </xsl:call-template>
3571
+ <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
3012
3572
  </xsl:otherwise>
3013
3573
  </xsl:choose>
3014
- </xsl:template><xsl:template name="capitalize">
3015
- <xsl:param name="str"/>
3016
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
3017
- <xsl:value-of select="substring($str, 2)"/>
3018
- </xsl:template><xsl:template match="mathml:math">
3019
- <fo:inline font-family="STIX2Math">
3020
- <fo:instream-foreign-object fox:alt-text="Math">
3021
- <xsl:copy-of select="."/>
3022
- </fo:instream-foreign-object>
3023
- </fo:inline>
3024
- </xsl:template><xsl:template match="*[local-name()='localityStack']">
3025
- <xsl:for-each select="*[local-name()='locality']">
3026
- <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3027
- <xsl:apply-templates select="."/>
3028
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3029
- </xsl:for-each>
3030
- </xsl:template><xsl:template match="*[local-name()='link']" name="link">
3031
- <xsl:variable name="target">
3032
- <xsl:choose>
3033
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3034
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3035
- </xsl:when>
3036
- <xsl:otherwise>
3037
- <xsl:value-of select="normalize-space(@target)"/>
3038
- </xsl:otherwise>
3039
- </xsl:choose>
3040
- </xsl:variable>
3041
- <fo:inline xsl:use-attribute-sets="link-style">
3042
- <xsl:choose>
3043
- <xsl:when test="$target = ''">
3044
- <xsl:apply-templates/>
3045
- </xsl:when>
3046
- <xsl:otherwise>
3047
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3048
- <xsl:choose>
3049
- <xsl:when test="normalize-space(.) = ''">
3050
- <xsl:value-of select="$target"/>
3051
- </xsl:when>
3052
- <xsl:otherwise>
3053
- <xsl:apply-templates/>
3054
- </xsl:otherwise>
3055
- </xsl:choose>
3056
- </fo:basic-link>
3057
- </xsl:otherwise>
3058
- </xsl:choose>
3059
- </fo:inline>
3060
- </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3061
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3062
- <!-- <xsl:choose>
3063
- <xsl:when test="@lang = 'en'"></xsl:when>
3064
- <xsl:otherwise> -->
3065
- <xsl:attribute name="white-space">pre</xsl:attribute>
3066
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3067
- <!-- </xsl:otherwise>
3068
- </xsl:choose> -->
3574
+
3575
+ </xsl:template><xsl:template name="insertNonBreakSpaces">
3576
+ <xsl:param name="count"/>
3577
+ <xsl:if test="$count &gt; 0">
3578
+ <xsl:text> </xsl:text>
3579
+ <xsl:call-template name="insertNonBreakSpaces">
3580
+ <xsl:with-param name="count" select="$count - 1"/>
3581
+ </xsl:call-template>
3582
+ </xsl:if>
3583
+ </xsl:template><xsl:template match="*[local-name() = 'domain']">
3584
+ <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
3585
+ <xsl:text> </xsl:text>
3586
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']">
3587
+ <fo:block xsl:use-attribute-sets="admitted-style">
3069
3588
  <xsl:apply-templates/>
3070
3589
  </fo:block>
3071
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
3072
- <fo:inline id="{@id}"/>
3073
- </xsl:template><xsl:template match="*[local-name()='appendix']">
3074
- <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3075
- <xsl:variable name="title-appendix">
3076
- <xsl:call-template name="getTitle">
3077
- <xsl:with-param name="name" select="'title-appendix'"/>
3078
- </xsl:call-template>
3079
- </xsl:variable>
3080
- <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
3081
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3590
+ </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3591
+ <xsl:variable name="title-deprecated">
3592
+ <xsl:call-template name="getTitle">
3593
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3594
+ </xsl:call-template>
3595
+ </xsl:variable>
3596
+ <fo:block xsl:use-attribute-sets="deprecates-style">
3597
+ <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
3598
+ </fo:block>
3599
+ </xsl:template><xsl:template match="*[local-name() = 'definition']">
3600
+ <fo:block xsl:use-attribute-sets="definition-style">
3601
+ <xsl:apply-templates/>
3082
3602
  </fo:block>
3603
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
3083
3604
  <xsl:apply-templates/>
3084
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3085
- <fo:inline><xsl:apply-templates/></fo:inline>
3086
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
3087
- <fo:block xsl:use-attribute-sets="appendix-example-style">
3088
- <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
3089
- <xsl:variable name="title-example">
3090
- <xsl:call-template name="getTitle">
3091
- <xsl:with-param name="name" select="'title-example'"/>
3092
- </xsl:call-template>
3093
- </xsl:variable>
3094
- <xsl:value-of select="$title-example"/>
3095
- <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
3096
- <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
3605
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
3606
+ <fo:inline> <xsl:apply-templates/></fo:inline>
3607
+ <fo:block> </fo:block>
3608
+ </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
3609
+
3610
+ <fo:block break-after="page"/>
3611
+
3612
+ <fo:block>
3613
+ <xsl:call-template name="setId"/>
3614
+
3615
+
3616
+
3617
+
3618
+
3619
+ <xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
3620
+ <xsl:if test="$pos &gt;= 2">
3621
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
3097
3622
  </xsl:if>
3098
- <xsl:if test="*[local-name()='name']">
3099
- <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
3100
- </xsl:if>
3623
+
3624
+
3625
+
3626
+
3627
+
3628
+
3629
+ <xsl:apply-templates/>
3630
+ </fo:block>
3631
+
3632
+
3633
+
3634
+ </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3635
+ <fo:block break-after="page"/>
3636
+ <fo:block>
3637
+ <xsl:call-template name="setId"/>
3638
+ <xsl:apply-templates/>
3639
+ </fo:block>
3640
+ </xsl:template><xsl:template match="*[local-name() = 'clause']">
3641
+ <fo:block>
3642
+ <xsl:call-template name="setId"/>
3643
+ <xsl:apply-templates/>
3644
+ </fo:block>
3645
+ </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3646
+ <fo:block id="{@id}">
3647
+ <xsl:apply-templates/>
3648
+ </fo:block>
3649
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
3650
+
3651
+ <fo:block id="{@id}">
3652
+ <xsl:apply-templates/>
3653
+ </fo:block>
3654
+ </xsl:template><xsl:template match="*[local-name() = 'annex']">
3655
+ <fo:block break-after="page"/>
3656
+ <fo:block id="{@id}">
3657
+
3101
3658
  </fo:block>
3102
3659
  <xsl:apply-templates/>
3103
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
3104
- <fo:inline><xsl:apply-templates/></fo:inline>
3105
- </xsl:template><xsl:template match="*[local-name() = 'callout']">
3106
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3107
- </xsl:template><xsl:template match="*[local-name() = 'annotation']">
3108
- <xsl:variable name="annotation-id" select="@id"/>
3109
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3110
- <fo:block id="{$annotation-id}" white-space="nowrap">
3111
- <fo:inline>
3112
- <xsl:apply-templates>
3113
- <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
3114
- </xsl:apply-templates>
3115
- </fo:inline>
3116
- </fo:block>
3117
- </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
3118
- <xsl:param name="callout"/>
3119
- <fo:inline id="{@id}">
3120
- <!-- for first p in annotation, put <x> -->
3121
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3660
+ </xsl:template><xsl:template match="*[local-name() = 'review']">
3661
+ <!-- comment 2019-11-29 -->
3662
+ <!-- <fo:block font-weight="bold">Review:</fo:block>
3663
+ <xsl:apply-templates /> -->
3664
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3665
+ <!-- 0xA0 to space replacement -->
3666
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3667
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3668
+ <xsl:choose>
3669
+ <xsl:when test="parent::*[local-name() = 'note']">
3670
+ <fo:block-container>
3671
+ <xsl:attribute name="margin-left">
3672
+ <xsl:choose>
3673
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3674
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3675
+ </xsl:choose>
3676
+ </xsl:attribute>
3677
+
3678
+ <fo:block-container margin-left="0mm">
3679
+ <fo:block>
3680
+ <xsl:apply-templates select="." mode="ul_ol"/>
3681
+ </fo:block>
3682
+ </fo:block-container>
3683
+ </fo:block-container>
3684
+ </xsl:when>
3685
+ <xsl:otherwise>
3686
+ <fo:block>
3687
+ <xsl:apply-templates select="." mode="ul_ol"/>
3688
+ </fo:block>
3689
+ </xsl:otherwise>
3690
+ </xsl:choose>
3691
+ </xsl:template><xsl:template match="*[local-name() = 'errata']">
3692
+ <!-- <row>
3693
+ <date>05-07-2013</date>
3694
+ <type>Editorial</type>
3695
+ <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
3696
+ <pages>D-3</pages>
3697
+ </row>
3698
+ -->
3699
+ <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
3700
+ <fo:table-column column-width="20mm"/>
3701
+ <fo:table-column column-width="23mm"/>
3702
+ <fo:table-column column-width="107mm"/>
3703
+ <fo:table-column column-width="15mm"/>
3704
+ <fo:table-body>
3705
+ <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
3706
+ <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3707
+ <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3708
+ <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
3709
+ <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
3710
+ </fo:table-row>
3711
+ <xsl:apply-templates/>
3712
+ </fo:table-body>
3713
+ </fo:table>
3714
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
3715
+ <fo:table-row>
3122
3716
  <xsl:apply-templates/>
3123
- </fo:inline>
3124
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
3125
- <xsl:variable name="title-modified">
3126
- <xsl:call-template name="getTitle">
3127
- <xsl:with-param name="name" select="'title-modified'"/>
3128
- </xsl:call-template>
3129
- </xsl:variable>
3717
+ </fo:table-row>
3718
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
3719
+ <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3720
+ <fo:block><xsl:apply-templates/></fo:block>
3721
+ </fo:table-cell>
3722
+ </xsl:template><xsl:template name="processBibitem">
3723
+
3724
+
3725
+
3726
+
3727
+ </xsl:template><xsl:template name="processBibitemDocId">
3728
+ <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')]"/>
3130
3729
  <xsl:choose>
3131
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3132
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> </xsl:text></xsl:otherwise>
3730
+ <xsl:when test="normalize-space($_doc_ident) != ''">
3731
+ <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"/>
3732
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
3733
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3734
+ </xsl:if>
3735
+ <xsl:value-of select="$_doc_ident"/>
3736
+ </xsl:when>
3737
+ <xsl:otherwise>
3738
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
3739
+ <xsl:if test="$type != ''">
3740
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3741
+ </xsl:if>
3742
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
3743
+ </xsl:otherwise>
3133
3744
  </xsl:choose>
3134
- <xsl:apply-templates/>
3745
+ </xsl:template><xsl:template name="processPersonalAuthor">
3746
+ <xsl:choose>
3747
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3748
+ <author>
3749
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3750
+ </author>
3751
+ </xsl:when>
3752
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3753
+ <author>
3754
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3755
+ <xsl:text> </xsl:text>
3756
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3757
+ </author>
3758
+ </xsl:when>
3759
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3760
+ <author>
3761
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3762
+ <xsl:text> </xsl:text>
3763
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3764
+ </author>
3765
+ </xsl:when>
3766
+ <xsl:otherwise>
3767
+ <xsl:apply-templates/>
3768
+ </xsl:otherwise>
3769
+ </xsl:choose>
3770
+ </xsl:template><xsl:template name="renderDate">
3771
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3772
+ <xsl:value-of select="*[local-name() = 'on']"/>
3773
+ </xsl:if>
3774
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3775
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3776
+ </xsl:if>
3777
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3778
+ <xsl:value-of select="translate(.,'. ','')"/>
3779
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3780
+ <xsl:value-of select="substring(.,1,1)"/>
3135
3781
  </xsl:template><xsl:template name="convertDate">
3136
3782
  <xsl:param name="date"/>
3137
3783
  <xsl:param name="format" select="'short'"/>
@@ -3262,27 +3908,49 @@
3262
3908
  </xsl:otherwise>
3263
3909
  </xsl:choose>
3264
3910
  </xsl:template><xsl:template name="getLevel">
3265
- <xsl:variable name="level_total" select="count(ancestor::*)"/>
3266
- <xsl:variable name="level">
3267
- <xsl:choose>
3268
- <xsl:when test="ancestor::*[local-name() = 'preface']">
3269
- <xsl:value-of select="$level_total - 2"/>
3270
- </xsl:when>
3271
- <xsl:when test="ancestor::*[local-name() = 'sections']">
3272
- <xsl:value-of select="$level_total - 2"/>
3273
- </xsl:when>
3274
- <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3275
- <xsl:value-of select="$level_total - 2"/>
3276
- </xsl:when>
3277
- <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3278
- <xsl:otherwise>
3279
- <xsl:value-of select="$level_total - 1"/>
3280
- </xsl:otherwise>
3281
- </xsl:choose>
3282
- </xsl:variable>
3283
- <xsl:value-of select="$level"/>
3284
- </xsl:template><xsl:template name="getSubSection">
3285
- <xsl:number format=".1" level="multiple" count="*[local-name() = 'clause']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'terms'] | *[local-name() = 'terms']/*[local-name() = 'term'] | *[local-name() = 'clause']/*[local-name() = 'term'] | *[local-name() = 'terms']/*[local-name() = 'clause'] | *[local-name() = 'terms']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'definitions'] | *[local-name() = 'clause']/*[local-name() = 'references']"/>
3911
+ <xsl:param name="depth"/>
3912
+ <xsl:choose>
3913
+ <xsl:when test="normalize-space(@depth) != ''">
3914
+ <xsl:value-of select="@depth"/>
3915
+ </xsl:when>
3916
+ <xsl:when test="normalize-space($depth) != ''">
3917
+ <xsl:value-of select="$depth"/>
3918
+ </xsl:when>
3919
+ <xsl:otherwise>
3920
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
3921
+ <xsl:variable name="level">
3922
+ <xsl:choose>
3923
+ <xsl:when test="parent::*[local-name() = 'preface']">
3924
+ <xsl:value-of select="$level_total - 1"/>
3925
+ </xsl:when>
3926
+ <xsl:when test="ancestor::*[local-name() = 'preface']">
3927
+ <xsl:value-of select="$level_total - 2"/>
3928
+ </xsl:when>
3929
+ <!-- <xsl:when test="parent::*[local-name() = 'sections']">
3930
+ <xsl:value-of select="$level_total - 1"/>
3931
+ </xsl:when> -->
3932
+ <xsl:when test="ancestor::*[local-name() = 'sections']">
3933
+ <xsl:value-of select="$level_total - 1"/>
3934
+ </xsl:when>
3935
+ <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3936
+ <xsl:value-of select="$level_total - 1"/>
3937
+ </xsl:when>
3938
+ <xsl:when test="parent::*[local-name() = 'annex']">
3939
+ <xsl:value-of select="$level_total - 1"/>
3940
+ </xsl:when>
3941
+ <xsl:when test="ancestor::*[local-name() = 'annex']">
3942
+ <xsl:value-of select="$level_total"/>
3943
+ </xsl:when>
3944
+ <xsl:when test="local-name() = 'annex'">1</xsl:when>
3945
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3946
+ <xsl:otherwise>
3947
+ <xsl:value-of select="$level_total - 1"/>
3948
+ </xsl:otherwise>
3949
+ </xsl:choose>
3950
+ </xsl:variable>
3951
+ <xsl:value-of select="$level"/>
3952
+ </xsl:otherwise>
3953
+ </xsl:choose>
3286
3954
  </xsl:template><xsl:template name="split">
3287
3955
  <xsl:param name="pText" select="."/>
3288
3956
  <xsl:param name="sep" select="','"/>
@@ -3313,7 +3981,9 @@
3313
3981
  <xsl:value-of select="document('')//*/namespace::m3d"/>
3314
3982
 
3315
3983
 
3316
-
3984
+
3985
+
3986
+
3317
3987
  </xsl:variable>
3318
3988
  <xsl:if test="$documentNS != $XSLNS">
3319
3989
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -3328,4 +3998,32 @@
3328
3998
  <xsl:when test="$language = 'cn'">Chinese</xsl:when>
3329
3999
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3330
4000
  </xsl:choose>
4001
+ </xsl:template><xsl:template name="setId">
4002
+ <xsl:attribute name="id">
4003
+ <xsl:choose>
4004
+ <xsl:when test="@id">
4005
+ <xsl:value-of select="@id"/>
4006
+ </xsl:when>
4007
+ <xsl:otherwise>
4008
+ <xsl:value-of select="generate-id()"/>
4009
+ </xsl:otherwise>
4010
+ </xsl:choose>
4011
+ </xsl:attribute>
4012
+ </xsl:template><xsl:template name="add-letter-spacing">
4013
+ <xsl:param name="text"/>
4014
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4015
+ <xsl:if test="string-length($text) &gt; 0">
4016
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4017
+ <fo:inline padding-right="{$letter-spacing}mm">
4018
+ <xsl:if test="$char = '®'">
4019
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4020
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4021
+ </xsl:if>
4022
+ <xsl:value-of select="$char"/>
4023
+ </fo:inline>
4024
+ <xsl:call-template name="add-letter-spacing">
4025
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4026
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4027
+ </xsl:call-template>
4028
+ </xsl:if>
3331
4029
  </xsl:template></xsl:stylesheet>