metanorma-m3aawg 1.4.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1df43a25f1a7ad091a452c56839e94394a9483dc08ff0cd0129f1e8badca9d47
4
- data.tar.gz: 1a683e6ab44684a12ebc51b6c06a613103369047694bca57f21ed29ce4da3ec8
3
+ metadata.gz: 94c7b82480769b8de334650f945711c4db8c1487c569385493cd14b09c158e95
4
+ data.tar.gz: 4ed2f0a6757190d584b5bee3027d66c64b7780ebf077c59a8bc77bcb78d8fa67
5
5
  SHA512:
6
- metadata.gz: af4aafb5553e7d82b501f1b0ed87bd9355ea0e21cfd497e654a99fa7189d89f0368c5ab1be6ba0c54f68f8842b7795b84502a64227896f48faa25e4a56ff15a7
7
- data.tar.gz: b945ae401120b03be3c7a3f19b68636e97b0dd4836d5d515cfb038bc68f6c70da24ac2d7aa51a73c023ce826faa5f54fe263a8cfdb9a71b0d864ed3759c2fcd3
6
+ metadata.gz: 8537d1bbb48f69310f1f97472ff7d44ccc87cbb5f9425348e5dba8d60522171645371032528a2d058cb051e0556695e6fcecc3c755b14e20ade3a7b07e81f488
7
+ data.tar.gz: 14120e590dbab99118c4ad5def4030b5b5537aea4b5fc7bf067b35a23c95884c76803fde6fef29d7597d0708ed52d26f507833d89a7a16dec31dc83dd5587890
@@ -56,7 +56,7 @@ module Asciidoctor
56
56
  docstatus = node.attr("status")
57
57
  dn = node.attr("docnumber")
58
58
  if docstatus
59
- abbr = IsoDoc::M3AAWG::Metadata.new("en", "Latn", {}).
59
+ abbr = IsoDoc::M3AAWG::Metadata.new("en", "Latn", @i18n).
60
60
  stage_abbr(docstatus)
61
61
  dn = "#{dn}(#{abbr})" unless abbr.empty?
62
62
  end
@@ -922,6 +922,9 @@
922
922
  <optional>
923
923
  <attribute name="script"/>
924
924
  </optional>
925
+ <optional>
926
+ <attribute name="type"/>
927
+ </optional>
925
928
  <optional>
926
929
  <attribute name="obligation">
927
930
  <choice>
@@ -961,9 +964,6 @@
961
964
  </define>
962
965
  <define name="content-subsection">
963
966
  <element name="clause">
964
- <optional>
965
- <attribute name="type"/>
966
- </optional>
967
967
  <ref name="Content-Section"/>
968
968
  </element>
969
969
  </define>
@@ -992,6 +992,9 @@
992
992
  </choice>
993
993
  </attribute>
994
994
  </optional>
995
+ <optional>
996
+ <attribute name="type"/>
997
+ </optional>
995
998
  <optional>
996
999
  <ref name="section-title"/>
997
1000
  </optional>
@@ -1011,9 +1014,6 @@
1011
1014
  </define>
1012
1015
  <define name="clause">
1013
1016
  <element name="clause">
1014
- <optional>
1015
- <attribute name="type"/>
1016
- </optional>
1017
1017
  <ref name="Clause-Section"/>
1018
1018
  </element>
1019
1019
  </define>
@@ -1042,6 +1042,9 @@
1042
1042
  </choice>
1043
1043
  </attribute>
1044
1044
  </optional>
1045
+ <optional>
1046
+ <attribute name="type"/>
1047
+ </optional>
1045
1048
  <optional>
1046
1049
  <ref name="section-title"/>
1047
1050
  </optional>
@@ -1180,6 +1183,9 @@
1180
1183
  <optional>
1181
1184
  <attribute name="script"/>
1182
1185
  </optional>
1186
+ <optional>
1187
+ <attribute name="type"/>
1188
+ </optional>
1183
1189
  <optional>
1184
1190
  <attribute name="obligation">
1185
1191
  <choice>
@@ -1,40 +1,8 @@
1
- require_relative "metadata"
2
1
  require "fileutils"
3
2
 
4
3
  module IsoDoc
5
4
  module M3AAWG
6
5
  module BaseRender
7
- def metadata_init(lang, script, labels)
8
- @meta = Metadata.new(lang, script, labels)
9
- end
10
-
11
- #def add_image(filenames)
12
- #filenames.each do |filename|
13
- #FileUtils.cp html_doc_path(filename), File.join(@localdir, filename)
14
- #@files_to_delete << File.join(@localdir, filename)
15
- #end
16
- #end
17
-
18
- def annex_name(annex, name, div)
19
- div.h1 **{ class: "Annex" } do |t|
20
- t << "#{@xrefs.anchor(annex['id'], :label)} "
21
- t.br
22
- t.b do |b|
23
- name&.children&.each { |c2| parse(c2, b) }
24
- end
25
- end
26
- end
27
-
28
- def i18n_init(lang, script)
29
- super
30
- @annex_lbl = "Appendix"
31
- @labels["annex"] = "Appendix"
32
- end
33
-
34
- def fileloc(loc)
35
- File.join(File.dirname(__FILE__), loc)
36
- end
37
-
38
6
  def cleanup(docxml)
39
7
  super
40
8
  term_cleanup(docxml)
@@ -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
@@ -57,6 +58,7 @@ module IsoDoc
57
58
  end
58
59
 
59
60
  include BaseRender
61
+ include Init
60
62
  end
61
63
  end
62
64
  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
+
@@ -24,21 +24,19 @@
24
24
  <contents>
25
25
  <xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()" mode="contents"/>
26
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>
27
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]" mode="contents"/> <!-- [@id = '_scope'] -->
28
+
29
+ <!-- Normative references -->
30
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]" mode="contents"/> <!-- [@id = '_normative_references'] -->
31
+
32
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() &gt; 1]" mode="contents"/> <!-- @id != '_scope' -->
33
+
36
34
  <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
35
 
39
- <xsl:apply-templates select="//m3d:figure" mode="contents"/>
36
+ <!-- Bibliography -->
37
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() &gt; 1]" mode="contents"/> <!-- @id = '_bibliography' -->
40
38
 
41
- <xsl:apply-templates select="//m3d:table" mode="contents"/>
39
+
42
40
  </contents>
43
41
  </xsl:variable>
44
42
 
@@ -47,7 +45,7 @@
47
45
  </xsl:variable>
48
46
 
49
47
  <xsl:template match="/">
50
- <xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
48
+ <xsl:call-template name="namespaceCheck"/>
51
49
  <fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
52
50
  <fo:layout-master-set>
53
51
 
@@ -233,17 +231,17 @@
233
231
  <fo:table-column column-width="25mm"/>
234
232
  <fo:table-column column-width="155mm"/>
235
233
  <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 -->
234
+ <xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
237
235
  <fo:table-row height="6mm">
238
236
  <fo:table-cell>
239
237
  <fo:block font-weight="bold">
240
238
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
241
239
  <xsl:choose>
242
- <xsl:when test="@section = '0'">
243
- <xsl:value-of select="text()"/>
240
+ <xsl:when test="@section = ''">
241
+ <xsl:apply-templates/>
244
242
  </xsl:when>
245
243
  <xsl:when test="@type = 'references' and @section = ''">
246
- <xsl:value-of select="text()"/>
244
+ <xsl:apply-templates/>
247
245
  </xsl:when>
248
246
  <xsl:when test="@level = 1">
249
247
  <xsl:value-of select="@section"/>
@@ -260,12 +258,13 @@
260
258
  </xsl:if>
261
259
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
262
260
  <xsl:choose>
263
- <xsl:when test="@section = '0'"/>
261
+ <xsl:when test="@section = ''"/>
264
262
  <xsl:when test="@type = 'references' and @section = ''"/>
265
263
  <xsl:otherwise>
266
- <xsl:value-of select="text()"/>
264
+ <xsl:apply-templates/>
267
265
  </xsl:otherwise>
268
266
  </xsl:choose>
267
+
269
268
  <fo:inline keep-together.within-line="always">
270
269
  <fo:leader font-weight="normal" leader-pattern="dots"/>
271
270
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -292,23 +291,17 @@
292
291
 
293
292
  <fo:block break-after="page"/>
294
293
 
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>
294
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]"/> <!-- Scope -->
298
295
 
299
296
  <!-- Normative references -->
300
297
  <xsl:if test="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
301
298
  <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>
299
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]"/>
305
300
  </xsl:if>
306
301
 
307
302
  <!-- 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>
311
-
303
+ <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() &gt; 1]"/>
304
+
312
305
  <!-- Annex(s) -->
313
306
  <xsl:apply-templates select="/m3d:m3d-standard/m3d:annex"/>
314
307
 
@@ -328,178 +321,61 @@
328
321
  </fo:block>
329
322
  </xsl:template>
330
323
 
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>
324
+ <xsl:template match="node()">
325
+ <xsl:apply-templates/>
339
326
  </xsl:template>
340
327
 
341
328
  <!-- ============================= -->
342
329
  <!-- CONTENTS -->
343
330
  <!-- ============================= -->
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>
331
+ <xsl:template match="node()" mode="contents">
332
+ <xsl:apply-templates mode="contents"/>
351
333
  </xsl:template>
352
334
 
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
-
335
+
336
+ <!-- element with title -->
337
+ <xsl:template match="*[m3d:title]" mode="contents">
384
338
  <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"/>
339
+ <xsl:call-template name="getLevel">
340
+ <xsl:with-param name="depth" select="m3d:title/@depth"/>
391
341
  </xsl:call-template>
392
342
  </xsl:variable>
393
343
 
394
344
  <xsl:variable name="display">
395
345
  <xsl:choose>
396
- <xsl:when test="ancestor::m3d:bibitem">false</xsl:when>
397
- <xsl:when test="ancestor::m3d:term">false</xsl:when>
346
+ <xsl:when test="ancestor-or-self::m3d:bibitem">false</xsl:when>
347
+ <xsl:when test="ancestor-or-self::m3d:term">false</xsl:when>
348
+ <xsl:when test="ancestor-or-self::m3d:preface and $level &gt;= 2">false</xsl:when>
398
349
  <xsl:when test="ancestor::m3d:annex and $level &gt;= 3">false</xsl:when>
399
350
  <xsl:when test="$level &lt;= 3">true</xsl:when>
400
351
  <xsl:otherwise>false</xsl:otherwise>
401
352
  </xsl:choose>
402
353
  </xsl:variable>
403
354
 
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">
411
- <xsl:choose>
412
- <xsl:when test="ancestor::m3d:annex">annex</xsl:when>
413
- </xsl:choose>
414
- </xsl:variable>
415
355
 
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>
356
+ <xsl:if test="$display = 'true'">
427
357
 
428
- <xsl:apply-templates mode="contents">
429
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
430
- </xsl:apply-templates>
358
+ <xsl:variable name="section">
359
+ <xsl:call-template name="getSection"/>
360
+ </xsl:variable>
361
+
362
+ <xsl:variable name="title">
363
+ <xsl:call-template name="getName"/>
364
+ </xsl:variable>
365
+
366
+ <xsl:variable name="type">
367
+ <xsl:value-of select="local-name()"/>
368
+ </xsl:variable>
369
+
370
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
371
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
372
+ </item>
373
+ <xsl:apply-templates mode="contents"/>
374
+ </xsl:if>
431
375
 
432
376
  </xsl:template>
433
377
 
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>
378
+
503
379
 
504
380
  <xsl:template name="getListItemFormat">
505
381
  <xsl:choose>
@@ -523,47 +399,9 @@
523
399
  <!-- ============================= -->
524
400
  <!-- ============================= -->
525
401
 
402
+
526
403
 
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)]">
404
+ <!-- <xsl:template match="m3d:clause//m3d:clause[not(m3d:title)]">
567
405
  <xsl:param name="sectionNum"/>
568
406
  <xsl:variable name="section">
569
407
  <xsl:call-template name="getSection">
@@ -572,37 +410,47 @@
572
410
  </xsl:variable>
573
411
  <fo:block margin-top="6pt" margin-bottom="6pt" keep-with-next="always">
574
412
  <fo:inline>
575
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
413
+ <xsl:value-of select="$section"/>
576
414
  </fo:inline>
577
415
  </fo:block>
578
416
  <xsl:apply-templates>
579
417
  <xsl:with-param name="sectionNum" select="$sectionNum"/>
580
418
  </xsl:apply-templates>
581
- </xsl:template>
419
+ </xsl:template> -->
582
420
 
421
+ <!-- ====== -->
422
+ <!-- title -->
423
+ <!-- ====== -->
583
424
 
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"/>
425
+ <xsl:template match="m3d:boilerplate//m3d:title">
426
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
427
+ <xsl:apply-templates/>
428
+ </fo:block>
429
+ </xsl:template>
430
+
431
+
432
+ <xsl:template match="m3d:annex/m3d:title">
433
+ <xsl:variable name="level">
434
+ <xsl:call-template name="getLevel"/>
590
435
  </xsl:variable>
591
-
592
- <xsl:variable name="id">
593
- <xsl:call-template name="getId"/>
436
+ <xsl:variable name="font-size">
437
+ <xsl:choose>
438
+ <xsl:when test="$level = 1">14pt</xsl:when>
439
+ <xsl:otherwise>12pt</xsl:otherwise>
440
+ </xsl:choose>
594
441
  </xsl:variable>
442
+ <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
443
+ <xsl:apply-templates/>
444
+ </fo:block>
445
+ </xsl:template>
446
+
447
+
448
+ <xsl:template match="m3d:title">
595
449
 
596
450
  <xsl:variable name="level">
597
451
  <xsl:call-template name="getLevel"/>
598
452
  </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
-
453
+
606
454
  <xsl:variable name="font-size">
607
455
  <xsl:choose>
608
456
  <xsl:when test="ancestor::m3d:preface">14pt</xsl:when>
@@ -619,98 +467,40 @@
619
467
  </xsl:choose>
620
468
  </xsl:variable>
621
469
 
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> -->
470
+ <xsl:element name="{$element-name}">
471
+ <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
472
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
473
+ <xsl:attribute name="margin-top">
474
+ <xsl:choose>
475
+ <xsl:when test="ancestor::m3d:preface">8pt</xsl:when>
476
+ <xsl:when test="$level = 2 and ancestor::m3d:annex">10pt</xsl:when>
477
+ <xsl:when test="$level = 1">0pt</xsl:when>
478
+ <xsl:when test="$level = ''">6pt</xsl:when>
479
+ <xsl:otherwise>12pt</xsl:otherwise>
480
+ </xsl:choose>
481
+ </xsl:attribute>
482
+ <xsl:attribute name="margin-bottom">
483
+ <xsl:choose>
484
+ <xsl:when test="ancestor::m3d:preface">6pt</xsl:when>
485
+ <xsl:when test="$level = 1">12pt</xsl:when>
486
+ <xsl:otherwise>8pt</xsl:otherwise>
487
+ </xsl:choose>
488
+ </xsl:attribute>
489
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
490
+
491
+ <xsl:apply-templates/>
492
+
493
+ </xsl:element>
494
+
495
+ <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::m3d:p)">
496
+ <!-- <fo:block> -->
497
+ <xsl:value-of select="$linebreak"/>
498
+ <!-- </fo:block> -->
499
+ </xsl:if>
648
500
 
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
501
  </xsl:template>
713
-
502
+ <!-- ====== -->
503
+ <!-- ====== -->
714
504
 
715
505
 
716
506
  <xsl:template match="m3d:p">
@@ -823,90 +613,6 @@
823
613
  <xsl:apply-templates/>
824
614
  </xsl:template>
825
615
 
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
616
 
911
617
 
912
618
  <xsl:template match="m3d:bibitem">
@@ -934,7 +640,7 @@
934
640
  </xsl:template>
935
641
 
936
642
 
937
- <xsl:template match="m3d:bibitem/m3d:note">
643
+ <xsl:template match="m3d:bibitem/m3d:note" priority="2">
938
644
  <fo:footnote>
939
645
  <xsl:variable name="number">
940
646
  <xsl:number level="any" count="m3d:bibitem/m3d:note"/>
@@ -966,14 +672,14 @@
966
672
  </xsl:if>
967
673
  <xsl:apply-templates/>
968
674
  </fo:list-block>
969
- <xsl:for-each select="./m3d:note//m3d:p">
675
+ <xsl:for-each select="./m3d:note">
970
676
  <xsl:call-template name="note"/>
971
677
  </xsl:for-each>
972
678
  </fo:block-container>
973
679
  </fo:block-container>
974
680
  </xsl:template>
975
681
 
976
- <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note"/>
682
+ <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note" priority="2"/>
977
683
 
978
684
  <xsl:template match="m3d:li">
979
685
  <fo:list-item id="{@id}">
@@ -987,36 +693,17 @@
987
693
  </fo:block>
988
694
  </fo:list-item-label>
989
695
  <fo:list-item-body start-indent="body-start()">
990
- <xsl:apply-templates/>
991
- <xsl:apply-templates select=".//m3d:note" mode="process"/>
696
+ <fo:block>
697
+ <xsl:apply-templates/>
698
+ <xsl:apply-templates select=".//m3d:note" mode="process"/>
699
+ </fo:block>
992
700
  </fo:list-item-body>
993
701
  </fo:list-item>
994
702
  </xsl:template>
995
703
 
996
704
 
997
- <xsl:template match="m3d:term">
998
- <xsl:param name="sectionNum"/>
999
- <fo:block id="{@id}" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
1000
- <fo:inline>
1001
- <xsl:variable name="section">
1002
- <xsl:for-each select="*[1]">
1003
- <xsl:call-template name="getSection">
1004
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1005
- </xsl:call-template>
1006
- </xsl:for-each>
1007
- </xsl:variable>
1008
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
1009
- </fo:inline>
1010
- </fo:block>
1011
- <fo:block>
1012
- <xsl:apply-templates>
1013
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1014
- </xsl:apply-templates>
1015
- </fo:block>
1016
- </xsl:template>
1017
-
705
+
1018
706
  <xsl:template match="m3d:preferred">
1019
- <xsl:param name="sectionNum"/>
1020
707
 
1021
708
  <fo:inline>
1022
709
  <xsl:apply-templates/>
@@ -1027,135 +714,34 @@
1027
714
  </xsl:if>
1028
715
 
1029
716
  </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
717
 
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>
718
+
1099
719
 
1100
- <xsl:template match="m3d:termnote">
720
+ <xsl:template match="m3d:termnote" priority="2">
1101
721
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1102
722
  <fo:block>
1103
723
  <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)"/>
724
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
1111
725
  </fo:inline>
1112
726
  <xsl:apply-templates/>
1113
727
  </fo:block>
1114
728
  </fo:block-container>
1115
729
  </xsl:template>
1116
730
 
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>
731
+ <xsl:template match="m3d:example/m3d:p" priority="2">
732
+ <fo:inline xsl:use-attribute-sets="example-p-style">
1140
733
  <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>
734
+ </fo:inline>
1146
735
  </xsl:template>
1147
736
 
1148
-
1149
- <xsl:template match="m3d:annex">
1150
- <fo:block break-after="page"/>
1151
- <xsl:apply-templates/>
1152
- </xsl:template>
1153
737
 
1154
738
 
1155
739
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
1156
740
  <xsl:template match="m3d:references[position() &gt; 1]">
1157
741
  <fo:block break-after="page"/>
1158
- <xsl:apply-templates/>
742
+ <fo:block id="{@id}">
743
+ <xsl:apply-templates/>
744
+ </fo:block>
1159
745
  <fo:block-container text-align="center">
1160
746
  <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
1161
747
  <fo:block> </fo:block>
@@ -1214,27 +800,8 @@
1214
800
  </fo:inline>
1215
801
  </xsl:template>
1216
802
 
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
-
803
+
804
+
1238
805
 
1239
806
  <xsl:template match="mathml:math" priority="2">
1240
807
  <fo:inline font-family="Cambria Math">
@@ -1244,152 +811,21 @@
1244
811
  </fo:inline>
1245
812
  </xsl:template>
1246
813
 
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
814
 
1317
- <xsl:template match="m3d:note/m3d:p" name="note">
1318
- <xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
815
+ <!-- <xsl:template match="m3d:note/m3d:p" name="note">
1319
816
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1320
817
  <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>
818
+ <fo:inline >
819
+ <xsl:apply-templates select="../m3d:name" mode="presentation">
820
+ <xsl:with-param name="sfx" select="':'"/>
821
+ </xsl:apply-templates>
1332
822
  </fo:inline>
1333
- <xsl:apply-templates/>
823
+ <xsl:apply-templates />
1334
824
  </fo:block>
1335
825
  </fo:block-container>
1336
- </xsl:template>
826
+ </xsl:template> -->
827
+
1337
828
 
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
829
 
1394
830
  <xsl:template match="m3d:admonition">
1395
831
  <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
@@ -1400,17 +836,6 @@
1400
836
  </fo:block>
1401
837
  </xsl:template>
1402
838
 
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
839
 
1415
840
  <xsl:template match="m3d:formula/m3d:stem">
1416
841
  <fo:block margin-top="14pt" margin-bottom="14pt">
@@ -1426,179 +851,21 @@
1426
851
  </fo:table-cell>
1427
852
  <fo:table-cell display-align="center">
1428
853
  <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>
854
+ <xsl:apply-templates select="../m3d:name" mode="presentation"/>
1437
855
  </fo:block>
1438
856
  </fo:table-cell>
1439
857
  </fo:table-row>
1440
858
  </fo:table-body>
1441
- </fo:table>
1442
- <fo:inline keep-together.within-line="always">
1443
- </fo:inline>
859
+ </fo:table>
1444
860
  </fo:block>
1445
861
  </xsl:template>
1446
862
 
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
863
 
1544
864
  <xsl:variable name="Image-M3AAWG-Logo">
1545
865
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczL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QcwMu6mmqmCmrJIyl2iWmTA2HYNGa5AKkHSNmbsN0A7fOCNhZhHqg8w+UwMBhJLcya0FxYrJlD0LRsRjDegPOhTWheTOK1hYZ6T2bQuAaaewAXh9DdfgdqN76jluyXlP1fznY/xgXEzqrCButblm2a1xcovbcdtD7QrPwUehc0OOM5l7cmeJtjA6k80mJnbrttzUXiDIMn1WHWVZsUgsYulYcr+7KXlhVZVjVTVElxpxphn6Vltqi9u0m9pgVWf5ey0/sTQYZBDfbXTdb1UI9tFbXdUyCwhX43GS4fKHV6wfDcXkTDOsI4byfPzq2B9pQqc9C9gVKnGxOWF24nYu5cUs1twmr59sCl/WjzU1MAHYIQWw2XqsLZRoRpOjVnMND+1qKFmae8wFgtsG2gHDly5KgAVF5e/pvffrJtf4yoCUBDsrlDD0jZnqdqAtAEtE9GzVJS12NpxxuqwnCspk7vvSewQplRk4CGffKrpLu4WsU2xFMqfgTkuIS+hrErAGQ7eV+RpBtsgMaRI0eOqpNswmSFMlscf1yDdZ5rqVfsk3NFkMJL4HkmbZYabCMMUYsM4wNDz3VFkKzUrNShVr7FUOZ9NShw35f64SwWk60P1I2fJiwW9gDQlGR1cGTSNv0gbYKhLrYvh9WWD5peZ3C5fFLqB3dI7HfDm2YPzqkkhzFChQ+bC2gOAdpwAOpSxzYdOXJUW8m8/VQPKGr7yVHdJbgdKy+GwcowwKvGOsCgFnZZy2jfUtv7DMAXtgDYy4dHFM5Yakzw/AsXBTBqhR3AXAaFzOI7nKfc9pMjR44KTNh+cmc/OaqTRBCxpIbrgO2dVXWoz6DF+ZLJkSNHjuodOZduR44cOXLkyJEDNY4cOXLkyJEjR7WF/O2nDbnvXd9oIzfEjhw5cuTI0W8L1CAA0DauOxw5clQA6khe84PrCkeOHBWS/l+AAQACYD7v73Ou8wAAAABJRU5ErkJggg==</xsl:text>
1546
866
  </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
-
867
+
1561
868
  <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
869
 
1603
870
  <title-annex lang="en">Annex </title-annex>
1604
871
  <title-annex lang="fr">Annexe </title-annex>
@@ -1606,17 +873,7 @@
1606
873
  <title-annex lang="zh">Annex </title-annex>
1607
874
 
1608
875
 
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
-
876
+
1620
877
  <title-edition lang="en">
1621
878
 
1622
879
 
@@ -1624,9 +881,7 @@
1624
881
 
1625
882
  </title-edition>
1626
883
 
1627
- <title-formula lang="en">Formula </title-formula>
1628
- <title-formula lang="fr">Formula </title-formula>
1629
-
884
+
1630
885
  <title-toc lang="en">
1631
886
 
1632
887
 
@@ -1661,13 +916,6 @@
1661
916
  </title-part>
1662
917
  <title-part lang="zh">第 # 部分:</title-part>
1663
918
 
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
919
  <title-modified lang="en">modified</title-modified>
1672
920
  <title-modified lang="fr">modifiée</title-modified>
1673
921
 
@@ -1681,14 +929,12 @@
1681
929
 
1682
930
  <title-deprecated lang="en">DEPRECATED</title-deprecated>
1683
931
  <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1684
-
1685
- <title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
1686
-
932
+
1687
933
  <title-list-tables lang="en">List of Tables</title-list-tables>
1688
934
 
1689
935
  <title-list-figures lang="en">List of Figures</title-list-figures>
1690
936
 
1691
- <title-recommendation lang="en">Recommendation </title-recommendation>
937
+ <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1692
938
 
1693
939
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1694
940
 
@@ -1698,8 +944,6 @@
1698
944
 
1699
945
  <title-in lang="en">in </title-in>
1700
946
 
1701
- <title-box lang="en">Box </title-box>
1702
-
1703
947
  <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1704
948
  <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1705
949
 
@@ -1722,7 +966,7 @@
1722
966
  <title-warning lang="zh">警告</title-warning>
1723
967
 
1724
968
  <title-amendment lang="en">AMENDMENT</title-amendment>
1725
- </xsl:variable><xsl:template name="getTitle">
969
+ </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1726
970
  <xsl:param name="name"/>
1727
971
  <xsl:variable name="lang">
1728
972
  <xsl:call-template name="getLang"/>
@@ -1743,6 +987,8 @@
1743
987
 
1744
988
 
1745
989
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
990
+ <xsl:attribute name="white-space">pre</xsl:attribute>
991
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1746
992
 
1747
993
 
1748
994
 
@@ -1754,25 +1000,292 @@
1754
1000
 
1755
1001
 
1756
1002
 
1757
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1758
-
1759
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1760
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1761
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1762
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1003
+ </xsl:attribute-set><xsl:attribute-set name="permission-style">
1763
1004
 
1005
+ </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
1764
1006
 
1007
+ </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
1765
1008
 
1766
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1009
+ </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1767
1010
 
1768
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1769
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1770
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1011
+ </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1771
1012
 
1013
+ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1772
1014
 
1015
+ </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
1016
+ </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
1017
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
1773
1018
 
1774
- </xsl:attribute-set><xsl:template match="text()">
1775
- <xsl:value-of select="."/>
1019
+
1020
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
1021
+
1022
+
1023
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
1024
+
1025
+ </xsl:attribute-set><xsl:attribute-set name="termexample-style">
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
1032
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1033
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1034
+
1035
+
1036
+
1037
+ </xsl:attribute-set><xsl:attribute-set name="example-style">
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1045
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+ </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1052
+
1053
+
1054
+ </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1063
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+ </xsl:attribute-set><xsl:attribute-set name="example-p-style">
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+
1080
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1081
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1089
+
1090
+
1091
+
1092
+
1093
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1094
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1095
+
1096
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1097
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1098
+
1099
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1100
+ <xsl:attribute name="text-align">center</xsl:attribute>
1101
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1113
+
1114
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1115
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1116
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1117
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1118
+
1119
+
1120
+
1121
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1122
+
1123
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1124
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1125
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1126
+
1127
+
1128
+
1129
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1130
+
1131
+
1132
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1133
+
1134
+
1135
+
1136
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1146
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1147
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1148
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+ </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1167
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1168
+
1169
+
1170
+
1171
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1181
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1189
+
1190
+
1191
+
1192
+
1193
+
1194
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1195
+
1196
+
1197
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1198
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
1199
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1206
+
1207
+
1208
+ <xsl:attribute name="text-align">right</xsl:attribute>
1209
+
1210
+
1211
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1218
+
1219
+
1220
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1221
+
1222
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1223
+
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+ <xsl:attribute name="text-align">center</xsl:attribute>
1233
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1234
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1235
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1245
+
1246
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1247
+ <xsl:attribute name="text-align">center</xsl:attribute>
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1254
+
1255
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1256
+
1257
+
1258
+ <xsl:attribute name="width">100%</xsl:attribute>
1259
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1260
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1261
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1262
+
1263
+
1264
+
1265
+
1266
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1267
+
1268
+
1269
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1270
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1271
+
1272
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1273
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1274
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1275
+ <xsl:attribute name="text-align">center</xsl:attribute>
1276
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1277
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1278
+
1279
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1280
+
1281
+
1282
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1283
+
1284
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1285
+
1286
+
1287
+ </xsl:attribute-set><xsl:template match="text()">
1288
+ <xsl:value-of select="."/>
1776
1289
  </xsl:template><xsl:template match="*[local-name()='br']">
1777
1290
  <xsl:value-of select="$linebreak"/>
1778
1291
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
@@ -1780,62 +1293,21 @@
1780
1293
  <xsl:call-template name="add-zero-spaces-java"/>
1781
1294
  </xsl:template><xsl:template match="*[local-name()='table']">
1782
1295
 
1783
- <xsl:variable name="simple-table">
1784
- <!-- <xsl:copy> -->
1785
- <xsl:call-template name="getSimpleTable"/>
1786
- <!-- </xsl:copy> -->
1296
+ <xsl:variable name="simple-table">
1297
+ <xsl:call-template name="getSimpleTable"/>
1787
1298
  </xsl:variable>
1788
1299
 
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
1300
 
1795
- <!-- <xsl:if test="$namespace = 'iso'">
1796
- <fo:block space-before="6pt">&#xA0;</fo:block>
1797
- </xsl:if> -->
1798
1301
 
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"/>
1302
+
1303
+
1304
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1305
+
1836
1306
 
1837
- </xsl:otherwise>
1838
- </xsl:choose>
1307
+
1308
+ <xsl:call-template name="fn_name_display"/>
1309
+
1310
+
1839
1311
 
1840
1312
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1841
1313
 
@@ -1927,32 +1399,15 @@
1927
1399
 
1928
1400
 
1929
1401
 
1402
+
1403
+
1930
1404
  </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
-
1943
-
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/>
1405
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1406
+ <xsl:if test="normalize-space() != ''">
1407
+ <fo:block xsl:use-attribute-sets="table-name-style">
1408
+ <xsl:apply-templates/>
1409
+ </fo:block>
1410
+ </xsl:if>
1956
1411
  </xsl:template><xsl:template name="calculate-columns-numbers">
1957
1412
  <xsl:param name="table-row"/>
1958
1413
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -2177,6 +1632,7 @@
2177
1632
 
2178
1633
 
2179
1634
 
1635
+
2180
1636
  <xsl:if test="@colspan">
2181
1637
  <xsl:attribute name="number-columns-spanned">
2182
1638
  <xsl:value-of select="@colspan"/>
@@ -2196,7 +1652,7 @@
2196
1652
 
2197
1653
 
2198
1654
 
2199
-
1655
+
2200
1656
 
2201
1657
 
2202
1658
 
@@ -2215,21 +1671,9 @@
2215
1671
  <fo:block>
2216
1672
 
2217
1673
  <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
-
1674
+ </fo:block>
2231
1675
  </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">
1676
+ </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
1677
 
2234
1678
 
2235
1679
  <fo:block font-size="10pt" margin-bottom="12pt">
@@ -2241,26 +1685,14 @@
2241
1685
 
2242
1686
 
2243
1687
 
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>
1688
+
1689
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2255
1690
 
2256
-
2257
-
2258
-
2259
1691
  </fo:inline>
2260
1692
  <xsl:apply-templates mode="process"/>
2261
1693
  </fo:block>
2262
1694
 
2263
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1695
+ </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
1696
  <xsl:apply-templates/>
2265
1697
  </xsl:template><xsl:template name="fn_display">
2266
1698
  <xsl:variable name="references">
@@ -2320,7 +1752,7 @@
2320
1752
  <!-- and (not(@class) or @class !='pseudocode') -->
2321
1753
  </xsl:variable>
2322
1754
  <xsl:variable name="references">
2323
- <xsl:for-each select=".//*[local-name()='fn']">
1755
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2324
1756
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2325
1757
  <xsl:apply-templates/>
2326
1758
  </fn>
@@ -2587,7 +2019,7 @@
2587
2019
  <xsl:value-of select="string-length(normalize-space(.))"/>
2588
2020
  </xsl:if>
2589
2021
  </xsl:for-each>
2590
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
2022
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2591
2023
  <xsl:param name="key_iso"/>
2592
2024
 
2593
2025
  <!-- <tr>
@@ -2603,12 +2035,7 @@
2603
2035
  <xsl:if test="normalize-space($key_iso) = 'true'">
2604
2036
  <xsl:attribute name="margin-top">0</xsl:attribute>
2605
2037
  </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"/>
2038
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2612
2039
  </fo:block>
2613
2040
  </fo:table-cell>
2614
2041
  <fo:table-cell>
@@ -2677,7 +2104,7 @@
2677
2104
  <fo:inline font-style="italic">
2678
2105
  <xsl:apply-templates/>
2679
2106
  </fo:inline>
2680
- </xsl:template><xsl:template match="*[local-name()='strong']">
2107
+ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2681
2108
  <fo:inline font-weight="bold">
2682
2109
  <xsl:apply-templates/>
2683
2110
  </fo:inline>
@@ -2690,7 +2117,7 @@
2690
2117
  <xsl:apply-templates/>
2691
2118
  </fo:inline>
2692
2119
  </xsl:template><xsl:template match="*[local-name()='tt']">
2693
- <fo:inline font-family="Courier" font-size="10pt">
2120
+ <fo:inline xsl:use-attribute-sets="tt-style">
2694
2121
  <xsl:apply-templates/>
2695
2122
  </fo:inline>
2696
2123
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -3004,134 +2431,751 @@
3004
2431
  </xsl:call-template>
3005
2432
  </xsl:when>
3006
2433
  <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>
2434
+ <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
2435
+ <xsl:value-of select="substring($str2, 2)"/> -->
2436
+ <xsl:call-template name="capitalize">
2437
+ <xsl:with-param name="str" select="$str2"/>
2438
+ </xsl:call-template>
2439
+ </xsl:otherwise>
2440
+ </xsl:choose>
2441
+ </xsl:template><xsl:template name="capitalize">
2442
+ <xsl:param name="str"/>
2443
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2444
+ <xsl:value-of select="substring($str, 2)"/>
2445
+ </xsl:template><xsl:template match="mathml:math">
2446
+ <fo:inline font-family="STIX2Math">
2447
+ <fo:instream-foreign-object fox:alt-text="Math">
2448
+ <xsl:copy-of select="."/>
2449
+ </fo:instream-foreign-object>
2450
+ </fo:inline>
2451
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2452
+ <xsl:variable name="target">
2453
+ <xsl:choose>
2454
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2455
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2456
+ </xsl:when>
2457
+ <xsl:otherwise>
2458
+ <xsl:value-of select="normalize-space(@target)"/>
2459
+ </xsl:otherwise>
2460
+ </xsl:choose>
2461
+ </xsl:variable>
2462
+ <fo:inline xsl:use-attribute-sets="link-style">
2463
+ <xsl:choose>
2464
+ <xsl:when test="$target = ''">
2465
+ <xsl:apply-templates/>
2466
+ </xsl:when>
2467
+ <xsl:otherwise>
2468
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2469
+ <xsl:choose>
2470
+ <xsl:when test="normalize-space(.) = ''">
2471
+ <xsl:value-of select="$target"/>
2472
+ </xsl:when>
2473
+ <xsl:otherwise>
2474
+ <xsl:apply-templates/>
2475
+ </xsl:otherwise>
2476
+ </xsl:choose>
2477
+ </fo:basic-link>
2478
+ </xsl:otherwise>
2479
+ </xsl:choose>
2480
+ </fo:inline>
2481
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
2482
+ <fo:inline id="{@id}"/>
2483
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
2484
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2485
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2486
+ </fo:block>
2487
+ <xsl:apply-templates/>
2488
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2489
+ <fo:inline><xsl:apply-templates/></fo:inline>
2490
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
2491
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
2492
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2493
+ </fo:block>
2494
+ <xsl:apply-templates/>
2495
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
2496
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2497
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
2498
+ <xsl:variable name="annotation-id" select="@id"/>
2499
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2500
+ <fo:block id="{$annotation-id}" white-space="nowrap">
2501
+ <fo:inline>
2502
+ <xsl:apply-templates>
2503
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2504
+ </xsl:apply-templates>
2505
+ </fo:inline>
2506
+ </fo:block>
2507
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2508
+ <xsl:param name="callout"/>
2509
+ <fo:inline id="{@id}">
2510
+ <!-- for first p in annotation, put <x> -->
2511
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2512
+ <xsl:apply-templates/>
2513
+ </fo:inline>
2514
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
2515
+ <xsl:variable name="title-modified">
2516
+ <xsl:call-template name="getTitle">
2517
+ <xsl:with-param name="name" select="'title-modified'"/>
2518
+ </xsl:call-template>
2519
+ </xsl:variable>
2520
+ <xsl:choose>
2521
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2522
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
2523
+ </xsl:choose>
2524
+ <xsl:apply-templates/>
2525
+ </xsl:template><xsl:template match="*[local-name() = 'xref']">
2526
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2527
+
2528
+ <xsl:apply-templates/>
2529
+ </fo:basic-link>
2530
+ </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2531
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2532
+ <xsl:apply-templates/>
2533
+ </fo:block>
2534
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2535
+ <fo:inline>
2536
+ <xsl:apply-templates/>
2537
+ </fo:inline>
2538
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
2539
+ <fo:inline>
2540
+ <xsl:apply-templates/>
2541
+ </fo:inline>
2542
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
2543
+ <xsl:if test="normalize-space() != ''">
2544
+ <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
2545
+ </xsl:if>
2546
+ </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
2547
+
2548
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
2549
+
2550
+
2551
+
2552
+
2553
+ <fo:block-container margin-left="0mm">
2554
+
2555
+
2556
+
2557
+
2558
+
2559
+
2560
+
2561
+
2562
+ <fo:block>
2563
+
2564
+
2565
+
2566
+
2567
+ <fo:inline xsl:use-attribute-sets="note-name-style">
2568
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2569
+ </fo:inline>
2570
+ <xsl:apply-templates/>
2571
+ </fo:block>
2572
+
2573
+
2574
+ </fo:block-container>
2575
+ </fo:block-container>
2576
+
2577
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
2578
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
2579
+ <xsl:choose>
2580
+ <xsl:when test="$num = 1">
2581
+ <fo:inline xsl:use-attribute-sets="note-p-style">
2582
+ <xsl:apply-templates/>
2583
+ </fo:inline>
2584
+ </xsl:when>
2585
+ <xsl:otherwise>
2586
+ <fo:block xsl:use-attribute-sets="note-p-style">
2587
+ <xsl:apply-templates/>
2588
+ </fo:block>
2589
+ </xsl:otherwise>
2590
+ </xsl:choose>
2591
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2592
+ <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2593
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2594
+ <xsl:apply-templates/>
2595
+ </fo:block>
2596
+ </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">
2597
+ <xsl:param name="sfx"/>
2598
+ <xsl:variable name="suffix">
2599
+ <xsl:choose>
2600
+ <xsl:when test="$sfx != ''">
2601
+ <xsl:value-of select="$sfx"/>
2602
+ </xsl:when>
2603
+ <xsl:otherwise>
2604
+
2605
+ <xsl:text>:</xsl:text>
2606
+
2607
+
2608
+ </xsl:otherwise>
2609
+ </xsl:choose>
2610
+ </xsl:variable>
2611
+ <xsl:if test="normalize-space() != ''">
2612
+ <xsl:apply-templates/>
2613
+ <xsl:value-of select="$suffix"/>
2614
+ </xsl:if>
2615
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
2616
+ <xsl:param name="sfx"/>
2617
+ <xsl:variable name="suffix">
2618
+ <xsl:choose>
2619
+ <xsl:when test="$sfx != ''">
2620
+ <xsl:value-of select="$sfx"/>
2621
+ </xsl:when>
2622
+ <xsl:otherwise>
2623
+
2624
+
2625
+ </xsl:otherwise>
2626
+ </xsl:choose>
2627
+ </xsl:variable>
2628
+ <xsl:if test="normalize-space() != ''">
2629
+ <xsl:apply-templates/>
2630
+ <xsl:value-of select="$suffix"/>
2631
+ </xsl:if>
2632
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
2633
+ <fo:inline><xsl:apply-templates/></fo:inline>
2634
+ </xsl:template><xsl:template match="*[local-name() = 'terms']">
2635
+ <fo:block id="{@id}">
2636
+ <xsl:apply-templates/>
2637
+ </fo:block>
2638
+ </xsl:template><xsl:template match="*[local-name() = 'term']">
2639
+ <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
2640
+
2641
+
2642
+ <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
2643
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
2644
+ </fo:block>
2645
+
2646
+
2647
+ <xsl:apply-templates/>
2648
+ </fo:block>
2649
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
2650
+ <xsl:if test="normalize-space() != ''">
2651
+ <fo:inline>
2652
+ <xsl:apply-templates/>
2653
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
2654
+ <xsl:text>.</xsl:text>
2655
+ </xsl:if> -->
2656
+ </fo:inline>
2657
+ </xsl:if>
2658
+ </xsl:template><xsl:template match="*[local-name() = 'figure']">
2659
+ <fo:block-container id="{@id}">
2660
+ <fo:block>
2661
+ <xsl:apply-templates/>
2662
+ </fo:block>
2663
+ <xsl:call-template name="fn_display_figure"/>
2664
+ <xsl:for-each select="*[local-name() = 'note']">
2665
+ <xsl:call-template name="note"/>
2666
+ </xsl:for-each>
2667
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2668
+ </fo:block-container>
2669
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
2670
+ <fo:block id="{@id}">
2671
+ <xsl:apply-templates/>
2672
+ </fo:block>
2673
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
2674
+ <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
2675
+ <xsl:apply-templates/>
2676
+ </fo:block>
2677
+ </xsl:template><xsl:template match="*[local-name() = 'image']">
2678
+ <fo:block xsl:use-attribute-sets="image-style">
2679
+
2680
+
2681
+ <xsl:variable name="src">
2682
+ <xsl:choose>
2683
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
2684
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
2685
+ </xsl:when>
2686
+ <xsl:otherwise>
2687
+ <xsl:value-of select="@src"/>
2688
+ </xsl:otherwise>
2689
+ </xsl:choose>
2690
+ </xsl:variable>
2691
+
2692
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
2693
+ </fo:block>
2694
+ </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">
2695
+ <xsl:apply-templates mode="contents"/>
2696
+ <xsl:text> </xsl:text>
2697
+ </xsl:template><xsl:template match="text()" mode="contents">
2698
+ <xsl:value-of select="."/>
2699
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
2700
+ <xsl:if test="normalize-space() != ''">
2701
+ <fo:block xsl:use-attribute-sets="figure-name-style">
2702
+
2703
+ <xsl:apply-templates/>
2704
+ </fo:block>
2705
+ </xsl:if>
2706
+ </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">
2707
+ <xsl:apply-templates mode="contents_item"/>
2708
+ <!-- <xsl:text> </xsl:text> -->
2709
+ </xsl:template><xsl:template name="getSection">
2710
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
2711
+ </xsl:template><xsl:template name="getName">
2712
+ <xsl:choose>
2713
+ <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
2714
+ <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
2715
+ </xsl:when>
2716
+ <xsl:otherwise>
2717
+ <xsl:copy-of select="*[local-name() = 'title']/node()"/>
2718
+ </xsl:otherwise>
2719
+ </xsl:choose>
2720
+ </xsl:template><xsl:template name="insertTitleAsListItem">
2721
+ <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
2722
+ <xsl:variable name="section">
2723
+ <xsl:for-each select="..">
2724
+ <xsl:call-template name="getSection"/>
2725
+ </xsl:for-each>
2726
+ </xsl:variable>
2727
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
2728
+ <fo:list-item>
2729
+ <fo:list-item-label end-indent="label-end()">
2730
+ <fo:block>
2731
+ <xsl:value-of select="$section"/>
2732
+ </fo:block>
2733
+ </fo:list-item-label>
2734
+ <fo:list-item-body start-indent="body-start()">
2735
+ <fo:block>
2736
+ <xsl:choose>
2737
+ <xsl:when test="*[local-name() = 'tab']">
2738
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
2739
+ </xsl:when>
2740
+ <xsl:otherwise>
2741
+ <xsl:apply-templates/>
2742
+ </xsl:otherwise>
2743
+ </xsl:choose>
2744
+ </fo:block>
2745
+ </fo:list-item-body>
2746
+ </fo:list-item>
2747
+ </fo:list-block>
2748
+ </xsl:template><xsl:template name="extractTitle">
2749
+ <xsl:choose>
2750
+ <xsl:when test="*[local-name() = 'tab']">
2751
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
2752
+ </xsl:when>
2753
+ <xsl:otherwise>
2754
+ <xsl:apply-templates/>
2755
+ </xsl:otherwise>
2756
+ </xsl:choose>
2757
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
2758
+ <xsl:text> </xsl:text>
2759
+ </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
2760
+ <xsl:copy>
2761
+ <xsl:apply-templates mode="contents_item"/>
2762
+ </xsl:copy>
2763
+ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
2764
+ <xsl:text> </xsl:text>
2765
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
2766
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
2767
+ <xsl:apply-templates/>
2768
+ </fo:block>
2769
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2770
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
2771
+ <xsl:variable name="text">
2772
+ <xsl:call-template name="add-zero-spaces-equal"/>
2773
+ </xsl:variable>
2774
+ <xsl:call-template name="add-zero-spaces">
2775
+ <xsl:with-param name="text" select="$text"/>
2776
+ </xsl:call-template>
2777
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
2778
+ <xsl:if test="normalize-space() != ''">
2779
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2780
+
2781
+ <xsl:apply-templates/>
2782
+ </fo:block>
2783
+ </xsl:if>
2784
+ </xsl:template><xsl:template match="*[local-name() = 'permission']">
2785
+ <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
2786
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2787
+ <xsl:apply-templates/>
2788
+ </fo:block>
2789
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
2790
+ <xsl:if test="normalize-space() != ''">
2791
+ <fo:block xsl:use-attribute-sets="permission-name-style">
2792
+ <xsl:apply-templates/>
2793
+
2794
+ </fo:block>
2795
+ </xsl:if>
2796
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
2797
+ <fo:block xsl:use-attribute-sets="permission-label-style">
2798
+ <xsl:apply-templates/>
2799
+ </fo:block>
2800
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']">
2801
+ <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
2802
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2803
+ <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
2804
+ <xsl:apply-templates select="@obligation" mode="presentation"/>
2805
+ <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
2806
+ <xsl:apply-templates/>
2807
+ </fo:block>
2808
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
2809
+ <xsl:if test="normalize-space() != ''">
2810
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
2811
+
2812
+ <xsl:apply-templates/>
2813
+
2814
+ </fo:block>
2815
+ </xsl:if>
2816
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
2817
+ <fo:block xsl:use-attribute-sets="requirement-label-style">
2818
+ <xsl:apply-templates/>
2819
+ </fo:block>
2820
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
2821
+ <fo:block>
2822
+ <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
2823
+ </fo:block>
2824
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
2825
+ <fo:block xsl:use-attribute-sets="requirement-subject-style">
2826
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
2827
+ </fo:block>
2828
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
2829
+ <fo:block xsl:use-attribute-sets="requirement-inherit-style">
2830
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
2831
+ </fo:block>
2832
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
2833
+ <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
2834
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2835
+ <xsl:apply-templates/>
2836
+ </fo:block>
2837
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
2838
+ <xsl:if test="normalize-space() != ''">
2839
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
2840
+ <xsl:apply-templates/>
2841
+
2842
+ </fo:block>
2843
+ </xsl:if>
2844
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
2845
+ <fo:block xsl:use-attribute-sets="recommendation-label-style">
2846
+ <xsl:apply-templates/>
2847
+ </fo:block>
2848
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']">
2849
+ <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
2850
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2851
+ <xsl:apply-templates/>
2852
+ </fo:block>
2853
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
2854
+ <xsl:if test="normalize-space() != ''">
2855
+ <fo:inline xsl:use-attribute-sets="termexample-name-style">
2856
+ <xsl:apply-templates/>
2857
+ </fo:inline>
2858
+ </xsl:if>
2859
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
2860
+ <fo:inline><xsl:apply-templates/></fo:inline>
2861
+ </xsl:template><xsl:template match="*[local-name() = 'example']">
2862
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
2863
+
2864
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2865
+
2866
+ <xsl:variable name="element">
2867
+
2868
+ inline
2869
+ </xsl:variable>
2870
+
2871
+ <xsl:choose>
2872
+ <xsl:when test="normalize-space($element) = 'block'">
2873
+ <fo:block xsl:use-attribute-sets="example-body-style">
2874
+ <xsl:apply-templates/>
2875
+ </fo:block>
2876
+ </xsl:when>
2877
+ <xsl:otherwise>
2878
+ <fo:inline>
2879
+ <xsl:apply-templates/>
2880
+ </fo:inline>
2881
+ </xsl:otherwise>
2882
+ </xsl:choose>
2883
+
2884
+ </fo:block>
2885
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
2886
+
2887
+ <xsl:variable name="element">
2888
+
2889
+ inline
2890
+ </xsl:variable>
2891
+ <xsl:choose>
2892
+ <xsl:when test="ancestor::*[local-name() = 'appendix']">
2893
+ <fo:inline>
2894
+ <xsl:apply-templates/>
2895
+ </fo:inline>
2896
+ </xsl:when>
2897
+ <xsl:when test="normalize-space($element) = 'block'">
2898
+ <fo:block xsl:use-attribute-sets="example-name-style">
2899
+ <xsl:apply-templates/>
2900
+ </fo:block>
2901
+ </xsl:when>
2902
+ <xsl:otherwise>
2903
+ <fo:inline xsl:use-attribute-sets="example-name-style">
2904
+ <xsl:apply-templates/>
2905
+ </fo:inline>
3012
2906
  </xsl:otherwise>
3013
2907
  </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">
2908
+
2909
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
2910
+ <fo:block xsl:use-attribute-sets="example-p-style">
2911
+
2912
+ <xsl:apply-templates/>
2913
+ </fo:block>
2914
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']">
2915
+ <fo:block xsl:use-attribute-sets="termsource-style">
2916
+ <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
2917
+ <xsl:variable name="termsource_text">
2918
+ <xsl:apply-templates/>
2919
+ </xsl:variable>
3032
2920
  <xsl:choose>
3033
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3034
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2921
+ <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
2922
+ <xsl:apply-templates/>
3035
2923
  </xsl:when>
3036
2924
  <xsl:otherwise>
3037
- <xsl:value-of select="normalize-space(@target)"/>
2925
+ <xsl:text>[</xsl:text>
2926
+ <xsl:apply-templates/>
2927
+ <xsl:text>]</xsl:text>
3038
2928
  </xsl:otherwise>
3039
2929
  </xsl:choose>
2930
+ </fo:block>
2931
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
2932
+ <xsl:if test="normalize-space() != ''">
2933
+ <xsl:value-of select="."/>
2934
+ </xsl:if>
2935
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
2936
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
2937
+
2938
+ <fo:inline xsl:use-attribute-sets="origin-style">
2939
+ <xsl:apply-templates/>
2940
+ </fo:inline>
2941
+ </fo:basic-link>
2942
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
2943
+ <fo:inline><xsl:apply-templates/></fo:inline>
2944
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
2945
+ <xsl:if test="normalize-space() != ''">
2946
+ <xsl:value-of select="."/>
2947
+ </xsl:if>
2948
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
2949
+
2950
+ <fo:block xsl:use-attribute-sets="quote-style">
2951
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
2952
+ </fo:block>
2953
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
2954
+ <fo:block xsl:use-attribute-sets="quote-source-style">
2955
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
2956
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
2957
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
2958
+ </fo:block>
2959
+ </xsl:if>
2960
+ </xsl:template><xsl:template match="*[local-name() = 'source']">
2961
+ <xsl:if test="../*[local-name() = 'author']">
2962
+ <xsl:text>, </xsl:text>
2963
+ </xsl:if>
2964
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
2965
+ <xsl:apply-templates/>
2966
+ </fo:basic-link>
2967
+ </xsl:template><xsl:template match="*[local-name() = 'author']">
2968
+ <xsl:text>— </xsl:text>
2969
+ <xsl:apply-templates/>
2970
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
2971
+ <fo:inline xsl:use-attribute-sets="eref-style">
2972
+ <xsl:if test="@type = 'footnote'">
2973
+
2974
+
2975
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
2976
+ <xsl:attribute name="font-size">50%</xsl:attribute>
2977
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2978
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2979
+
2980
+ </xsl:if>
2981
+
2982
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
2983
+
2984
+ <xsl:if test="@type = 'inline'">
2985
+
2986
+
2987
+ </xsl:if>
2988
+
2989
+
2990
+ <xsl:apply-templates/>
2991
+ </fo:basic-link>
2992
+ </fo:inline>
2993
+ </xsl:template><xsl:template match="*[local-name() = 'tab']">
2994
+ <!-- zero-space char -->
2995
+ <xsl:variable name="depth">
2996
+ <xsl:call-template name="getLevel">
2997
+ <xsl:with-param name="depth" select="../@depth"/>
2998
+ </xsl:call-template>
3040
2999
  </xsl:variable>
3041
- <fo:inline xsl:use-attribute-sets="link-style">
3000
+
3001
+ <xsl:variable name="padding">
3002
+
3003
+
3004
+
3005
+
3006
+
3007
+
3008
+
3009
+
3010
+ <xsl:variable name="references_num_current">
3011
+ <xsl:number level="any" count="m3d:references"/>
3012
+ </xsl:variable>
3013
+ <xsl:choose>
3014
+ <xsl:when test="(ancestor-or-self::m3d:sections and $depth = 1) or (local-name(../..) = 'references' and $references_num_current = 1)">25</xsl:when>
3015
+ <xsl:when test="ancestor-or-self::m3d:sections or ancestor-or-self::m3d:annex">3</xsl:when>
3016
+ </xsl:choose>
3017
+
3018
+
3019
+
3020
+
3021
+
3022
+
3023
+
3024
+
3025
+
3026
+
3027
+ </xsl:variable>
3028
+
3029
+ <xsl:variable name="padding-right">
3042
3030
  <xsl:choose>
3043
- <xsl:when test="$target = ''">
3044
- <xsl:apply-templates/>
3045
- </xsl:when>
3031
+ <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
3046
3032
  <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>
3033
+ <xsl:value-of select="normalize-space($padding)"/>
3057
3034
  </xsl:otherwise>
3058
3035
  </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> -->
3036
+ </xsl:variable>
3037
+
3038
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3039
+
3040
+ <xsl:choose>
3041
+ <xsl:when test="$language = 'zh'">
3042
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
3043
+ </xsl:when>
3044
+ <xsl:when test="../../@inline-header = 'true'">
3045
+ <fo:inline font-size="90%">
3046
+ <xsl:call-template name="insertNonBreakSpaces">
3047
+ <xsl:with-param name="count" select="$padding-right"/>
3048
+ </xsl:call-template>
3049
+ </fo:inline>
3050
+ </xsl:when>
3051
+ <xsl:otherwise>
3052
+ <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
3053
+ </xsl:otherwise>
3054
+ </xsl:choose>
3055
+
3056
+ </xsl:template><xsl:template name="insertNonBreakSpaces">
3057
+ <xsl:param name="count"/>
3058
+ <xsl:if test="$count &gt; 0">
3059
+ <xsl:text> </xsl:text>
3060
+ <xsl:call-template name="insertNonBreakSpaces">
3061
+ <xsl:with-param name="count" select="$count - 1"/>
3062
+ </xsl:call-template>
3063
+ </xsl:if>
3064
+ </xsl:template><xsl:template match="*[local-name() = 'domain']">
3065
+ <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
3066
+ <xsl:text> </xsl:text>
3067
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']">
3068
+ <fo:block xsl:use-attribute-sets="admitted-style">
3069
3069
  <xsl:apply-templates/>
3070
3070
  </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"/>
3071
+ </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3072
+ <xsl:variable name="title-deprecated">
3073
+ <xsl:call-template name="getTitle">
3074
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3075
+ </xsl:call-template>
3076
+ </xsl:variable>
3077
+ <fo:block xsl:use-attribute-sets="deprecates-style">
3078
+ <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
3082
3079
  </fo:block>
3080
+ </xsl:template><xsl:template match="*[local-name() = 'definition']">
3081
+ <fo:block xsl:use-attribute-sets="definition-style">
3082
+ <xsl:apply-templates/>
3083
+ </fo:block>
3084
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
3083
3085
  <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>
3086
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
3087
+ <fo:inline> <xsl:apply-templates/></fo:inline>
3088
+ <fo:block> </fo:block>
3089
+ </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
3090
+
3091
+ <fo:block break-after="page"/>
3092
+
3093
+ <fo:block>
3094
+ <xsl:call-template name="setId"/>
3095
+
3096
+
3097
+
3098
+
3099
+
3100
+ <xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
3101
+ <xsl:if test="$pos &gt;= 2">
3102
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
3097
3103
  </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>
3104
+
3105
+
3106
+
3107
+
3108
+
3109
+
3110
+ <xsl:apply-templates/>
3101
3111
  </fo:block>
3102
- <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>
3112
+
3113
+
3114
+
3115
+ </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3116
+ <fo:block break-after="page"/>
3117
+ <fo:block>
3118
+ <xsl:call-template name="setId"/>
3122
3119
  <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>
3130
- <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>
3133
- </xsl:choose>
3120
+ </fo:block>
3121
+ </xsl:template><xsl:template match="*[local-name() = 'clause']">
3122
+ <fo:block>
3123
+ <xsl:call-template name="setId"/>
3124
+ <xsl:apply-templates/>
3125
+ </fo:block>
3126
+ </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3127
+ <fo:block id="{@id}">
3128
+ <xsl:apply-templates/>
3129
+ </fo:block>
3130
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@id = '_normative_references' or @id = '_references']">
3131
+
3132
+ <fo:block id="{@id}">
3133
+ <xsl:apply-templates/>
3134
+ </fo:block>
3135
+ </xsl:template><xsl:template match="*[local-name() = 'annex']">
3136
+ <fo:block break-after="page"/>
3137
+ <fo:block id="{@id}">
3138
+
3139
+ </fo:block>
3134
3140
  <xsl:apply-templates/>
3141
+ </xsl:template><xsl:template match="*[local-name() = 'review']">
3142
+ <!-- comment 2019-11-29 -->
3143
+ <!-- <fo:block font-weight="bold">Review:</fo:block>
3144
+ <xsl:apply-templates /> -->
3145
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3146
+ <!-- 0xA0 to space replacement -->
3147
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3148
+ </xsl:template><xsl:template match="*[local-name() = 'errata']">
3149
+ <!-- <row>
3150
+ <date>05-07-2013</date>
3151
+ <type>Editorial</type>
3152
+ <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
3153
+ <pages>D-3</pages>
3154
+ </row>
3155
+ -->
3156
+ <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
3157
+ <fo:table-column column-width="20mm"/>
3158
+ <fo:table-column column-width="23mm"/>
3159
+ <fo:table-column column-width="107mm"/>
3160
+ <fo:table-column column-width="15mm"/>
3161
+ <fo:table-body>
3162
+ <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
3163
+ <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3164
+ <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3165
+ <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
3166
+ <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
3167
+ </fo:table-row>
3168
+ <xsl:apply-templates/>
3169
+ </fo:table-body>
3170
+ </fo:table>
3171
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
3172
+ <fo:table-row>
3173
+ <xsl:apply-templates/>
3174
+ </fo:table-row>
3175
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
3176
+ <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3177
+ <fo:block><xsl:apply-templates/></fo:block>
3178
+ </fo:table-cell>
3135
3179
  </xsl:template><xsl:template name="convertDate">
3136
3180
  <xsl:param name="date"/>
3137
3181
  <xsl:param name="format" select="'short'"/>
@@ -3262,27 +3306,49 @@
3262
3306
  </xsl:otherwise>
3263
3307
  </xsl:choose>
3264
3308
  </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']"/>
3309
+ <xsl:param name="depth"/>
3310
+ <xsl:choose>
3311
+ <xsl:when test="normalize-space(@depth) != ''">
3312
+ <xsl:value-of select="@depth"/>
3313
+ </xsl:when>
3314
+ <xsl:when test="normalize-space($depth) != ''">
3315
+ <xsl:value-of select="$depth"/>
3316
+ </xsl:when>
3317
+ <xsl:otherwise>
3318
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
3319
+ <xsl:variable name="level">
3320
+ <xsl:choose>
3321
+ <xsl:when test="parent::*[local-name() = 'preface']">
3322
+ <xsl:value-of select="$level_total - 1"/>
3323
+ </xsl:when>
3324
+ <xsl:when test="ancestor::*[local-name() = 'preface']">
3325
+ <xsl:value-of select="$level_total - 2"/>
3326
+ </xsl:when>
3327
+ <!-- <xsl:when test="parent::*[local-name() = 'sections']">
3328
+ <xsl:value-of select="$level_total - 1"/>
3329
+ </xsl:when> -->
3330
+ <xsl:when test="ancestor::*[local-name() = 'sections']">
3331
+ <xsl:value-of select="$level_total - 1"/>
3332
+ </xsl:when>
3333
+ <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3334
+ <xsl:value-of select="$level_total - 1"/>
3335
+ </xsl:when>
3336
+ <xsl:when test="parent::*[local-name() = 'annex']">
3337
+ <xsl:value-of select="$level_total - 1"/>
3338
+ </xsl:when>
3339
+ <xsl:when test="ancestor::*[local-name() = 'annex']">
3340
+ <xsl:value-of select="$level_total"/>
3341
+ </xsl:when>
3342
+ <xsl:when test="local-name() = 'annex'">1</xsl:when>
3343
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3344
+ <xsl:otherwise>
3345
+ <xsl:value-of select="$level_total - 1"/>
3346
+ </xsl:otherwise>
3347
+ </xsl:choose>
3348
+ </xsl:variable>
3349
+ <xsl:value-of select="$level"/>
3350
+ </xsl:otherwise>
3351
+ </xsl:choose>
3286
3352
  </xsl:template><xsl:template name="split">
3287
3353
  <xsl:param name="pText" select="."/>
3288
3354
  <xsl:param name="sep" select="','"/>
@@ -3328,4 +3394,15 @@
3328
3394
  <xsl:when test="$language = 'cn'">Chinese</xsl:when>
3329
3395
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3330
3396
  </xsl:choose>
3397
+ </xsl:template><xsl:template name="setId">
3398
+ <xsl:attribute name="id">
3399
+ <xsl:choose>
3400
+ <xsl:when test="@id">
3401
+ <xsl:value-of select="@id"/>
3402
+ </xsl:when>
3403
+ <xsl:otherwise>
3404
+ <xsl:value-of select="generate-id()"/>
3405
+ </xsl:otherwise>
3406
+ </xsl:choose>
3407
+ </xsl:attribute>
3331
3408
  </xsl:template></xsl:stylesheet>