metanorma-m3aawg 1.4.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1172,4 +1172,3 @@ ol
1172
1172
  ul
1173
1173
  {margin-bottom:0cm;
1174
1174
  margin-left:18pt;}
1175
-
@@ -1,5 +1,6 @@
1
1
  require "isodoc"
2
2
  require_relative "base_convert"
3
+ require_relative "init"
3
4
 
4
5
  module IsoDoc
5
6
  module M3AAWG
@@ -57,6 +58,7 @@ module IsoDoc
57
58
  end
58
59
 
59
60
  include BaseRender
61
+ include Init
60
62
  end
61
63
  end
62
64
  end
@@ -0,0 +1 @@
1
+ annex: Appendix
@@ -0,0 +1,10 @@
1
+ module IsoDoc
2
+ module M3AAWG
3
+ class I18n < IsoDoc::I18n
4
+ def load_yaml1(lang, script)
5
+ y = YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
6
+ super.merge(y)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,27 @@
1
+ require "isodoc"
2
+ require_relative "metadata"
3
+ require_relative "xref"
4
+ require_relative "i18n"
5
+
6
+ module IsoDoc
7
+ module M3AAWG
8
+ module Init
9
+ def metadata_init(lang, script, labels)
10
+ @meta = Metadata.new(lang, script, labels)
11
+ end
12
+
13
+ def xref_init(lang, script, klass, labels, options)
14
+ @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), labels, options)
15
+ end
16
+
17
+ def i18n_init(lang, script, i18nyaml = nil)
18
+ @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
19
+ end
20
+
21
+ def fileloc(loc)
22
+ File.join(File.dirname(__FILE__), loc)
23
+ end
24
+ end
25
+ end
26
+ end
27
+
@@ -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"/>
@@ -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,17 @@
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
676
 
997
- <xsl:template match="m3d:term">
998
- <xsl:param name="sectionNum"/>
999
- <fo:block id="{@id}" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
1000
- <fo:inline>
1001
- <xsl:variable name="section">
1002
- <xsl:for-each select="*[1]">
1003
- <xsl:call-template name="getSection">
1004
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1005
- </xsl:call-template>
1006
- </xsl:for-each>
1007
- </xsl:variable>
1008
- <xsl:value-of select="$section"/><!-- <xsl:text>.</xsl:text> -->
1009
- </fo:inline>
1010
- </fo:block>
1011
- <fo:block>
1012
- <xsl:apply-templates>
1013
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1014
- </xsl:apply-templates>
1015
- </fo:block>
1016
- </xsl:template>
1017
-
677
+
1018
678
  <xsl:template match="m3d:preferred">
1019
- <xsl:param name="sectionNum"/>
1020
679
 
1021
680
  <fo:inline>
1022
681
  <xsl:apply-templates/>
@@ -1027,135 +686,34 @@
1027
686
  </xsl:if>
1028
687
 
1029
688
  </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
689
 
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>
690
+
1099
691
 
1100
- <xsl:template match="m3d:termnote">
692
+ <xsl:template match="m3d:termnote" priority="2">
1101
693
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1102
694
  <fo:block>
1103
695
  <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)"/>
696
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
1111
697
  </fo:inline>
1112
698
  <xsl:apply-templates/>
1113
699
  </fo:block>
1114
700
  </fo:block-container>
1115
701
  </xsl:template>
1116
702
 
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>
703
+ <xsl:template match="m3d:example/m3d:p" priority="2">
704
+ <fo:inline xsl:use-attribute-sets="example-p-style">
1140
705
  <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>
706
+ </fo:inline>
1146
707
  </xsl:template>
1147
708
 
1148
-
1149
- <xsl:template match="m3d:annex">
1150
- <fo:block break-after="page"/>
1151
- <xsl:apply-templates/>
1152
- </xsl:template>
1153
709
 
1154
710
 
1155
711
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
1156
- <xsl:template match="m3d:references[position() &gt; 1]">
712
+ <xsl:template match="m3d:references[not(@normative='true')]">
1157
713
  <fo:block break-after="page"/>
1158
- <xsl:apply-templates/>
714
+ <fo:block id="{@id}">
715
+ <xsl:apply-templates/>
716
+ </fo:block>
1159
717
  <fo:block-container text-align="center">
1160
718
  <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
1161
719
  <fo:block> </fo:block>
@@ -1166,7 +724,7 @@
1166
724
 
1167
725
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1168
726
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem"> -->
1169
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem">
727
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem">
1170
728
  <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
1171
729
  <fo:list-item>
1172
730
  <fo:list-item-label end-indent="label-end()">
@@ -1205,36 +763,17 @@
1205
763
  </xsl:template>
1206
764
 
1207
765
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem" mode="contents"/> -->
1208
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem" mode="contents"/>
766
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem" mode="contents"/>
1209
767
 
1210
768
  <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem/m3d:title"> -->
1211
- <xsl:template match="m3d:references[position() &gt; 1]/m3d:bibitem/m3d:title">
769
+ <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem/m3d:title">
1212
770
  <fo:inline font-style="italic">
1213
771
  <xsl:apply-templates/>
1214
772
  </fo:inline>
1215
773
  </xsl:template>
1216
774
 
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
-
775
+
776
+
1238
777
 
1239
778
  <xsl:template match="mathml:math" priority="2">
1240
779
  <fo:inline font-family="Cambria Math">
@@ -1244,152 +783,21 @@
1244
783
  </fo:inline>
1245
784
  </xsl:template>
1246
785
 
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
786
 
1317
- <xsl:template match="m3d:note/m3d:p" name="note">
1318
- <xsl:variable name="claims_id" select="ancestor::m3d:clause[1]/@id"/>
787
+ <!-- <xsl:template match="m3d:note/m3d:p" name="note">
1319
788
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
1320
789
  <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>
790
+ <fo:inline >
791
+ <xsl:apply-templates select="../m3d:name" mode="presentation">
792
+ <xsl:with-param name="sfx" select="':'"/>
793
+ </xsl:apply-templates>
1332
794
  </fo:inline>
1333
- <xsl:apply-templates/>
795
+ <xsl:apply-templates />
1334
796
  </fo:block>
1335
797
  </fo:block-container>
1336
- </xsl:template>
798
+ </xsl:template> -->
799
+
1337
800
 
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
801
 
1394
802
  <xsl:template match="m3d:admonition">
1395
803
  <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
@@ -1400,17 +808,6 @@
1400
808
  </fo:block>
1401
809
  </xsl:template>
1402
810
 
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
811
 
1415
812
  <xsl:template match="m3d:formula/m3d:stem">
1416
813
  <fo:block margin-top="14pt" margin-bottom="14pt">
@@ -1426,179 +823,21 @@
1426
823
  </fo:table-cell>
1427
824
  <fo:table-cell display-align="center">
1428
825
  <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>
826
+ <xsl:apply-templates select="../m3d:name" mode="presentation"/>
1437
827
  </fo:block>
1438
828
  </fo:table-cell>
1439
829
  </fo:table-row>
1440
830
  </fo:table-body>
1441
- </fo:table>
1442
- <fo:inline keep-together.within-line="always">
1443
- </fo:inline>
831
+ </fo:table>
1444
832
  </fo:block>
1445
833
  </xsl:template>
1446
834
 
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
835
 
1544
836
  <xsl:variable name="Image-M3AAWG-Logo">
1545
837
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUu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AABJRU5ErkJggg==</xsl:text>
1546
838
  </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
-
839
+
1561
840
  <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
841
 
1603
842
  <title-annex lang="en">Annex </title-annex>
1604
843
  <title-annex lang="fr">Annexe </title-annex>
@@ -1606,17 +845,7 @@
1606
845
  <title-annex lang="zh">Annex </title-annex>
1607
846
 
1608
847
 
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
-
848
+
1620
849
  <title-edition lang="en">
1621
850
 
1622
851
 
@@ -1624,9 +853,7 @@
1624
853
 
1625
854
  </title-edition>
1626
855
 
1627
- <title-formula lang="en">Formula </title-formula>
1628
- <title-formula lang="fr">Formula </title-formula>
1629
-
856
+
1630
857
  <title-toc lang="en">
1631
858
 
1632
859
 
@@ -1661,13 +888,6 @@
1661
888
  </title-part>
1662
889
  <title-part lang="zh">第 # 部分:</title-part>
1663
890
 
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
891
  <title-modified lang="en">modified</title-modified>
1672
892
  <title-modified lang="fr">modifiée</title-modified>
1673
893
 
@@ -1681,14 +901,12 @@
1681
901
 
1682
902
  <title-deprecated lang="en">DEPRECATED</title-deprecated>
1683
903
  <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1684
-
1685
- <title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
1686
-
904
+
1687
905
  <title-list-tables lang="en">List of Tables</title-list-tables>
1688
906
 
1689
907
  <title-list-figures lang="en">List of Figures</title-list-figures>
1690
908
 
1691
- <title-recommendation lang="en">Recommendation </title-recommendation>
909
+ <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1692
910
 
1693
911
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1694
912
 
@@ -1698,8 +916,6 @@
1698
916
 
1699
917
  <title-in lang="en">in </title-in>
1700
918
 
1701
- <title-box lang="en">Box </title-box>
1702
-
1703
919
  <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1704
920
  <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1705
921
 
@@ -1722,7 +938,7 @@
1722
938
  <title-warning lang="zh">警告</title-warning>
1723
939
 
1724
940
  <title-amendment lang="en">AMENDMENT</title-amendment>
1725
- </xsl:variable><xsl:template name="getTitle">
941
+ </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1726
942
  <xsl:param name="name"/>
1727
943
  <xsl:variable name="lang">
1728
944
  <xsl:call-template name="getLang"/>
@@ -1743,6 +959,8 @@
1743
959
 
1744
960
 
1745
961
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
962
+ <xsl:attribute name="white-space">pre</xsl:attribute>
963
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1746
964
 
1747
965
 
1748
966
 
@@ -1754,88 +972,360 @@
1754
972
 
1755
973
 
1756
974
 
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>
975
+ </xsl:attribute-set><xsl:attribute-set name="permission-style">
1763
976
 
977
+ </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
1764
978
 
979
+ </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
1765
980
 
1766
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
981
+ </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1767
982
 
1768
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1769
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1770
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
983
+ </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1771
984
 
985
+ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1772
986
 
987
+ </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
988
+ </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
989
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
1773
990
 
1774
- </xsl:attribute-set><xsl:template match="text()">
1775
- <xsl:value-of select="."/>
1776
- </xsl:template><xsl:template match="*[local-name()='br']">
1777
- <xsl:value-of select="$linebreak"/>
991
+
992
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
993
+
994
+
995
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
996
+
997
+ </xsl:attribute-set><xsl:attribute-set name="termexample-style">
998
+
999
+
1000
+
1001
+
1002
+
1003
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
1004
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1005
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1006
+
1007
+
1008
+
1009
+ </xsl:attribute-set><xsl:attribute-set name="example-style">
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1017
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+ </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1024
+
1025
+
1026
+
1027
+ </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1036
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </xsl:attribute-set><xsl:attribute-set name="example-p-style">
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1056
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1066
+
1067
+
1068
+
1069
+
1070
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1071
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1072
+
1073
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1074
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1075
+
1076
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1077
+ <xsl:attribute name="text-align">center</xsl:attribute>
1078
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1091
+
1092
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1093
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1094
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1095
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1096
+
1097
+
1098
+
1099
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1100
+
1101
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1102
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1103
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1104
+
1105
+
1106
+
1107
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1108
+
1109
+
1110
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1111
+
1112
+
1113
+
1114
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1124
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1125
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1126
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+ </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1145
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1146
+
1147
+
1148
+
1149
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1159
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1173
+
1174
+
1175
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1176
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
1177
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1184
+
1185
+
1186
+ <xsl:attribute name="text-align">right</xsl:attribute>
1187
+
1188
+
1189
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1190
+
1191
+
1192
+
1193
+
1194
+
1195
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1196
+
1197
+
1198
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1199
+
1200
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+ <xsl:attribute name="text-align">center</xsl:attribute>
1211
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1212
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1213
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1223
+
1224
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1225
+ <xsl:attribute name="text-align">center</xsl:attribute>
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1232
+
1233
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1234
+
1235
+
1236
+ <xsl:attribute name="width">100%</xsl:attribute>
1237
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1238
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1239
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1240
+
1241
+
1242
+
1243
+
1244
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1245
+
1246
+
1247
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1248
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1249
+
1250
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1251
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1252
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1253
+ <xsl:attribute name="text-align">center</xsl:attribute>
1254
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1255
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1256
+
1257
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1258
+
1259
+
1260
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1261
+
1262
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1263
+
1264
+
1265
+ </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1266
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1267
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1268
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1269
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1270
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1271
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1272
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1273
+
1274
+ <!-- Normative references -->
1275
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
1276
+ <!-- Terms and definitions -->
1277
+ <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"/>
1278
+ <!-- Another main sections -->
1279
+ <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"/>
1280
+ <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1281
+ <!-- Bibliography -->
1282
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
1283
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1284
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1285
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1286
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1287
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1288
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1289
+ </xsl:template><xsl:template name="processMainSectionsDefault">
1290
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1291
+
1292
+ <xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1293
+ <fo:block break-after="page"/>
1294
+ </xsl:if>
1295
+
1296
+ <!-- Normative references -->
1297
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1298
+ <!-- Terms and definitions -->
1299
+ <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']]"/>
1300
+ <!-- Another main sections -->
1301
+ <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'])]"/>
1302
+ <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1303
+ <!-- Bibliography -->
1304
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1305
+ </xsl:template><xsl:template match="text()">
1306
+ <xsl:value-of select="."/>
1307
+ </xsl:template><xsl:template match="*[local-name()='br']">
1308
+ <xsl:value-of select="$linebreak"/>
1778
1309
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1779
1310
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1780
1311
  <xsl:call-template name="add-zero-spaces-java"/>
1781
1312
  </xsl:template><xsl:template match="*[local-name()='table']">
1782
1313
 
1783
- <xsl:variable name="simple-table">
1784
- <!-- <xsl:copy> -->
1785
- <xsl:call-template name="getSimpleTable"/>
1786
- <!-- </xsl:copy> -->
1314
+ <xsl:variable name="simple-table">
1315
+ <xsl:call-template name="getSimpleTable"/>
1787
1316
  </xsl:variable>
1788
1317
 
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
1318
 
1795
- <!-- <xsl:if test="$namespace = 'iso'">
1796
- <fo:block space-before="6pt">&#xA0;</fo:block>
1797
- </xsl:if> -->
1798
1319
 
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"/>
1320
+
1321
+
1322
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1323
+
1836
1324
 
1837
- </xsl:otherwise>
1838
- </xsl:choose>
1325
+
1326
+ <xsl:call-template name="fn_name_display"/>
1327
+
1328
+
1839
1329
 
1840
1330
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1841
1331
 
@@ -1891,6 +1381,7 @@
1891
1381
 
1892
1382
 
1893
1383
 
1384
+
1894
1385
  <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
1895
1386
 
1896
1387
 
@@ -1903,6 +1394,7 @@
1903
1394
 
1904
1395
 
1905
1396
 
1397
+
1906
1398
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1907
1399
  <xsl:choose>
1908
1400
  <xsl:when test=". = 1 or . = 0">
@@ -1927,32 +1419,15 @@
1927
1419
 
1928
1420
 
1929
1421
 
1422
+
1423
+
1930
1424
  </fo:block-container>
1931
- </xsl:template><xsl:template name="getTableNumber">
1932
- <xsl:choose>
1933
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
1934
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
1935
- </xsl:when>
1936
- <xsl:when test="ancestor::*[local-name()='annex']">
1937
-
1938
-
1939
-
1940
-
1941
-
1942
-
1943
-
1944
-
1945
- </xsl:when>
1946
- <xsl:otherwise>
1947
-
1948
-
1949
- <xsl:number format="A." count="*[local-name()='annex']"/>
1950
- <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
1951
-
1952
- </xsl:otherwise>
1953
- </xsl:choose>
1954
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
1955
- <xsl:apply-templates/>
1425
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1426
+ <xsl:if test="normalize-space() != ''">
1427
+ <fo:block xsl:use-attribute-sets="table-name-style">
1428
+ <xsl:apply-templates/>
1429
+ </fo:block>
1430
+ </xsl:if>
1956
1431
  </xsl:template><xsl:template name="calculate-columns-numbers">
1957
1432
  <xsl:param name="table-row"/>
1958
1433
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -2170,6 +1645,16 @@
2170
1645
  </fo:table-row>
2171
1646
  </xsl:template><xsl:template match="*[local-name()='th']">
2172
1647
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
1648
+ <xsl:attribute name="text-align">
1649
+ <xsl:choose>
1650
+ <xsl:when test="@align">
1651
+ <xsl:value-of select="@align"/>
1652
+ </xsl:when>
1653
+ <xsl:otherwise>center</xsl:otherwise>
1654
+ </xsl:choose>
1655
+ </xsl:attribute>
1656
+
1657
+
2173
1658
 
2174
1659
 
2175
1660
 
@@ -2193,10 +1678,18 @@
2193
1678
  </fo:table-cell>
2194
1679
  </xsl:template><xsl:template match="*[local-name()='td']">
2195
1680
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1681
+ <xsl:attribute name="text-align">
1682
+ <xsl:choose>
1683
+ <xsl:when test="@align">
1684
+ <xsl:value-of select="@align"/>
1685
+ </xsl:when>
1686
+ <xsl:otherwise>left</xsl:otherwise>
1687
+ </xsl:choose>
1688
+ </xsl:attribute>
2196
1689
 
2197
1690
 
2198
1691
 
2199
-
1692
+
2200
1693
 
2201
1694
 
2202
1695
 
@@ -2215,21 +1708,9 @@
2215
1708
  <fo:block>
2216
1709
 
2217
1710
  <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
-
1711
+ </fo:block>
2231
1712
  </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">
1713
+ </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
1714
 
2234
1715
 
2235
1716
  <fo:block font-size="10pt" margin-bottom="12pt">
@@ -2240,26 +1721,15 @@
2240
1721
  <fo:inline padding-right="2mm">
2241
1722
 
2242
1723
 
2243
- <xsl:variable name="title-note">
2244
- <xsl:call-template name="getTitle">
2245
- <xsl:with-param name="name" select="'title-note'"/>
2246
- </xsl:call-template>
2247
- </xsl:variable>
2248
- <xsl:value-of select="$title-note"/>
2249
1724
 
2250
- <xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
2251
- <xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) &gt; 1">
2252
- <xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
2253
- </xsl:if>
1725
+
1726
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2254
1727
 
2255
-
2256
-
2257
-
2258
1728
  </fo:inline>
2259
1729
  <xsl:apply-templates mode="process"/>
2260
1730
  </fo:block>
2261
1731
 
2262
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1732
+ </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">
2263
1733
  <xsl:apply-templates/>
2264
1734
  </xsl:template><xsl:template name="fn_display">
2265
1735
  <xsl:variable name="references">
@@ -2319,7 +1789,7 @@
2319
1789
  <!-- and (not(@class) or @class !='pseudocode') -->
2320
1790
  </xsl:variable>
2321
1791
  <xsl:variable name="references">
2322
- <xsl:for-each select=".//*[local-name()='fn']">
1792
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2323
1793
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2324
1794
  <xsl:apply-templates/>
2325
1795
  </fn>
@@ -2586,7 +2056,7 @@
2586
2056
  <xsl:value-of select="string-length(normalize-space(.))"/>
2587
2057
  </xsl:if>
2588
2058
  </xsl:for-each>
2589
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
2059
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2590
2060
  <xsl:param name="key_iso"/>
2591
2061
 
2592
2062
  <!-- <tr>
@@ -2602,12 +2072,7 @@
2602
2072
  <xsl:if test="normalize-space($key_iso) = 'true'">
2603
2073
  <xsl:attribute name="margin-top">0</xsl:attribute>
2604
2074
  </xsl:if>
2605
- <xsl:variable name="title-note">
2606
- <xsl:call-template name="getTitle">
2607
- <xsl:with-param name="name" select="'title-note'"/>
2608
- </xsl:call-template>
2609
- </xsl:variable>
2610
- <xsl:value-of select="$title-note"/>
2075
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2611
2076
  </fo:block>
2612
2077
  </fo:table-cell>
2613
2078
  <fo:table-cell>
@@ -2676,7 +2141,7 @@
2676
2141
  <fo:inline font-style="italic">
2677
2142
  <xsl:apply-templates/>
2678
2143
  </fo:inline>
2679
- </xsl:template><xsl:template match="*[local-name()='strong']">
2144
+ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2680
2145
  <fo:inline font-weight="bold">
2681
2146
  <xsl:apply-templates/>
2682
2147
  </fo:inline>
@@ -2689,7 +2154,7 @@
2689
2154
  <xsl:apply-templates/>
2690
2155
  </fo:inline>
2691
2156
  </xsl:template><xsl:template match="*[local-name()='tt']">
2692
- <fo:inline font-family="Courier" font-size="10pt">
2157
+ <fo:inline xsl:use-attribute-sets="tt-style">
2693
2158
  <xsl:apply-templates/>
2694
2159
  </fo:inline>
2695
2160
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -3020,117 +2485,845 @@
3020
2485
  <xsl:copy-of select="."/>
3021
2486
  </fo:instream-foreign-object>
3022
2487
  </fo:inline>
3023
- </xsl:template><xsl:template match="*[local-name()='localityStack']">
3024
- <xsl:for-each select="*[local-name()='locality']">
3025
- <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3026
- <xsl:apply-templates select="."/>
3027
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3028
- </xsl:for-each>
3029
- </xsl:template><xsl:template match="*[local-name()='link']" name="link">
2488
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3030
2489
  <xsl:variable name="target">
3031
2490
  <xsl:choose>
3032
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3033
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2491
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2492
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2493
+ </xsl:when>
2494
+ <xsl:otherwise>
2495
+ <xsl:value-of select="normalize-space(@target)"/>
2496
+ </xsl:otherwise>
2497
+ </xsl:choose>
2498
+ </xsl:variable>
2499
+ <fo:inline xsl:use-attribute-sets="link-style">
2500
+ <xsl:choose>
2501
+ <xsl:when test="$target = ''">
2502
+ <xsl:apply-templates/>
2503
+ </xsl:when>
2504
+ <xsl:otherwise>
2505
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2506
+ <xsl:choose>
2507
+ <xsl:when test="normalize-space(.) = ''">
2508
+ <xsl:value-of select="$target"/>
2509
+ </xsl:when>
2510
+ <xsl:otherwise>
2511
+ <xsl:apply-templates/>
2512
+ </xsl:otherwise>
2513
+ </xsl:choose>
2514
+ </fo:basic-link>
2515
+ </xsl:otherwise>
2516
+ </xsl:choose>
2517
+ </fo:inline>
2518
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
2519
+ <fo:inline id="{@id}"/>
2520
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
2521
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2522
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2523
+ </fo:block>
2524
+ <xsl:apply-templates/>
2525
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2526
+ <fo:inline><xsl:apply-templates/></fo:inline>
2527
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
2528
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
2529
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2530
+ </fo:block>
2531
+ <xsl:apply-templates/>
2532
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
2533
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2534
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
2535
+ <xsl:variable name="annotation-id" select="@id"/>
2536
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2537
+ <fo:block id="{$annotation-id}" white-space="nowrap">
2538
+ <fo:inline>
2539
+ <xsl:apply-templates>
2540
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2541
+ </xsl:apply-templates>
2542
+ </fo:inline>
2543
+ </fo:block>
2544
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2545
+ <xsl:param name="callout"/>
2546
+ <fo:inline id="{@id}">
2547
+ <!-- for first p in annotation, put <x> -->
2548
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2549
+ <xsl:apply-templates/>
2550
+ </fo:inline>
2551
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
2552
+ <xsl:variable name="title-modified">
2553
+ <xsl:call-template name="getTitle">
2554
+ <xsl:with-param name="name" select="'title-modified'"/>
2555
+ </xsl:call-template>
2556
+ </xsl:variable>
2557
+ <xsl:choose>
2558
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2559
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
2560
+ </xsl:choose>
2561
+ <xsl:apply-templates/>
2562
+ </xsl:template><xsl:template match="*[local-name() = 'xref']">
2563
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2564
+
2565
+ <xsl:apply-templates/>
2566
+ </fo:basic-link>
2567
+ </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2568
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2569
+ <xsl:apply-templates/>
2570
+ </fo:block>
2571
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2572
+ <fo:inline>
2573
+ <xsl:apply-templates/>
2574
+ </fo:inline>
2575
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
2576
+ <fo:inline>
2577
+ <xsl:apply-templates/>
2578
+ </fo:inline>
2579
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
2580
+ <xsl:if test="normalize-space() != ''">
2581
+ <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
2582
+ </xsl:if>
2583
+ </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
2584
+
2585
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
2586
+
2587
+
2588
+
2589
+
2590
+ <fo:block-container margin-left="0mm">
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2599
+ <fo:block>
2600
+
2601
+
2602
+
2603
+
2604
+ <fo:inline xsl:use-attribute-sets="note-name-style">
2605
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2606
+ </fo:inline>
2607
+ <xsl:apply-templates/>
2608
+ </fo:block>
2609
+
2610
+
2611
+ </fo:block-container>
2612
+ </fo:block-container>
2613
+
2614
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
2615
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
2616
+ <xsl:choose>
2617
+ <xsl:when test="$num = 1">
2618
+ <fo:inline xsl:use-attribute-sets="note-p-style">
2619
+ <xsl:apply-templates/>
2620
+ </fo:inline>
2621
+ </xsl:when>
2622
+ <xsl:otherwise>
2623
+ <fo:block xsl:use-attribute-sets="note-p-style">
2624
+ <xsl:apply-templates/>
2625
+ </fo:block>
2626
+ </xsl:otherwise>
2627
+ </xsl:choose>
2628
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2629
+ <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2630
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2631
+ <xsl:apply-templates/>
2632
+ </fo:block>
2633
+ </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">
2634
+ <xsl:param name="sfx"/>
2635
+ <xsl:variable name="suffix">
2636
+ <xsl:choose>
2637
+ <xsl:when test="$sfx != ''">
2638
+ <xsl:value-of select="$sfx"/>
2639
+ </xsl:when>
2640
+ <xsl:otherwise>
2641
+
2642
+ <xsl:text>:</xsl:text>
2643
+
2644
+
2645
+ </xsl:otherwise>
2646
+ </xsl:choose>
2647
+ </xsl:variable>
2648
+ <xsl:if test="normalize-space() != ''">
2649
+ <xsl:apply-templates/>
2650
+ <xsl:value-of select="$suffix"/>
2651
+ </xsl:if>
2652
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
2653
+ <xsl:param name="sfx"/>
2654
+ <xsl:variable name="suffix">
2655
+ <xsl:choose>
2656
+ <xsl:when test="$sfx != ''">
2657
+ <xsl:value-of select="$sfx"/>
2658
+ </xsl:when>
2659
+ <xsl:otherwise>
2660
+
2661
+
2662
+ </xsl:otherwise>
2663
+ </xsl:choose>
2664
+ </xsl:variable>
2665
+ <xsl:if test="normalize-space() != ''">
2666
+ <xsl:apply-templates/>
2667
+ <xsl:value-of select="$suffix"/>
2668
+ </xsl:if>
2669
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
2670
+ <fo:inline><xsl:apply-templates/></fo:inline>
2671
+ </xsl:template><xsl:template match="*[local-name() = 'terms']">
2672
+ <fo:block id="{@id}">
2673
+ <xsl:apply-templates/>
2674
+ </fo:block>
2675
+ </xsl:template><xsl:template match="*[local-name() = 'term']">
2676
+ <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
2677
+
2678
+
2679
+ <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
2680
+ <xsl:apply-templates select="m3d:name" mode="presentation"/>
2681
+ </fo:block>
2682
+
2683
+
2684
+ <xsl:apply-templates/>
2685
+ </fo:block>
2686
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
2687
+ <xsl:if test="normalize-space() != ''">
2688
+ <fo:inline>
2689
+ <xsl:apply-templates/>
2690
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
2691
+ <xsl:text>.</xsl:text>
2692
+ </xsl:if> -->
2693
+ </fo:inline>
2694
+ </xsl:if>
2695
+ </xsl:template><xsl:template match="*[local-name() = 'figure']">
2696
+ <fo:block-container id="{@id}">
2697
+ <fo:block>
2698
+ <xsl:apply-templates/>
2699
+ </fo:block>
2700
+ <xsl:call-template name="fn_display_figure"/>
2701
+ <xsl:for-each select="*[local-name() = 'note']">
2702
+ <xsl:call-template name="note"/>
2703
+ </xsl:for-each>
2704
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2705
+ </fo:block-container>
2706
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
2707
+ <fo:block id="{@id}">
2708
+ <xsl:apply-templates/>
2709
+ </fo:block>
2710
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
2711
+ <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
2712
+ <xsl:apply-templates/>
2713
+ </fo:block>
2714
+ </xsl:template><xsl:template match="*[local-name() = 'image']">
2715
+ <fo:block xsl:use-attribute-sets="image-style">
2716
+
2717
+
2718
+ <xsl:variable name="src">
2719
+ <xsl:choose>
2720
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
2721
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
2722
+ </xsl:when>
2723
+ <xsl:otherwise>
2724
+ <xsl:value-of select="@src"/>
2725
+ </xsl:otherwise>
2726
+ </xsl:choose>
2727
+ </xsl:variable>
2728
+
2729
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
2730
+ </fo:block>
2731
+ </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">
2732
+ <xsl:apply-templates mode="contents"/>
2733
+ <xsl:text> </xsl:text>
2734
+ </xsl:template><xsl:template match="text()" mode="contents">
2735
+ <xsl:value-of select="."/>
2736
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
2737
+ <xsl:if test="normalize-space() != ''">
2738
+ <fo:block xsl:use-attribute-sets="figure-name-style">
2739
+
2740
+ <xsl:apply-templates/>
2741
+ </fo:block>
2742
+ </xsl:if>
2743
+ </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">
2744
+ <xsl:apply-templates mode="contents_item"/>
2745
+ <!-- <xsl:text> </xsl:text> -->
2746
+ </xsl:template><xsl:template name="getSection">
2747
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
2748
+ </xsl:template><xsl:template name="getName">
2749
+ <xsl:choose>
2750
+ <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
2751
+ <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
2752
+ </xsl:when>
2753
+ <xsl:otherwise>
2754
+ <xsl:copy-of select="*[local-name() = 'title']/node()"/>
2755
+ </xsl:otherwise>
2756
+ </xsl:choose>
2757
+ </xsl:template><xsl:template name="insertTitleAsListItem">
2758
+ <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
2759
+ <xsl:variable name="section">
2760
+ <xsl:for-each select="..">
2761
+ <xsl:call-template name="getSection"/>
2762
+ </xsl:for-each>
2763
+ </xsl:variable>
2764
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
2765
+ <fo:list-item>
2766
+ <fo:list-item-label end-indent="label-end()">
2767
+ <fo:block>
2768
+ <xsl:value-of select="$section"/>
2769
+ </fo:block>
2770
+ </fo:list-item-label>
2771
+ <fo:list-item-body start-indent="body-start()">
2772
+ <fo:block>
2773
+ <xsl:choose>
2774
+ <xsl:when test="*[local-name() = 'tab']">
2775
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
2776
+ </xsl:when>
2777
+ <xsl:otherwise>
2778
+ <xsl:apply-templates/>
2779
+ </xsl:otherwise>
2780
+ </xsl:choose>
2781
+ </fo:block>
2782
+ </fo:list-item-body>
2783
+ </fo:list-item>
2784
+ </fo:list-block>
2785
+ </xsl:template><xsl:template name="extractTitle">
2786
+ <xsl:choose>
2787
+ <xsl:when test="*[local-name() = 'tab']">
2788
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
2789
+ </xsl:when>
2790
+ <xsl:otherwise>
2791
+ <xsl:apply-templates/>
2792
+ </xsl:otherwise>
2793
+ </xsl:choose>
2794
+ </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">
2795
+ <xsl:text> </xsl:text>
2796
+ </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
2797
+ <xsl:copy>
2798
+ <xsl:apply-templates mode="contents_item"/>
2799
+ </xsl:copy>
2800
+ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
2801
+ <xsl:text> </xsl:text>
2802
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
2803
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
2804
+ <xsl:apply-templates/>
2805
+ </fo:block>
2806
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2807
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
2808
+ <xsl:variable name="text">
2809
+ <xsl:call-template name="add-zero-spaces-equal"/>
2810
+ </xsl:variable>
2811
+ <xsl:call-template name="add-zero-spaces">
2812
+ <xsl:with-param name="text" select="$text"/>
2813
+ </xsl:call-template>
2814
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
2815
+ <xsl:if test="normalize-space() != ''">
2816
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2817
+
2818
+ <xsl:apply-templates/>
2819
+ </fo:block>
2820
+ </xsl:if>
2821
+ </xsl:template><xsl:template match="*[local-name() = 'permission']">
2822
+ <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
2823
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2824
+ <xsl:apply-templates/>
2825
+ </fo:block>
2826
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
2827
+ <xsl:if test="normalize-space() != ''">
2828
+ <fo:block xsl:use-attribute-sets="permission-name-style">
2829
+ <xsl:apply-templates/>
2830
+
2831
+ </fo:block>
2832
+ </xsl:if>
2833
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
2834
+ <fo:block xsl:use-attribute-sets="permission-label-style">
2835
+ <xsl:apply-templates/>
2836
+ </fo:block>
2837
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']">
2838
+ <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
2839
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2840
+ <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
2841
+ <xsl:apply-templates select="@obligation" mode="presentation"/>
2842
+ <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
2843
+ <xsl:apply-templates/>
2844
+ </fo:block>
2845
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
2846
+ <xsl:if test="normalize-space() != ''">
2847
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
2848
+
2849
+ <xsl:apply-templates/>
2850
+
2851
+ </fo:block>
2852
+ </xsl:if>
2853
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
2854
+ <fo:block xsl:use-attribute-sets="requirement-label-style">
2855
+ <xsl:apply-templates/>
2856
+ </fo:block>
2857
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
2858
+ <fo:block>
2859
+ <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
2860
+ </fo:block>
2861
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
2862
+ <fo:block xsl:use-attribute-sets="requirement-subject-style">
2863
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
2864
+ </fo:block>
2865
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
2866
+ <fo:block xsl:use-attribute-sets="requirement-inherit-style">
2867
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
2868
+ </fo:block>
2869
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
2870
+ <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
2871
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2872
+ <xsl:apply-templates/>
2873
+ </fo:block>
2874
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
2875
+ <xsl:if test="normalize-space() != ''">
2876
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
2877
+ <xsl:apply-templates/>
2878
+
2879
+ </fo:block>
2880
+ </xsl:if>
2881
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
2882
+ <fo:block xsl:use-attribute-sets="recommendation-label-style">
2883
+ <xsl:apply-templates/>
2884
+ </fo:block>
2885
+ </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2886
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
2887
+ <fo:block-container margin-left="0mm" margin-right="0mm">
2888
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
2889
+ <xsl:variable name="simple-table">
2890
+ <xsl:call-template name="getSimpleTable"/>
2891
+ </xsl:variable>
2892
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2893
+ <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
2894
+ <fo:table-column column-width="35mm"/>
2895
+ <fo:table-column column-width="115mm"/>
2896
+ </xsl:if>
2897
+ <xsl:apply-templates mode="requirement"/>
2898
+ </fo:table>
2899
+ <!-- fn processing -->
2900
+ <xsl:if test=".//*[local-name() = 'fn']">
2901
+ <xsl:for-each select="*[local-name() = 'tbody']">
2902
+ <fo:block font-size="90%" border-bottom="1.pt solid black">
2903
+ <xsl:call-template name="fn_display"/>
2904
+ </fo:block>
2905
+ </xsl:for-each>
2906
+ </xsl:if>
2907
+ </fo:block-container>
2908
+ </fo:block-container>
2909
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
2910
+ <fo:table-header>
2911
+ <xsl:apply-templates mode="requirement"/>
2912
+ </fo:table-header>
2913
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
2914
+ <fo:table-body>
2915
+ <xsl:apply-templates mode="requirement"/>
2916
+ </fo:table-body>
2917
+ </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
2918
+ <fo:table-row>
2919
+ <xsl:apply-templates mode="requirement"/>
2920
+ </fo:table-row>
2921
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
2922
+ <fo:table-cell text-align="{@align}">
2923
+ <xsl:attribute name="text-align">
2924
+ <xsl:choose>
2925
+ <xsl:when test="@align">
2926
+ <xsl:value-of select="@align"/>
2927
+ </xsl:when>
2928
+ <xsl:otherwise>center</xsl:otherwise>
2929
+ </xsl:choose>
2930
+ </xsl:attribute>
2931
+ <xsl:if test="@colspan">
2932
+ <xsl:attribute name="number-columns-spanned">
2933
+ <xsl:value-of select="@colspan"/>
2934
+ </xsl:attribute>
2935
+ </xsl:if>
2936
+ <xsl:if test="@rowspan">
2937
+ <xsl:attribute name="number-rows-spanned">
2938
+ <xsl:value-of select="@rowspan"/>
2939
+ </xsl:attribute>
2940
+ </xsl:if>
2941
+
2942
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2943
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2944
+ <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
2945
+ </xsl:if>
2946
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
2947
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2948
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
2949
+ </xsl:if>
2950
+
2951
+ <fo:block>
2952
+ <xsl:apply-templates/>
2953
+ </fo:block>
2954
+ </fo:table-cell>
2955
+ </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
2956
+ <fo:table-cell text-align="{@align}">
2957
+ <xsl:attribute name="text-align">
2958
+ <xsl:choose>
2959
+ <xsl:when test="@align">
2960
+ <xsl:value-of select="@align"/>
2961
+ </xsl:when>
2962
+ <xsl:otherwise>left</xsl:otherwise>
2963
+ </xsl:choose>
2964
+ </xsl:attribute>
2965
+ <xsl:if test="@colspan">
2966
+ <xsl:attribute name="number-columns-spanned">
2967
+ <xsl:value-of select="@colspan"/>
2968
+ </xsl:attribute>
2969
+ </xsl:if>
2970
+ <xsl:if test="@rowspan">
2971
+ <xsl:attribute name="number-rows-spanned">
2972
+ <xsl:value-of select="@rowspan"/>
2973
+ </xsl:attribute>
2974
+ </xsl:if>
2975
+
2976
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2977
+ <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
2978
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2979
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
2980
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
2981
+ </xsl:if>
2982
+ </xsl:if>
2983
+
2984
+ <fo:block>
2985
+ <xsl:apply-templates/>
2986
+ </fo:block>
2987
+ </fo:table-cell>
2988
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
2989
+ <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
2990
+ <xsl:apply-templates/>
2991
+ </fo:block>
2992
+ </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
2993
+ <fo:block margin-bottom="10pt">
2994
+ <xsl:apply-templates/>
2995
+ </fo:block>
2996
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']">
2997
+ <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
2998
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2999
+ <xsl:apply-templates/>
3000
+ </fo:block>
3001
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
3002
+ <xsl:if test="normalize-space() != ''">
3003
+ <fo:inline xsl:use-attribute-sets="termexample-name-style">
3004
+ <xsl:apply-templates/>
3005
+ </fo:inline>
3006
+ </xsl:if>
3007
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
3008
+ <fo:inline><xsl:apply-templates/></fo:inline>
3009
+ </xsl:template><xsl:template match="*[local-name() = 'example']">
3010
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
3011
+
3012
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3013
+
3014
+ <xsl:variable name="element">
3015
+
3016
+ inline
3017
+ </xsl:variable>
3018
+
3019
+ <xsl:choose>
3020
+ <xsl:when test="normalize-space($element) = 'block'">
3021
+ <fo:block xsl:use-attribute-sets="example-body-style">
3022
+ <xsl:apply-templates/>
3023
+ </fo:block>
3024
+ </xsl:when>
3025
+ <xsl:otherwise>
3026
+ <fo:inline>
3027
+ <xsl:apply-templates/>
3028
+ </fo:inline>
3029
+ </xsl:otherwise>
3030
+ </xsl:choose>
3031
+
3032
+ </fo:block>
3033
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
3034
+
3035
+ <xsl:variable name="element">
3036
+
3037
+ inline
3038
+ </xsl:variable>
3039
+ <xsl:choose>
3040
+ <xsl:when test="ancestor::*[local-name() = 'appendix']">
3041
+ <fo:inline>
3042
+ <xsl:apply-templates/>
3043
+ </fo:inline>
3044
+ </xsl:when>
3045
+ <xsl:when test="normalize-space($element) = 'block'">
3046
+ <fo:block xsl:use-attribute-sets="example-name-style">
3047
+ <xsl:apply-templates/>
3048
+ </fo:block>
3049
+ </xsl:when>
3050
+ <xsl:otherwise>
3051
+ <fo:inline xsl:use-attribute-sets="example-name-style">
3052
+ <xsl:apply-templates/>
3053
+ </fo:inline>
3054
+ </xsl:otherwise>
3055
+ </xsl:choose>
3056
+
3057
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3058
+ <fo:block xsl:use-attribute-sets="example-p-style">
3059
+
3060
+ <xsl:apply-templates/>
3061
+ </fo:block>
3062
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3063
+ <fo:block xsl:use-attribute-sets="termsource-style">
3064
+ <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3065
+ <xsl:variable name="termsource_text">
3066
+ <xsl:apply-templates/>
3067
+ </xsl:variable>
3068
+ <xsl:choose>
3069
+ <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3070
+ <xsl:apply-templates/>
3034
3071
  </xsl:when>
3035
3072
  <xsl:otherwise>
3036
- <xsl:value-of select="normalize-space(@target)"/>
3073
+ <xsl:text>[</xsl:text>
3074
+ <xsl:apply-templates/>
3075
+ <xsl:text>]</xsl:text>
3037
3076
  </xsl:otherwise>
3038
3077
  </xsl:choose>
3078
+ </fo:block>
3079
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
3080
+ <xsl:if test="normalize-space() != ''">
3081
+ <xsl:value-of select="."/>
3082
+ </xsl:if>
3083
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
3084
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3085
+
3086
+ <fo:inline xsl:use-attribute-sets="origin-style">
3087
+ <xsl:apply-templates/>
3088
+ </fo:inline>
3089
+ </fo:basic-link>
3090
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
3091
+ <fo:inline><xsl:apply-templates/></fo:inline>
3092
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
3093
+ <xsl:if test="normalize-space() != ''">
3094
+ <xsl:value-of select="."/>
3095
+ </xsl:if>
3096
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3097
+
3098
+ <fo:block xsl:use-attribute-sets="quote-style">
3099
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3100
+ </fo:block>
3101
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3102
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3103
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3104
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3105
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3106
+ </fo:block>
3107
+ </xsl:if>
3108
+ </xsl:template><xsl:template match="*[local-name() = 'source']">
3109
+ <xsl:if test="../*[local-name() = 'author']">
3110
+ <xsl:text>, </xsl:text>
3111
+ </xsl:if>
3112
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3113
+ <xsl:apply-templates/>
3114
+ </fo:basic-link>
3115
+ </xsl:template><xsl:template match="*[local-name() = 'author']">
3116
+ <xsl:text>— </xsl:text>
3117
+ <xsl:apply-templates/>
3118
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
3119
+ <fo:inline xsl:use-attribute-sets="eref-style">
3120
+ <xsl:if test="@type = 'footnote'">
3121
+
3122
+
3123
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3124
+ <xsl:attribute name="font-size">50%</xsl:attribute>
3125
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3126
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3127
+
3128
+ </xsl:if>
3129
+
3130
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3131
+
3132
+ <xsl:if test="@type = 'inline'">
3133
+
3134
+
3135
+ </xsl:if>
3136
+
3137
+
3138
+ <xsl:apply-templates/>
3139
+ </fo:basic-link>
3140
+ </fo:inline>
3141
+ </xsl:template><xsl:template match="*[local-name() = 'tab']">
3142
+ <!-- zero-space char -->
3143
+ <xsl:variable name="depth">
3144
+ <xsl:call-template name="getLevel">
3145
+ <xsl:with-param name="depth" select="../@depth"/>
3146
+ </xsl:call-template>
3039
3147
  </xsl:variable>
3040
- <fo:inline xsl:use-attribute-sets="link-style">
3148
+
3149
+ <xsl:variable name="padding">
3150
+
3151
+
3152
+
3153
+
3154
+
3155
+
3156
+
3157
+
3158
+ <xsl:variable name="references_num_current">
3159
+ <xsl:number level="any" count="m3d:references"/>
3160
+ </xsl:variable>
3161
+ <xsl:choose>
3162
+ <xsl:when test="(ancestor-or-self::m3d:sections and $depth = 1) or (local-name(../..) = 'references' and $references_num_current = 1)">25</xsl:when>
3163
+ <xsl:when test="ancestor-or-self::m3d:sections or ancestor-or-self::m3d:annex">3</xsl:when>
3164
+ </xsl:choose>
3165
+
3166
+
3167
+
3168
+
3169
+
3170
+
3171
+
3172
+
3173
+
3174
+
3175
+ </xsl:variable>
3176
+
3177
+ <xsl:variable name="padding-right">
3041
3178
  <xsl:choose>
3042
- <xsl:when test="$target = ''">
3043
- <xsl:apply-templates/>
3044
- </xsl:when>
3179
+ <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
3045
3180
  <xsl:otherwise>
3046
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3047
- <xsl:choose>
3048
- <xsl:when test="normalize-space(.) = ''">
3049
- <xsl:value-of select="$target"/>
3050
- </xsl:when>
3051
- <xsl:otherwise>
3052
- <xsl:apply-templates/>
3053
- </xsl:otherwise>
3054
- </xsl:choose>
3055
- </fo:basic-link>
3181
+ <xsl:value-of select="normalize-space($padding)"/>
3056
3182
  </xsl:otherwise>
3057
3183
  </xsl:choose>
3058
- </fo:inline>
3059
- </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3060
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3061
- <!-- <xsl:choose>
3062
- <xsl:when test="@lang = 'en'"></xsl:when>
3063
- <xsl:otherwise> -->
3064
- <xsl:attribute name="white-space">pre</xsl:attribute>
3065
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3066
- <!-- </xsl:otherwise>
3067
- </xsl:choose> -->
3184
+ </xsl:variable>
3185
+
3186
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3187
+
3188
+ <xsl:choose>
3189
+ <xsl:when test="$language = 'zh'">
3190
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
3191
+ </xsl:when>
3192
+ <xsl:when test="../../@inline-header = 'true'">
3193
+ <fo:inline font-size="90%">
3194
+ <xsl:call-template name="insertNonBreakSpaces">
3195
+ <xsl:with-param name="count" select="$padding-right"/>
3196
+ </xsl:call-template>
3197
+ </fo:inline>
3198
+ </xsl:when>
3199
+ <xsl:otherwise>
3200
+ <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
3201
+ </xsl:otherwise>
3202
+ </xsl:choose>
3203
+
3204
+ </xsl:template><xsl:template name="insertNonBreakSpaces">
3205
+ <xsl:param name="count"/>
3206
+ <xsl:if test="$count &gt; 0">
3207
+ <xsl:text> </xsl:text>
3208
+ <xsl:call-template name="insertNonBreakSpaces">
3209
+ <xsl:with-param name="count" select="$count - 1"/>
3210
+ </xsl:call-template>
3211
+ </xsl:if>
3212
+ </xsl:template><xsl:template match="*[local-name() = 'domain']">
3213
+ <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
3214
+ <xsl:text> </xsl:text>
3215
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']">
3216
+ <fo:block xsl:use-attribute-sets="admitted-style">
3068
3217
  <xsl:apply-templates/>
3069
3218
  </fo:block>
3070
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
3071
- <fo:inline id="{@id}"/>
3072
- </xsl:template><xsl:template match="*[local-name()='appendix']">
3073
- <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3074
- <xsl:variable name="title-appendix">
3075
- <xsl:call-template name="getTitle">
3076
- <xsl:with-param name="name" select="'title-appendix'"/>
3077
- </xsl:call-template>
3078
- </xsl:variable>
3079
- <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
3080
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3219
+ </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3220
+ <xsl:variable name="title-deprecated">
3221
+ <xsl:call-template name="getTitle">
3222
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3223
+ </xsl:call-template>
3224
+ </xsl:variable>
3225
+ <fo:block xsl:use-attribute-sets="deprecates-style">
3226
+ <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
3227
+ </fo:block>
3228
+ </xsl:template><xsl:template match="*[local-name() = 'definition']">
3229
+ <fo:block xsl:use-attribute-sets="definition-style">
3230
+ <xsl:apply-templates/>
3081
3231
  </fo:block>
3232
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
3082
3233
  <xsl:apply-templates/>
3083
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3084
- <fo:inline><xsl:apply-templates/></fo:inline>
3085
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
3086
- <fo:block xsl:use-attribute-sets="appendix-example-style">
3087
- <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
3088
- <xsl:variable name="title-example">
3089
- <xsl:call-template name="getTitle">
3090
- <xsl:with-param name="name" select="'title-example'"/>
3091
- </xsl:call-template>
3092
- </xsl:variable>
3093
- <xsl:value-of select="$title-example"/>
3094
- <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
3095
- <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
3234
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
3235
+ <fo:inline> <xsl:apply-templates/></fo:inline>
3236
+ <fo:block> </fo:block>
3237
+ </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
3238
+
3239
+ <fo:block break-after="page"/>
3240
+
3241
+ <fo:block>
3242
+ <xsl:call-template name="setId"/>
3243
+
3244
+
3245
+
3246
+
3247
+
3248
+ <xsl:variable name="pos"><xsl:number count="m3d:sections/m3d:clause | m3d:sections/m3d:terms"/></xsl:variable>
3249
+ <xsl:if test="$pos &gt;= 2">
3250
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
3096
3251
  </xsl:if>
3097
- <xsl:if test="*[local-name()='name']">
3098
- <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
3099
- </xsl:if>
3252
+
3253
+
3254
+
3255
+
3256
+
3257
+
3258
+ <xsl:apply-templates/>
3100
3259
  </fo:block>
3101
- <xsl:apply-templates/>
3102
- </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">
3103
- <fo:inline><xsl:apply-templates/></fo:inline>
3104
- </xsl:template><xsl:template match="*[local-name() = 'callout']">
3105
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3106
- </xsl:template><xsl:template match="*[local-name() = 'annotation']">
3107
- <xsl:variable name="annotation-id" select="@id"/>
3108
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3109
- <fo:block id="{$annotation-id}" white-space="nowrap">
3110
- <fo:inline>
3111
- <xsl:apply-templates>
3112
- <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
3113
- </xsl:apply-templates>
3114
- </fo:inline>
3115
- </fo:block>
3116
- </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
3117
- <xsl:param name="callout"/>
3118
- <fo:inline id="{@id}">
3119
- <!-- for first p in annotation, put <x> -->
3120
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3260
+
3261
+
3262
+
3263
+ </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3264
+ <fo:block break-after="page"/>
3265
+ <fo:block>
3266
+ <xsl:call-template name="setId"/>
3121
3267
  <xsl:apply-templates/>
3122
- </fo:inline>
3123
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
3124
- <xsl:variable name="title-modified">
3125
- <xsl:call-template name="getTitle">
3126
- <xsl:with-param name="name" select="'title-modified'"/>
3127
- </xsl:call-template>
3128
- </xsl:variable>
3129
- <xsl:choose>
3130
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3131
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
3132
- </xsl:choose>
3268
+ </fo:block>
3269
+ </xsl:template><xsl:template match="*[local-name() = 'clause']">
3270
+ <fo:block>
3271
+ <xsl:call-template name="setId"/>
3272
+ <xsl:apply-templates/>
3273
+ </fo:block>
3274
+ </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3275
+ <fo:block id="{@id}">
3276
+ <xsl:apply-templates/>
3277
+ </fo:block>
3278
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
3279
+
3280
+ <fo:block id="{@id}">
3281
+ <xsl:apply-templates/>
3282
+ </fo:block>
3283
+ </xsl:template><xsl:template match="*[local-name() = 'annex']">
3284
+ <fo:block break-after="page"/>
3285
+ <fo:block id="{@id}">
3286
+
3287
+ </fo:block>
3133
3288
  <xsl:apply-templates/>
3289
+ </xsl:template><xsl:template match="*[local-name() = 'review']">
3290
+ <!-- comment 2019-11-29 -->
3291
+ <!-- <fo:block font-weight="bold">Review:</fo:block>
3292
+ <xsl:apply-templates /> -->
3293
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3294
+ <!-- 0xA0 to space replacement -->
3295
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3296
+ </xsl:template><xsl:template match="*[local-name() = 'errata']">
3297
+ <!-- <row>
3298
+ <date>05-07-2013</date>
3299
+ <type>Editorial</type>
3300
+ <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
3301
+ <pages>D-3</pages>
3302
+ </row>
3303
+ -->
3304
+ <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
3305
+ <fo:table-column column-width="20mm"/>
3306
+ <fo:table-column column-width="23mm"/>
3307
+ <fo:table-column column-width="107mm"/>
3308
+ <fo:table-column column-width="15mm"/>
3309
+ <fo:table-body>
3310
+ <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
3311
+ <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3312
+ <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3313
+ <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
3314
+ <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
3315
+ </fo:table-row>
3316
+ <xsl:apply-templates/>
3317
+ </fo:table-body>
3318
+ </fo:table>
3319
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
3320
+ <fo:table-row>
3321
+ <xsl:apply-templates/>
3322
+ </fo:table-row>
3323
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
3324
+ <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3325
+ <fo:block><xsl:apply-templates/></fo:block>
3326
+ </fo:table-cell>
3134
3327
  </xsl:template><xsl:template name="convertDate">
3135
3328
  <xsl:param name="date"/>
3136
3329
  <xsl:param name="format" select="'short'"/>
@@ -3261,27 +3454,49 @@
3261
3454
  </xsl:otherwise>
3262
3455
  </xsl:choose>
3263
3456
  </xsl:template><xsl:template name="getLevel">
3264
- <xsl:variable name="level_total" select="count(ancestor::*)"/>
3265
- <xsl:variable name="level">
3266
- <xsl:choose>
3267
- <xsl:when test="ancestor::*[local-name() = 'preface']">
3268
- <xsl:value-of select="$level_total - 2"/>
3269
- </xsl:when>
3270
- <xsl:when test="ancestor::*[local-name() = 'sections']">
3271
- <xsl:value-of select="$level_total - 2"/>
3272
- </xsl:when>
3273
- <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3274
- <xsl:value-of select="$level_total - 2"/>
3275
- </xsl:when>
3276
- <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3277
- <xsl:otherwise>
3278
- <xsl:value-of select="$level_total - 1"/>
3279
- </xsl:otherwise>
3280
- </xsl:choose>
3281
- </xsl:variable>
3282
- <xsl:value-of select="$level"/>
3283
- </xsl:template><xsl:template name="getSubSection">
3284
- <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']"/>
3457
+ <xsl:param name="depth"/>
3458
+ <xsl:choose>
3459
+ <xsl:when test="normalize-space(@depth) != ''">
3460
+ <xsl:value-of select="@depth"/>
3461
+ </xsl:when>
3462
+ <xsl:when test="normalize-space($depth) != ''">
3463
+ <xsl:value-of select="$depth"/>
3464
+ </xsl:when>
3465
+ <xsl:otherwise>
3466
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
3467
+ <xsl:variable name="level">
3468
+ <xsl:choose>
3469
+ <xsl:when test="parent::*[local-name() = 'preface']">
3470
+ <xsl:value-of select="$level_total - 1"/>
3471
+ </xsl:when>
3472
+ <xsl:when test="ancestor::*[local-name() = 'preface']">
3473
+ <xsl:value-of select="$level_total - 2"/>
3474
+ </xsl:when>
3475
+ <!-- <xsl:when test="parent::*[local-name() = 'sections']">
3476
+ <xsl:value-of select="$level_total - 1"/>
3477
+ </xsl:when> -->
3478
+ <xsl:when test="ancestor::*[local-name() = 'sections']">
3479
+ <xsl:value-of select="$level_total - 1"/>
3480
+ </xsl:when>
3481
+ <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3482
+ <xsl:value-of select="$level_total - 1"/>
3483
+ </xsl:when>
3484
+ <xsl:when test="parent::*[local-name() = 'annex']">
3485
+ <xsl:value-of select="$level_total - 1"/>
3486
+ </xsl:when>
3487
+ <xsl:when test="ancestor::*[local-name() = 'annex']">
3488
+ <xsl:value-of select="$level_total"/>
3489
+ </xsl:when>
3490
+ <xsl:when test="local-name() = 'annex'">1</xsl:when>
3491
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3492
+ <xsl:otherwise>
3493
+ <xsl:value-of select="$level_total - 1"/>
3494
+ </xsl:otherwise>
3495
+ </xsl:choose>
3496
+ </xsl:variable>
3497
+ <xsl:value-of select="$level"/>
3498
+ </xsl:otherwise>
3499
+ </xsl:choose>
3285
3500
  </xsl:template><xsl:template name="split">
3286
3501
  <xsl:param name="pText" select="."/>
3287
3502
  <xsl:param name="sep" select="','"/>
@@ -3296,4 +3511,47 @@
3296
3511
  </xsl:if>
3297
3512
  </xsl:template><xsl:template name="getDocumentId">
3298
3513
  <xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
3514
+ </xsl:template><xsl:template name="namespaceCheck">
3515
+ <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
3516
+ <xsl:variable name="XSLNS">
3517
+
3518
+
3519
+
3520
+
3521
+
3522
+
3523
+
3524
+
3525
+
3526
+
3527
+ <xsl:value-of select="document('')//*/namespace::m3d"/>
3528
+
3529
+
3530
+
3531
+
3532
+ </xsl:variable>
3533
+ <xsl:if test="$documentNS != $XSLNS">
3534
+ <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
3535
+ </xsl:if>
3536
+ </xsl:template><xsl:template name="getLanguage">
3537
+ <xsl:param name="lang"/>
3538
+ <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
3539
+ <xsl:choose>
3540
+ <xsl:when test="$language = 'en'">English</xsl:when>
3541
+ <xsl:when test="$language = 'fr'">French</xsl:when>
3542
+ <xsl:when test="$language = 'de'">Deutsch</xsl:when>
3543
+ <xsl:when test="$language = 'cn'">Chinese</xsl:when>
3544
+ <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3545
+ </xsl:choose>
3546
+ </xsl:template><xsl:template name="setId">
3547
+ <xsl:attribute name="id">
3548
+ <xsl:choose>
3549
+ <xsl:when test="@id">
3550
+ <xsl:value-of select="@id"/>
3551
+ </xsl:when>
3552
+ <xsl:otherwise>
3553
+ <xsl:value-of select="generate-id()"/>
3554
+ </xsl:otherwise>
3555
+ </xsl:choose>
3556
+ </xsl:attribute>
3299
3557
  </xsl:template></xsl:stylesheet>