metanorma-m3aawg 1.4.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  require "isodoc"
2
2
  require_relative "base_convert"
3
+ require_relative "init"
3
4
 
4
5
  module IsoDoc
5
6
  module M3AAWG
@@ -13,8 +14,10 @@ module IsoDoc
13
14
 
14
15
  def default_fonts(options)
15
16
  {
16
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Overpass",sans-serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Overpass",sans-serif'),
17
+ bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
18
+ '"Overpass",sans-serif'),
19
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
20
+ '"Overpass",sans-serif'),
18
21
  monospacefont: '"Space Mono",monospace'
19
22
  }
20
23
  end
@@ -32,9 +35,12 @@ module IsoDoc
32
35
  def colophon(body, docxml)
33
36
  body.div **{ class: "colophon" } do |div|
34
37
  div << <<~"COLOPHON"
35
- <p>As with all M3AAWG documents that we publish, please check the M3AAWG website
36
- (<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to this paper.</p>
37
- <p>&copy; {{ docyear }} copyright by the Messaging, Malware and Mobile Anti-Abuse Working Group (M3AAWG)</p>
38
+ <p>As with all M<sup>3</sup>AAWG documents that we publish,
39
+ please check the M<sup>3</sup>AAWG website
40
+ (<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to
41
+ this paper.</p>
42
+ <p>&copy; #{@meta.get[:docyear]} copyright by the Messaging, Malware
43
+ and Mobile Anti-Abuse Working Group (M<sup>3</sup>AAWG)</p>
38
44
  COLOPHON
39
45
  end
40
46
  end
@@ -47,7 +53,8 @@ module IsoDoc
47
53
  end
48
54
 
49
55
  def make_body(xml, docxml)
50
- body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
56
+ body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
57
+ "xml:lang": "EN-US", class: "container" }
51
58
  xml.body **body_attr do |body|
52
59
  make_body1(body, docxml)
53
60
  make_body2(body, docxml)
@@ -57,6 +64,7 @@ module IsoDoc
57
64
  end
58
65
 
59
66
  include BaseRender
67
+ include Init
60
68
  end
61
69
  end
62
70
  end
@@ -0,0 +1 @@
1
+ annex: Appendix
@@ -0,0 +1,10 @@
1
+ module IsoDoc
2
+ module M3AAWG
3
+ class I18n < IsoDoc::I18n
4
+ def load_yaml1(lang, script)
5
+ y = YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
6
+ super.merge(y)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,27 @@
1
+ require "isodoc"
2
+ require_relative "metadata"
3
+ require_relative "xref"
4
+ require_relative "i18n"
5
+
6
+ module IsoDoc
7
+ module M3AAWG
8
+ module Init
9
+ def metadata_init(lang, script, labels)
10
+ @meta = Metadata.new(lang, script, labels)
11
+ end
12
+
13
+ def xref_init(lang, script, klass, labels, options)
14
+ @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), labels, options)
15
+ end
16
+
17
+ def i18n_init(lang, script, i18nyaml = nil)
18
+ @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
19
+ end
20
+
21
+ def fileloc(loc)
22
+ File.join(File.dirname(__FILE__), loc)
23
+ end
24
+ end
25
+ end
26
+ end
27
+
@@ -22,23 +22,8 @@
22
22
  -->
23
23
  <xsl:variable name="contents">
24
24
  <contents>
25
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()" mode="contents"/>
26
-
27
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
28
- <xsl:with-param name="sectionNum" select="'1'"/>
29
- </xsl:apply-templates>
30
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
31
- <xsl:with-param name="sectionNum" select="'2'"/>
32
- </xsl:apply-templates>
33
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() &gt; 1]" mode="contents"> <!-- @id != '_scope' -->
34
- <xsl:with-param name="sectionNumSkew" select="'1'"/>
35
- </xsl:apply-templates>
36
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:annex" mode="contents"/>
37
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() &gt; 1]" mode="contents"/> <!-- @id = '_bibliography' -->
38
-
39
- <xsl:apply-templates select="//m3d:figure" mode="contents"/>
40
-
41
- <xsl:apply-templates select="//m3d:table" mode="contents"/>
25
+ <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
26
+ <xsl:call-template name="processMainSectionsDefault_Contents"/>
42
27
  </contents>
43
28
  </xsl:variable>
44
29
 
@@ -47,7 +32,7 @@
47
32
  </xsl:variable>
48
33
 
49
34
  <xsl:template match="/">
50
- <xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
35
+ <xsl:call-template name="namespaceCheck"/>
51
36
  <fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
52
37
  <fo:layout-master-set>
53
38
 
@@ -233,17 +218,17 @@
233
218
  <fo:table-column column-width="25mm"/>
234
219
  <fo:table-column column-width="155mm"/>
235
220
  <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 -->
221
+ <xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
237
222
  <fo:table-row height="6mm">
238
223
  <fo:table-cell>
239
224
  <fo:block font-weight="bold">
240
225
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
241
226
  <xsl:choose>
242
- <xsl:when test="@section = '0'">
243
- <xsl:value-of select="text()"/>
227
+ <xsl:when test="@section = ''">
228
+ <xsl:apply-templates/>
244
229
  </xsl:when>
245
230
  <xsl:when test="@type = 'references' and @section = ''">
246
- <xsl:value-of select="text()"/>
231
+ <xsl:apply-templates/>
247
232
  </xsl:when>
248
233
  <xsl:when test="@level = 1">
249
234
  <xsl:value-of select="@section"/>
@@ -260,12 +245,13 @@
260
245
  </xsl:if>
261
246
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
262
247
  <xsl:choose>
263
- <xsl:when test="@section = '0'"/>
248
+ <xsl:when test="@section = ''"/>
264
249
  <xsl:when test="@type = 'references' and @section = ''"/>
265
250
  <xsl:otherwise>
266
- <xsl:value-of select="text()"/>
251
+ <xsl:apply-templates/>
267
252
  </xsl:otherwise>
268
253
  </xsl:choose>
254
+
269
255
  <fo:inline keep-together.within-line="always">
270
256
  <fo:leader font-weight="normal" leader-pattern="dots"/>
271
257
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -286,35 +272,14 @@
286
272
  </fo:block>
287
273
 
288
274
  <!-- Foreword, Introduction -->
289
- <fo:block>
290
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:preface/node()"/>
275
+ <fo:block>
276
+ <xsl:call-template name="processPrefaceSectionsDefault"/>
291
277
  </fo:block>
292
278
 
293
279
  <fo:block break-after="page"/>
294
280
 
295
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]"> <!-- Scope -->
296
- <xsl:with-param name="sectionNum" select="'1'"/>
297
- </xsl:apply-templates>
298
-
299
- <!-- Normative references -->
300
- <xsl:if test="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
301
- <fo:block break-after="page"/>
302
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
303
- <xsl:with-param name="sectionNum" select="'2'"/>
304
- </xsl:apply-templates>
305
- </xsl:if>
306
-
307
- <!-- Main sections -->
308
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() &gt; 1]">
309
- <xsl:with-param name="sectionNumSkew" select="'1'"/>
310
- </xsl:apply-templates>
311
-
312
- <!-- Annex(s) -->
313
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:annex"/>
281
+ <xsl:call-template name="processMainSectionsDefault"/>
314
282
 
315
- <!-- Bibliography -->
316
- <xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() &gt; 1]"/>
317
-
318
283
  </fo:flow>
319
284
  </fo:page-sequence>
320
285
 
@@ -328,178 +293,61 @@
328
293
  </fo:block>
329
294
  </xsl:template>
330
295
 
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>
296
+ <xsl:template match="node()">
297
+ <xsl:apply-templates/>
339
298
  </xsl:template>
340
299
 
341
300
  <!-- ============================= -->
342
301
  <!-- CONTENTS -->
343
302
  <!-- ============================= -->
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>
303
+ <xsl:template match="node()" mode="contents">
304
+ <xsl:apply-templates mode="contents"/>
351
305
  </xsl:template>
352
306
 
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
-
307
+
308
+ <!-- element with title -->
309
+ <xsl:template match="*[m3d:title]" mode="contents">
384
310
  <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"/>
311
+ <xsl:call-template name="getLevel">
312
+ <xsl:with-param name="depth" select="m3d:title/@depth"/>
391
313
  </xsl:call-template>
392
314
  </xsl:variable>
393
315
 
394
316
  <xsl:variable name="display">
395
317
  <xsl:choose>
396
- <xsl:when test="ancestor::m3d:bibitem">false</xsl:when>
397
- <xsl:when test="ancestor::m3d:term">false</xsl:when>
318
+ <xsl:when test="ancestor-or-self::m3d:bibitem">false</xsl:when>
319
+ <xsl:when test="ancestor-or-self::m3d:term">false</xsl:when>
320
+ <xsl:when test="ancestor-or-self::m3d:preface and $level &gt;= 2">false</xsl:when>
398
321
  <xsl:when test="ancestor::m3d:annex and $level &gt;= 3">false</xsl:when>
399
322
  <xsl:when test="$level &lt;= 3">true</xsl:when>
400
323
  <xsl:otherwise>false</xsl:otherwise>
401
324
  </xsl:choose>
402
325
  </xsl:variable>
403
326
 
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
327
 
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>
328
+ <xsl:if test="$display = 'true'">
427
329
 
428
- <xsl:apply-templates mode="contents">
429
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
430
- </xsl:apply-templates>
330
+ <xsl:variable name="section">
331
+ <xsl:call-template name="getSection"/>
332
+ </xsl:variable>
333
+
334
+ <xsl:variable name="title">
335
+ <xsl:call-template name="getName"/>
336
+ </xsl:variable>
337
+
338
+ <xsl:variable name="type">
339
+ <xsl:value-of select="local-name()"/>
340
+ </xsl:variable>
341
+
342
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
343
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
344
+ </item>
345
+ <xsl:apply-templates mode="contents"/>
346
+ </xsl:if>
431
347
 
432
348
  </xsl:template>
433
349
 
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>
350
+
503
351
 
504
352
  <xsl:template name="getListItemFormat">
505
353
  <xsl:choose>
@@ -523,47 +371,9 @@
523
371
  <!-- ============================= -->
524
372
  <!-- ============================= -->
525
373
 
374
+
526
375
 
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)]">
376
+ <!-- <xsl:template match="m3d:clause//m3d:clause[not(m3d:title)]">
567
377
  <xsl:param name="sectionNum"/>
568
378
  <xsl:variable name="section">
569
379
  <xsl:call-template name="getSection">
@@ -572,37 +382,47 @@
572
382
  </xsl:variable>
573
383
  <fo:block margin-top="6pt" margin-bottom="6pt" keep-with-next="always">
574
384
  <fo:inline>
575
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
385
+ <xsl:value-of select="$section"/>
576
386
  </fo:inline>
577
387
  </fo:block>
578
388
  <xsl:apply-templates>
579
389
  <xsl:with-param name="sectionNum" select="$sectionNum"/>
580
390
  </xsl:apply-templates>
581
- </xsl:template>
391
+ </xsl:template> -->
582
392
 
393
+ <!-- ====== -->
394
+ <!-- title -->
395
+ <!-- ====== -->
583
396
 
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"/>
397
+ <xsl:template match="m3d:boilerplate//m3d:title">
398
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
399
+ <xsl:apply-templates/>
400
+ </fo:block>
401
+ </xsl:template>
402
+
403
+
404
+ <xsl:template match="m3d:annex/m3d:title">
405
+ <xsl:variable name="level">
406
+ <xsl:call-template name="getLevel"/>
590
407
  </xsl:variable>
591
-
592
- <xsl:variable name="id">
593
- <xsl:call-template name="getId"/>
408
+ <xsl:variable name="font-size">
409
+ <xsl:choose>
410
+ <xsl:when test="$level = 1">14pt</xsl:when>
411
+ <xsl:otherwise>12pt</xsl:otherwise>
412
+ </xsl:choose>
594
413
  </xsl:variable>
414
+ <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
415
+ <xsl:apply-templates/>
416
+ </fo:block>
417
+ </xsl:template>
418
+
419
+
420
+ <xsl:template match="m3d:title">
595
421
 
596
422
  <xsl:variable name="level">
597
423
  <xsl:call-template name="getLevel"/>
598
424
  </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
-
425
+
606
426
  <xsl:variable name="font-size">
607
427
  <xsl:choose>
608
428
  <xsl:when test="ancestor::m3d:preface">14pt</xsl:when>
@@ -619,98 +439,40 @@
619
439
  </xsl:choose>
620
440
  </xsl:variable>
621
441
 
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> -->
442
+ <xsl:element name="{$element-name}">
443
+ <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
444
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
445
+ <xsl:attribute name="margin-top">
446
+ <xsl:choose>
447
+ <xsl:when test="ancestor::m3d:preface">8pt</xsl:when>
448
+ <xsl:when test="$level = 2 and ancestor::m3d:annex">10pt</xsl:when>
449
+ <xsl:when test="$level = 1">0pt</xsl:when>
450
+ <xsl:when test="$level = ''">6pt</xsl:when>
451
+ <xsl:otherwise>12pt</xsl:otherwise>
452
+ </xsl:choose>
453
+ </xsl:attribute>
454
+ <xsl:attribute name="margin-bottom">
455
+ <xsl:choose>
456
+ <xsl:when test="ancestor::m3d:preface">6pt</xsl:when>
457
+ <xsl:when test="$level = 1">12pt</xsl:when>
458
+ <xsl:otherwise>8pt</xsl:otherwise>
459
+ </xsl:choose>
460
+ </xsl:attribute>
461
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
462
+
463
+ <xsl:apply-templates/>
464
+
465
+ </xsl:element>
466
+
467
+ <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::m3d:p)">
468
+ <!-- <fo:block> -->
469
+ <xsl:value-of select="$linebreak"/>
470
+ <!-- </fo:block> -->
471
+ </xsl:if>
648
472
 
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
473
  </xsl:template>
713
-
474
+ <!-- ====== -->
475
+ <!-- ====== -->
714
476
 
715
477
 
716
478
  <xsl:template match="m3d:p">
@@ -794,13 +556,13 @@
794
556
  <fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
795
557
  <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
796
558
  <!-- <xsl:value-of select="@reference"/> -->
797
- <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@id='_normative_references' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
559
+ <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@normative='true' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
798
560
  </fo:basic-link>
799
561
  </fo:inline>
800
562
  <fo:footnote-body>
801
563
  <fo:block font-size="9pt" margin-bottom="12pt">
802
564
  <fo:inline font-size="6pt" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super" padding-right="1mm">
803
- <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@id='_normative_references' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
565
+ <xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@normative='true' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
804
566
  </fo:inline>
805
567
  <xsl:for-each select="m3d:p">
806
568
  <xsl:apply-templates/>
@@ -823,90 +585,6 @@
823
585
  <xsl:apply-templates/>
824
586
  </xsl:template>
825
587
 
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
588
 
911
589
 
912
590
  <xsl:template match="m3d:bibitem">
@@ -934,7 +612,7 @@
934
612
  </xsl:template>
935
613
 
936
614
 
937
- <xsl:template match="m3d:bibitem/m3d:note">
615
+ <xsl:template match="m3d:bibitem/m3d:note" priority="2">
938
616
  <fo:footnote>
939
617
  <xsl:variable name="number">
940
618
  <xsl:number level="any" count="m3d:bibitem/m3d:note"/>
@@ -957,7 +635,7 @@
957
635
 
958
636
 
959
637
 
960
- <xsl:template match="m3d:ul | m3d:ol">
638
+ <xsl:template match="m3d:ul | m3d:ol" mode="ul_ol">
961
639
  <fo:block-container margin-left="6mm">
962
640
  <fo:block-container margin-left="0mm">
963
641
  <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="6mm"> <!-- margin-bottom="8pt" -->
@@ -966,14 +644,14 @@
966
644
  </xsl:if>
967
645
  <xsl:apply-templates/>
968
646
  </fo:list-block>
969
- <xsl:for-each select="./m3d:note//m3d:p">
647
+ <xsl:for-each select="./m3d:note">
970
648
  <xsl:call-template name="note"/>
971
649
  </xsl:for-each>
972
650
  </fo:block-container>
973
651
  </fo:block-container>
974
652
  </xsl:template>
975
653
 
976
- <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note"/>
654
+ <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note" priority="2"/>
977
655
 
978
656
  <xsl:template match="m3d:li">
979
657
  <fo:list-item id="{@id}">
@@ -987,36 +665,19 @@
987
665
  </fo:block>
988
666
  </fo:list-item-label>
989
667
  <fo:list-item-body start-indent="body-start()">
990
- <xsl:apply-templates/>
991
- <xsl:apply-templates select=".//m3d:note" mode="process"/>
668
+ <fo:block>
669
+ <xsl:apply-templates/>
670
+ <xsl:apply-templates select=".//m3d:note" mode="process"/>
671
+ </fo:block>
992
672
  </fo:list-item-body>
993
673
  </fo:list-item>
994
674
  </xsl:template>
995
675
 
996
-
997
- <xsl:template match="m3d:term">
998
- <xsl:param name="sectionNum"/>
999
- <fo:block id="{@id}" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
1000
- <fo:inline>
1001
- <xsl:variable name="section">
1002
- <xsl:for-each select="*[1]">
1003
- <xsl:call-template name="getSection">
1004
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1005
- </xsl:call-template>
1006
- </xsl:for-each>
1007
- </xsl:variable>
1008
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
1009
- </fo:inline>
1010
- </fo:block>
1011
- <fo:block>
1012
- <xsl:apply-templates>
1013
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1014
- </xsl:apply-templates>
1015
- </fo:block>
676
+ <xsl:template match="m3d:note" mode="process">
677
+ <xsl:call-template name="note"/>
1016
678
  </xsl:template>
1017
-
679
+
1018
680
  <xsl:template match="m3d:preferred">
1019
- <xsl:param name="sectionNum"/>
1020
681
 
1021
682
  <fo:inline>
1022
683
  <xsl:apply-templates/>
@@ -1027,135 +688,34 @@
1027
688
  </xsl:if>
1028
689
 
1029
690
  </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
691
 
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>
692
+
1099
693
 
1100
- <xsl:template match="m3d:termnote">
694
+ <xsl:template match="m3d:termnote" priority="2">
1101
695
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1102
696
  <fo:block>
1103
697
  <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)"/>
698
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
1111
699
  </fo:inline>
1112
700
  <xsl:apply-templates/>
1113
701
  </fo:block>
1114
702
  </fo:block-container>
1115
703
  </xsl:template>
1116
704
 
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>
705
+ <xsl:template match="m3d:example/m3d:p" priority="2">
706
+ <fo:inline xsl:use-attribute-sets="example-p-style">
1140
707
  <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>
708
+ </fo:inline>
1146
709
  </xsl:template>
1147
710
 
1148
-
1149
- <xsl:template match="m3d:annex">
1150
- <fo:block break-after="page"/>
1151
- <xsl:apply-templates/>
1152
- </xsl:template>
1153
711
 
1154
712
 
1155
713
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
1156
- <xsl:template match="m3d:references[position() &gt; 1]">
714
+ <xsl:template match="m3d:references[not(@normative='true')]">
1157
715
  <fo:block break-after="page"/>
1158
- <xsl:apply-templates/>
716
+ <fo:block id="{@id}">
717
+ <xsl:apply-templates/>
718
+ </fo:block>
1159
719
  <fo:block-container text-align="center">
1160
720
  <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
1161
721
  <fo:block> </fo:block>
@@ -1166,7 +726,7 @@
1166
726
 
1167
727
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1168
728
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem"> -->
1169
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem">
729
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem">
1170
730
  <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
1171
731
  <fo:list-item>
1172
732
  <fo:list-item-label end-indent="label-end()">
@@ -1205,191 +765,45 @@
1205
765
  </xsl:template>
1206
766
 
1207
767
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem" mode="contents"/> -->
1208
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem" mode="contents"/>
768
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem" mode="contents"/>
1209
769
 
1210
770
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem/m3d:title"> -->
1211
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem/m3d:title">
771
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem/m3d:title">
1212
772
  <fo:inline font-style="italic">
1213
773
  <xsl:apply-templates/>
1214
774
  </fo:inline>
1215
775
  </xsl:template>
1216
776
 
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
-
777
+
778
+
1238
779
 
1239
780
  <xsl:template match="mathml:math" priority="2">
1240
781
  <fo:inline font-family="Cambria Math">
782
+ <xsl:variable name="mathml">
783
+ <xsl:apply-templates select="." mode="mathml"/>
784
+ </xsl:variable>
1241
785
  <fo:instream-foreign-object fox:alt-text="Math">
1242
- <xsl:copy-of select="."/>
786
+ <!-- <xsl:copy-of select="."/> -->
787
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
1243
788
  </fo:instream-foreign-object>
1244
789
  </fo:inline>
1245
790
  </xsl:template>
1246
791
 
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
792
 
1317
- <xsl:template match="m3d:note/m3d:p" name="note">
1318
- <xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
793
+ <!-- <xsl:template match="m3d:note/m3d:p" name="note">
1319
794
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1320
795
  <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>
796
+ <fo:inline >
797
+ <xsl:apply-templates select="../m3d:name" mode="presentation">
798
+ <xsl:with-param name="sfx" select="':'"/>
799
+ </xsl:apply-templates>
1332
800
  </fo:inline>
1333
- <xsl:apply-templates/>
801
+ <xsl:apply-templates />
1334
802
  </fo:block>
1335
803
  </fo:block-container>
1336
- </xsl:template>
804
+ </xsl:template> -->
805
+
1337
806
 
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
807
 
1394
808
  <xsl:template match="m3d:admonition">
1395
809
  <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
@@ -1400,23 +814,12 @@
1400
814
  </fo:block>
1401
815
  </xsl:template>
1402
816
 
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
817
 
1415
818
  <xsl:template match="m3d:formula/m3d:stem">
1416
819
  <fo:block margin-top="14pt" margin-bottom="14pt">
1417
- <fo:table table-layout="fixed" width="170mm">
1418
- <fo:table-column column-width="165mm"/>
1419
- <fo:table-column column-width="5mm"/>
820
+ <fo:table table-layout="fixed" width="100%"> <!-- 170mm -->
821
+ <fo:table-column column-width="95%"/> <!-- 165mm -->
822
+ <fo:table-column column-width="5%"/> <!-- 5mm -->
1420
823
  <fo:table-body>
1421
824
  <fo:table-row>
1422
825
  <fo:table-cell display-align="center">
@@ -1426,179 +829,21 @@
1426
829
  </fo:table-cell>
1427
830
  <fo:table-cell display-align="center">
1428
831
  <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>
832
+ <xsl:apply-templates select="../m3d:name" mode="presentation"/>
1437
833
  </fo:block>
1438
834
  </fo:table-cell>
1439
835
  </fo:table-row>
1440
836
  </fo:table-body>
1441
- </fo:table>
1442
- <fo:inline keep-together.within-line="always">
1443
- </fo:inline>
837
+ </fo:table>
1444
838
  </fo:block>
1445
839
  </xsl:template>
1446
840
 
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
841
 
1544
842
  <xsl:variable name="Image-M3AAWG-Logo">
1545
843
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOmZhZjViZGQ1LWJhM2QtMTFkYS1hZDMxLWQzM2Q3NTE4MmYxYiIgeG1wTU06RG9jdW1lb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wnCspk7vvSewQplRk4CGffKrpLu4WsU2xFMqfgTkuIS+hrErAGQ7eV+RpBtsgMaRI0eOqpNswmSFMlscf1yDdZ5rqVfsk3NFkMJL4HkmbZYabCMMUYsM4wNDz3VFkKzUrNShVr7FUOZ9NShw35f64SwWk60P1I2fJiwW9gDQlGR1cGTSNv0gbYKhLrYvh9WWD5peZ3C5fFLqB3dI7HfDm2YPzqkkhzFChQ+bC2gOAdpwAOpSxzYdOXJUW8m8/VQPKGr7yVHdJbgdKy+GwcowwKvGOsCgFnZZy2jfUtv7DMAXtgDYy4dHFM5Yakzw/AsXBTBqhR3AXAaFzOI7nKfc9pMjR44KTNh+cmc/OaqTRBCxpIbrgO2dVXWoz6DF+ZLJkSNHjuodOZduR44cOXLkyJEDNY4cOXLkyJEjR7WF/O2nDbnvXd9oIzfEjhw5cuTI0W8L1CAA0DauOxw5clQA6khe84PrCkeOHBWS/l+AAQACYD7v73Ou8wAAAABJRU5ErkJggg==</xsl:text>
1546
844
  </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
-
845
+
1561
846
  <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
847
 
1603
848
  <title-annex lang="en">Annex </title-annex>
1604
849
  <title-annex lang="fr">Annexe </title-annex>
@@ -1606,17 +851,7 @@
1606
851
  <title-annex lang="zh">Annex </title-annex>
1607
852
 
1608
853
 
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
-
854
+
1620
855
  <title-edition lang="en">
1621
856
 
1622
857
 
@@ -1624,9 +859,7 @@
1624
859
 
1625
860
  </title-edition>
1626
861
 
1627
- <title-formula lang="en">Formula </title-formula>
1628
- <title-formula lang="fr">Formula </title-formula>
1629
-
862
+
1630
863
  <title-toc lang="en">
1631
864
 
1632
865
 
@@ -1661,13 +894,6 @@
1661
894
  </title-part>
1662
895
  <title-part lang="zh">第 # 部分:</title-part>
1663
896
 
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
897
  <title-modified lang="en">modified</title-modified>
1672
898
  <title-modified lang="fr">modifiée</title-modified>
1673
899
 
@@ -1675,20 +901,23 @@
1675
901
 
1676
902
 
1677
903
 
1678
- <title-source lang="en">SOURCE</title-source>
904
+ <title-source lang="en">
905
+
906
+ <xsl:text>SOURCE</xsl:text>
907
+
908
+
909
+ </title-source>
1679
910
 
1680
911
  <title-keywords lang="en">Keywords</title-keywords>
1681
912
 
1682
913
  <title-deprecated lang="en">DEPRECATED</title-deprecated>
1683
914
  <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1684
-
1685
- <title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
1686
-
915
+
1687
916
  <title-list-tables lang="en">List of Tables</title-list-tables>
1688
917
 
1689
918
  <title-list-figures lang="en">List of Figures</title-list-figures>
1690
919
 
1691
- <title-recommendation lang="en">Recommendation </title-recommendation>
920
+ <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1692
921
 
1693
922
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1694
923
 
@@ -1698,8 +927,6 @@
1698
927
 
1699
928
  <title-in lang="en">in </title-in>
1700
929
 
1701
- <title-box lang="en">Box </title-box>
1702
-
1703
930
  <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1704
931
  <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1705
932
 
@@ -1722,7 +949,11 @@
1722
949
  <title-warning lang="zh">警告</title-warning>
1723
950
 
1724
951
  <title-amendment lang="en">AMENDMENT</title-amendment>
1725
- </xsl:variable><xsl:template name="getTitle">
952
+
953
+ <title-continued lang="en">(continued)</title-continued>
954
+ <title-continued lang="fr">(continué)</title-continued>
955
+
956
+ </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1726
957
  <xsl:param name="name"/>
1727
958
  <xsl:variable name="lang">
1728
959
  <xsl:call-template name="getLang"/>
@@ -1742,7 +973,10 @@
1742
973
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1743
974
 
1744
975
 
976
+
1745
977
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
978
+ <xsl:attribute name="white-space">pre</xsl:attribute>
979
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1746
980
 
1747
981
 
1748
982
 
@@ -1754,24 +988,348 @@
1754
988
 
1755
989
 
1756
990
 
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>
1763
991
 
992
+ </xsl:attribute-set><xsl:attribute-set name="permission-style">
1764
993
 
994
+ </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
1765
995
 
1766
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
996
+ </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
1767
997
 
1768
- <xsl:attribute name="font-size">10pt</xsl:attribute>
998
+ </xsl:attribute-set><xsl:attribute-set name="requirement-style">
999
+
1000
+ </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1001
+
1002
+ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1003
+
1004
+ </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
1005
+ </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
1006
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
1007
+
1008
+
1009
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
1010
+
1011
+
1012
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
1013
+
1014
+ </xsl:attribute-set><xsl:attribute-set name="termexample-style">
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
1021
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1022
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1023
+
1024
+
1025
+
1026
+ </xsl:attribute-set><xsl:attribute-set name="example-style">
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1034
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+ </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1042
+
1043
+
1044
+
1045
+ </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1054
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+ </xsl:attribute-set><xsl:attribute-set name="example-p-style">
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1075
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1085
+
1086
+
1087
+
1088
+
1089
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1090
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1091
+
1092
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1093
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1094
+
1095
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1096
+ <xsl:attribute name="text-align">center</xsl:attribute>
1097
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+
1109
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1110
+
1111
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1112
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1113
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1114
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1115
+
1116
+
1117
+
1118
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1119
+
1120
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1769
1121
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
1770
1122
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1771
1123
 
1772
1124
 
1773
1125
 
1774
- </xsl:attribute-set><xsl:template match="text()">
1126
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1127
+
1128
+
1129
+
1130
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1131
+
1132
+
1133
+
1134
+
1135
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1145
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1146
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1147
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+ </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1164
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1180
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1188
+
1189
+
1190
+
1191
+
1192
+
1193
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1194
+
1195
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1196
+
1197
+
1198
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1199
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
1200
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1207
+
1208
+
1209
+ <xsl:attribute name="text-align">right</xsl:attribute>
1210
+
1211
+
1212
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1219
+
1220
+
1221
+
1222
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1223
+
1224
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+ <xsl:attribute name="text-align">center</xsl:attribute>
1236
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1237
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1238
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1248
+
1249
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1250
+ <xsl:attribute name="text-align">center</xsl:attribute>
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1257
+
1258
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1259
+
1260
+
1261
+ <xsl:attribute name="width">100%</xsl:attribute>
1262
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1263
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1264
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1265
+
1266
+
1267
+
1268
+
1269
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1270
+
1271
+
1272
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1273
+
1274
+
1275
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1276
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1277
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1278
+ <xsl:attribute name="text-align">center</xsl:attribute>
1279
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1280
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1281
+
1282
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1283
+
1284
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1285
+
1286
+
1287
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1288
+
1289
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1290
+
1291
+
1292
+ </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1293
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1294
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1295
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1296
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1297
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1298
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1299
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1300
+
1301
+ <!-- Normative references -->
1302
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
1303
+ <!-- Terms and definitions -->
1304
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
1305
+ <!-- Another main sections -->
1306
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
1307
+ <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1308
+ <!-- Bibliography -->
1309
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
1310
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1311
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1312
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1313
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1314
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1315
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1316
+ </xsl:template><xsl:template name="processMainSectionsDefault">
1317
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1318
+
1319
+ <xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1320
+ <fo:block break-after="page"/>
1321
+ </xsl:if>
1322
+
1323
+ <!-- Normative references -->
1324
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1325
+ <!-- Terms and definitions -->
1326
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
1327
+ <!-- Another main sections -->
1328
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
1329
+ <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1330
+ <!-- Bibliography -->
1331
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1332
+ </xsl:template><xsl:template match="text()">
1775
1333
  <xsl:value-of select="."/>
1776
1334
  </xsl:template><xsl:template match="*[local-name()='br']">
1777
1335
  <xsl:value-of select="$linebreak"/>
@@ -1780,62 +1338,23 @@
1780
1338
  <xsl:call-template name="add-zero-spaces-java"/>
1781
1339
  </xsl:template><xsl:template match="*[local-name()='table']">
1782
1340
 
1783
- <xsl:variable name="simple-table">
1784
- <!-- <xsl:copy> -->
1785
- <xsl:call-template name="getSimpleTable"/>
1786
- <!-- </xsl:copy> -->
1341
+ <xsl:variable name="simple-table">
1342
+ <xsl:call-template name="getSimpleTable"/>
1787
1343
  </xsl:variable>
1788
1344
 
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
1345
 
1795
- <!-- <xsl:if test="$namespace = 'iso'">
1796
- <fo:block space-before="6pt">&#xA0;</fo:block>
1797
- </xsl:if> -->
1798
1346
 
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"/>
1347
+
1348
+
1349
+ <!-- $namespace = 'iso' or -->
1350
+
1351
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1352
+
1836
1353
 
1837
- </xsl:otherwise>
1838
- </xsl:choose>
1354
+
1355
+ <xsl:call-template name="fn_name_display"/>
1356
+
1357
+
1839
1358
 
1840
1359
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1841
1360
 
@@ -1888,6 +1407,7 @@
1888
1407
 
1889
1408
 
1890
1409
 
1410
+
1891
1411
 
1892
1412
 
1893
1413
 
@@ -1903,6 +1423,9 @@
1903
1423
 
1904
1424
 
1905
1425
 
1426
+
1427
+
1428
+
1906
1429
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1907
1430
  <xsl:choose>
1908
1431
  <xsl:when test=". = 1 or . = 0">
@@ -1927,32 +1450,16 @@
1927
1450
 
1928
1451
 
1929
1452
 
1453
+
1454
+
1930
1455
  </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>
1456
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1457
+ <xsl:if test="normalize-space() != ''">
1458
+ <fo:block xsl:use-attribute-sets="table-name-style">
1947
1459
 
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/>
1460
+ <xsl:apply-templates/>
1461
+ </fo:block>
1462
+ </xsl:if>
1956
1463
  </xsl:template><xsl:template name="calculate-columns-numbers">
1957
1464
  <xsl:param name="table-row"/>
1958
1465
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -2067,10 +1574,25 @@
2067
1574
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2068
1575
  <xsl:param name="cols-count"/>
2069
1576
  <!-- font-weight="bold" -->
2070
- <fo:table-header>
2071
-
1577
+ <fo:table-header>
1578
+
2072
1579
  <xsl:apply-templates/>
2073
1580
  </fo:table-header>
1581
+ </xsl:template><xsl:template name="table-header-title">
1582
+ <xsl:param name="cols-count"/>
1583
+ <!-- row for title -->
1584
+ <fo:table-row>
1585
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
1586
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1587
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1588
+ <xsl:call-template name="fn_name_display"/>
1589
+ </xsl:for-each>
1590
+ <fo:block text-align="right" font-style="italic">
1591
+ <xsl:text> </xsl:text>
1592
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1593
+ </fo:block>
1594
+ </fo:table-cell>
1595
+ </fo:table-row>
2074
1596
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2075
1597
  <fo:table-body>
2076
1598
  <xsl:apply-templates/>
@@ -2134,6 +1656,8 @@
2134
1656
  </xsl:choose>
2135
1657
  </xsl:variable>
2136
1658
 
1659
+
1660
+
2137
1661
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2138
1662
  <xsl:with-param name="cols-count" select="$cols-count"/>
2139
1663
  </xsl:apply-templates>
@@ -2143,6 +1667,8 @@
2143
1667
  </xsl:call-template>
2144
1668
 
2145
1669
  <fo:table-body>
1670
+
1671
+
2146
1672
  <xsl:apply-templates/>
2147
1673
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2148
1674
 
@@ -2165,11 +1691,24 @@
2165
1691
 
2166
1692
  </xsl:if>
2167
1693
 
1694
+
1695
+
2168
1696
 
2169
1697
  <xsl:apply-templates/>
2170
1698
  </fo:table-row>
2171
1699
  </xsl:template><xsl:template match="*[local-name()='th']">
2172
1700
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
1701
+ <xsl:attribute name="text-align">
1702
+ <xsl:choose>
1703
+ <xsl:when test="@align">
1704
+ <xsl:value-of select="@align"/>
1705
+ </xsl:when>
1706
+ <xsl:otherwise>center</xsl:otherwise>
1707
+ </xsl:choose>
1708
+ </xsl:attribute>
1709
+
1710
+
1711
+
2173
1712
 
2174
1713
 
2175
1714
 
@@ -2187,15 +1726,36 @@
2187
1726
  <xsl:value-of select="@rowspan"/>
2188
1727
  </xsl:attribute>
2189
1728
  </xsl:if>
1729
+ <xsl:call-template name="display-align"/>
2190
1730
  <fo:block>
2191
1731
  <xsl:apply-templates/>
2192
1732
  </fo:block>
2193
1733
  </fo:table-cell>
1734
+ </xsl:template><xsl:template name="display-align">
1735
+ <xsl:if test="@valign">
1736
+ <xsl:attribute name="display-align">
1737
+ <xsl:choose>
1738
+ <xsl:when test="@valign = 'top'">before</xsl:when>
1739
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
1740
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
1741
+ <xsl:otherwise>before</xsl:otherwise>
1742
+ </xsl:choose>
1743
+ </xsl:attribute>
1744
+ </xsl:if>
2194
1745
  </xsl:template><xsl:template match="*[local-name()='td']">
2195
1746
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1747
+ <xsl:attribute name="text-align">
1748
+ <xsl:choose>
1749
+ <xsl:when test="@align">
1750
+ <xsl:value-of select="@align"/>
1751
+ </xsl:when>
1752
+ <xsl:otherwise>left</xsl:otherwise>
1753
+ </xsl:choose>
1754
+ </xsl:attribute>
2196
1755
 
2197
1756
 
2198
1757
 
1758
+
2199
1759
 
2200
1760
 
2201
1761
 
@@ -2212,24 +1772,12 @@
2212
1772
  <xsl:value-of select="@rowspan"/>
2213
1773
  </xsl:attribute>
2214
1774
  </xsl:if>
2215
- <fo:block>
2216
-
1775
+ <xsl:call-template name="display-align"/>
1776
+ <fo:block>
2217
1777
  <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
-
1778
+ </fo:block>
2231
1779
  </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">
1780
+ </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
1781
 
2234
1782
 
2235
1783
  <fo:block font-size="10pt" margin-bottom="12pt">
@@ -2241,26 +1789,14 @@
2241
1789
 
2242
1790
 
2243
1791
 
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>
1792
+
1793
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2255
1794
 
2256
-
2257
-
2258
-
2259
1795
  </fo:inline>
2260
1796
  <xsl:apply-templates mode="process"/>
2261
1797
  </fo:block>
2262
1798
 
2263
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1799
+ </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
1800
  <xsl:apply-templates/>
2265
1801
  </xsl:template><xsl:template name="fn_display">
2266
1802
  <xsl:variable name="references">
@@ -2320,7 +1856,7 @@
2320
1856
  <!-- and (not(@class) or @class !='pseudocode') -->
2321
1857
  </xsl:variable>
2322
1858
  <xsl:variable name="references">
2323
- <xsl:for-each select=".//*[local-name()='fn']">
1859
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2324
1860
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2325
1861
  <xsl:apply-templates/>
2326
1862
  </fn>
@@ -2414,6 +1950,7 @@
2414
1950
 
2415
1951
 
2416
1952
 
1953
+
2417
1954
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2418
1955
 
2419
1956
  <xsl:value-of select="@reference"/>
@@ -2424,115 +1961,129 @@
2424
1961
  <xsl:apply-templates/>
2425
1962
  </fo:inline>
2426
1963
  </xsl:template><xsl:template match="*[local-name()='dl']">
2427
- <xsl:variable name="parent" select="local-name(..)"/>
2428
-
2429
- <xsl:variable name="key_iso">
2430
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
2431
- </xsl:variable>
2432
-
2433
- <xsl:choose>
2434
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2435
-
2436
-
2437
- <fo:block margin-bottom="12pt" text-align="left">
2438
-
2439
- <xsl:variable name="title-where">
2440
- <xsl:call-template name="getTitle">
2441
- <xsl:with-param name="name" select="'title-where'"/>
2442
- </xsl:call-template>
2443
- </xsl:variable>
2444
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2445
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2446
- <xsl:text/>
2447
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2448
- </fo:block>
2449
-
2450
- </xsl:when>
2451
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2452
- <fo:block margin-bottom="12pt" text-align="left">
2453
-
2454
-
2455
-
2456
-
2457
- <xsl:variable name="title-where">
2458
- <xsl:call-template name="getTitle">
2459
- <xsl:with-param name="name" select="'title-where'"/>
2460
- </xsl:call-template>
2461
- </xsl:variable>
2462
- <xsl:value-of select="$title-where"/>
2463
- </fo:block>
2464
- </xsl:when>
2465
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2466
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2467
-
2468
-
2469
-
2470
- <xsl:variable name="title-key">
2471
- <xsl:call-template name="getTitle">
2472
- <xsl:with-param name="name" select="'title-key'"/>
2473
- </xsl:call-template>
2474
- </xsl:variable>
2475
- <xsl:value-of select="$title-key"/>
2476
- </fo:block>
2477
- </xsl:when>
2478
- </xsl:choose>
2479
-
2480
- <!-- a few components -->
2481
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2482
- <fo:block>
1964
+ <fo:block-container margin-left="0mm">
1965
+ <xsl:if test="parent::*[local-name() = 'note']">
1966
+ <xsl:attribute name="margin-left">
1967
+ <xsl:choose>
1968
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
1969
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
1970
+ </xsl:choose>
1971
+ </xsl:attribute>
2483
1972
 
1973
+ </xsl:if>
1974
+ <fo:block-container margin-left="0mm">
1975
+
1976
+ <xsl:variable name="parent" select="local-name(..)"/>
2484
1977
 
1978
+ <xsl:variable name="key_iso">
1979
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
1980
+ </xsl:variable>
2485
1981
 
1982
+ <xsl:choose>
1983
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
1984
+
1985
+
1986
+ <fo:block margin-bottom="12pt" text-align="left">
1987
+
1988
+ <xsl:variable name="title-where">
1989
+ <xsl:call-template name="getTitle">
1990
+ <xsl:with-param name="name" select="'title-where'"/>
1991
+ </xsl:call-template>
1992
+ </xsl:variable>
1993
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
1994
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
1995
+ <xsl:text/>
1996
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
1997
+ </fo:block>
1998
+
1999
+ </xsl:when>
2000
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2001
+ <fo:block margin-bottom="12pt" text-align="left">
2002
+
2003
+
2004
+
2005
+
2006
+ <xsl:variable name="title-where">
2007
+ <xsl:call-template name="getTitle">
2008
+ <xsl:with-param name="name" select="'title-where'"/>
2009
+ </xsl:call-template>
2010
+ </xsl:variable>
2011
+ <xsl:value-of select="$title-where"/>
2012
+ </fo:block>
2013
+ </xsl:when>
2014
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2015
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2016
+
2017
+
2018
+
2019
+ <xsl:variable name="title-key">
2020
+ <xsl:call-template name="getTitle">
2021
+ <xsl:with-param name="name" select="'title-key'"/>
2022
+ </xsl:call-template>
2023
+ </xsl:variable>
2024
+ <xsl:value-of select="$title-key"/>
2025
+ </fo:block>
2026
+ </xsl:when>
2027
+ </xsl:choose>
2486
2028
 
2487
- <fo:block>
2488
-
2489
-
2490
-
2491
-
2492
- <fo:table width="95%" table-layout="fixed">
2029
+ <!-- a few components -->
2030
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2031
+ <fo:block>
2493
2032
 
2494
- <xsl:choose>
2495
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2496
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2497
- </xsl:when>
2498
- <xsl:when test="normalize-space($key_iso) = 'true'">
2499
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2033
+
2034
+
2035
+
2036
+ <fo:block>
2037
+
2038
+
2039
+
2040
+
2041
+ <fo:table width="95%" table-layout="fixed">
2500
2042
 
2501
- </xsl:when>
2502
- </xsl:choose>
2503
- <!-- create virtual html table for dl/[dt and dd] -->
2504
- <xsl:variable name="html-table">
2505
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2506
- <xsl:element name="{$ns}:table">
2507
- <tbody>
2508
- <xsl:apply-templates mode="dl"/>
2509
- </tbody>
2510
- </xsl:element>
2511
- </xsl:variable>
2512
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2513
- <xsl:variable name="colwidths">
2514
- <xsl:call-template name="calculate-column-widths">
2515
- <xsl:with-param name="cols-count" select="2"/>
2516
- <xsl:with-param name="table" select="$html-table"/>
2517
- </xsl:call-template>
2518
- </xsl:variable>
2519
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2520
- <xsl:variable name="maxlength_dt">
2521
- <xsl:call-template name="getMaxLength_dt"/>
2522
- </xsl:variable>
2523
- <xsl:call-template name="setColumnWidth_dl">
2524
- <xsl:with-param name="colwidths" select="$colwidths"/>
2525
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2526
- </xsl:call-template>
2527
- <fo:table-body>
2528
- <xsl:apply-templates>
2529
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2530
- </xsl:apply-templates>
2531
- </fo:table-body>
2532
- </fo:table>
2533
- </fo:block>
2534
- </fo:block>
2535
- </xsl:if>
2043
+ <xsl:choose>
2044
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2045
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2046
+ </xsl:when>
2047
+ <xsl:when test="normalize-space($key_iso) = 'true'">
2048
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2049
+
2050
+ </xsl:when>
2051
+ </xsl:choose>
2052
+ <!-- create virtual html table for dl/[dt and dd] -->
2053
+ <xsl:variable name="html-table">
2054
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2055
+ <xsl:element name="{$ns}:table">
2056
+ <tbody>
2057
+ <xsl:apply-templates mode="dl"/>
2058
+ </tbody>
2059
+ </xsl:element>
2060
+ </xsl:variable>
2061
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2062
+ <xsl:variable name="colwidths">
2063
+ <xsl:call-template name="calculate-column-widths">
2064
+ <xsl:with-param name="cols-count" select="2"/>
2065
+ <xsl:with-param name="table" select="$html-table"/>
2066
+ </xsl:call-template>
2067
+ </xsl:variable>
2068
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2069
+ <xsl:variable name="maxlength_dt">
2070
+ <xsl:call-template name="getMaxLength_dt"/>
2071
+ </xsl:variable>
2072
+ <xsl:call-template name="setColumnWidth_dl">
2073
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2074
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2075
+ </xsl:call-template>
2076
+ <fo:table-body>
2077
+ <xsl:apply-templates>
2078
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2079
+ </xsl:apply-templates>
2080
+ </fo:table-body>
2081
+ </fo:table>
2082
+ </fo:block>
2083
+ </fo:block>
2084
+ </xsl:if>
2085
+ </fo:block-container>
2086
+ </fo:block-container>
2536
2087
  </xsl:template><xsl:template name="setColumnWidth_dl">
2537
2088
  <xsl:param name="colwidths"/>
2538
2089
  <xsl:param name="maxlength_dt"/>
@@ -2587,7 +2138,7 @@
2587
2138
  <xsl:value-of select="string-length(normalize-space(.))"/>
2588
2139
  </xsl:if>
2589
2140
  </xsl:for-each>
2590
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
2141
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2591
2142
  <xsl:param name="key_iso"/>
2592
2143
 
2593
2144
  <!-- <tr>
@@ -2603,12 +2154,7 @@
2603
2154
  <xsl:if test="normalize-space($key_iso) = 'true'">
2604
2155
  <xsl:attribute name="margin-top">0</xsl:attribute>
2605
2156
  </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"/>
2157
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2612
2158
  </fo:block>
2613
2159
  </fo:table-cell>
2614
2160
  <fo:table-cell>
@@ -2634,6 +2180,7 @@
2634
2180
  <xsl:param name="key_iso"/>
2635
2181
 
2636
2182
  <fo:table-row>
2183
+
2637
2184
  <fo:table-cell>
2638
2185
 
2639
2186
  <fo:block margin-top="6pt">
@@ -2659,14 +2206,36 @@
2659
2206
  <fo:table-cell>
2660
2207
  <fo:block>
2661
2208
 
2662
-
2209
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2210
+ <xsl:if test="local-name(*[1]) != 'stem'">
2211
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2212
+ </xsl:if>
2213
+ </xsl:if> -->
2663
2214
 
2664
2215
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2665
2216
 
2666
2217
  </fo:block>
2667
2218
  </fo:table-cell>
2668
2219
  </fo:table-row>
2669
-
2220
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2221
+ <xsl:if test="local-name(*[1]) = 'stem'">
2222
+ <fo:table-row>
2223
+ <fo:table-cell>
2224
+ <fo:block margin-top="6pt">
2225
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2226
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2227
+ </xsl:if>
2228
+ <xsl:text>&#xA0;</xsl:text>
2229
+ </fo:block>
2230
+ </fo:table-cell>
2231
+ <fo:table-cell>
2232
+ <fo:block>
2233
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2234
+ </fo:block>
2235
+ </fo:table-cell>
2236
+ </fo:table-row>
2237
+ </xsl:if>
2238
+ </xsl:if> -->
2670
2239
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2671
2240
  <xsl:apply-templates/>
2672
2241
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -2677,7 +2246,7 @@
2677
2246
  <fo:inline font-style="italic">
2678
2247
  <xsl:apply-templates/>
2679
2248
  </fo:inline>
2680
- </xsl:template><xsl:template match="*[local-name()='strong']">
2249
+ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2681
2250
  <fo:inline font-weight="bold">
2682
2251
  <xsl:apply-templates/>
2683
2252
  </fo:inline>
@@ -2690,7 +2259,37 @@
2690
2259
  <xsl:apply-templates/>
2691
2260
  </fo:inline>
2692
2261
  </xsl:template><xsl:template match="*[local-name()='tt']">
2693
- <fo:inline font-family="Courier" font-size="10pt">
2262
+ <fo:inline xsl:use-attribute-sets="tt-style">
2263
+ <xsl:variable name="_font-size">
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+ <xsl:choose>
2273
+ <xsl:when test="not(ancestor::*[local-name()='note'])">10</xsl:when>
2274
+ <xsl:otherwise>11</xsl:otherwise>
2275
+ </xsl:choose>
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+
2282
+
2283
+ </xsl:variable>
2284
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2285
+ <xsl:if test="$font-size != ''">
2286
+ <xsl:attribute name="font-size">
2287
+ <xsl:choose>
2288
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2289
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2290
+ </xsl:choose>
2291
+ </xsl:attribute>
2292
+ </xsl:if>
2694
2293
  <xsl:apply-templates/>
2695
2294
  </fo:inline>
2696
2295
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2969,169 +2568,1100 @@
2969
2568
  </xsl:choose>
2970
2569
  </xsl:for-each>
2971
2570
  </xsl:variable>
2972
-
2973
- <xsl:variable name="newRow">
2974
- <xsl:copy>
2975
- <xsl:copy-of select="$currentRow/@*"/>
2976
- <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
2977
- </xsl:copy>
2571
+
2572
+ <xsl:variable name="newRow">
2573
+ <xsl:copy>
2574
+ <xsl:copy-of select="$currentRow/@*"/>
2575
+ <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
2576
+ </xsl:copy>
2577
+ </xsl:variable>
2578
+ <xsl:copy-of select="$newRow"/>
2579
+
2580
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
2581
+ <xsl:with-param name="previousRow" select="$newRow"/>
2582
+ </xsl:apply-templates>
2583
+ </xsl:template><xsl:template name="getLang">
2584
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2585
+ <xsl:choose>
2586
+ <xsl:when test="$language = 'English'">en</xsl:when>
2587
+ <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
2588
+ </xsl:choose>
2589
+ </xsl:template><xsl:template name="capitalizeWords">
2590
+ <xsl:param name="str"/>
2591
+ <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
2592
+ <xsl:choose>
2593
+ <xsl:when test="contains($str2, ' ')">
2594
+ <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
2595
+ <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
2596
+ <xsl:value-of select="substring($substr, 2)"/> -->
2597
+ <xsl:call-template name="capitalize">
2598
+ <xsl:with-param name="str" select="$substr"/>
2599
+ </xsl:call-template>
2600
+ <xsl:text> </xsl:text>
2601
+ <xsl:call-template name="capitalizeWords">
2602
+ <xsl:with-param name="str" select="substring-after($str2, ' ')"/>
2603
+ </xsl:call-template>
2604
+ </xsl:when>
2605
+ <xsl:otherwise>
2606
+ <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
2607
+ <xsl:value-of select="substring($str2, 2)"/> -->
2608
+ <xsl:call-template name="capitalize">
2609
+ <xsl:with-param name="str" select="$str2"/>
2610
+ </xsl:call-template>
2611
+ </xsl:otherwise>
2612
+ </xsl:choose>
2613
+ </xsl:template><xsl:template name="capitalize">
2614
+ <xsl:param name="str"/>
2615
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2616
+ <xsl:value-of select="substring($str, 2)"/>
2617
+ </xsl:template><xsl:template match="mathml:math">
2618
+ <fo:inline font-family="STIX2Math">
2619
+ <xsl:variable name="mathml">
2620
+ <xsl:apply-templates select="." mode="mathml"/>
2621
+ </xsl:variable>
2622
+ <fo:instream-foreign-object fox:alt-text="Math">
2623
+ <!-- <xsl:copy-of select="."/> -->
2624
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
2625
+ </fo:instream-foreign-object>
2626
+ </fo:inline>
2627
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
2628
+ <xsl:copy>
2629
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2630
+ </xsl:copy>
2631
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
2632
+ <xsl:copy>
2633
+ <!-- replace start and end spaces to non-break space -->
2634
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2635
+ </xsl:copy>
2636
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2637
+ <xsl:variable name="target">
2638
+ <xsl:choose>
2639
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2640
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2641
+ </xsl:when>
2642
+ <xsl:otherwise>
2643
+ <xsl:value-of select="normalize-space(@target)"/>
2644
+ </xsl:otherwise>
2645
+ </xsl:choose>
2646
+ </xsl:variable>
2647
+ <fo:inline xsl:use-attribute-sets="link-style">
2648
+ <xsl:choose>
2649
+ <xsl:when test="$target = ''">
2650
+ <xsl:apply-templates/>
2651
+ </xsl:when>
2652
+ <xsl:otherwise>
2653
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2654
+ <xsl:choose>
2655
+ <xsl:when test="normalize-space(.) = ''">
2656
+ <xsl:value-of select="$target"/>
2657
+ </xsl:when>
2658
+ <xsl:otherwise>
2659
+ <xsl:apply-templates/>
2660
+ </xsl:otherwise>
2661
+ </xsl:choose>
2662
+ </fo:basic-link>
2663
+ </xsl:otherwise>
2664
+ </xsl:choose>
2665
+ </fo:inline>
2666
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
2667
+ <fo:inline id="{@id}"/>
2668
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
2669
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2670
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2671
+ </fo:block>
2672
+ <xsl:apply-templates/>
2673
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2674
+ <fo:inline><xsl:apply-templates/></fo:inline>
2675
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
2676
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
2677
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2678
+ </fo:block>
2679
+ <xsl:apply-templates/>
2680
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
2681
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2682
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
2683
+ <xsl:variable name="annotation-id" select="@id"/>
2684
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2685
+ <fo:block id="{$annotation-id}" white-space="nowrap">
2686
+ <fo:inline>
2687
+ <xsl:apply-templates>
2688
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2689
+ </xsl:apply-templates>
2690
+ </fo:inline>
2691
+ </fo:block>
2692
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2693
+ <xsl:param name="callout"/>
2694
+ <fo:inline id="{@id}">
2695
+ <!-- for first p in annotation, put <x> -->
2696
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2697
+ <xsl:apply-templates/>
2698
+ </fo:inline>
2699
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
2700
+ <xsl:variable name="title-modified">
2701
+ <xsl:call-template name="getTitle">
2702
+ <xsl:with-param name="name" select="'title-modified'"/>
2703
+ </xsl:call-template>
2704
+ </xsl:variable>
2705
+ <xsl:choose>
2706
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2707
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
2708
+ </xsl:choose>
2709
+ <xsl:apply-templates/>
2710
+ </xsl:template><xsl:template match="*[local-name() = 'xref']">
2711
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2712
+
2713
+ <xsl:apply-templates/>
2714
+ </fo:basic-link>
2715
+ </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2716
+ <fo:block-container margin-left="0mm">
2717
+ <xsl:if test="parent::*[local-name() = 'note']">
2718
+ <xsl:attribute name="margin-left">
2719
+ <xsl:choose>
2720
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2721
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2722
+ </xsl:choose>
2723
+ </xsl:attribute>
2724
+
2725
+ </xsl:if>
2726
+ <fo:block-container margin-left="0mm">
2727
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2728
+ <xsl:apply-templates/>
2729
+ </fo:block>
2730
+ </fo:block-container>
2731
+ </fo:block-container>
2732
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2733
+ <fo:inline>
2734
+ <xsl:apply-templates/>
2735
+ </fo:inline>
2736
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
2737
+ <fo:inline>
2738
+ <xsl:apply-templates/>
2739
+ </fo:inline>
2740
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
2741
+ <xsl:if test="normalize-space() != ''">
2742
+ <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
2743
+ </xsl:if>
2744
+ </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
2745
+
2746
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
2747
+
2748
+
2749
+
2750
+
2751
+ <fo:block-container margin-left="0mm">
2752
+
2753
+
2754
+
2755
+
2756
+
2757
+
2758
+
2759
+
2760
+ <fo:block>
2761
+
2762
+
2763
+
2764
+
2765
+ <fo:inline xsl:use-attribute-sets="note-name-style">
2766
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2767
+ </fo:inline>
2768
+ <xsl:apply-templates/>
2769
+ </fo:block>
2770
+
2771
+
2772
+ </fo:block-container>
2773
+ </fo:block-container>
2774
+
2775
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
2776
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
2777
+ <xsl:choose>
2778
+ <xsl:when test="$num = 1">
2779
+ <fo:inline xsl:use-attribute-sets="note-p-style">
2780
+ <xsl:apply-templates/>
2781
+ </fo:inline>
2782
+ </xsl:when>
2783
+ <xsl:otherwise>
2784
+ <fo:block xsl:use-attribute-sets="note-p-style">
2785
+ <xsl:apply-templates/>
2786
+ </fo:block>
2787
+ </xsl:otherwise>
2788
+ </xsl:choose>
2789
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2790
+ <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2791
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
2792
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2793
+ </fo:inline>
2794
+ <xsl:apply-templates/>
2795
+ </fo:block>
2796
+ </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">
2797
+ <xsl:param name="sfx"/>
2798
+ <xsl:variable name="suffix">
2799
+ <xsl:choose>
2800
+ <xsl:when test="$sfx != ''">
2801
+ <xsl:value-of select="$sfx"/>
2802
+ </xsl:when>
2803
+ <xsl:otherwise>
2804
+
2805
+ <xsl:text>:</xsl:text>
2806
+
2807
+
2808
+ </xsl:otherwise>
2809
+ </xsl:choose>
2810
+ </xsl:variable>
2811
+ <xsl:if test="normalize-space() != ''">
2812
+ <xsl:apply-templates/>
2813
+ <xsl:value-of select="$suffix"/>
2814
+ </xsl:if>
2815
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
2816
+ <xsl:param name="sfx"/>
2817
+ <xsl:variable name="suffix">
2818
+ <xsl:choose>
2819
+ <xsl:when test="$sfx != ''">
2820
+ <xsl:value-of select="$sfx"/>
2821
+ </xsl:when>
2822
+ <xsl:otherwise>
2823
+
2824
+
2825
+ </xsl:otherwise>
2826
+ </xsl:choose>
2827
+ </xsl:variable>
2828
+ <xsl:if test="normalize-space() != ''">
2829
+ <xsl:apply-templates/>
2830
+ <xsl:value-of select="$suffix"/>
2831
+ </xsl:if>
2832
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
2833
+ <fo:inline><xsl:apply-templates/></fo:inline>
2834
+ </xsl:template><xsl:template match="*[local-name() = 'terms']">
2835
+ <fo:block id="{@id}">
2836
+ <xsl:apply-templates/>
2837
+ </fo:block>
2838
+ </xsl:template><xsl:template match="*[local-name() = 'term']">
2839
+ <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
2840
+
2841
+
2842
+ <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
2843
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
2844
+ </fo:block>
2845
+
2846
+
2847
+ <xsl:apply-templates/>
2848
+ </fo:block>
2849
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
2850
+ <xsl:if test="normalize-space() != ''">
2851
+ <fo:inline>
2852
+ <xsl:apply-templates/>
2853
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
2854
+ <xsl:text>.</xsl:text>
2855
+ </xsl:if> -->
2856
+ </fo:inline>
2857
+ </xsl:if>
2858
+ </xsl:template><xsl:template match="*[local-name() = 'figure']">
2859
+ <fo:block-container id="{@id}">
2860
+ <fo:block>
2861
+ <xsl:apply-templates/>
2862
+ </fo:block>
2863
+ <xsl:call-template name="fn_display_figure"/>
2864
+ <xsl:for-each select="*[local-name() = 'note']">
2865
+ <xsl:call-template name="note"/>
2866
+ </xsl:for-each>
2867
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2868
+ </fo:block-container>
2869
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
2870
+ <fo:block id="{@id}">
2871
+ <xsl:apply-templates/>
2872
+ </fo:block>
2873
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
2874
+ <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
2875
+ <xsl:apply-templates/>
2876
+ </fo:block>
2877
+ </xsl:template><xsl:template match="*[local-name() = 'image']">
2878
+ <fo:block xsl:use-attribute-sets="image-style">
2879
+
2880
+
2881
+ <xsl:variable name="src">
2882
+ <xsl:choose>
2883
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
2884
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
2885
+ </xsl:when>
2886
+ <xsl:otherwise>
2887
+ <xsl:value-of select="@src"/>
2888
+ </xsl:otherwise>
2889
+ </xsl:choose>
2890
+ </xsl:variable>
2891
+
2892
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
2893
+ </fo:block>
2894
+ </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">
2895
+ <xsl:apply-templates mode="contents"/>
2896
+ <xsl:text> </xsl:text>
2897
+ </xsl:template><xsl:template match="text()" mode="contents">
2898
+ <xsl:value-of select="."/>
2899
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
2900
+ <xsl:if test="normalize-space() != ''">
2901
+ <fo:block xsl:use-attribute-sets="figure-name-style">
2902
+
2903
+ <xsl:apply-templates/>
2904
+ </fo:block>
2905
+ </xsl:if>
2906
+ </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">
2907
+ <xsl:apply-templates mode="contents_item"/>
2908
+ <!-- <xsl:text> </xsl:text> -->
2909
+ </xsl:template><xsl:template name="getSection">
2910
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
2911
+ </xsl:template><xsl:template name="getName">
2912
+ <xsl:choose>
2913
+ <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
2914
+ <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
2915
+ </xsl:when>
2916
+ <xsl:otherwise>
2917
+ <xsl:copy-of select="*[local-name() = 'title']/node()"/>
2918
+ </xsl:otherwise>
2919
+ </xsl:choose>
2920
+ </xsl:template><xsl:template name="insertTitleAsListItem">
2921
+ <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
2922
+ <xsl:variable name="section">
2923
+ <xsl:for-each select="..">
2924
+ <xsl:call-template name="getSection"/>
2925
+ </xsl:for-each>
2926
+ </xsl:variable>
2927
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
2928
+ <fo:list-item>
2929
+ <fo:list-item-label end-indent="label-end()">
2930
+ <fo:block>
2931
+ <xsl:value-of select="$section"/>
2932
+ </fo:block>
2933
+ </fo:list-item-label>
2934
+ <fo:list-item-body start-indent="body-start()">
2935
+ <fo:block>
2936
+ <xsl:choose>
2937
+ <xsl:when test="*[local-name() = 'tab']">
2938
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
2939
+ </xsl:when>
2940
+ <xsl:otherwise>
2941
+ <xsl:apply-templates/>
2942
+ </xsl:otherwise>
2943
+ </xsl:choose>
2944
+ </fo:block>
2945
+ </fo:list-item-body>
2946
+ </fo:list-item>
2947
+ </fo:list-block>
2948
+ </xsl:template><xsl:template name="extractTitle">
2949
+ <xsl:choose>
2950
+ <xsl:when test="*[local-name() = 'tab']">
2951
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
2952
+ </xsl:when>
2953
+ <xsl:otherwise>
2954
+ <xsl:apply-templates/>
2955
+ </xsl:otherwise>
2956
+ </xsl:choose>
2957
+ </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">
2958
+ <xsl:text> </xsl:text>
2959
+ </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
2960
+ <xsl:copy>
2961
+ <xsl:apply-templates mode="contents_item"/>
2962
+ </xsl:copy>
2963
+ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
2964
+ <xsl:text> </xsl:text>
2965
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
2966
+
2967
+ <fo:block-container margin-left="0mm">
2968
+ <xsl:if test="parent::*[local-name() = 'note']">
2969
+ <xsl:attribute name="margin-left">
2970
+ <xsl:choose>
2971
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2972
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2973
+ </xsl:choose>
2974
+ </xsl:attribute>
2975
+
2976
+ </xsl:if>
2977
+ <fo:block-container margin-left="0mm">
2978
+
2979
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
2980
+ <xsl:variable name="_font-size">
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+
2987
+
2988
+
2989
+
2990
+
2991
+
2992
+
2993
+
2994
+
2995
+ </xsl:variable>
2996
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2997
+ <xsl:if test="$font-size != ''">
2998
+ <xsl:attribute name="font-size">
2999
+ <xsl:choose>
3000
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3001
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3002
+ </xsl:choose>
3003
+ </xsl:attribute>
3004
+ </xsl:if>
3005
+ <xsl:apply-templates/>
3006
+ </fo:block>
3007
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3008
+
3009
+ </fo:block-container>
3010
+ </fo:block-container>
3011
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
3012
+ <xsl:variable name="text">
3013
+ <xsl:call-template name="add-zero-spaces-equal"/>
3014
+ </xsl:variable>
3015
+ <xsl:call-template name="add-zero-spaces-java">
3016
+ <xsl:with-param name="text" select="$text"/>
3017
+ </xsl:call-template>
3018
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3019
+ <xsl:if test="normalize-space() != ''">
3020
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3021
+ <xsl:apply-templates/>
3022
+ </fo:block>
3023
+ </xsl:if>
3024
+ </xsl:template><xsl:template match="*[local-name() = 'permission']">
3025
+ <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3026
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3027
+ <xsl:apply-templates/>
3028
+ </fo:block>
3029
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
3030
+ <xsl:if test="normalize-space() != ''">
3031
+ <fo:block xsl:use-attribute-sets="permission-name-style">
3032
+ <xsl:apply-templates/>
3033
+
3034
+ </fo:block>
3035
+ </xsl:if>
3036
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
3037
+ <fo:block xsl:use-attribute-sets="permission-label-style">
3038
+ <xsl:apply-templates/>
3039
+ </fo:block>
3040
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']">
3041
+ <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3042
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3043
+ <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
3044
+ <xsl:apply-templates select="@obligation" mode="presentation"/>
3045
+ <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
3046
+ <xsl:apply-templates/>
3047
+ </fo:block>
3048
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
3049
+ <xsl:if test="normalize-space() != ''">
3050
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
3051
+
3052
+ <xsl:apply-templates/>
3053
+
3054
+ </fo:block>
3055
+ </xsl:if>
3056
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
3057
+ <fo:block xsl:use-attribute-sets="requirement-label-style">
3058
+ <xsl:apply-templates/>
3059
+ </fo:block>
3060
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
3061
+ <fo:block>
3062
+ <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
3063
+ </fo:block>
3064
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
3065
+ <fo:block xsl:use-attribute-sets="requirement-subject-style">
3066
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
3067
+ </fo:block>
3068
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
3069
+ <fo:block xsl:use-attribute-sets="requirement-inherit-style">
3070
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
3071
+ </fo:block>
3072
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
3073
+ <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3074
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3075
+ <xsl:apply-templates/>
3076
+ </fo:block>
3077
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
3078
+ <xsl:if test="normalize-space() != ''">
3079
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
3080
+ <xsl:apply-templates/>
3081
+
3082
+ </fo:block>
3083
+ </xsl:if>
3084
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
3085
+ <fo:block xsl:use-attribute-sets="recommendation-label-style">
3086
+ <xsl:apply-templates/>
3087
+ </fo:block>
3088
+ </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3089
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3090
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3091
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3092
+ </xsl:if>
3093
+ <fo:block-container margin-left="0mm" margin-right="0mm">
3094
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
3095
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3096
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
3097
+ </xsl:if>
3098
+ <xsl:variable name="simple-table">
3099
+ <xsl:call-template name="getSimpleTable"/>
3100
+ </xsl:variable>
3101
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3102
+ <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3103
+ <!-- <fo:table-column column-width="35mm"/>
3104
+ <fo:table-column column-width="115mm"/> -->
3105
+ <fo:table-column column-width="30%"/>
3106
+ <fo:table-column column-width="70%"/>
3107
+ </xsl:if>
3108
+ <xsl:apply-templates mode="requirement"/>
3109
+ </fo:table>
3110
+ <!-- fn processing -->
3111
+ <xsl:if test=".//*[local-name() = 'fn']">
3112
+ <xsl:for-each select="*[local-name() = 'tbody']">
3113
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3114
+ <xsl:call-template name="fn_display"/>
3115
+ </fo:block>
3116
+ </xsl:for-each>
3117
+ </xsl:if>
3118
+ </fo:block-container>
3119
+ </fo:block-container>
3120
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
3121
+ <fo:table-header>
3122
+ <xsl:apply-templates mode="requirement"/>
3123
+ </fo:table-header>
3124
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
3125
+ <fo:table-body>
3126
+ <xsl:apply-templates mode="requirement"/>
3127
+ </fo:table-body>
3128
+ </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3129
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3130
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3131
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3132
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3133
+ </xsl:if>
3134
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3135
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3136
+ </xsl:if>
3137
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3138
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
3139
+ </xsl:if>
3140
+ <xsl:apply-templates mode="requirement"/>
3141
+ </fo:table-row>
3142
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3143
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3144
+ <xsl:attribute name="text-align">
3145
+ <xsl:choose>
3146
+ <xsl:when test="@align">
3147
+ <xsl:value-of select="@align"/>
3148
+ </xsl:when>
3149
+ <xsl:otherwise>left</xsl:otherwise>
3150
+ </xsl:choose>
3151
+ </xsl:attribute>
3152
+ <xsl:if test="@colspan">
3153
+ <xsl:attribute name="number-columns-spanned">
3154
+ <xsl:value-of select="@colspan"/>
3155
+ </xsl:attribute>
3156
+ </xsl:if>
3157
+ <xsl:if test="@rowspan">
3158
+ <xsl:attribute name="number-rows-spanned">
3159
+ <xsl:value-of select="@rowspan"/>
3160
+ </xsl:attribute>
3161
+ </xsl:if>
3162
+ <xsl:call-template name="display-align"/>
3163
+
3164
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3165
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3166
+ <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3167
+ </xsl:if>
3168
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3169
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3170
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3171
+ </xsl:if> -->
3172
+
3173
+ <fo:block>
3174
+ <xsl:apply-templates/>
3175
+ </fo:block>
3176
+ </fo:table-cell>
3177
+ </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3178
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3179
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3180
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3181
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3182
+ </xsl:if>
3183
+ <xsl:attribute name="text-align">
3184
+ <xsl:choose>
3185
+ <xsl:when test="@align">
3186
+ <xsl:value-of select="@align"/>
3187
+ </xsl:when>
3188
+ <xsl:otherwise>left</xsl:otherwise>
3189
+ </xsl:choose>
3190
+ </xsl:attribute>
3191
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3192
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3193
+ </xsl:if>
3194
+ <xsl:if test="@colspan">
3195
+ <xsl:attribute name="number-columns-spanned">
3196
+ <xsl:value-of select="@colspan"/>
3197
+ </xsl:attribute>
3198
+ </xsl:if>
3199
+ <xsl:if test="@rowspan">
3200
+ <xsl:attribute name="number-rows-spanned">
3201
+ <xsl:value-of select="@rowspan"/>
3202
+ </xsl:attribute>
3203
+ </xsl:if>
3204
+ <xsl:call-template name="display-align"/>
3205
+
3206
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3207
+ <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3208
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3209
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3210
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3211
+ </xsl:if>
3212
+ </xsl:if> -->
3213
+ <!-- 2nd line and below -->
3214
+
3215
+ <fo:block>
3216
+ <xsl:apply-templates/>
3217
+ </fo:block>
3218
+ </fo:table-cell>
3219
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3220
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3221
+ <xsl:apply-templates/>
3222
+ </fo:block>
3223
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3224
+ <fo:block> <!-- margin-bottom="10pt" -->
3225
+ <xsl:apply-templates/>
3226
+ </fo:block>
3227
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']">
3228
+ <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
3229
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3230
+ <xsl:apply-templates/>
3231
+ </fo:block>
3232
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
3233
+ <xsl:if test="normalize-space() != ''">
3234
+ <fo:inline xsl:use-attribute-sets="termexample-name-style">
3235
+ <xsl:apply-templates/>
3236
+ </fo:inline>
3237
+ </xsl:if>
3238
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
3239
+ <fo:inline><xsl:apply-templates/></fo:inline>
3240
+ </xsl:template><xsl:template match="*[local-name() = 'example']">
3241
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
3242
+
3243
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3244
+
3245
+ <xsl:variable name="element">
3246
+
3247
+ inline
3248
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3249
+ </xsl:variable>
3250
+
3251
+ <xsl:choose>
3252
+ <xsl:when test="contains(normalize-space($element), 'block')">
3253
+ <fo:block xsl:use-attribute-sets="example-body-style">
3254
+ <xsl:apply-templates/>
3255
+ </fo:block>
3256
+ </xsl:when>
3257
+ <xsl:otherwise>
3258
+ <fo:inline>
3259
+ <xsl:apply-templates/>
3260
+ </fo:inline>
3261
+ </xsl:otherwise>
3262
+ </xsl:choose>
3263
+
3264
+ </fo:block>
3265
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
3266
+
3267
+ <xsl:variable name="element">
3268
+
3269
+ inline
3270
+ </xsl:variable>
3271
+ <xsl:choose>
3272
+ <xsl:when test="ancestor::*[local-name() = 'appendix']">
3273
+ <fo:inline>
3274
+ <xsl:apply-templates/>
3275
+ </fo:inline>
3276
+ </xsl:when>
3277
+ <xsl:when test="normalize-space($element) = 'block'">
3278
+ <fo:block xsl:use-attribute-sets="example-name-style">
3279
+ <xsl:apply-templates/>
3280
+ </fo:block>
3281
+ </xsl:when>
3282
+ <xsl:otherwise>
3283
+ <fo:inline xsl:use-attribute-sets="example-name-style">
3284
+ <xsl:apply-templates/>
3285
+ </fo:inline>
3286
+ </xsl:otherwise>
3287
+ </xsl:choose>
3288
+
3289
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3290
+
3291
+ <xsl:variable name="element">
3292
+ block
3293
+
3294
+ </xsl:variable>
3295
+ <xsl:choose>
3296
+ <xsl:when test="normalize-space($element) = 'block'">
3297
+ <fo:block xsl:use-attribute-sets="example-p-style">
3298
+
3299
+ <xsl:apply-templates/>
3300
+ </fo:block>
3301
+ </xsl:when>
3302
+ <xsl:otherwise>
3303
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3304
+ <xsl:apply-templates/>
3305
+ </fo:inline>
3306
+ </xsl:otherwise>
3307
+ </xsl:choose>
3308
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3309
+ <fo:block xsl:use-attribute-sets="termsource-style">
3310
+ <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3311
+ <xsl:variable name="termsource_text">
3312
+ <xsl:apply-templates/>
3313
+ </xsl:variable>
3314
+
3315
+ <xsl:choose>
3316
+ <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3317
+ <xsl:apply-templates/>
3318
+ </xsl:when>
3319
+ <xsl:otherwise>
3320
+
3321
+ <xsl:text>[</xsl:text>
3322
+
3323
+ <xsl:apply-templates/>
3324
+
3325
+ <xsl:text>]</xsl:text>
3326
+
3327
+ </xsl:otherwise>
3328
+ </xsl:choose>
3329
+ </fo:block>
3330
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
3331
+ <xsl:if test="normalize-space() != ''">
3332
+ <xsl:value-of select="."/>
3333
+ </xsl:if>
3334
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
3335
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3336
+
3337
+ <fo:inline xsl:use-attribute-sets="origin-style">
3338
+ <xsl:apply-templates/>
3339
+ </fo:inline>
3340
+ </fo:basic-link>
3341
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
3342
+ <fo:inline><xsl:apply-templates/></fo:inline>
3343
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
3344
+ <xsl:if test="normalize-space() != ''">
3345
+ <xsl:value-of select="."/>
3346
+ </xsl:if>
3347
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3348
+ <fo:block-container margin-left="0mm">
3349
+ <xsl:if test="parent::*[local-name() = 'note']">
3350
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3351
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3352
+ </xsl:if>
3353
+ </xsl:if>
3354
+
3355
+ <fo:block-container margin-left="0mm">
3356
+
3357
+ <fo:block xsl:use-attribute-sets="quote-style">
3358
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3359
+ </fo:block>
3360
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3361
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3362
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3363
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3364
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3365
+ </fo:block>
3366
+ </xsl:if>
3367
+
3368
+ </fo:block-container>
3369
+ </fo:block-container>
3370
+ </xsl:template><xsl:template match="*[local-name() = 'source']">
3371
+ <xsl:if test="../*[local-name() = 'author']">
3372
+ <xsl:text>, </xsl:text>
3373
+ </xsl:if>
3374
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3375
+ <xsl:apply-templates/>
3376
+ </fo:basic-link>
3377
+ </xsl:template><xsl:template match="*[local-name() = 'author']">
3378
+ <xsl:text>— </xsl:text>
3379
+ <xsl:apply-templates/>
3380
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
3381
+ <fo:inline xsl:use-attribute-sets="eref-style">
3382
+ <xsl:if test="@type = 'footnote'">
3383
+
3384
+
3385
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3386
+ <xsl:attribute name="font-size">50%</xsl:attribute>
3387
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3388
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3389
+
3390
+ </xsl:if>
3391
+
3392
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3393
+
3394
+ <xsl:if test="@type = 'inline'">
3395
+
3396
+
3397
+
3398
+ </xsl:if>
3399
+
3400
+
3401
+ <xsl:apply-templates/>
3402
+ </fo:basic-link>
3403
+ </fo:inline>
3404
+ </xsl:template><xsl:template match="*[local-name() = 'tab']">
3405
+ <!-- zero-space char -->
3406
+ <xsl:variable name="depth">
3407
+ <xsl:call-template name="getLevel">
3408
+ <xsl:with-param name="depth" select="../@depth"/>
3409
+ </xsl:call-template>
3410
+ </xsl:variable>
3411
+
3412
+ <xsl:variable name="padding">
3413
+
3414
+
3415
+
3416
+
3417
+
3418
+
3419
+
3420
+
3421
+ <xsl:variable name="references_num_current">
3422
+ <xsl:number level="any" count="m3d:references"/>
3423
+ </xsl:variable>
3424
+ <xsl:choose>
3425
+ <xsl:when test="(ancestor-or-self::m3d:sections and $depth = 1) or (local-name(../..) = 'references' and $references_num_current = 1)">25</xsl:when>
3426
+ <xsl:when test="ancestor-or-self::m3d:sections or ancestor-or-self::m3d:annex">3</xsl:when>
3427
+ </xsl:choose>
3428
+
3429
+
3430
+
3431
+
3432
+
3433
+
3434
+
3435
+
3436
+
3437
+
3438
+
3439
+ </xsl:variable>
3440
+
3441
+ <xsl:variable name="padding-right">
3442
+ <xsl:choose>
3443
+ <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
3444
+ <xsl:otherwise>
3445
+ <xsl:value-of select="normalize-space($padding)"/>
3446
+ </xsl:otherwise>
3447
+ </xsl:choose>
2978
3448
  </xsl:variable>
2979
- <xsl:copy-of select="$newRow"/>
2980
-
2981
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
2982
- <xsl:with-param name="previousRow" select="$newRow"/>
2983
- </xsl:apply-templates>
2984
- </xsl:template><xsl:template name="getLang">
3449
+
2985
3450
  <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3451
+
2986
3452
  <xsl:choose>
2987
- <xsl:when test="$language = 'English'">en</xsl:when>
2988
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
2989
- </xsl:choose>
2990
- </xsl:template><xsl:template name="capitalizeWords">
2991
- <xsl:param name="str"/>
2992
- <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
2993
- <xsl:choose>
2994
- <xsl:when test="contains($str2, ' ')">
2995
- <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
2996
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
2997
- <xsl:value-of select="substring($substr, 2)"/> -->
2998
- <xsl:call-template name="capitalize">
2999
- <xsl:with-param name="str" select="$substr"/>
3000
- </xsl:call-template>
3001
- <xsl:text> </xsl:text>
3002
- <xsl:call-template name="capitalizeWords">
3003
- <xsl:with-param name="str" select="substring-after($str2, ' ')"/>
3004
- </xsl:call-template>
3453
+ <xsl:when test="$language = 'zh'">
3454
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
3455
+ </xsl:when>
3456
+ <xsl:when test="../../@inline-header = 'true'">
3457
+ <fo:inline font-size="90%">
3458
+ <xsl:call-template name="insertNonBreakSpaces">
3459
+ <xsl:with-param name="count" select="$padding-right"/>
3460
+ </xsl:call-template>
3461
+ </fo:inline>
3005
3462
  </xsl:when>
3006
3463
  <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>
3464
+ <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
3012
3465
  </xsl:otherwise>
3013
3466
  </xsl:choose>
3014
- </xsl:template><xsl:template name="capitalize">
3015
- <xsl:param name="str"/>
3016
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
3017
- <xsl:value-of select="substring($str, 2)"/>
3018
- </xsl:template><xsl:template match="mathml:math">
3019
- <fo:inline font-family="STIX2Math">
3020
- <fo:instream-foreign-object fox:alt-text="Math">
3021
- <xsl:copy-of select="."/>
3022
- </fo:instream-foreign-object>
3023
- </fo:inline>
3024
- </xsl:template><xsl:template match="*[local-name()='localityStack']">
3025
- <xsl:for-each select="*[local-name()='locality']">
3026
- <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3027
- <xsl:apply-templates select="."/>
3028
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3029
- </xsl:for-each>
3030
- </xsl:template><xsl:template match="*[local-name()='link']" name="link">
3031
- <xsl:variable name="target">
3032
- <xsl:choose>
3033
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3034
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3035
- </xsl:when>
3036
- <xsl:otherwise>
3037
- <xsl:value-of select="normalize-space(@target)"/>
3038
- </xsl:otherwise>
3039
- </xsl:choose>
3040
- </xsl:variable>
3041
- <fo:inline xsl:use-attribute-sets="link-style">
3042
- <xsl:choose>
3043
- <xsl:when test="$target = ''">
3044
- <xsl:apply-templates/>
3045
- </xsl:when>
3046
- <xsl:otherwise>
3047
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3048
- <xsl:choose>
3049
- <xsl:when test="normalize-space(.) = ''">
3050
- <xsl:value-of select="$target"/>
3051
- </xsl:when>
3052
- <xsl:otherwise>
3053
- <xsl:apply-templates/>
3054
- </xsl:otherwise>
3055
- </xsl:choose>
3056
- </fo:basic-link>
3057
- </xsl:otherwise>
3058
- </xsl:choose>
3059
- </fo:inline>
3060
- </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3061
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3062
- <!-- <xsl:choose>
3063
- <xsl:when test="@lang = 'en'"></xsl:when>
3064
- <xsl:otherwise> -->
3065
- <xsl:attribute name="white-space">pre</xsl:attribute>
3066
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3067
- <!-- </xsl:otherwise>
3068
- </xsl:choose> -->
3467
+
3468
+ </xsl:template><xsl:template name="insertNonBreakSpaces">
3469
+ <xsl:param name="count"/>
3470
+ <xsl:if test="$count &gt; 0">
3471
+ <xsl:text> </xsl:text>
3472
+ <xsl:call-template name="insertNonBreakSpaces">
3473
+ <xsl:with-param name="count" select="$count - 1"/>
3474
+ </xsl:call-template>
3475
+ </xsl:if>
3476
+ </xsl:template><xsl:template match="*[local-name() = 'domain']">
3477
+ <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
3478
+ <xsl:text> </xsl:text>
3479
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']">
3480
+ <fo:block xsl:use-attribute-sets="admitted-style">
3069
3481
  <xsl:apply-templates/>
3070
3482
  </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"/>
3483
+ </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3484
+ <xsl:variable name="title-deprecated">
3485
+ <xsl:call-template name="getTitle">
3486
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3487
+ </xsl:call-template>
3488
+ </xsl:variable>
3489
+ <fo:block xsl:use-attribute-sets="deprecates-style">
3490
+ <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
3491
+ </fo:block>
3492
+ </xsl:template><xsl:template match="*[local-name() = 'definition']">
3493
+ <fo:block xsl:use-attribute-sets="definition-style">
3494
+ <xsl:apply-templates/>
3082
3495
  </fo:block>
3496
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
3083
3497
  <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>
3498
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
3499
+ <fo:inline> <xsl:apply-templates/></fo:inline>
3500
+ <fo:block> </fo:block>
3501
+ </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
3502
+
3503
+ <fo:block break-after="page"/>
3504
+
3505
+ <fo:block>
3506
+ <xsl:call-template name="setId"/>
3507
+
3508
+
3509
+
3510
+
3511
+
3512
+ <xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
3513
+ <xsl:if test="$pos &gt;= 2">
3514
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
3097
3515
  </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>
3516
+
3517
+
3518
+
3519
+
3520
+
3521
+
3522
+ <xsl:apply-templates/>
3523
+ </fo:block>
3524
+
3525
+
3526
+
3527
+ </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3528
+ <fo:block break-after="page"/>
3529
+ <fo:block>
3530
+ <xsl:call-template name="setId"/>
3531
+ <xsl:apply-templates/>
3532
+ </fo:block>
3533
+ </xsl:template><xsl:template match="*[local-name() = 'clause']">
3534
+ <fo:block>
3535
+ <xsl:call-template name="setId"/>
3536
+ <xsl:apply-templates/>
3537
+ </fo:block>
3538
+ </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3539
+ <fo:block id="{@id}">
3540
+ <xsl:apply-templates/>
3541
+ </fo:block>
3542
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
3543
+
3544
+ <fo:block id="{@id}">
3545
+ <xsl:apply-templates/>
3546
+ </fo:block>
3547
+ </xsl:template><xsl:template match="*[local-name() = 'annex']">
3548
+ <fo:block break-after="page"/>
3549
+ <fo:block id="{@id}">
3550
+
3101
3551
  </fo:block>
3102
3552
  <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>
3553
+ </xsl:template><xsl:template match="*[local-name() = 'review']">
3554
+ <!-- comment 2019-11-29 -->
3555
+ <!-- <fo:block font-weight="bold">Review:</fo:block>
3556
+ <xsl:apply-templates /> -->
3557
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3558
+ <!-- 0xA0 to space replacement -->
3559
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3560
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3561
+ <fo:block-container margin-left="0mm">
3562
+ <xsl:if test="parent::*[local-name() = 'note']">
3563
+ <xsl:attribute name="margin-left">
3564
+ <xsl:choose>
3565
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3566
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3567
+ </xsl:choose>
3568
+ </xsl:attribute>
3569
+
3570
+ </xsl:if>
3571
+ <fo:block-container margin-left="0mm">
3572
+ <xsl:apply-templates select="." mode="ul_ol"/>
3573
+ </fo:block-container>
3574
+ </fo:block-container>
3575
+ </xsl:template><xsl:template match="*[local-name() = 'errata']">
3576
+ <!-- <row>
3577
+ <date>05-07-2013</date>
3578
+ <type>Editorial</type>
3579
+ <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
3580
+ <pages>D-3</pages>
3581
+ </row>
3582
+ -->
3583
+ <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
3584
+ <fo:table-column column-width="20mm"/>
3585
+ <fo:table-column column-width="23mm"/>
3586
+ <fo:table-column column-width="107mm"/>
3587
+ <fo:table-column column-width="15mm"/>
3588
+ <fo:table-body>
3589
+ <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
3590
+ <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3591
+ <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3592
+ <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
3593
+ <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
3594
+ </fo:table-row>
3595
+ <xsl:apply-templates/>
3596
+ </fo:table-body>
3597
+ </fo:table>
3598
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
3599
+ <fo:table-row>
3122
3600
  <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>
3601
+ </fo:table-row>
3602
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
3603
+ <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3604
+ <fo:block><xsl:apply-templates/></fo:block>
3605
+ </fo:table-cell>
3606
+ </xsl:template><xsl:template name="processBibitem">
3607
+
3608
+
3609
+
3610
+
3611
+ </xsl:template><xsl:template name="processBibitemDocId">
3612
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
3130
3613
  <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>
3614
+ <xsl:when test="normalize-space($_doc_ident) != ''">
3615
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
3616
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
3617
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3618
+ </xsl:if>
3619
+ <xsl:value-of select="$_doc_ident"/>
3620
+ </xsl:when>
3621
+ <xsl:otherwise>
3622
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
3623
+ <xsl:if test="$type != ''">
3624
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3625
+ </xsl:if>
3626
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
3627
+ </xsl:otherwise>
3133
3628
  </xsl:choose>
3134
- <xsl:apply-templates/>
3629
+ </xsl:template><xsl:template name="processPersonalAuthor">
3630
+ <xsl:choose>
3631
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3632
+ <author>
3633
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3634
+ </author>
3635
+ </xsl:when>
3636
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3637
+ <author>
3638
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3639
+ <xsl:text> </xsl:text>
3640
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3641
+ </author>
3642
+ </xsl:when>
3643
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3644
+ <author>
3645
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3646
+ <xsl:text> </xsl:text>
3647
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3648
+ </author>
3649
+ </xsl:when>
3650
+ <xsl:otherwise>
3651
+ <xsl:apply-templates/>
3652
+ </xsl:otherwise>
3653
+ </xsl:choose>
3654
+ </xsl:template><xsl:template name="renderDate">
3655
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3656
+ <xsl:value-of select="*[local-name() = 'on']"/>
3657
+ </xsl:if>
3658
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3659
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3660
+ </xsl:if>
3661
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3662
+ <xsl:value-of select="translate(.,'. ','')"/>
3663
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3664
+ <xsl:value-of select="substring(.,1,1)"/>
3135
3665
  </xsl:template><xsl:template name="convertDate">
3136
3666
  <xsl:param name="date"/>
3137
3667
  <xsl:param name="format" select="'short'"/>
@@ -3262,27 +3792,49 @@
3262
3792
  </xsl:otherwise>
3263
3793
  </xsl:choose>
3264
3794
  </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']"/>
3795
+ <xsl:param name="depth"/>
3796
+ <xsl:choose>
3797
+ <xsl:when test="normalize-space(@depth) != ''">
3798
+ <xsl:value-of select="@depth"/>
3799
+ </xsl:when>
3800
+ <xsl:when test="normalize-space($depth) != ''">
3801
+ <xsl:value-of select="$depth"/>
3802
+ </xsl:when>
3803
+ <xsl:otherwise>
3804
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
3805
+ <xsl:variable name="level">
3806
+ <xsl:choose>
3807
+ <xsl:when test="parent::*[local-name() = 'preface']">
3808
+ <xsl:value-of select="$level_total - 1"/>
3809
+ </xsl:when>
3810
+ <xsl:when test="ancestor::*[local-name() = 'preface']">
3811
+ <xsl:value-of select="$level_total - 2"/>
3812
+ </xsl:when>
3813
+ <!-- <xsl:when test="parent::*[local-name() = 'sections']">
3814
+ <xsl:value-of select="$level_total - 1"/>
3815
+ </xsl:when> -->
3816
+ <xsl:when test="ancestor::*[local-name() = 'sections']">
3817
+ <xsl:value-of select="$level_total - 1"/>
3818
+ </xsl:when>
3819
+ <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3820
+ <xsl:value-of select="$level_total - 1"/>
3821
+ </xsl:when>
3822
+ <xsl:when test="parent::*[local-name() = 'annex']">
3823
+ <xsl:value-of select="$level_total - 1"/>
3824
+ </xsl:when>
3825
+ <xsl:when test="ancestor::*[local-name() = 'annex']">
3826
+ <xsl:value-of select="$level_total"/>
3827
+ </xsl:when>
3828
+ <xsl:when test="local-name() = 'annex'">1</xsl:when>
3829
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3830
+ <xsl:otherwise>
3831
+ <xsl:value-of select="$level_total - 1"/>
3832
+ </xsl:otherwise>
3833
+ </xsl:choose>
3834
+ </xsl:variable>
3835
+ <xsl:value-of select="$level"/>
3836
+ </xsl:otherwise>
3837
+ </xsl:choose>
3286
3838
  </xsl:template><xsl:template name="split">
3287
3839
  <xsl:param name="pText" select="."/>
3288
3840
  <xsl:param name="sep" select="','"/>
@@ -3313,7 +3865,8 @@
3313
3865
  <xsl:value-of select="document('')//*/namespace::m3d"/>
3314
3866
 
3315
3867
 
3316
-
3868
+
3869
+
3317
3870
  </xsl:variable>
3318
3871
  <xsl:if test="$documentNS != $XSLNS">
3319
3872
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -3328,4 +3881,15 @@
3328
3881
  <xsl:when test="$language = 'cn'">Chinese</xsl:when>
3329
3882
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3330
3883
  </xsl:choose>
3884
+ </xsl:template><xsl:template name="setId">
3885
+ <xsl:attribute name="id">
3886
+ <xsl:choose>
3887
+ <xsl:when test="@id">
3888
+ <xsl:value-of select="@id"/>
3889
+ </xsl:when>
3890
+ <xsl:otherwise>
3891
+ <xsl:value-of select="generate-id()"/>
3892
+ </xsl:otherwise>
3893
+ </xsl:choose>
3894
+ </xsl:attribute>
3331
3895
  </xsl:template></xsl:stylesheet>