metanorma-gb 1.4.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -74,17 +74,6 @@ module IsoDoc
74
74
  term_merge(docxml, "DeprecatedTerms")
75
75
  docxml
76
76
  end
77
-
78
- =begin
79
- def intro_cleanup(docxml)
80
- # insert tab for purposes of ToC lining up
81
- docxml.xpath("//h1[@class = 'IntroTitle']").each do |h1|
82
- if h1.content == "引言"
83
- h1.add_child('<span style="mso-tab-count:1">&#xA0; </span>')
84
- end
85
- end
86
- end
87
- =end
88
77
  end
89
78
  end
90
79
  end
@@ -37,23 +37,8 @@
37
37
  -->
38
38
  <xsl:variable name="contents">
39
39
  <contents>
40
- <xsl:apply-templates select="/gb:gb-standard/gb:preface/node()" mode="contents"/>
41
-
42
- <xsl:apply-templates select="/gb:gb-standard/gb:sections/gb:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
43
- <xsl:with-param name="sectionNum" select="'1'"/>
44
- </xsl:apply-templates>
45
- <xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
46
- <xsl:with-param name="sectionNum" select="'2'"/>
47
- </xsl:apply-templates>
48
- <xsl:apply-templates select="/gb:gb-standard/gb:sections/*[position() &gt; 1]" mode="contents"> <!-- @id != '_scope' -->
49
- <xsl:with-param name="sectionNumSkew" select="'1'"/>
50
- </xsl:apply-templates>
51
- <xsl:apply-templates select="/gb:gb-standard/gb:annex" mode="contents"/>
52
- <xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[position() &gt; 1]" mode="contents"/> <!-- @id = '_bibliography' -->
53
-
54
- <xsl:apply-templates select="//gb:figure" mode="contents"/>
55
-
56
- <xsl:apply-templates select="//gb:table" mode="contents"/>
40
+ <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
41
+ <xsl:call-template name="processMainSectionsDefault_Contents"/>
57
42
  </contents>
58
43
  </xsl:variable>
59
44
 
@@ -62,7 +47,7 @@
62
47
  </xsl:variable>
63
48
 
64
49
  <xsl:template match="/">
65
- <xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
50
+ <xsl:call-template name="namespaceCheck"/>
66
51
  <fo:root font-family="SimSun" font-size="10.5pt" xml:lang="{$lang}"> <!-- -->
67
52
  <fo:layout-master-set>
68
53
 
@@ -344,32 +329,19 @@
344
329
 
345
330
  <fo:block line-height="220%">
346
331
  <xsl:variable name="margin-left">12</xsl:variable>
347
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'][not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
332
+ <xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
348
333
  <fo:block text-align-last="justify">
349
334
  <xsl:if test="@level =2">
350
335
  <xsl:attribute name="margin-left">3.7mm</xsl:attribute>
351
336
  </xsl:if>
352
337
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
353
- <xsl:if test="normalize-space(@section) != '' and not(@display-section = 'false')">
354
- <fo:inline>
355
- <xsl:if test="@type = 'annex' and @level = 1">
356
- <xsl:attribute name="font-weight">bold</xsl:attribute>
357
- </xsl:if>
338
+ <xsl:if test="normalize-space(@section) != ''">
339
+ <fo:inline>
358
340
  <xsl:value-of select="@section"/>
359
341
  </fo:inline>
360
- <xsl:if test="not(@type = 'annex' and @level = 1)">
361
- <xsl:text>. </xsl:text>
362
- </xsl:if>
363
- <xsl:if test="@type = 'annex' and @level = 1">
364
- <xsl:text> </xsl:text>
365
- </xsl:if>
342
+ <xsl:value-of select="$tab_zh"/>
366
343
  </xsl:if>
367
- <xsl:if test="@addon != ''">
368
- <fo:inline font-weight="normal">(<xsl:value-of select="@addon"/>)</fo:inline>
369
- <xsl:text> </xsl:text>
370
- </xsl:if>
371
- <xsl:value-of select="text()"/>
372
- <xsl:text> </xsl:text>
344
+ <xsl:apply-templates/>
373
345
  <fo:inline keep-together.within-line="always">
374
346
  <fo:leader font-weight="normal" leader-pattern="dots"/>
375
347
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -383,8 +355,8 @@
383
355
  </fo:block-container>
384
356
 
385
357
  <!-- Foreword, Introduction -->
386
- <fo:block line-height="150%">
387
- <xsl:apply-templates select="/gb:gb-standard/gb:preface/node()"/>
358
+ <fo:block line-height="150%">
359
+ <xsl:call-template name="processPrefaceSectionsDefault"/>
388
360
  </fo:block>
389
361
 
390
362
  </fo:flow>
@@ -407,25 +379,7 @@
407
379
  </xsl:call-template>
408
380
  </fo:block>
409
381
 
410
- <xsl:apply-templates select="/gb:gb-standard/gb:sections/gb:clause[1]"> <!-- Scope -->
411
- <xsl:with-param name="sectionNum" select="'1'"/>
412
- </xsl:apply-templates>
413
-
414
- <!-- Normative references -->
415
- <xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[1]">
416
- <xsl:with-param name="sectionNum" select="'2'"/>
417
- </xsl:apply-templates>
418
-
419
- <!-- Main sections -->
420
- <xsl:apply-templates select="/gb:gb-standard/gb:sections/*[position() &gt; 1]">
421
- <xsl:with-param name="sectionNumSkew" select="'1'"/>
422
- </xsl:apply-templates>
423
-
424
- <!-- Annex(s) -->
425
- <xsl:apply-templates select="/gb:gb-standard/gb:annex"/>
426
-
427
- <!-- Bibliography -->
428
- <xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[position() &gt; 1]"/>
382
+ <xsl:call-template name="processMainSectionsDefault"/>
429
383
 
430
384
  </fo:block>
431
385
  </fo:flow>
@@ -482,185 +436,57 @@
482
436
  </xsl:if>
483
437
  </xsl:template>
484
438
 
485
- <!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
486
- <xsl:template match="node()">
487
- <xsl:param name="sectionNum"/>
488
- <xsl:param name="sectionNumSkew"/>
489
- <xsl:apply-templates>
490
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
491
- <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
492
- </xsl:apply-templates>
439
+ <xsl:template match="node()">
440
+ <xsl:apply-templates/>
493
441
  </xsl:template>
494
442
 
495
443
  <!-- ============================= -->
496
444
  <!-- CONTENTS -->
497
445
  <!-- ============================= -->
498
- <xsl:template match="node()" mode="contents">
499
- <xsl:param name="sectionNum"/>
500
- <xsl:param name="sectionNumSkew"/>
501
- <xsl:apply-templates mode="contents">
502
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
503
- <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
504
- </xsl:apply-templates>
446
+ <xsl:template match="node()" mode="contents">
447
+ <xsl:apply-templates mode="contents"/>
505
448
  </xsl:template>
506
449
 
507
-
508
- <!-- calculate main section number (1,2,3) and pass it deep into templates -->
509
- <!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
510
- <xsl:template match="gb:gb-standard/gb:sections/*" mode="contents">
511
- <xsl:param name="sectionNum"/>
512
- <xsl:param name="sectionNumSkew" select="0"/>
513
- <xsl:variable name="sectionNum_">
514
- <xsl:choose>
515
- <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
516
- <xsl:when test="$sectionNumSkew != 0">
517
- <xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- gb:sections/gb:clause | gb:sections/gb:terms -->
518
- <xsl:value-of select="$number + $sectionNumSkew"/>
519
- </xsl:when>
520
- <xsl:otherwise>
521
- <xsl:number count="*"/>
522
- </xsl:otherwise>
523
- </xsl:choose>
524
- </xsl:variable>
525
- <xsl:apply-templates mode="contents">
526
- <xsl:with-param name="sectionNum" select="$sectionNum_"/>
527
- </xsl:apply-templates>
528
- </xsl:template>
529
-
530
- <!-- Any node with title element - clause, definition, annex,... -->
531
- <xsl:template match="gb:title | gb:preferred" mode="contents">
532
- <xsl:param name="sectionNum"/>
533
- <!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
534
- <xsl:variable name="id">
535
- <xsl:call-template name="getId"/>
536
- </xsl:variable>
537
-
450
+ <!-- element with title -->
451
+ <xsl:template match="*[gb:title]" mode="contents">
538
452
  <xsl:variable name="level">
539
- <xsl:call-template name="getLevel"/>
540
- </xsl:variable>
541
-
542
- <xsl:variable name="section">
543
- <xsl:call-template name="getSection">
544
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
453
+ <xsl:call-template name="getLevel">
454
+ <xsl:with-param name="depth" select="gb:title/@depth"/>
545
455
  </xsl:call-template>
546
456
  </xsl:variable>
547
457
 
548
458
  <xsl:variable name="display">
549
459
  <xsl:choose>
550
- <xsl:when test="ancestor::gb:bibitem">false</xsl:when>
551
- <xsl:when test="ancestor::gb:term">false</xsl:when>
552
- <xsl:when test="ancestor::gb:annex and $level &gt;= 3">false</xsl:when>
553
- <xsl:when test="$level &lt;= 3">true</xsl:when>
460
+ <xsl:when test="ancestor-or-self::gb:bibitem">false</xsl:when>
461
+ <xsl:when test="ancestor-or-self::gb:term">false</xsl:when>
462
+ <xsl:when test="$level &lt;= 2">true</xsl:when>
554
463
  <xsl:otherwise>false</xsl:otherwise>
555
464
  </xsl:choose>
556
465
  </xsl:variable>
557
466
 
558
- <xsl:variable name="display-section">true</xsl:variable>
559
-
560
- <xsl:variable name="type">
561
- <xsl:value-of select="local-name(..)"/>
562
- </xsl:variable>
563
-
564
- <xsl:variable name="root">
565
- <xsl:choose>
566
- <xsl:when test="ancestor::gb:annex">annex</xsl:when>
567
- </xsl:choose>
568
- </xsl:variable>
569
-
570
- <item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
571
- <xsl:attribute name="addon">
572
- <xsl:if test="local-name(..) = 'annex'">
573
- <xsl:variable name="obligation" select="../@obligation"/>
574
- <xsl:variable name="title-obligation-normative">
575
- <xsl:call-template name="getTitle">
576
- <xsl:with-param name="name" select="'title-obligation-normative'"/>
577
- </xsl:call-template>
578
- </xsl:variable>
579
- <xsl:choose>
580
- <xsl:when test="$obligation = 'normative'"><xsl:value-of select="$title-obligation-normative"/></xsl:when>
581
- <xsl:otherwise><xsl:value-of select="$obligation"/></xsl:otherwise>
582
- </xsl:choose>
583
- </xsl:if>
584
- </xsl:attribute>
585
- <xsl:value-of select="."/>
586
- </item>
467
+ <xsl:if test="$display = 'true'">
587
468
 
588
- <xsl:apply-templates mode="contents">
589
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
590
- </xsl:apply-templates>
469
+ <xsl:variable name="section">
470
+ <xsl:call-template name="getSection"/>
471
+ </xsl:variable>
472
+
473
+ <xsl:variable name="title">
474
+ <xsl:call-template name="getName"/>
475
+ </xsl:variable>
476
+
477
+ <xsl:variable name="type">
478
+ <xsl:value-of select="local-name()"/>
479
+ </xsl:variable>
480
+
481
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
482
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
483
+ </item>
484
+ <xsl:apply-templates mode="contents"/>
485
+ </xsl:if>
591
486
 
592
487
  </xsl:template>
593
488
 
594
489
 
595
- <xsl:template match="gb:figure" mode="contents">
596
- <item level="" id="{@id}" display="false">
597
- <xsl:attribute name="section">
598
- <xsl:call-template name="getFigureNumber"/>
599
- </xsl:attribute>
600
- </item>
601
- </xsl:template>
602
-
603
- <xsl:template match="gb:table" mode="contents">
604
- <xsl:param name="sectionNum"/>
605
- <xsl:variable name="annex-id" select="ancestor::gb:annex/@id"/>
606
- <item level="" id="{@id}" display="false" type="table">
607
- <xsl:attribute name="section">
608
- <xsl:variable name="title-table">
609
- <xsl:call-template name="getTitle">
610
- <xsl:with-param name="name" select="'title-table'"/>
611
- </xsl:call-template>
612
- </xsl:variable>
613
- <xsl:value-of select="$title-table"/>
614
- <xsl:choose>
615
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
616
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
617
- </xsl:when>
618
- <xsl:when test="ancestor::*[local-name()='annex']">
619
- <xsl:number format="A-" count="gb:annex"/>
620
- <xsl:number format="1" level="any" count="gb:table[ancestor::gb:annex[@id = $annex-id]]"/>
621
- </xsl:when>
622
- <xsl:otherwise>
623
- <!-- <xsl:number format="1"/> -->
624
- <xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/>
625
- </xsl:otherwise>
626
- </xsl:choose>
627
- </xsl:attribute>
628
- <xsl:value-of select="gb:name/text()"/>
629
- </item>
630
- </xsl:template>
631
-
632
- <xsl:template match="gb:formula" mode="contents">
633
- <item level="" id="{@id}" display="false">
634
- <xsl:attribute name="section">
635
- <xsl:variable name="title-formula">
636
- <xsl:call-template name="getTitle">
637
- <xsl:with-param name="name" select="'title-formula'"/>
638
- </xsl:call-template>
639
- </xsl:variable>
640
- <xsl:value-of select="$title-formula"/><xsl:number format="(A.1)" level="multiple" count="gb:annex | gb:formula"/>
641
- </xsl:attribute>
642
- </item>
643
- </xsl:template>
644
-
645
- <xsl:template match="gb:li" mode="contents">
646
- <xsl:param name="sectionNum"/>
647
- <item level="" id="{@id}" display="false" type="li">
648
- <xsl:attribute name="section">
649
- <xsl:call-template name="getListItemFormat"/>
650
- </xsl:attribute>
651
- <xsl:attribute name="parent_section">
652
- <xsl:for-each select="ancestor::*[not(local-name() = 'p' or local-name() = 'ol')][1]">
653
- <xsl:call-template name="getSection">
654
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
655
- </xsl:call-template>
656
- </xsl:for-each>
657
- </xsl:attribute>
658
- </item>
659
- <xsl:apply-templates mode="contents">
660
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
661
- </xsl:apply-templates>
662
- </xsl:template>
663
-
664
490
  <xsl:template name="getListItemFormat">
665
491
  <xsl:choose>
666
492
  <xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!-- dash -->
@@ -683,6 +509,9 @@
683
509
  <!-- ============================= -->
684
510
  <!-- ============================= -->
685
511
 
512
+ <xsl:template match="*[local-name() = 'tab']" priority="2">
513
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
514
+ </xsl:template>
686
515
 
687
516
  <xsl:template match="gb:license-statement//gb:title">
688
517
  <fo:block text-align="center" font-weight="bold">
@@ -729,87 +558,50 @@
729
558
  </fo:block>
730
559
  </xsl:template>
731
560
 
732
- <!-- Foreword, Introduction -->
733
- <xsl:template match="gb:gb-standard/gb:preface/*">
734
- <fo:block break-after="page"/>
735
- <xsl:apply-templates/>
736
- </xsl:template>
737
561
 
562
+ <!-- ====== -->
563
+ <!-- title -->
564
+ <!-- ====== -->
738
565
 
739
- <!-- clause, terms, clause, ...-->
740
- <xsl:template match="gb:gb-standard/gb:sections/*">
741
- <xsl:param name="sectionNum"/>
742
- <xsl:param name="sectionNumSkew" select="0"/>
743
- <fo:block>
744
- <xsl:variable name="pos"><xsl:number count="gb:sections/gb:clause | gb:sections/gb:terms"/></xsl:variable>
745
- <xsl:if test="$pos &gt;= 2">
746
- <xsl:attribute name="space-before">18pt</xsl:attribute>
747
- </xsl:if>
748
- <!-- pos=<xsl:value-of select="$pos" /> -->
749
- <xsl:variable name="sectionNum_">
750
- <xsl:choose>
751
- <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
752
- <xsl:when test="$sectionNumSkew != 0">
753
- <xsl:variable name="number"><xsl:number count="gb:sections/gb:clause | gb:sections/gb:terms"/></xsl:variable>
754
- <xsl:value-of select="$number + $sectionNumSkew"/>
755
- </xsl:when>
756
- </xsl:choose>
757
- </xsl:variable>
758
- <xsl:if test="not(gb:title)">
759
- <fo:block margin-top="3pt" margin-bottom="12pt">
760
- <xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="gb:clause"/>
761
- </fo:block>
762
- </xsl:if>
763
- <xsl:apply-templates>
764
- <xsl:with-param name="sectionNum" select="$sectionNum_"/>
765
- </xsl:apply-templates>
566
+ <xsl:template match="gb:annex/gb:title">
567
+ <xsl:variable name="level">
568
+ <xsl:call-template name="getLevel"/>
569
+ </xsl:variable>
570
+ <xsl:variable name="font-family">
571
+ <xsl:choose>
572
+ <xsl:when test="$level &gt;= 3">SimSun</xsl:when>
573
+ <xsl:otherwise>SimHei</xsl:otherwise>
574
+ </xsl:choose>
575
+ </xsl:variable>
576
+ <fo:block font-family="{$font-family}" font-size="10.5pt" text-align="center" margin-bottom="24pt" keep-with-next="always">
577
+ <xsl:apply-templates/>
766
578
  </fo:block>
767
579
  </xsl:template>
768
580
 
769
-
770
- <xsl:template match="gb:clause//gb:clause[not(gb:title)]">
771
- <xsl:param name="sectionNum"/>
772
- <xsl:variable name="section">
773
- <xsl:call-template name="getSection">
774
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
775
- </xsl:call-template>
776
- </xsl:variable>
777
- <fo:block margin-top="6pt" margin-bottom="6pt" keep-with-next="always">
778
- <fo:inline font-family="SimHei">
779
- <xsl:value-of select="$section"/><xsl:text>.</xsl:text>
780
- </fo:inline>
581
+ <!-- Bibliography -->
582
+ <xsl:template match="gb:references[not(@normative='true')]/gb:title">
583
+ <fo:block font-family="SimHei" text-align="center" margin-top="6pt" margin-bottom="16pt" keep-with-next="always">
584
+ <xsl:apply-templates/>
781
585
  </fo:block>
782
- <xsl:apply-templates>
783
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
784
- </xsl:apply-templates>
785
586
  </xsl:template>
786
587
 
787
-
788
588
  <xsl:template match="gb:title">
789
- <xsl:param name="sectionNum"/>
790
-
791
- <xsl:variable name="parent-name" select="local-name(..)"/>
792
- <xsl:variable name="references_num_current">
793
- <xsl:number level="any" count="gb:references"/>
794
- </xsl:variable>
795
-
796
- <xsl:variable name="id">
797
- <xsl:call-template name="getId"/>
798
- </xsl:variable>
799
589
 
800
590
  <xsl:variable name="level">
801
591
  <xsl:call-template name="getLevel"/>
802
592
  </xsl:variable>
803
593
 
804
- <xsl:variable name="section">
805
- <xsl:call-template name="getSection">
806
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
807
- </xsl:call-template>
594
+ <xsl:variable name="element-name">
595
+ <xsl:choose>
596
+ <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
597
+ <xsl:otherwise>fo:block</xsl:otherwise>
598
+ </xsl:choose>
808
599
  </xsl:variable>
809
600
 
810
601
  <xsl:variable name="font-family">
811
602
  <xsl:choose>
812
603
  <xsl:when test="ancestor::gb:annex and $level &gt;= 3">SimSun</xsl:when>
604
+ <xsl:when test="$element-name = 'fo:inline'">SimSun</xsl:when>
813
605
  <xsl:otherwise>SimHei</xsl:otherwise>
814
606
  </xsl:choose>
815
607
  </xsl:variable>
@@ -821,98 +613,65 @@
821
613
  </xsl:choose>
822
614
  </xsl:variable>
823
615
 
824
- <xsl:variable name="element-name">
825
- <xsl:choose>
826
- <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
827
- <xsl:otherwise>fo:block</xsl:otherwise>
828
- </xsl:choose>
829
- </xsl:variable>
830
616
 
831
- <xsl:choose>
832
- <xsl:when test="$parent-name = 'annex'">
833
- <fo:block id="{$id}" font-family="{$font-family}" font-size="{$font-size}" text-align="center" margin-bottom="12pt" keep-with-next="always">
834
- <xsl:value-of select="$section"/>
835
- <xsl:if test=" ../@obligation">
836
- <xsl:value-of select="$linebreak"/>
837
- <fo:inline font-weight="normal">
838
- <xsl:text>(</xsl:text>
839
- <xsl:variable name="obligation" select="../@obligation"/>
840
- <xsl:variable name="title-obligation-normative">
841
- <xsl:call-template name="getTitle">
842
- <xsl:with-param name="name" select="'title-obligation-normative'"/>
843
- </xsl:call-template>
844
- </xsl:variable>
845
- <xsl:choose>
846
- <xsl:when test="$obligation = 'normative'"><xsl:value-of select="$title-obligation-normative"/></xsl:when>
847
- <xsl:otherwise><xsl:value-of select="$obligation"/></xsl:otherwise>
848
- </xsl:choose>
849
- <xsl:text>)</xsl:text>
850
- </fo:inline>
851
- </xsl:if>
852
- <fo:block margin-top="14pt" margin-bottom="24pt"><xsl:apply-templates/></fo:block>
853
- </fo:block>
854
- </xsl:when>
855
- <xsl:when test="$parent-name = 'references' and $references_num_current != 1"> <!-- Bibliography -->
856
- <fo:block id="{$id}" font-family="{$font-family}" text-align="center" margin-top="6pt" margin-bottom="16pt" keep-with-next="always">
857
- <xsl:apply-templates/>
858
- </fo:block>
859
- </xsl:when>
617
+
618
+ <xsl:element name="{$element-name}">
619
+ <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
620
+ <xsl:attribute name="font-family"><xsl:value-of select="$font-family"/></xsl:attribute>
621
+ <xsl:attribute name="margin-top">
622
+ <xsl:choose>
623
+ <xsl:when test="ancestor::gb:preface">8pt</xsl:when>
624
+ <xsl:when test="$level = 2 and ancestor::gb:annex">10pt</xsl:when>
625
+ <xsl:when test="$level = 1">16pt</xsl:when>
626
+ <xsl:when test="$level = ''">6pt</xsl:when>
627
+ <xsl:when test="$level &gt;= 5">6pt</xsl:when>
628
+ <xsl:otherwise>12pt</xsl:otherwise>
629
+ </xsl:choose>
630
+ </xsl:attribute>
631
+ <xsl:attribute name="margin-bottom">
632
+ <xsl:choose>
633
+ <xsl:when test="ancestor::gb:preface">24pt</xsl:when>
634
+ <xsl:when test="$level = 1">16pt</xsl:when>
635
+ <xsl:when test="$level &gt;= 5">6pt</xsl:when>
636
+ <xsl:otherwise>8pt</xsl:otherwise>
637
+ </xsl:choose>
638
+ </xsl:attribute>
860
639
 
861
- <xsl:otherwise>
862
- <xsl:element name="{$element-name}">
863
- <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
864
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
865
- <xsl:attribute name="font-family"><xsl:value-of select="$font-family"/></xsl:attribute>
866
- <xsl:attribute name="margin-top">
867
- <xsl:choose>
868
- <xsl:when test="ancestor::gb:preface">8pt</xsl:when>
869
- <xsl:when test="$level = 2 and ancestor::gb:annex">10pt</xsl:when>
870
- <xsl:when test="$level = 1">16pt</xsl:when>
871
- <xsl:when test="$level = ''">6pt</xsl:when>
872
- <xsl:otherwise>12pt</xsl:otherwise>
873
- </xsl:choose>
874
- </xsl:attribute>
875
- <xsl:attribute name="margin-bottom">
876
- <xsl:choose>
877
- <xsl:when test="ancestor::gb:preface">24pt</xsl:when>
878
- <xsl:when test="$level = 1">16pt</xsl:when>
879
- <xsl:otherwise>8pt</xsl:otherwise>
880
- </xsl:choose>
881
- </xsl:attribute>
882
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
883
- <xsl:if test="ancestor::gb:preface">
884
- <xsl:attribute name="text-align">center</xsl:attribute>
885
- <xsl:attribute name="font-family">SimHei</xsl:attribute>
886
- </xsl:if>
887
- <xsl:if test="$element-name = 'fo:inline'">
888
- <xsl:attribute name="padding-left">7.4mm</xsl:attribute>
889
- </xsl:if>
890
-
891
- <xsl:value-of select="$section"/>
892
- <xsl:if test="$section != ''">. </xsl:if>
640
+
641
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
642
+ <xsl:if test="ancestor::gb:preface">
643
+ <xsl:attribute name="text-align">center</xsl:attribute>
644
+ <xsl:attribute name="font-family">SimHei</xsl:attribute>
645
+ </xsl:if>
646
+ <xsl:if test="$element-name = 'fo:inline'">
647
+ <xsl:attribute name="padding-left">7.4mm</xsl:attribute>
648
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
649
+ </xsl:if>
650
+
651
+ <xsl:apply-templates/>
652
+
653
+ <xsl:if test="$element-name = 'fo:inline'">
654
+ <xsl:value-of select="$tab_zh"/>
655
+ </xsl:if>
656
+
657
+ </xsl:element>
658
+
659
+ <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::gb:p)">
660
+ <!-- <fo:block> -->
661
+ <xsl:value-of select="$linebreak"/>
662
+ <!-- </fo:block> -->
663
+ </xsl:if>
893
664
 
894
- <xsl:apply-templates/>
895
- </xsl:element>
896
-
897
- <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::gb:p)">
898
- <!-- <fo:block> -->
899
- <xsl:value-of select="$linebreak"/>
900
- <!-- </fo:block> -->
901
- </xsl:if>
902
- </xsl:otherwise>
903
- </xsl:choose>
904
- </xsl:template>
665
+ </xsl:template>
666
+ <!-- ====== -->
667
+ <!-- ====== -->
905
668
 
906
-
907
669
 
908
- <xsl:template match="gb:p">
909
- <xsl:param name="inline" select="'false'"/>
670
+ <xsl:template match="gb:p">
910
671
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
911
672
  <xsl:variable name="element-name">
912
- <xsl:choose>
913
- <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
914
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
915
- <!-- <xsl:when test="local-name(..) = 'admonition'">fo:inline</xsl:when> -->
673
+ <xsl:choose>
674
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
916
675
  <xsl:otherwise>fo:block</xsl:otherwise>
917
676
  </xsl:choose>
918
677
  </xsl:variable>
@@ -922,7 +681,7 @@
922
681
  <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
923
682
  <xsl:when test="ancestor::gb:td/@align"><xsl:value-of select="ancestor::gb:td/@align"/></xsl:when>
924
683
  <xsl:when test="ancestor::gb:th/@align"><xsl:value-of select="ancestor::gb:th/@align"/></xsl:when>
925
- <xsl:otherwise>justify</xsl:otherwise><!-- left -->
684
+ <xsl:otherwise>justify</xsl:otherwise>
926
685
  </xsl:choose>
927
686
  </xsl:attribute>
928
687
  <xsl:attribute name="text-indent">
@@ -937,21 +696,9 @@
937
696
  </xsl:if>
938
697
  <xsl:apply-templates/>
939
698
  </xsl:element>
940
- <xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
941
- <xsl:choose>
942
- <xsl:when test="ancestor::gb:annex">
943
- <xsl:value-of select="$linebreak"/>
944
- </xsl:when>
945
- <xsl:otherwise>
946
- <fo:block margin-bottom="12pt">
947
- <xsl:value-of select="$linebreak"/>
948
- </fo:block>
949
- </xsl:otherwise>
950
- </xsl:choose>
951
- </xsl:if>
952
- <xsl:if test="$inline = 'true'">
953
- <fo:block> </fo:block>
954
- </xsl:if>
699
+ <xsl:if test="$element-name = 'fo:inline' and not(local-name(..) = 'admonition')">
700
+ <xsl:value-of select="$linebreak"/>
701
+ </xsl:if>
955
702
  </xsl:template>
956
703
 
957
704
  <xsl:template match="gb:li//gb:p//text()">
@@ -994,13 +741,13 @@
994
741
  <fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
995
742
  <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
996
743
  <!-- <xsl:value-of select="@reference"/> -->
997
- <xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@id='_normative_references' or not(preceding-sibling::gb:references)]]/gb:note)"/>
744
+ <xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@normative='true' or not(preceding-sibling::gb:references)]]/gb:note)"/>
998
745
  </fo:basic-link>
999
746
  </fo:inline>
1000
747
  <fo:footnote-body>
1001
748
  <fo:block font-size="9pt" margin-bottom="12pt">
1002
749
  <fo:inline font-size="50%" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super">
1003
- <xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@id='_normative_references' or not(preceding-sibling::gb:references)]]/gb:note)"/>
750
+ <xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@normative='true' or not(preceding-sibling::gb:references)]]/gb:note)"/>
1004
751
  </fo:inline>
1005
752
  <xsl:for-each select="gb:p">
1006
753
  <xsl:apply-templates/>
@@ -1023,90 +770,6 @@
1023
770
  <xsl:apply-templates/>
1024
771
  </xsl:template>
1025
772
 
1026
- <xsl:template match="gb:review">
1027
- <!-- comment 2019-11-29 -->
1028
- <!-- <fo:block font-weight="bold">Review:</fo:block>
1029
- <xsl:apply-templates /> -->
1030
- </xsl:template>
1031
-
1032
- <xsl:template match="text()">
1033
- <xsl:value-of select="."/>
1034
- </xsl:template>
1035
-
1036
- <xsl:template match="gb:image">
1037
- <fo:block-container text-align="center">
1038
- <fo:block>
1039
- <fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
1040
- </fo:block>
1041
- <fo:block font-family="SimHei" margin-top="12pt" margin-bottom="12pt">
1042
- <xsl:variable name="title-figure">
1043
- <xsl:call-template name="getTitle">
1044
- <xsl:with-param name="name" select="'title-figure'"/>
1045
- </xsl:call-template>
1046
- </xsl:variable>
1047
- <xsl:value-of select="$title-figure"/>
1048
- <xsl:call-template name="getFigureNumber"/>
1049
- </fo:block>
1050
- </fo:block-container>
1051
- </xsl:template>
1052
-
1053
- <xsl:template match="gb:figure">
1054
- <fo:block-container id="{@id}">
1055
- <fo:block>
1056
- <xsl:apply-templates/>
1057
- </fo:block>
1058
- <xsl:call-template name="fn_display_figure"/>
1059
- <xsl:for-each select="gb:note//gb:p">
1060
- <xsl:call-template name="note"/>
1061
- </xsl:for-each>
1062
- <fo:block font-family="SimHei" text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
1063
- <xsl:call-template name="getFigureNumber"/>
1064
- <xsl:if test="gb:name">
1065
- <!-- <xsl:if test="not(local-name(..) = 'figure')"> -->
1066
- <xsl:text> — </xsl:text>
1067
- <!-- </xsl:if> -->
1068
- <xsl:value-of select="gb:name"/>
1069
- </xsl:if>
1070
- </fo:block>
1071
- </fo:block-container>
1072
- </xsl:template>
1073
-
1074
- <xsl:template name="getFigureNumber">
1075
- <xsl:variable name="title-figure">
1076
- <xsl:call-template name="getTitle">
1077
- <xsl:with-param name="name" select="'title-figure'"/>
1078
- </xsl:call-template>
1079
- </xsl:variable>
1080
- <xsl:choose>
1081
- <xsl:when test="ancestor::gb:annex">
1082
- <xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="gb:annex | gb:figure"/>
1083
- </xsl:when>
1084
- <xsl:otherwise>
1085
- <xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
1086
- </xsl:otherwise>
1087
- </xsl:choose>
1088
- </xsl:template>
1089
-
1090
- <xsl:template match="gb:figure/gb:name"/>
1091
- <xsl:template match="gb:figure/gb:fn" priority="2"/>
1092
- <xsl:template match="gb:figure/gb:note"/>
1093
-
1094
-
1095
- <xsl:template match="gb:figure/gb:image">
1096
- <fo:block text-align="center">
1097
- <xsl:variable name="src">
1098
- <xsl:choose>
1099
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
1100
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
1101
- </xsl:when>
1102
- <xsl:otherwise>
1103
- <xsl:value-of select="@src"/>
1104
- </xsl:otherwise>
1105
- </xsl:choose>
1106
- </xsl:variable>
1107
- <fo:external-graphic src="{$src}" width="100%" content-height="100%" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- src="{@src}" -->
1108
- </fo:block>
1109
- </xsl:template>
1110
773
 
1111
774
 
1112
775
  <xsl:template match="gb:bibitem">
@@ -1134,7 +797,7 @@
1134
797
  </xsl:template>
1135
798
 
1136
799
 
1137
- <xsl:template match="gb:bibitem/gb:note">
800
+ <xsl:template match="gb:bibitem/gb:note" priority="2">
1138
801
  <fo:footnote>
1139
802
  <xsl:variable name="number">
1140
803
  <xsl:number level="any" count="gb:bibitem/gb:note"/>
@@ -1164,12 +827,12 @@
1164
827
  </xsl:if>
1165
828
  <xsl:apply-templates/>
1166
829
  </fo:list-block>
1167
- <xsl:for-each select="./gb:note//gb:p">
830
+ <xsl:for-each select="./gb:note">
1168
831
  <xsl:call-template name="note"/>
1169
832
  </xsl:for-each>
1170
833
  </xsl:template>
1171
834
 
1172
- <xsl:template match="gb:ul//gb:note | gb:ol//gb:note"/>
835
+ <xsl:template match="gb:ul//gb:note | gb:ol//gb:note" priority="2"/>
1173
836
 
1174
837
  <xsl:template match="gb:li">
1175
838
  <fo:list-item id="{@id}">
@@ -1179,42 +842,23 @@
1179
842
  </fo:block>
1180
843
  </fo:list-item-label>
1181
844
  <fo:list-item-body start-indent="body-start()">
1182
- <xsl:apply-templates/>
1183
- <xsl:apply-templates select=".//gb:note" mode="process"/>
845
+ <fo:block>
846
+ <xsl:apply-templates/>
847
+ <xsl:apply-templates select=".//gb:note" mode="process"/>
848
+ </fo:block>
1184
849
  </fo:list-item-body>
1185
850
  </fo:list-item>
1186
851
  </xsl:template>
1187
852
 
1188
853
 
1189
- <xsl:template match="gb:term">
1190
- <xsl:param name="sectionNum"/>
1191
- <fo:block id="{@id}" font-family="SimHei" font-size="11pt" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
1192
- <fo:inline>
1193
- <xsl:variable name="section">
1194
- <xsl:for-each select="*[1]">
1195
- <xsl:call-template name="getSection">
1196
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1197
- </xsl:call-template>
1198
- </xsl:for-each>
1199
- </xsl:variable>
1200
- <xsl:value-of select="$section"/><xsl:text>.</xsl:text>
1201
- </fo:inline>
1202
- </fo:block>
1203
- <fo:block>
1204
- <xsl:apply-templates>
1205
- <xsl:with-param name="sectionNum" select="$sectionNum"/>
1206
- </xsl:apply-templates>
1207
- </fo:block>
1208
- </xsl:template>
1209
854
 
1210
- <xsl:template match="gb:preferred">
1211
- <xsl:param name="sectionNum"/>
1212
-
855
+ <xsl:template match="gb:preferred" priority="2">
856
+
1213
857
  <fo:inline font-family="SimHei" font-size="11pt">
1214
858
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'preferred'])">
1215
859
  <xsl:attribute name="padding-left">7.4mm</xsl:attribute>
1216
860
  </xsl:if>
1217
- <xsl:apply-templates/><xsl:text> </xsl:text>
861
+ <xsl:apply-templates/><xsl:value-of select="$tab_zh"/>
1218
862
  </fo:inline>
1219
863
 
1220
864
  <xsl:if test="not(following-sibling::*[1][local-name() = 'preferred'])">
@@ -1223,14 +867,13 @@
1223
867
 
1224
868
  </xsl:template>
1225
869
 
1226
- <xsl:template match="gb:admitted">
1227
- <xsl:param name="sectionNum"/>
870
+ <xsl:template match="gb:admitted" priority="2">
1228
871
 
1229
872
  <fo:inline font-size="11pt">
1230
873
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'admitted'])">
1231
874
  <xsl:attribute name="padding-left">7.4mm</xsl:attribute>
1232
875
  </xsl:if>
1233
- <xsl:apply-templates/><xsl:text> </xsl:text>
876
+ <xsl:apply-templates/><xsl:value-of select="$tab_zh"/>
1234
877
  </fo:inline>
1235
878
 
1236
879
  <xsl:if test="not(following-sibling::*[1][local-name() = 'admitted'])">
@@ -1239,8 +882,8 @@
1239
882
 
1240
883
  </xsl:template>
1241
884
 
1242
- <xsl:template match="gb:deprecates">
1243
- <xsl:param name="sectionNum"/>
885
+
886
+ <xsl:template match="gb:deprecates" priority="2">
1244
887
  <fo:inline font-size="11pt">
1245
888
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'deprecates'])">
1246
889
  <xsl:attribute name="padding-left">7.4mm</xsl:attribute>
@@ -1255,48 +898,12 @@
1255
898
  </fo:inline>
1256
899
  <xsl:if test="not(following-sibling::*[1][local-name() = 'deprecates'])">
1257
900
  <xsl:value-of select="$linebreak"/>
1258
- </xsl:if>
1259
-
1260
- </xsl:template>
1261
-
1262
- <xsl:template match="gb:definition[preceding-sibling::gb:domain]">
1263
- <xsl:apply-templates/>
1264
- </xsl:template>
1265
- <xsl:template match="gb:definition[preceding-sibling::gb:domain]/gb:p">
1266
- <fo:inline> <xsl:apply-templates/></fo:inline>
1267
- <fo:block> </fo:block>
1268
- </xsl:template>
1269
-
1270
- <xsl:template match="gb:definition">
1271
- <fo:block>
1272
- <xsl:apply-templates/>
1273
- </fo:block>
1274
- </xsl:template>
1275
-
1276
- <xsl:template match="gb:termsource">
1277
- <fo:block text-indent="7.4mm">
1278
- <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
1279
- <fo:basic-link internal-destination="{gb:origin/@bibitemid}" fox:alt-text="{gb:origin/@citeas}">
1280
- <xsl:text>[</xsl:text> <!-- SOURCE: -->
1281
- <xsl:value-of select="gb:origin/@citeas"/>
1282
-
1283
- <xsl:apply-templates select="gb:origin/gb:localityStack"/>
1284
-
1285
- </fo:basic-link>
1286
- <xsl:apply-templates select="gb:modification"/>
1287
- <xsl:text>]</xsl:text>
1288
- </fo:block>
901
+ </xsl:if>
1289
902
  </xsl:template>
1290
903
 
1291
904
 
1292
- <xsl:template match="gb:modification/gb:p">
1293
- <xsl:apply-templates/>
1294
- </xsl:template>
1295
- <xsl:template match="gb:modification/text()">
1296
- <xsl:apply-templates/>
1297
- </xsl:template>
1298
905
 
1299
- <xsl:template match="gb:termnote">
906
+ <xsl:template match="gb:termnote" priority="2">
1300
907
  <fo:block-container font-size="9pt" margin-left="7.4mm" margin-top="4pt" line-height="125%">
1301
908
  <fo:block-container margin-left="0mm">
1302
909
  <fo:table table-layout="fixed" width="100%">
@@ -1306,13 +913,7 @@
1306
913
  <fo:table-row>
1307
914
  <fo:table-cell>
1308
915
  <fo:block font-family="SimHei">
1309
- <xsl:variable name="num"><xsl:number/></xsl:variable>
1310
- <xsl:variable name="title-note-to-entry">
1311
- <xsl:call-template name="getTitle">
1312
- <xsl:with-param name="name" select="'title-note-to-entry'"/>
1313
- </xsl:call-template>
1314
- </xsl:variable>
1315
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
916
+ <xsl:apply-templates select="gb:name" mode="presentation"/>
1316
917
  </fo:block>
1317
918
  </fo:table-cell>
1318
919
  <fo:table-cell>
@@ -1327,48 +928,14 @@
1327
928
  </fo:block-container>
1328
929
  </xsl:template>
1329
930
 
1330
- <xsl:template match="gb:termnote/gb:p">
1331
- <fo:inline><xsl:apply-templates/></fo:inline>
1332
- </xsl:template>
1333
-
1334
- <xsl:template match="gb:domain">
1335
- <fo:inline padding-left="7.4mm">&lt;<xsl:apply-templates/>&gt; </fo:inline>
1336
- </xsl:template>
1337
-
1338
-
1339
- <xsl:template match="gb:termexample">
1340
- <fo:block font-size="9pt" margin-top="14pt" margin-bottom="14pt" text-align="justify">
1341
- <fo:inline padding-right="1mm" font-family="SimHei">
1342
- <xsl:variable name="title-example">
1343
- <xsl:call-template name="getTitle">
1344
- <xsl:with-param name="name" select="'title-example'"/>
1345
- </xsl:call-template>
1346
- </xsl:variable>
1347
- <xsl:value-of select="$title-example"/>
1348
- <xsl:if test="count(ancestor::gb:term[1]//gb:termexample) &gt; 1">
1349
- <xsl:number/>
1350
- </xsl:if>
1351
- <xsl:text>:</xsl:text>
1352
- </fo:inline>
1353
- <xsl:apply-templates/>
1354
- </fo:block>
1355
- </xsl:template>
1356
-
1357
- <xsl:template match="gb:termexample/gb:p">
1358
- <fo:inline><xsl:apply-templates/></fo:inline>
1359
- </xsl:template>
1360
931
 
1361
-
1362
- <xsl:template match="gb:annex">
1363
- <fo:block break-after="page"/>
1364
- <xsl:apply-templates/>
1365
- </xsl:template>
1366
932
 
1367
-
1368
933
  <!-- <xsl:template match="gb:references[@id = '_bibliography']"> -->
1369
- <xsl:template match="gb:references[position() &gt; 1]">
934
+ <xsl:template match="gb:references[not(@normative='true')]">
1370
935
  <fo:block break-after="page"/>
1371
- <xsl:apply-templates/>
936
+ <fo:block id="{@id}">
937
+ <xsl:apply-templates/>
938
+ </fo:block>
1372
939
  <fo:block-container text-align="center">
1373
940
  <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
1374
941
  <fo:block> </fo:block>
@@ -1379,7 +946,7 @@
1379
946
 
1380
947
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1381
948
  <!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem"> -->
1382
- <xsl:template match="gb:references[position() &gt; 1]/gb:bibitem">
949
+ <xsl:template match="gb:references[not(@normative='true')]/gb:bibitem">
1383
950
  <fo:list-block font-size="11pt" margin-bottom="12pt" provisional-distance-between-starts="12mm">
1384
951
  <fo:list-item>
1385
952
  <fo:list-item-label end-indent="label-end()">
@@ -1418,36 +985,15 @@
1418
985
  </xsl:template>
1419
986
 
1420
987
  <!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem" mode="contents"/> -->
1421
- <xsl:template match="gb:references[position() &gt; 1]/gb:bibitem" mode="contents"/>
988
+ <xsl:template match="gb:references[not(@normative='true')]/gb:bibitem" mode="contents"/>
1422
989
 
1423
990
  <!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem/gb:title"> -->
1424
- <xsl:template match="gb:references[position() &gt; 1]/gb:bibitem/gb:title">
991
+ <xsl:template match="gb:references[not(@normative='true')]/gb:bibitem/gb:title">
1425
992
  <fo:inline font-style="italic">
1426
993
  <xsl:apply-templates/>
1427
994
  </fo:inline>
1428
995
  </xsl:template>
1429
996
 
1430
- <xsl:template match="gb:quote">
1431
- <fo:block margin-top="12pt" margin-left="12mm" margin-right="12mm">
1432
- <xsl:apply-templates select=".//gb:p"/>
1433
- </fo:block>
1434
- <fo:block text-align="right">
1435
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
1436
- <xsl:text>— </xsl:text><xsl:value-of select="gb:author"/>
1437
- <xsl:if test="gb:source">
1438
- <xsl:text>, </xsl:text>
1439
- <xsl:apply-templates select="gb:source"/>
1440
- </xsl:if>
1441
- </fo:block>
1442
- </xsl:template>
1443
-
1444
- <xsl:template match="gb:source">
1445
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
1446
- <xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
1447
- <xsl:apply-templates select="gb:localityStack"/>
1448
- </fo:basic-link>
1449
- </xsl:template>
1450
-
1451
997
 
1452
998
  <xsl:template match="mathml:math" priority="2">
1453
999
  <fo:inline font-family="Cambria Math">
@@ -1457,169 +1003,8 @@
1457
1003
  </fo:inline>
1458
1004
  </xsl:template>
1459
1005
 
1460
- <xsl:template match="gb:xref">
1461
- <xsl:param name="sectionNum"/>
1462
-
1463
- <xsl:variable name="target" select="normalize-space(@target)"/>
1464
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
1465
- <xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = $target]/@section"/>
1466
- <!-- <xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))"> -->
1467
- <!-- <xsl:attribute name="color">blue</xsl:attribute>
1468
- <xsl:attribute name="text-decoration">underline</xsl:attribute> -->
1469
- <!-- </xsl:if> -->
1470
- <xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = $target]/@type"/>
1471
- <xsl:variable name="root" select="xalan:nodeset($contents)//item[@id =$target]/@root"/>
1472
- <xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =$target]/@level"/>
1473
-
1474
- <xsl:variable name="title-clause">
1475
- <xsl:call-template name="getTitle">
1476
- <xsl:with-param name="name" select="'title-clause'"/>
1477
- </xsl:call-template>
1478
- </xsl:variable>
1479
- <xsl:variable name="title-annex">
1480
- <xsl:call-template name="getTitle">
1481
- <xsl:with-param name="name" select="'title-annex'"/>
1482
- </xsl:call-template>
1483
- </xsl:variable>
1484
-
1485
- <xsl:choose>
1486
- <xsl:when test="$type = 'clause' and $root != 'annex' and $level = 1"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
1487
- <xsl:when test="$type = 'clause' and $root = 'annex'"><xsl:value-of select="$title-annex"/></xsl:when>
1488
- <xsl:when test="$type = 'li'">
1489
- <xsl:attribute name="color">black</xsl:attribute>
1490
- <xsl:attribute name="text-decoration">none</xsl:attribute>
1491
- <xsl:variable name="parent_section" select="xalan:nodeset($contents)//item[@id =$target]/@parent_section"/>
1492
- <xsl:variable name="currentSection">
1493
- <xsl:call-template name="getSection"/>
1494
- </xsl:variable>
1495
- <xsl:if test="not(contains($parent_section, $currentSection))">
1496
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
1497
- <xsl:attribute name="color">blue</xsl:attribute>
1498
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1499
- <xsl:value-of select="$parent_section"/><xsl:text> </xsl:text>
1500
- </fo:basic-link>
1501
- </xsl:if>
1502
- </xsl:when>
1503
- <xsl:when test="normalize-space($section) = ''">
1504
- <xsl:text>[</xsl:text><xsl:value-of select="$target"/><xsl:text>]</xsl:text>
1505
- </xsl:when>
1506
- <xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
1507
- </xsl:choose>
1508
- <xsl:value-of select="$section"/>
1509
- </fo:basic-link>
1510
- </xsl:template>
1511
-
1512
- <xsl:template match="gb:example/gb:p">
1513
- <fo:block font-size="10pt" margin-top="8pt" margin-bottom="8pt">
1514
- <!-- <xsl:if test="ancestor::gb:li">
1515
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1516
- </xsl:if> -->
1517
- <xsl:variable name="claims_id" select="ancestor::gb:clause[1]/@id"/>
1518
- <fo:inline padding-right="5mm">
1519
- <xsl:variable name="title-example">
1520
- <xsl:call-template name="getTitle">
1521
- <xsl:with-param name="name" select="'title-example'"/>
1522
- </xsl:call-template>
1523
- </xsl:variable>
1524
- <xsl:value-of select="$title-example"/>
1525
- <xsl:if test="count(ancestor::gb:clause[1]//gb:example) &gt; 1">
1526
- <xsl:number count="gb:example[ancestor::gb:clause[@id = $claims_id]]" level="any"/>
1527
- </xsl:if>
1528
- </fo:inline>
1529
- <xsl:apply-templates/>
1530
- </fo:block>
1531
- </xsl:template>
1532
-
1533
- <xsl:template match="gb:note/gb:p" name="note">
1534
- <xsl:variable name="claims_id" select="ancestor::gb:clause[1]/@id"/>
1535
- <fo:block-container font-size="9pt" margin-left="7.4mm" margin-top="4pt" line-height="125%">
1536
- <fo:block-container margin-left="0mm">
1537
- <fo:table table-layout="fixed" width="100%">
1538
- <fo:table-column column-width="10mm"/>
1539
- <fo:table-column column-width="155mm"/>
1540
- <fo:table-body>
1541
- <fo:table-row>
1542
- <fo:table-cell>
1543
- <fo:block font-family="SimHei">
1544
- <xsl:variable name="title-note">
1545
- <xsl:call-template name="getTitle">
1546
- <xsl:with-param name="name" select="'title-note'"/>
1547
- </xsl:call-template>
1548
- </xsl:variable>
1549
- <xsl:value-of select="normalize-space($title-note)"/>
1550
- <xsl:if test="count(ancestor::gb:clause[1]//gb:note) &gt; 1">
1551
- <xsl:text> </xsl:text><xsl:number count="gb:note[ancestor::gb:clause[@id = $claims_id]]" level="any"/>
1552
- </xsl:if>
1553
- <xsl:text>:</xsl:text>
1554
- </fo:block>
1555
- </fo:table-cell>
1556
- <fo:table-cell>
1557
- <fo:block text-align="justify">
1558
- <xsl:apply-templates/>
1559
- </fo:block>
1560
- </fo:table-cell>
1561
- </fo:table-row>
1562
- </fo:table-body>
1563
- </fo:table>
1564
- </fo:block-container>
1565
- </fo:block-container>
1566
- </xsl:template>
1567
1006
 
1568
- <!-- <eref type="inline" bibitemid="IEC60050-113" citeas="IEC 60050-113:2011"><localityStack><locality type="clause"><referenceFrom>113-01-12</referenceFrom></locality></localityStack></eref> -->
1569
- <xsl:template match="gb:eref">
1570
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
1571
- <xsl:if test="@type = 'footnote'">
1572
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
1573
- <xsl:attribute name="font-size">50%</xsl:attribute>
1574
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1575
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1576
- </xsl:if>
1577
- <!-- <xsl:if test="@type = 'inline'">
1578
- <xsl:attribute name="color">blue</xsl:attribute>
1579
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1580
- </xsl:if> -->
1581
-
1582
- <xsl:choose>
1583
- <xsl:when test="@citeas and normalize-space(text()) = ''">
1584
- <xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
1585
- </xsl:when>
1586
- <xsl:when test="@bibitemid and normalize-space(text()) = ''">
1587
- <xsl:value-of select="//gb:bibitem[@id = current()/@bibitemid]/gb:docidentifier"/>
1588
- </xsl:when>
1589
- <xsl:otherwise/>
1590
- </xsl:choose>
1591
- <xsl:apply-templates select="gb:localityStack"/>
1592
- <xsl:apply-templates select="text()"/>
1593
- </fo:basic-link>
1594
- </xsl:template>
1595
-
1596
- <xsl:template match="gb:locality">
1597
- <xsl:variable name="title-clause">
1598
- <xsl:call-template name="getTitle">
1599
- <xsl:with-param name="name" select="'title-clause'"/>
1600
- </xsl:call-template>
1601
- </xsl:variable>
1602
- <xsl:variable name="title-annex">
1603
- <xsl:call-template name="getTitle">
1604
- <xsl:with-param name="name" select="'title-annex'"/>
1605
- </xsl:call-template>
1606
- </xsl:variable>
1607
- <xsl:variable name="title-table">
1608
- <xsl:call-template name="getTitle">
1609
- <xsl:with-param name="name" select="'title-table'"/>
1610
- </xsl:call-template>
1611
- </xsl:variable>
1612
- <xsl:choose>
1613
- <xsl:when test="@type ='section' and ancestor::gb:termsource">SOURCE Section </xsl:when>
1614
- <xsl:when test="ancestor::gb:termsource"/>
1615
- <xsl:when test="@type ='clause' and ancestor::gb:eref"/>
1616
- <xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
1617
- <xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
1618
- <xsl:when test="@type ='table'"><xsl:value-of select="$title-table"/></xsl:when>
1619
- <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
1620
- </xsl:choose>
1621
- <xsl:text> </xsl:text><xsl:value-of select="gb:referenceFrom"/>
1622
- </xsl:template>
1007
+
1623
1008
 
1624
1009
  <xsl:template match="gb:admonition">
1625
1010
  <xsl:variable name="title-caution">
@@ -1644,18 +1029,7 @@
1644
1029
  </fo:block>
1645
1030
  </xsl:template>
1646
1031
 
1647
- <xsl:template match="gb:formula">
1648
- <fo:block id="{@id}">
1649
- <xsl:apply-templates/>
1650
- </fo:block>
1651
- </xsl:template>
1652
-
1653
- <xsl:template match="gb:formula/gb:dt/gb:stem">
1654
- <fo:inline>
1655
- <xsl:apply-templates/>
1656
- </fo:inline>
1657
- </xsl:template>
1658
-
1032
+
1659
1033
  <xsl:template match="gb:formula/gb:stem">
1660
1034
  <fo:block font-size="11pt" margin-top="14pt" margin-bottom="14pt">
1661
1035
  <fo:table table-layout="fixed" width="170mm">
@@ -1670,28 +1044,16 @@
1670
1044
  </fo:table-cell>
1671
1045
  <fo:table-cell display-align="center">
1672
1046
  <fo:block text-align="left">
1673
- <xsl:choose>
1674
- <xsl:when test="ancestor::gb:annex">
1675
- <xsl:number format="(A.1)" level="multiple" count="gb:annex | gb:formula"/>
1676
- </xsl:when>
1677
- <xsl:otherwise> <!-- not(ancestor::gb:annex) -->
1678
- <xsl:number format="(1)" level="any" count="gb:formula"/>
1679
- </xsl:otherwise>
1680
- </xsl:choose>
1047
+ <xsl:apply-templates select="../gb:name" mode="presentation"/>
1681
1048
  </fo:block>
1682
1049
  </fo:table-cell>
1683
1050
  </fo:table-row>
1684
1051
  </fo:table-body>
1685
- </fo:table>
1686
- <fo:inline keep-together.within-line="always">
1687
- </fo:inline>
1052
+ </fo:table>
1688
1053
  </fo:block>
1689
1054
  </xsl:template>
1690
1055
 
1691
- <xsl:template match="gb:br" priority="2">
1692
- <!-- <fo:block>&#xA0;</fo:block> -->
1693
- <xsl:value-of select="$linebreak"/>
1694
- </xsl:template>
1056
+
1695
1057
 
1696
1058
  <xsl:template name="insertHeaderFooter">
1697
1059
  <fo:static-content flow-name="header">
@@ -1724,88 +1086,6 @@
1724
1086
  </xsl:template>
1725
1087
 
1726
1088
 
1727
- <xsl:template name="getSection">
1728
- <xsl:param name="sectionNum"/>
1729
- <xsl:variable name="level">
1730
- <xsl:call-template name="getLevel"/>
1731
- </xsl:variable>
1732
- <xsl:variable name="section">
1733
- <xsl:choose>
1734
- <xsl:when test="ancestor::gb:bibliography">
1735
- <xsl:value-of select="$sectionNum"/>
1736
- </xsl:when>
1737
- <xsl:when test="ancestor::gb:sections">
1738
- <!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
1739
- <xsl:choose>
1740
- <xsl:when test="$level = 1">
1741
- <xsl:value-of select="$sectionNum"/>
1742
- </xsl:when>
1743
- <xsl:when test="$level &gt;= 2">
1744
- <xsl:variable name="num">
1745
- <xsl:call-template name="getSubSection"/>
1746
- </xsl:variable>
1747
- <xsl:value-of select="concat($sectionNum, $num)"/>
1748
- </xsl:when>
1749
- <xsl:otherwise>
1750
- <!-- z<xsl:value-of select="$sectionNum"/>z -->
1751
- </xsl:otherwise>
1752
- </xsl:choose>
1753
- </xsl:when>
1754
- <xsl:when test="ancestor::gb:annex">
1755
- <xsl:variable name="annexid" select="normalize-space(/gb:gb-standard/gb:bibdata/gb:ext/gb:structuredidentifier/gb:annexid)"/>
1756
- <xsl:choose>
1757
- <xsl:when test="$level = 1">
1758
- <xsl:variable name="title-annex">
1759
- <xsl:call-template name="getTitle">
1760
- <xsl:with-param name="name" select="'title-annex'"/>
1761
- </xsl:call-template>
1762
- </xsl:variable>
1763
- <xsl:value-of select="$title-annex"/>
1764
- <xsl:choose>
1765
- <xsl:when test="count(//gb:annex) = 1 and $annexid != ''">
1766
- <xsl:value-of select="$annexid"/>
1767
- </xsl:when>
1768
- <xsl:otherwise>
1769
- <xsl:number format="A" level="any" count="gb:annex"/>
1770
- </xsl:otherwise>
1771
- </xsl:choose>
1772
- </xsl:when>
1773
- <xsl:otherwise>
1774
- <xsl:choose>
1775
- <xsl:when test="count(//gb:annex) = 1 and $annexid != ''">
1776
- <xsl:value-of select="$annexid"/><xsl:number format=".1" level="multiple" count="gb:clause"/>
1777
- </xsl:when>
1778
- <xsl:otherwise>
1779
- <xsl:number format="A.1" level="multiple" count="gb:annex | gb:clause"/>
1780
- </xsl:otherwise>
1781
- </xsl:choose>
1782
- </xsl:otherwise>
1783
- </xsl:choose>
1784
- </xsl:when>
1785
- <xsl:when test="ancestor::gb:preface"> <!-- if preface and there is clause(s) -->
1786
- <xsl:choose>
1787
- <xsl:when test="$level = 1 and ..//gb:clause">0</xsl:when>
1788
- <xsl:when test="$level &gt;= 2">
1789
- <xsl:variable name="num">
1790
- <xsl:number format=".1" level="multiple" count="gb:clause"/>
1791
- </xsl:variable>
1792
- <xsl:value-of select="concat('0', $num)"/>
1793
- </xsl:when>
1794
- <xsl:otherwise>
1795
- <!-- z<xsl:value-of select="$sectionNum"/>z -->
1796
- </xsl:otherwise>
1797
- </xsl:choose>
1798
- </xsl:when>
1799
- <xsl:otherwise>
1800
- </xsl:otherwise>
1801
- </xsl:choose>
1802
- </xsl:variable>
1803
- <xsl:value-of select="$section"/>
1804
- </xsl:template>
1805
-
1806
- <!-- <xsl:variable name="Image-GB-Logo">
1807
- <xsl:text>R0lGODlhWAIvAcQSAEBAQL+/v39/f4CAgO/v7xAQEDAwMJ+fn8/Pz2BgYCAgIN/f31BQUK+vr4+Pj3BwcP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAABYAi8BAAX/oCSOZGmeaKqubOu+MBIcgpAAOBDtfO//wKBwSCwaj8gkEUBwIRTKqHRKrVqvWF4hh6sJGgEEbEwum8/otHqdWgRsgEJ2Tq/bpQcX487v+/+APlsMXwFsh4iJiouLCAcPOoGSk5REAi6RlZqbnJUGCQ6GjKOkpaZnBA0CmUhbOQ8DsbKztLW2t7i5uru8vb6/tAY+ly2sEQzAycrLzM3Oz843OcJRAA8NTafa29yJDQ/URQDIBwEBEOjp6uvs7e7v8PHy8/T19vIHP8QsxgUI9wADChxIsKDBg+sImHMwgEEcIwAciOlGsaJFEwgcGAPyKRQBhCBDihxJrwGQfSs2//ojybKly5cwFTqARETBg4kXc+pcFOABFCEKQJ2DSbSoUXcI5OzYswOlikgGwq08SrWqVaOOEvwEYnPBzq9gyTRIoJTrtQVX06oFmZSHAQI8nKaIxETqv7V48+qlt+AA2SAA8oQdTHgEggdlBTE4gHav48dIy76FEBfTDgAQCGydCrmz57Q9t/YoIMBr4dMWFwgQ3cPm0M+w9xKQ/JFyU8sRMENou6NA49jAg7M8zHpHAt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rhYx7GAC/i4zrUjwDkET/+DNQ5QP6k0QWlowICgCu6AO4VpDDUzwXpTwAEAEVaSAgAADs=</xsl:text>
1808
- </xsl:variable> -->
1809
1089
 
1810
1090
  <xsl:template name="addLetterSpacing">
1811
1091
  <xsl:param name="text"/>
@@ -1821,46 +1101,6 @@
1821
1101
  </xsl:template>
1822
1102
 
1823
1103
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1824
-
1825
- <title-table lang="en">Table </title-table>
1826
- <title-table lang="fr">Tableau </title-table>
1827
-
1828
-
1829
- <title-table lang="zh">表 </title-table>
1830
-
1831
-
1832
- <title-note lang="en">NOTE </title-note>
1833
- <title-note lang="fr">NOTE </title-note>
1834
-
1835
-
1836
- <title-note lang="zh">注 </title-note>
1837
-
1838
-
1839
- <title-figure lang="en">Figure </title-figure>
1840
- <title-figure lang="fr">Figure </title-figure>
1841
-
1842
-
1843
- <title-figure lang="zh">图 </title-figure>
1844
-
1845
-
1846
- <title-example lang="en">EXAMPLE </title-example>
1847
- <title-example lang="fr">EXEMPLE </title-example>
1848
-
1849
-
1850
- <title-example lang="zh">示例 </title-example>
1851
-
1852
-
1853
- <title-example-xref lang="en">Example </title-example-xref>
1854
- <title-example-xref lang="fr">Exemple </title-example-xref>
1855
-
1856
- <title-section lang="en">Section </title-section>
1857
- <title-section lang="fr">Section </title-section>
1858
-
1859
- <title-inequality lang="en">Inequality </title-inequality>
1860
- <title-inequality lang="fr">Inequality </title-inequality>
1861
-
1862
- <title-equation lang="en">Equation </title-equation>
1863
- <title-equation lang="fr">Equation </title-equation>
1864
1104
 
1865
1105
  <title-annex lang="en">Annex </title-annex>
1866
1106
  <title-annex lang="fr">Annexe </title-annex>
@@ -1868,25 +1108,13 @@
1868
1108
 
1869
1109
  <title-annex lang="zh">附件 </title-annex>
1870
1110
 
1871
-
1872
- <title-appendix lang="en">Appendix </title-appendix>
1873
- <title-appendix lang="fr">Appendix </title-appendix>
1874
-
1875
- <title-clause lang="en">Clause </title-clause>
1876
- <title-clause lang="fr">Article </title-clause>
1877
-
1878
-
1879
- <title-clause lang="zh">条 </title-clause>
1880
-
1881
-
1111
+
1882
1112
  <title-edition lang="en">
1883
1113
 
1884
1114
 
1885
1115
  </title-edition>
1886
1116
 
1887
- <title-formula lang="en">Formula </title-formula>
1888
- <title-formula lang="fr">Formula </title-formula>
1889
-
1117
+
1890
1118
  <title-toc lang="en">
1891
1119
 
1892
1120
 
@@ -1925,13 +1153,6 @@
1925
1153
  </title-part>
1926
1154
  <title-part lang="zh">第 # 部分:</title-part>
1927
1155
 
1928
- <title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
1929
- <title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
1930
-
1931
-
1932
- <title-note-to-entry lang="zh">注#: </title-note-to-entry>
1933
-
1934
-
1935
1156
  <title-modified lang="en">modified</title-modified>
1936
1157
  <title-modified lang="fr">modifiée</title-modified>
1937
1158
 
@@ -1945,14 +1166,12 @@
1945
1166
 
1946
1167
  <title-deprecated lang="en">DEPRECATED</title-deprecated>
1947
1168
  <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1948
-
1949
- <title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
1950
-
1169
+
1951
1170
  <title-list-tables lang="en">List of Tables</title-list-tables>
1952
1171
 
1953
1172
  <title-list-figures lang="en">List of Figures</title-list-figures>
1954
1173
 
1955
- <title-recommendation lang="en">Recommendation </title-recommendation>
1174
+ <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1956
1175
 
1957
1176
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1958
1177
 
@@ -1962,8 +1181,6 @@
1962
1181
 
1963
1182
  <title-in lang="en">in </title-in>
1964
1183
 
1965
- <title-box lang="en">Box </title-box>
1966
-
1967
1184
  <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1968
1185
  <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1969
1186
 
@@ -1986,7 +1203,7 @@
1986
1203
  <title-warning lang="zh">警告</title-warning>
1987
1204
 
1988
1205
  <title-amendment lang="en">AMENDMENT</title-amendment>
1989
- </xsl:variable><xsl:template name="getTitle">
1206
+ </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1990
1207
  <xsl:param name="name"/>
1991
1208
  <xsl:variable name="lang">
1992
1209
  <xsl:call-template name="getLang"/>
@@ -2004,6 +1221,8 @@
2004
1221
 
2005
1222
 
2006
1223
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1224
+ <xsl:attribute name="white-space">pre</xsl:attribute>
1225
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
2007
1226
 
2008
1227
  <xsl:attribute name="font-family">Courier</xsl:attribute>
2009
1228
  <xsl:attribute name="font-size">9pt</xsl:attribute>
@@ -2016,92 +1235,365 @@
2016
1235
 
2017
1236
 
2018
1237
 
2019
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2020
-
2021
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2022
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2023
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2024
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1238
+ </xsl:attribute-set><xsl:attribute-set name="permission-style">
2025
1239
 
1240
+ </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
2026
1241
 
1242
+ </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
2027
1243
 
2028
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1244
+ </xsl:attribute-set><xsl:attribute-set name="requirement-style">
2029
1245
 
2030
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2031
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2032
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1246
+ </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
2033
1247
 
1248
+ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
2034
1249
 
1250
+ </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
1251
+ </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
1252
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
2035
1253
 
2036
- </xsl:attribute-set><xsl:template match="text()">
2037
- <xsl:value-of select="."/>
2038
- </xsl:template><xsl:template match="*[local-name()='br']">
2039
- <xsl:value-of select="$linebreak"/>
2040
- </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2041
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
2042
- <xsl:call-template name="add-zero-spaces-java"/>
2043
- </xsl:template><xsl:template match="*[local-name()='table']">
2044
-
2045
- <xsl:variable name="simple-table">
2046
- <!-- <xsl:copy> -->
2047
- <xsl:call-template name="getSimpleTable"/>
2048
- <!-- </xsl:copy> -->
2049
- </xsl:variable>
2050
-
2051
- <!-- DEBUG -->
2052
- <!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
2053
- <!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
2054
-
2055
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2056
1254
 
2057
- <!-- <xsl:if test="$namespace = 'iso'">
2058
- <fo:block space-before="6pt">&#xA0;</fo:block>
2059
- </xsl:if> -->
1255
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
1256
+
1257
+
1258
+ </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
1259
+
1260
+ </xsl:attribute-set><xsl:attribute-set name="termexample-style">
1261
+
1262
+
1263
+
1264
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
1265
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
1266
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1267
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+ </xsl:attribute-set><xsl:attribute-set name="example-style">
1274
+
1275
+
1276
+
1277
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1278
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1279
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+ </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1289
+
1290
+
1291
+
1292
+ </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1293
+
1294
+
1295
+
1296
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+ </xsl:attribute-set><xsl:attribute-set name="example-p-style">
1313
+
1314
+
1315
+
1316
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1317
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1318
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1331
+
1332
+
1333
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1334
+ <xsl:attribute name="font-family">SimHei</xsl:attribute>
1335
+
2060
1336
 
2061
- <xsl:choose>
2062
- <xsl:when test="@unnumbered = 'true'"/>
2063
- <xsl:otherwise>
2064
-
2065
-
2066
-
2067
- <fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
2068
-
2069
-
2070
-
2071
-
2072
-
2073
-
2074
-
2075
- <xsl:attribute name="font-family">SimHei</xsl:attribute>
2076
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2077
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2078
-
2079
-
2080
- <xsl:variable name="title-table">
2081
- <xsl:call-template name="getTitle">
2082
- <xsl:with-param name="name" select="'title-table'"/>
2083
- </xsl:call-template>
2084
- </xsl:variable>
2085
- <xsl:value-of select="$title-table"/>
2086
-
2087
- <xsl:call-template name="getTableNumber"/>
2088
-
2089
-
2090
- <xsl:if test="*[local-name()='name']">
2091
-
2092
-
2093
-
2094
- <xsl:text> — </xsl:text>
2095
-
2096
- <xsl:apply-templates select="*[local-name()='name']" mode="process"/>
2097
- </xsl:if>
2098
- </fo:block>
2099
1337
 
1338
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1339
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1340
+
1341
+
1342
+ <xsl:attribute name="text-align">center</xsl:attribute>
1343
+ <xsl:attribute name="font-family">SimHei</xsl:attribute>
1344
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1345
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1346
+
1347
+
1348
+
2100
1349
 
2101
- <xsl:call-template name="fn_name_display"/>
1350
+
1351
+
1352
+
2102
1353
 
2103
- </xsl:otherwise>
2104
- </xsl:choose>
1354
+
1355
+
1356
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1357
+
1358
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1359
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1360
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1361
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1362
+
1363
+
1364
+
1365
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1366
+
1367
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1368
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1369
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1370
+
1371
+
1372
+
1373
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1374
+
1375
+
1376
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1377
+
1378
+
1379
+
1380
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1381
+
1382
+
1383
+
1384
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
1385
+ <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
1386
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1387
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
1388
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+ </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1403
+
1404
+
1405
+
1406
+ <xsl:attribute name="font-family">SimHei</xsl:attribute>
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1416
+
1417
+
1418
+
1419
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1420
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1421
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1422
+
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1440
+
1441
+
1442
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1443
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
1444
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1451
+
1452
+
1453
+ <xsl:attribute name="text-align">right</xsl:attribute>
1454
+
1455
+
1456
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1457
+
1458
+
1459
+
1460
+ <xsl:attribute name="text-indent">7.4mm</xsl:attribute>
1461
+
1462
+
1463
+
1464
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1465
+
1466
+
1467
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1468
+
1469
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+ <xsl:attribute name="font-family">SimHei</xsl:attribute>
1476
+ <xsl:attribute name="text-align">center</xsl:attribute>
1477
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1478
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1479
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1480
+
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1493
+
1494
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1495
+ <xsl:attribute name="text-align">center</xsl:attribute>
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1502
+
1503
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1504
+
1505
+
1506
+ <xsl:attribute name="width">100%</xsl:attribute>
1507
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1508
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1509
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1510
+
1511
+
1512
+
1513
+
1514
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1515
+
1516
+
1517
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1518
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1519
+
1520
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1521
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1522
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1523
+ <xsl:attribute name="text-align">center</xsl:attribute>
1524
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1525
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1526
+
1527
+ <xsl:attribute name="padding-left">7.4mm</xsl:attribute>
1528
+
1529
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1530
+
1531
+
1532
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1533
+
1534
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1535
+
1536
+
1537
+ </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1538
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1539
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1540
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1541
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1542
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1543
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1544
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1545
+
1546
+ <!-- Normative references -->
1547
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
1548
+ <!-- Terms and definitions -->
1549
+ <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"/>
1550
+ <!-- Another main sections -->
1551
+ <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"/>
1552
+ <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1553
+ <!-- Bibliography -->
1554
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
1555
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1556
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1557
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1558
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1559
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1560
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1561
+ </xsl:template><xsl:template name="processMainSectionsDefault">
1562
+ <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1563
+
1564
+ <!-- Normative references -->
1565
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1566
+ <!-- Terms and definitions -->
1567
+ <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']]"/>
1568
+ <!-- Another main sections -->
1569
+ <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'])]"/>
1570
+ <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1571
+ <!-- Bibliography -->
1572
+ <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1573
+ </xsl:template><xsl:template match="text()">
1574
+ <xsl:value-of select="."/>
1575
+ </xsl:template><xsl:template match="*[local-name()='br']">
1576
+ <xsl:value-of select="$linebreak"/>
1577
+ </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1578
+ <!-- <xsl:call-template name="add-zero-spaces"/> -->
1579
+ <xsl:call-template name="add-zero-spaces-java"/>
1580
+ </xsl:template><xsl:template match="*[local-name()='table']">
1581
+
1582
+ <xsl:variable name="simple-table">
1583
+ <xsl:call-template name="getSimpleTable"/>
1584
+ </xsl:variable>
1585
+
1586
+
1587
+
1588
+
1589
+
1590
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1591
+
1592
+
1593
+
1594
+ <xsl:call-template name="fn_name_display"/>
1595
+
1596
+
2105
1597
 
2106
1598
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2107
1599
 
@@ -2157,6 +1649,7 @@
2157
1649
 
2158
1650
 
2159
1651
 
1652
+
2160
1653
  <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">
2161
1654
 
2162
1655
 
@@ -2171,6 +1664,7 @@
2171
1664
 
2172
1665
 
2173
1666
 
1667
+
2174
1668
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
2175
1669
  <xsl:choose>
2176
1670
  <xsl:when test=". = 1 or . = 0">
@@ -2197,35 +1691,15 @@
2197
1691
  <xsl:apply-templates select="*[local-name()='note']" mode="process"/>
2198
1692
 
2199
1693
 
1694
+
1695
+
2200
1696
  </fo:block-container>
2201
- </xsl:template><xsl:template name="getTableNumber">
2202
- <xsl:choose>
2203
- <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
2204
- <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
2205
- </xsl:when>
2206
- <xsl:when test="ancestor::*[local-name()='annex']">
2207
-
2208
-
2209
- <xsl:variable name="annex-id" select="ancestor::gb:annex/@id"/>
2210
- <xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1" level="any" count="*[local-name()='table'][(not(@unnumbered) or @unnumbered != 'true') and ancestor::gb:annex[@id = $annex-id]]"/>
2211
-
2212
-
2213
-
2214
-
2215
-
2216
-
2217
-
2218
- </xsl:when>
2219
- <xsl:otherwise>
2220
-
2221
-
2222
- <xsl:number format="A." count="*[local-name()='annex']"/>
2223
- <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']"/>
2224
-
2225
- </xsl:otherwise>
2226
- </xsl:choose>
2227
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
2228
- <xsl:apply-templates/>
1697
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1698
+ <xsl:if test="normalize-space() != ''">
1699
+ <fo:block xsl:use-attribute-sets="table-name-style">
1700
+ <xsl:apply-templates/>
1701
+ </fo:block>
1702
+ </xsl:if>
2229
1703
  </xsl:template><xsl:template name="calculate-columns-numbers">
2230
1704
  <xsl:param name="table-row"/>
2231
1705
  <xsl:variable name="columns-count" select="count($table-row/*)"/>
@@ -2446,6 +1920,16 @@
2446
1920
  </fo:table-row>
2447
1921
  </xsl:template><xsl:template match="*[local-name()='th']">
2448
1922
  <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
1923
+ <xsl:attribute name="text-align">
1924
+ <xsl:choose>
1925
+ <xsl:when test="@align">
1926
+ <xsl:value-of select="@align"/>
1927
+ </xsl:when>
1928
+ <xsl:otherwise>center</xsl:otherwise>
1929
+ </xsl:choose>
1930
+ </xsl:attribute>
1931
+
1932
+
2449
1933
 
2450
1934
 
2451
1935
 
@@ -2469,6 +1953,14 @@
2469
1953
  </fo:table-cell>
2470
1954
  </xsl:template><xsl:template match="*[local-name()='td']">
2471
1955
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1956
+ <xsl:attribute name="text-align">
1957
+ <xsl:choose>
1958
+ <xsl:when test="@align">
1959
+ <xsl:value-of select="@align"/>
1960
+ </xsl:when>
1961
+ <xsl:otherwise>left</xsl:otherwise>
1962
+ </xsl:choose>
1963
+ </xsl:attribute>
2472
1964
 
2473
1965
 
2474
1966
 
@@ -2476,7 +1968,7 @@
2476
1968
  <xsl:if test="ancestor::*[local-name() = 'tfoot']">
2477
1969
  <xsl:attribute name="border-bottom">solid black 0</xsl:attribute>
2478
1970
  </xsl:if>
2479
-
1971
+
2480
1972
 
2481
1973
 
2482
1974
 
@@ -2495,21 +1987,9 @@
2495
1987
  <fo:block>
2496
1988
 
2497
1989
  <xsl:apply-templates/>
2498
- </fo:block>
2499
- <!-- <xsl:choose>
2500
- <xsl:when test="count(*) = 1 and *[local-name() = 'p']">
2501
- <xsl:apply-templates />
2502
- </xsl:when>
2503
- <xsl:otherwise>
2504
- <fo:block>
2505
- <xsl:apply-templates />
2506
- </fo:block>
2507
- </xsl:otherwise>
2508
- </xsl:choose> -->
2509
-
2510
-
1990
+ </fo:block>
2511
1991
  </fo:table-cell>
2512
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
1992
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2513
1993
 
2514
1994
 
2515
1995
  <fo:block font-size="10pt" margin-bottom="12pt">
@@ -2527,26 +2007,14 @@
2527
2007
 
2528
2008
 
2529
2009
 
2530
- <xsl:variable name="title-note">
2531
- <xsl:call-template name="getTitle">
2532
- <xsl:with-param name="name" select="'title-note'"/>
2533
- </xsl:call-template>
2534
- </xsl:variable>
2535
- <xsl:value-of select="$title-note"/>
2536
-
2537
- <xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
2538
- <xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) &gt; 1">
2539
- <xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
2540
- </xsl:if>
2541
- <xsl:text>:</xsl:text>
2542
-
2543
-
2544
-
2010
+
2011
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2012
+
2545
2013
  </fo:inline>
2546
2014
  <xsl:apply-templates mode="process"/>
2547
2015
  </fo:block>
2548
2016
 
2549
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2017
+ </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">
2550
2018
  <xsl:apply-templates/>
2551
2019
  </xsl:template><xsl:template name="fn_display">
2552
2020
  <xsl:variable name="references">
@@ -2612,7 +2080,7 @@
2612
2080
  true <!-- and (not(@class) or @class !='pseudocode') -->
2613
2081
  </xsl:variable>
2614
2082
  <xsl:variable name="references">
2615
- <xsl:for-each select=".//*[local-name()='fn']">
2083
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2616
2084
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2617
2085
  <xsl:apply-templates/>
2618
2086
  </fn>
@@ -2907,7 +2375,7 @@
2907
2375
  <xsl:value-of select="string-length(normalize-space(.))"/>
2908
2376
  </xsl:if>
2909
2377
  </xsl:for-each>
2910
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
2378
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2911
2379
  <xsl:param name="key_iso"/>
2912
2380
 
2913
2381
  <!-- <tr>
@@ -2923,12 +2391,7 @@
2923
2391
  <xsl:if test="normalize-space($key_iso) = 'true'">
2924
2392
  <xsl:attribute name="margin-top">0</xsl:attribute>
2925
2393
  </xsl:if>
2926
- <xsl:variable name="title-note">
2927
- <xsl:call-template name="getTitle">
2928
- <xsl:with-param name="name" select="'title-note'"/>
2929
- </xsl:call-template>
2930
- </xsl:variable>
2931
- <xsl:value-of select="$title-note"/>
2394
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2932
2395
  </fo:block>
2933
2396
  </fo:table-cell>
2934
2397
  <fo:table-cell>
@@ -2979,14 +2442,36 @@
2979
2442
  <fo:table-cell>
2980
2443
  <fo:block>
2981
2444
 
2982
-
2445
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2446
+ <xsl:if test="local-name(*[1]) != 'stem'">
2447
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2448
+ </xsl:if>
2449
+ </xsl:if> -->
2983
2450
 
2984
2451
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2985
2452
 
2986
2453
  </fo:block>
2987
2454
  </fo:table-cell>
2988
2455
  </fo:table-row>
2989
-
2456
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2457
+ <xsl:if test="local-name(*[1]) = 'stem'">
2458
+ <fo:table-row>
2459
+ <fo:table-cell>
2460
+ <fo:block margin-top="6pt">
2461
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2462
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2463
+ </xsl:if>
2464
+ <xsl:text>&#xA0;</xsl:text>
2465
+ </fo:block>
2466
+ </fo:table-cell>
2467
+ <fo:table-cell>
2468
+ <fo:block>
2469
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2470
+ </fo:block>
2471
+ </fo:table-cell>
2472
+ </fo:table-row>
2473
+ </xsl:if>
2474
+ </xsl:if> -->
2990
2475
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2991
2476
  <xsl:apply-templates/>
2992
2477
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -2997,7 +2482,7 @@
2997
2482
  <fo:inline font-style="italic">
2998
2483
  <xsl:apply-templates/>
2999
2484
  </fo:inline>
3000
- </xsl:template><xsl:template match="*[local-name()='strong']">
2485
+ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
3001
2486
  <fo:inline font-weight="bold">
3002
2487
  <xsl:apply-templates/>
3003
2488
  </fo:inline>
@@ -3010,7 +2495,7 @@
3010
2495
  <xsl:apply-templates/>
3011
2496
  </fo:inline>
3012
2497
  </xsl:template><xsl:template match="*[local-name()='tt']">
3013
- <fo:inline font-family="Courier" font-size="10pt">
2498
+ <fo:inline xsl:use-attribute-sets="tt-style">
3014
2499
  <xsl:apply-templates/>
3015
2500
  </fo:inline>
3016
2501
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -3324,134 +2809,916 @@
3324
2809
  </xsl:call-template>
3325
2810
  </xsl:when>
3326
2811
  <xsl:otherwise>
3327
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3328
- <xsl:value-of select="substring($str2, 2)"/> -->
3329
- <xsl:call-template name="capitalize">
3330
- <xsl:with-param name="str" select="$str2"/>
3331
- </xsl:call-template>
2812
+ <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
2813
+ <xsl:value-of select="substring($str2, 2)"/> -->
2814
+ <xsl:call-template name="capitalize">
2815
+ <xsl:with-param name="str" select="$str2"/>
2816
+ </xsl:call-template>
2817
+ </xsl:otherwise>
2818
+ </xsl:choose>
2819
+ </xsl:template><xsl:template name="capitalize">
2820
+ <xsl:param name="str"/>
2821
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2822
+ <xsl:value-of select="substring($str, 2)"/>
2823
+ </xsl:template><xsl:template match="mathml:math">
2824
+ <fo:inline font-family="STIX2Math">
2825
+ <fo:instream-foreign-object fox:alt-text="Math">
2826
+ <xsl:copy-of select="."/>
2827
+ </fo:instream-foreign-object>
2828
+ </fo:inline>
2829
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2830
+ <xsl:variable name="target">
2831
+ <xsl:choose>
2832
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2833
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2834
+ </xsl:when>
2835
+ <xsl:otherwise>
2836
+ <xsl:value-of select="normalize-space(@target)"/>
2837
+ </xsl:otherwise>
2838
+ </xsl:choose>
2839
+ </xsl:variable>
2840
+ <fo:inline xsl:use-attribute-sets="link-style">
2841
+ <xsl:choose>
2842
+ <xsl:when test="$target = ''">
2843
+ <xsl:apply-templates/>
2844
+ </xsl:when>
2845
+ <xsl:otherwise>
2846
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2847
+ <xsl:choose>
2848
+ <xsl:when test="normalize-space(.) = ''">
2849
+ <xsl:value-of select="$target"/>
2850
+ </xsl:when>
2851
+ <xsl:otherwise>
2852
+ <xsl:apply-templates/>
2853
+ </xsl:otherwise>
2854
+ </xsl:choose>
2855
+ </fo:basic-link>
2856
+ </xsl:otherwise>
2857
+ </xsl:choose>
2858
+ </fo:inline>
2859
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
2860
+ <fo:inline id="{@id}"/>
2861
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
2862
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2863
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2864
+ </fo:block>
2865
+ <xsl:apply-templates/>
2866
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2867
+ <fo:inline><xsl:apply-templates/></fo:inline>
2868
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
2869
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
2870
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2871
+ </fo:block>
2872
+ <xsl:apply-templates/>
2873
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
2874
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2875
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
2876
+ <xsl:variable name="annotation-id" select="@id"/>
2877
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2878
+ <fo:block id="{$annotation-id}" white-space="nowrap">
2879
+ <fo:inline>
2880
+ <xsl:apply-templates>
2881
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2882
+ </xsl:apply-templates>
2883
+ </fo:inline>
2884
+ </fo:block>
2885
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2886
+ <xsl:param name="callout"/>
2887
+ <fo:inline id="{@id}">
2888
+ <!-- for first p in annotation, put <x> -->
2889
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2890
+ <xsl:apply-templates/>
2891
+ </fo:inline>
2892
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
2893
+ <xsl:variable name="title-modified">
2894
+ <xsl:call-template name="getTitle">
2895
+ <xsl:with-param name="name" select="'title-modified'"/>
2896
+ </xsl:call-template>
2897
+ </xsl:variable>
2898
+ <xsl:choose>
2899
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2900
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
2901
+ </xsl:choose>
2902
+ <xsl:apply-templates/>
2903
+ </xsl:template><xsl:template match="*[local-name() = 'xref']">
2904
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2905
+
2906
+ <xsl:apply-templates/>
2907
+ </fo:basic-link>
2908
+ </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2909
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2910
+ <xsl:apply-templates/>
2911
+ </fo:block>
2912
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2913
+ <fo:inline>
2914
+ <xsl:apply-templates/>
2915
+ </fo:inline>
2916
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
2917
+ <fo:inline>
2918
+ <xsl:apply-templates/>
2919
+ </fo:inline>
2920
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
2921
+ <xsl:if test="normalize-space() != ''">
2922
+ <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
2923
+ </xsl:if>
2924
+ </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
2925
+
2926
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
2927
+
2928
+
2929
+
2930
+
2931
+ <fo:block-container margin-left="0mm">
2932
+
2933
+ <fo:table table-layout="fixed" width="100%">
2934
+ <fo:table-column column-width="10mm"/>
2935
+ <fo:table-column column-width="155mm"/>
2936
+ <fo:table-body>
2937
+ <fo:table-row>
2938
+ <fo:table-cell>
2939
+ <fo:block font-family="SimHei" xsl:use-attribute-sets="note-name-style">
2940
+ <xsl:apply-templates select="gb:name" mode="presentation"/>
2941
+ </fo:block>
2942
+ </fo:table-cell>
2943
+ <fo:table-cell>
2944
+ <fo:block text-align="justify">
2945
+ <xsl:apply-templates/>
2946
+ </fo:block>
2947
+ </fo:table-cell>
2948
+ </fo:table-row>
2949
+ </fo:table-body>
2950
+ </fo:table>
2951
+
2952
+
2953
+
2954
+
2955
+
2956
+
2957
+
2958
+
2959
+
2960
+ </fo:block-container>
2961
+ </fo:block-container>
2962
+
2963
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
2964
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
2965
+ <xsl:choose>
2966
+ <xsl:when test="$num = 1">
2967
+ <fo:inline xsl:use-attribute-sets="note-p-style">
2968
+ <xsl:apply-templates/>
2969
+ </fo:inline>
2970
+ </xsl:when>
2971
+ <xsl:otherwise>
2972
+ <fo:block xsl:use-attribute-sets="note-p-style">
2973
+ <xsl:apply-templates/>
2974
+ </fo:block>
2975
+ </xsl:otherwise>
2976
+ </xsl:choose>
2977
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2978
+ <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2979
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2980
+ <xsl:apply-templates/>
2981
+ </fo:block>
2982
+ </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">
2983
+ <xsl:param name="sfx"/>
2984
+ <xsl:variable name="suffix">
2985
+ <xsl:choose>
2986
+ <xsl:when test="$sfx != ''">
2987
+ <xsl:value-of select="$sfx"/>
2988
+ </xsl:when>
2989
+ <xsl:otherwise>
2990
+
2991
+ <xsl:text>:</xsl:text>
2992
+
2993
+
2994
+ </xsl:otherwise>
2995
+ </xsl:choose>
2996
+ </xsl:variable>
2997
+ <xsl:if test="normalize-space() != ''">
2998
+ <xsl:apply-templates/>
2999
+ <xsl:value-of select="$suffix"/>
3000
+ </xsl:if>
3001
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
3002
+ <xsl:param name="sfx"/>
3003
+ <xsl:variable name="suffix">
3004
+ <xsl:choose>
3005
+ <xsl:when test="$sfx != ''">
3006
+ <xsl:value-of select="$sfx"/>
3007
+ </xsl:when>
3008
+ <xsl:otherwise>
3009
+
3010
+ <xsl:text>:</xsl:text>
3011
+
3012
+
3013
+ </xsl:otherwise>
3014
+ </xsl:choose>
3015
+ </xsl:variable>
3016
+ <xsl:if test="normalize-space() != ''">
3017
+ <xsl:apply-templates/>
3018
+ <xsl:value-of select="$suffix"/>
3019
+ </xsl:if>
3020
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
3021
+ <fo:inline><xsl:apply-templates/></fo:inline>
3022
+ </xsl:template><xsl:template match="*[local-name() = 'terms']">
3023
+ <fo:block id="{@id}">
3024
+ <xsl:apply-templates/>
3025
+ </fo:block>
3026
+ </xsl:template><xsl:template match="*[local-name() = 'term']">
3027
+ <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3028
+
3029
+ <fo:block font-family="SimHei" font-size="11pt" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
3030
+ <xsl:apply-templates select="gb:name" mode="presentation"/>
3031
+ </fo:block>
3032
+
3033
+
3034
+
3035
+ <xsl:apply-templates/>
3036
+ </fo:block>
3037
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3038
+ <xsl:if test="normalize-space() != ''">
3039
+ <fo:inline>
3040
+ <xsl:apply-templates/>
3041
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3042
+ <xsl:text>.</xsl:text>
3043
+ </xsl:if> -->
3044
+ </fo:inline>
3045
+ </xsl:if>
3046
+ </xsl:template><xsl:template match="*[local-name() = 'figure']">
3047
+ <fo:block-container id="{@id}">
3048
+ <fo:block>
3049
+ <xsl:apply-templates/>
3050
+ </fo:block>
3051
+ <xsl:call-template name="fn_display_figure"/>
3052
+ <xsl:for-each select="*[local-name() = 'note']">
3053
+ <xsl:call-template name="note"/>
3054
+ </xsl:for-each>
3055
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3056
+ </fo:block-container>
3057
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3058
+ <fo:block id="{@id}">
3059
+ <xsl:apply-templates/>
3060
+ </fo:block>
3061
+ </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3062
+ <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3063
+ <xsl:apply-templates/>
3064
+ </fo:block>
3065
+ </xsl:template><xsl:template match="*[local-name() = 'image']">
3066
+ <fo:block xsl:use-attribute-sets="image-style">
3067
+
3068
+
3069
+ <xsl:variable name="src">
3070
+ <xsl:choose>
3071
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3072
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3073
+ </xsl:when>
3074
+ <xsl:otherwise>
3075
+ <xsl:value-of select="@src"/>
3076
+ </xsl:otherwise>
3077
+ </xsl:choose>
3078
+ </xsl:variable>
3079
+
3080
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3081
+ </fo:block>
3082
+ </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">
3083
+ <xsl:apply-templates mode="contents"/>
3084
+ <xsl:text> </xsl:text>
3085
+ </xsl:template><xsl:template match="text()" mode="contents">
3086
+ <xsl:value-of select="."/>
3087
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3088
+ <xsl:if test="normalize-space() != ''">
3089
+ <fo:block xsl:use-attribute-sets="figure-name-style">
3090
+
3091
+ <xsl:apply-templates/>
3092
+ </fo:block>
3093
+ </xsl:if>
3094
+ </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">
3095
+ <xsl:apply-templates mode="contents_item"/>
3096
+ <!-- <xsl:text> </xsl:text> -->
3097
+ </xsl:template><xsl:template name="getSection">
3098
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3099
+ </xsl:template><xsl:template name="getName">
3100
+ <xsl:choose>
3101
+ <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
3102
+ <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
3103
+ </xsl:when>
3104
+ <xsl:otherwise>
3105
+ <xsl:copy-of select="*[local-name() = 'title']/node()"/>
3106
+ </xsl:otherwise>
3107
+ </xsl:choose>
3108
+ </xsl:template><xsl:template name="insertTitleAsListItem">
3109
+ <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
3110
+ <xsl:variable name="section">
3111
+ <xsl:for-each select="..">
3112
+ <xsl:call-template name="getSection"/>
3113
+ </xsl:for-each>
3114
+ </xsl:variable>
3115
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
3116
+ <fo:list-item>
3117
+ <fo:list-item-label end-indent="label-end()">
3118
+ <fo:block>
3119
+ <xsl:value-of select="$section"/>
3120
+ </fo:block>
3121
+ </fo:list-item-label>
3122
+ <fo:list-item-body start-indent="body-start()">
3123
+ <fo:block>
3124
+ <xsl:choose>
3125
+ <xsl:when test="*[local-name() = 'tab']">
3126
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
3127
+ </xsl:when>
3128
+ <xsl:otherwise>
3129
+ <xsl:apply-templates/>
3130
+ </xsl:otherwise>
3131
+ </xsl:choose>
3132
+ </fo:block>
3133
+ </fo:list-item-body>
3134
+ </fo:list-item>
3135
+ </fo:list-block>
3136
+ </xsl:template><xsl:template name="extractTitle">
3137
+ <xsl:choose>
3138
+ <xsl:when test="*[local-name() = 'tab']">
3139
+ <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
3140
+ </xsl:when>
3141
+ <xsl:otherwise>
3142
+ <xsl:apply-templates/>
3143
+ </xsl:otherwise>
3144
+ </xsl:choose>
3145
+ </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">
3146
+ <xsl:text> </xsl:text>
3147
+ </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3148
+ <xsl:copy>
3149
+ <xsl:apply-templates mode="contents_item"/>
3150
+ </xsl:copy>
3151
+ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3152
+ <xsl:text> </xsl:text>
3153
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3154
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3155
+ <xsl:apply-templates/>
3156
+ </fo:block>
3157
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3158
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
3159
+ <xsl:variable name="text">
3160
+ <xsl:call-template name="add-zero-spaces-equal"/>
3161
+ </xsl:variable>
3162
+ <xsl:call-template name="add-zero-spaces">
3163
+ <xsl:with-param name="text" select="$text"/>
3164
+ </xsl:call-template>
3165
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3166
+ <xsl:if test="normalize-space() != ''">
3167
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3168
+
3169
+ <xsl:apply-templates/>
3170
+ </fo:block>
3171
+ </xsl:if>
3172
+ </xsl:template><xsl:template match="*[local-name() = 'permission']">
3173
+ <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3174
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3175
+ <xsl:apply-templates/>
3176
+ </fo:block>
3177
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
3178
+ <xsl:if test="normalize-space() != ''">
3179
+ <fo:block xsl:use-attribute-sets="permission-name-style">
3180
+ <xsl:apply-templates/>
3181
+
3182
+ </fo:block>
3183
+ </xsl:if>
3184
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
3185
+ <fo:block xsl:use-attribute-sets="permission-label-style">
3186
+ <xsl:apply-templates/>
3187
+ </fo:block>
3188
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']">
3189
+ <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3190
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3191
+ <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
3192
+ <xsl:apply-templates select="@obligation" mode="presentation"/>
3193
+ <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
3194
+ <xsl:apply-templates/>
3195
+ </fo:block>
3196
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
3197
+ <xsl:if test="normalize-space() != ''">
3198
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
3199
+
3200
+ <xsl:apply-templates/>
3201
+
3202
+ </fo:block>
3203
+ </xsl:if>
3204
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
3205
+ <fo:block xsl:use-attribute-sets="requirement-label-style">
3206
+ <xsl:apply-templates/>
3207
+ </fo:block>
3208
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
3209
+ <fo:block>
3210
+ <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
3211
+ </fo:block>
3212
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
3213
+ <fo:block xsl:use-attribute-sets="requirement-subject-style">
3214
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
3215
+ </fo:block>
3216
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
3217
+ <fo:block xsl:use-attribute-sets="requirement-inherit-style">
3218
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
3219
+ </fo:block>
3220
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
3221
+ <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3222
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3223
+ <xsl:apply-templates/>
3224
+ </fo:block>
3225
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
3226
+ <xsl:if test="normalize-space() != ''">
3227
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
3228
+ <xsl:apply-templates/>
3229
+
3230
+ </fo:block>
3231
+ </xsl:if>
3232
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
3233
+ <fo:block xsl:use-attribute-sets="recommendation-label-style">
3234
+ <xsl:apply-templates/>
3235
+ </fo:block>
3236
+ </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3237
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3238
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3239
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3240
+ </xsl:if>
3241
+ <fo:block-container margin-left="0mm" margin-right="0mm">
3242
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3243
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3244
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3245
+ </xsl:if>
3246
+ <xsl:variable name="simple-table">
3247
+ <xsl:call-template name="getSimpleTable"/>
3248
+ </xsl:variable>
3249
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3250
+ <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3251
+ <!-- <fo:table-column column-width="35mm"/>
3252
+ <fo:table-column column-width="115mm"/> -->
3253
+ <fo:table-column column-width="25%"/>
3254
+ <fo:table-column column-width="75%"/>
3255
+ </xsl:if>
3256
+ <xsl:apply-templates mode="requirement"/>
3257
+ </fo:table>
3258
+ <!-- fn processing -->
3259
+ <xsl:if test=".//*[local-name() = 'fn']">
3260
+ <xsl:for-each select="*[local-name() = 'tbody']">
3261
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3262
+ <xsl:call-template name="fn_display"/>
3263
+ </fo:block>
3264
+ </xsl:for-each>
3265
+ </xsl:if>
3266
+ </fo:block-container>
3267
+ </fo:block-container>
3268
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
3269
+ <fo:table-header>
3270
+ <xsl:apply-templates mode="requirement"/>
3271
+ </fo:table-header>
3272
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
3273
+ <fo:table-body>
3274
+ <xsl:apply-templates mode="requirement"/>
3275
+ </fo:table-body>
3276
+ </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3277
+ <fo:table-row height="7mm">
3278
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3279
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3280
+ </xsl:if>
3281
+ <xsl:apply-templates mode="requirement"/>
3282
+ </fo:table-row>
3283
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3284
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3285
+ <xsl:attribute name="text-align">
3286
+ <xsl:choose>
3287
+ <xsl:when test="@align">
3288
+ <xsl:value-of select="@align"/>
3289
+ </xsl:when>
3290
+ <xsl:otherwise>left</xsl:otherwise>
3291
+ </xsl:choose>
3292
+ </xsl:attribute>
3293
+ <xsl:if test="@colspan">
3294
+ <xsl:attribute name="number-columns-spanned">
3295
+ <xsl:value-of select="@colspan"/>
3296
+ </xsl:attribute>
3297
+ </xsl:if>
3298
+ <xsl:if test="@rowspan">
3299
+ <xsl:attribute name="number-rows-spanned">
3300
+ <xsl:value-of select="@rowspan"/>
3301
+ </xsl:attribute>
3302
+ </xsl:if>
3303
+
3304
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3305
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3306
+ <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3307
+ </xsl:if>
3308
+ <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3309
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3310
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3311
+ </xsl:if> -->
3312
+
3313
+ <fo:block>
3314
+ <xsl:apply-templates/>
3315
+ </fo:block>
3316
+ </fo:table-cell>
3317
+ </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3318
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3319
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3320
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3321
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3322
+ </xsl:if>
3323
+ <xsl:attribute name="text-align">
3324
+ <xsl:choose>
3325
+ <xsl:when test="@align">
3326
+ <xsl:value-of select="@align"/>
3327
+ </xsl:when>
3328
+ <xsl:otherwise>left</xsl:otherwise>
3329
+ </xsl:choose>
3330
+ </xsl:attribute>
3331
+ <xsl:if test="@colspan">
3332
+ <xsl:attribute name="number-columns-spanned">
3333
+ <xsl:value-of select="@colspan"/>
3334
+ </xsl:attribute>
3335
+ </xsl:if>
3336
+ <xsl:if test="@rowspan">
3337
+ <xsl:attribute name="number-rows-spanned">
3338
+ <xsl:value-of select="@rowspan"/>
3339
+ </xsl:attribute>
3340
+ </xsl:if>
3341
+
3342
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3343
+ <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3344
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3345
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3346
+ <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3347
+ </xsl:if>
3348
+ </xsl:if> -->
3349
+ <!-- 2nd line and below -->
3350
+
3351
+ <fo:block>
3352
+ <xsl:apply-templates/>
3353
+ </fo:block>
3354
+ </fo:table-cell>
3355
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3356
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3357
+ <xsl:apply-templates/>
3358
+ </fo:block>
3359
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3360
+ <fo:block> <!-- margin-bottom="10pt" -->
3361
+ <xsl:apply-templates/>
3362
+ </fo:block>
3363
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']">
3364
+ <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
3365
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3366
+ <xsl:apply-templates/>
3367
+ </fo:block>
3368
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
3369
+ <xsl:if test="normalize-space() != ''">
3370
+ <fo:inline xsl:use-attribute-sets="termexample-name-style">
3371
+ <xsl:apply-templates/>
3372
+ </fo:inline>
3373
+ </xsl:if>
3374
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
3375
+ <fo:inline><xsl:apply-templates/></fo:inline>
3376
+ </xsl:template><xsl:template match="*[local-name() = 'example']">
3377
+ <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
3378
+
3379
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3380
+
3381
+ <xsl:variable name="element">
3382
+ block
3383
+
3384
+ </xsl:variable>
3385
+
3386
+ <xsl:choose>
3387
+ <xsl:when test="normalize-space($element) = 'block'">
3388
+ <fo:block xsl:use-attribute-sets="example-body-style">
3389
+ <xsl:apply-templates/>
3390
+ </fo:block>
3391
+ </xsl:when>
3392
+ <xsl:otherwise>
3393
+ <fo:inline>
3394
+ <xsl:apply-templates/>
3395
+ </fo:inline>
3396
+ </xsl:otherwise>
3397
+ </xsl:choose>
3398
+
3399
+ </fo:block>
3400
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
3401
+
3402
+ <xsl:variable name="element">
3403
+
3404
+ inline
3405
+ </xsl:variable>
3406
+ <xsl:choose>
3407
+ <xsl:when test="ancestor::*[local-name() = 'appendix']">
3408
+ <fo:inline>
3409
+ <xsl:apply-templates/>
3410
+ </fo:inline>
3411
+ </xsl:when>
3412
+ <xsl:when test="normalize-space($element) = 'block'">
3413
+ <fo:block xsl:use-attribute-sets="example-name-style">
3414
+ <xsl:apply-templates/>
3415
+ </fo:block>
3416
+ </xsl:when>
3417
+ <xsl:otherwise>
3418
+ <fo:inline xsl:use-attribute-sets="example-name-style">
3419
+ <xsl:apply-templates/>
3420
+ </fo:inline>
3332
3421
  </xsl:otherwise>
3333
3422
  </xsl:choose>
3334
- </xsl:template><xsl:template name="capitalize">
3335
- <xsl:param name="str"/>
3336
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
3337
- <xsl:value-of select="substring($str, 2)"/>
3338
- </xsl:template><xsl:template match="mathml:math">
3339
- <fo:inline font-family="STIX2Math">
3340
- <fo:instream-foreign-object fox:alt-text="Math">
3341
- <xsl:copy-of select="."/>
3342
- </fo:instream-foreign-object>
3343
- </fo:inline>
3344
- </xsl:template><xsl:template match="*[local-name()='localityStack']">
3345
- <xsl:for-each select="*[local-name()='locality']">
3346
- <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3347
- <xsl:apply-templates select="."/>
3348
- <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3349
- </xsl:for-each>
3350
- </xsl:template><xsl:template match="*[local-name()='link']" name="link">
3351
- <xsl:variable name="target">
3423
+
3424
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3425
+ <fo:block xsl:use-attribute-sets="example-p-style">
3426
+
3427
+ <xsl:apply-templates/>
3428
+ </fo:block>
3429
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3430
+ <fo:block xsl:use-attribute-sets="termsource-style">
3431
+ <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3432
+ <xsl:variable name="termsource_text">
3433
+ <xsl:apply-templates/>
3434
+ </xsl:variable>
3352
3435
  <xsl:choose>
3353
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3354
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3436
+ <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3437
+ <xsl:apply-templates/>
3355
3438
  </xsl:when>
3356
3439
  <xsl:otherwise>
3357
- <xsl:value-of select="normalize-space(@target)"/>
3440
+ <xsl:text>[</xsl:text>
3441
+ <xsl:apply-templates/>
3442
+ <xsl:text>]</xsl:text>
3358
3443
  </xsl:otherwise>
3359
3444
  </xsl:choose>
3445
+ </fo:block>
3446
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
3447
+ <xsl:if test="normalize-space() != ''">
3448
+ <xsl:value-of select="."/>
3449
+ </xsl:if>
3450
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
3451
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3452
+
3453
+ <fo:inline xsl:use-attribute-sets="origin-style">
3454
+ <xsl:apply-templates/>
3455
+ </fo:inline>
3456
+ </fo:basic-link>
3457
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
3458
+ <fo:inline><xsl:apply-templates/></fo:inline>
3459
+ </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
3460
+ <xsl:if test="normalize-space() != ''">
3461
+ <xsl:value-of select="."/>
3462
+ </xsl:if>
3463
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3464
+
3465
+ <fo:block xsl:use-attribute-sets="quote-style">
3466
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3467
+ </fo:block>
3468
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3469
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3470
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3471
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3472
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3473
+ </fo:block>
3474
+ </xsl:if>
3475
+ </xsl:template><xsl:template match="*[local-name() = 'source']">
3476
+ <xsl:if test="../*[local-name() = 'author']">
3477
+ <xsl:text>, </xsl:text>
3478
+ </xsl:if>
3479
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3480
+ <xsl:apply-templates/>
3481
+ </fo:basic-link>
3482
+ </xsl:template><xsl:template match="*[local-name() = 'author']">
3483
+ <xsl:text>— </xsl:text>
3484
+ <xsl:apply-templates/>
3485
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
3486
+ <fo:inline xsl:use-attribute-sets="eref-style">
3487
+ <xsl:if test="@type = 'footnote'">
3488
+
3489
+
3490
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3491
+ <xsl:attribute name="font-size">50%</xsl:attribute>
3492
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3493
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3494
+
3495
+ </xsl:if>
3496
+
3497
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3498
+
3499
+ <xsl:if test="@type = 'inline'">
3500
+
3501
+
3502
+ </xsl:if>
3503
+
3504
+
3505
+ <xsl:apply-templates/>
3506
+ </fo:basic-link>
3507
+ </fo:inline>
3508
+ </xsl:template><xsl:template match="*[local-name() = 'tab']">
3509
+ <!-- zero-space char -->
3510
+ <xsl:variable name="depth">
3511
+ <xsl:call-template name="getLevel">
3512
+ <xsl:with-param name="depth" select="../@depth"/>
3513
+ </xsl:call-template>
3360
3514
  </xsl:variable>
3361
- <fo:inline xsl:use-attribute-sets="link-style">
3515
+
3516
+ <xsl:variable name="padding">
3517
+
3518
+
3519
+ 3
3520
+
3521
+
3522
+
3523
+
3524
+
3525
+
3526
+
3527
+
3528
+
3529
+
3530
+
3531
+
3532
+
3533
+
3534
+ </xsl:variable>
3535
+
3536
+ <xsl:variable name="padding-right">
3362
3537
  <xsl:choose>
3363
- <xsl:when test="$target = ''">
3364
- <xsl:apply-templates/>
3365
- </xsl:when>
3538
+ <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
3366
3539
  <xsl:otherwise>
3367
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3368
- <xsl:choose>
3369
- <xsl:when test="normalize-space(.) = ''">
3370
- <xsl:value-of select="$target"/>
3371
- </xsl:when>
3372
- <xsl:otherwise>
3373
- <xsl:apply-templates/>
3374
- </xsl:otherwise>
3375
- </xsl:choose>
3376
- </fo:basic-link>
3540
+ <xsl:value-of select="normalize-space($padding)"/>
3377
3541
  </xsl:otherwise>
3378
3542
  </xsl:choose>
3379
- </fo:inline>
3380
- </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3381
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3382
- <!-- <xsl:choose>
3383
- <xsl:when test="@lang = 'en'"></xsl:when>
3384
- <xsl:otherwise> -->
3385
- <xsl:attribute name="white-space">pre</xsl:attribute>
3386
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3387
- <!-- </xsl:otherwise>
3388
- </xsl:choose> -->
3543
+ </xsl:variable>
3544
+
3545
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3546
+
3547
+ <xsl:choose>
3548
+ <xsl:when test="$language = 'zh'">
3549
+ <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
3550
+ </xsl:when>
3551
+ <xsl:when test="../../@inline-header = 'true'">
3552
+ <fo:inline font-size="90%">
3553
+ <xsl:call-template name="insertNonBreakSpaces">
3554
+ <xsl:with-param name="count" select="$padding-right"/>
3555
+ </xsl:call-template>
3556
+ </fo:inline>
3557
+ </xsl:when>
3558
+ <xsl:otherwise>
3559
+ <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
3560
+ </xsl:otherwise>
3561
+ </xsl:choose>
3562
+
3563
+ </xsl:template><xsl:template name="insertNonBreakSpaces">
3564
+ <xsl:param name="count"/>
3565
+ <xsl:if test="$count &gt; 0">
3566
+ <xsl:text> </xsl:text>
3567
+ <xsl:call-template name="insertNonBreakSpaces">
3568
+ <xsl:with-param name="count" select="$count - 1"/>
3569
+ </xsl:call-template>
3570
+ </xsl:if>
3571
+ </xsl:template><xsl:template match="*[local-name() = 'domain']">
3572
+ <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
3573
+ <xsl:text> </xsl:text>
3574
+ </xsl:template><xsl:template match="*[local-name() = 'admitted']">
3575
+ <fo:block xsl:use-attribute-sets="admitted-style">
3389
3576
  <xsl:apply-templates/>
3390
3577
  </fo:block>
3391
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
3392
- <fo:inline id="{@id}"/>
3393
- </xsl:template><xsl:template match="*[local-name()='appendix']">
3394
- <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3395
- <xsl:variable name="title-appendix">
3396
- <xsl:call-template name="getTitle">
3397
- <xsl:with-param name="name" select="'title-appendix'"/>
3398
- </xsl:call-template>
3399
- </xsl:variable>
3400
- <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
3401
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3578
+ </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3579
+ <xsl:variable name="title-deprecated">
3580
+ <xsl:call-template name="getTitle">
3581
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3582
+ </xsl:call-template>
3583
+ </xsl:variable>
3584
+ <fo:block xsl:use-attribute-sets="deprecates-style">
3585
+ <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
3586
+ </fo:block>
3587
+ </xsl:template><xsl:template match="*[local-name() = 'definition']">
3588
+ <fo:block xsl:use-attribute-sets="definition-style">
3589
+ <xsl:apply-templates/>
3402
3590
  </fo:block>
3591
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
3403
3592
  <xsl:apply-templates/>
3404
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3405
- <fo:inline><xsl:apply-templates/></fo:inline>
3406
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
3407
- <fo:block xsl:use-attribute-sets="appendix-example-style">
3408
- <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
3409
- <xsl:variable name="title-example">
3410
- <xsl:call-template name="getTitle">
3411
- <xsl:with-param name="name" select="'title-example'"/>
3412
- </xsl:call-template>
3413
- </xsl:variable>
3414
- <xsl:value-of select="$title-example"/>
3415
- <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
3416
- <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
3593
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
3594
+ <fo:inline> <xsl:apply-templates/></fo:inline>
3595
+ <fo:block> </fo:block>
3596
+ </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
3597
+
3598
+ <fo:block>
3599
+ <xsl:call-template name="setId"/>
3600
+
3601
+
3602
+
3603
+ <xsl:variable name="pos"><xsl:number count="gb:sections/gb:clause | gb:sections/gb:terms"/></xsl:variable>
3604
+ <xsl:if test="$pos &gt;= 2">
3605
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
3417
3606
  </xsl:if>
3418
- <xsl:if test="*[local-name()='name']">
3419
- <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
3420
- </xsl:if>
3607
+
3608
+
3609
+
3610
+
3611
+
3612
+
3613
+
3614
+
3615
+ <xsl:apply-templates/>
3616
+ </fo:block>
3617
+
3618
+
3619
+
3620
+ </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
3621
+ <fo:block break-after="page"/>
3622
+ <fo:block>
3623
+ <xsl:call-template name="setId"/>
3624
+ <xsl:apply-templates/>
3625
+ </fo:block>
3626
+ </xsl:template><xsl:template match="*[local-name() = 'clause']">
3627
+ <fo:block>
3628
+ <xsl:call-template name="setId"/>
3629
+ <xsl:apply-templates/>
3630
+ </fo:block>
3631
+ </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3632
+ <fo:block id="{@id}">
3633
+ <xsl:apply-templates/>
3634
+ </fo:block>
3635
+ </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
3636
+
3637
+ <fo:block id="{@id}">
3638
+ <xsl:apply-templates/>
3639
+ </fo:block>
3640
+ </xsl:template><xsl:template match="*[local-name() = 'annex']">
3641
+ <fo:block break-after="page"/>
3642
+ <fo:block id="{@id}">
3643
+
3421
3644
  </fo:block>
3422
3645
  <xsl:apply-templates/>
3423
- </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">
3424
- <fo:inline><xsl:apply-templates/></fo:inline>
3425
- </xsl:template><xsl:template match="*[local-name() = 'callout']">
3426
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3427
- </xsl:template><xsl:template match="*[local-name() = 'annotation']">
3428
- <xsl:variable name="annotation-id" select="@id"/>
3429
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3430
- <fo:block id="{$annotation-id}" white-space="nowrap">
3431
- <fo:inline>
3432
- <xsl:apply-templates>
3433
- <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
3434
- </xsl:apply-templates>
3435
- </fo:inline>
3436
- </fo:block>
3437
- </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
3438
- <xsl:param name="callout"/>
3439
- <fo:inline id="{@id}">
3440
- <!-- for first p in annotation, put <x> -->
3441
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3646
+ </xsl:template><xsl:template match="*[local-name() = 'review']">
3647
+ <!-- comment 2019-11-29 -->
3648
+ <!-- <fo:block font-weight="bold">Review:</fo:block>
3649
+ <xsl:apply-templates /> -->
3650
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3651
+ <!-- 0xA0 to space replacement -->
3652
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3653
+ </xsl:template><xsl:template match="*[local-name() = 'errata']">
3654
+ <!-- <row>
3655
+ <date>05-07-2013</date>
3656
+ <type>Editorial</type>
3657
+ <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
3658
+ <pages>D-3</pages>
3659
+ </row>
3660
+ -->
3661
+ <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
3662
+ <fo:table-column column-width="20mm"/>
3663
+ <fo:table-column column-width="23mm"/>
3664
+ <fo:table-column column-width="107mm"/>
3665
+ <fo:table-column column-width="15mm"/>
3666
+ <fo:table-body>
3667
+ <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
3668
+ <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3669
+ <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3670
+ <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
3671
+ <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
3672
+ </fo:table-row>
3673
+ <xsl:apply-templates/>
3674
+ </fo:table-body>
3675
+ </fo:table>
3676
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
3677
+ <fo:table-row>
3442
3678
  <xsl:apply-templates/>
3443
- </fo:inline>
3444
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
3445
- <xsl:variable name="title-modified">
3446
- <xsl:call-template name="getTitle">
3447
- <xsl:with-param name="name" select="'title-modified'"/>
3448
- </xsl:call-template>
3449
- </xsl:variable>
3679
+ </fo:table-row>
3680
+ </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
3681
+ <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3682
+ <fo:block><xsl:apply-templates/></fo:block>
3683
+ </fo:table-cell>
3684
+ </xsl:template><xsl:template name="processBibitem">
3685
+
3686
+ </xsl:template><xsl:template name="processPersonalAuthor">
3450
3687
  <xsl:choose>
3451
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3452
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
3688
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3689
+ <author>
3690
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3691
+ </author>
3692
+ </xsl:when>
3693
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3694
+ <author>
3695
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3696
+ <xsl:text> </xsl:text>
3697
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3698
+ </author>
3699
+ </xsl:when>
3700
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3701
+ <author>
3702
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3703
+ <xsl:text> </xsl:text>
3704
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3705
+ </author>
3706
+ </xsl:when>
3707
+ <xsl:otherwise>
3708
+ <xsl:apply-templates/>
3709
+ </xsl:otherwise>
3453
3710
  </xsl:choose>
3454
- <xsl:apply-templates/>
3711
+ </xsl:template><xsl:template name="renderDate">
3712
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3713
+ <xsl:value-of select="*[local-name() = 'on']"/>
3714
+ </xsl:if>
3715
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3716
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3717
+ </xsl:if>
3718
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3719
+ <xsl:value-of select="translate(.,'. ','')"/>
3720
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3721
+ <xsl:value-of select="substring(.,1,1)"/>
3455
3722
  </xsl:template><xsl:template name="convertDate">
3456
3723
  <xsl:param name="date"/>
3457
3724
  <xsl:param name="format" select="'short'"/>
@@ -3584,27 +3851,49 @@
3584
3851
  </xsl:otherwise>
3585
3852
  </xsl:choose>
3586
3853
  </xsl:template><xsl:template name="getLevel">
3587
- <xsl:variable name="level_total" select="count(ancestor::*)"/>
3588
- <xsl:variable name="level">
3589
- <xsl:choose>
3590
- <xsl:when test="ancestor::*[local-name() = 'preface']">
3591
- <xsl:value-of select="$level_total - 2"/>
3592
- </xsl:when>
3593
- <xsl:when test="ancestor::*[local-name() = 'sections']">
3594
- <xsl:value-of select="$level_total - 2"/>
3595
- </xsl:when>
3596
- <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3597
- <xsl:value-of select="$level_total - 2"/>
3598
- </xsl:when>
3599
- <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3600
- <xsl:otherwise>
3601
- <xsl:value-of select="$level_total - 1"/>
3602
- </xsl:otherwise>
3603
- </xsl:choose>
3604
- </xsl:variable>
3605
- <xsl:value-of select="$level"/>
3606
- </xsl:template><xsl:template name="getSubSection">
3607
- <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']"/>
3854
+ <xsl:param name="depth"/>
3855
+ <xsl:choose>
3856
+ <xsl:when test="normalize-space(@depth) != ''">
3857
+ <xsl:value-of select="@depth"/>
3858
+ </xsl:when>
3859
+ <xsl:when test="normalize-space($depth) != ''">
3860
+ <xsl:value-of select="$depth"/>
3861
+ </xsl:when>
3862
+ <xsl:otherwise>
3863
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
3864
+ <xsl:variable name="level">
3865
+ <xsl:choose>
3866
+ <xsl:when test="parent::*[local-name() = 'preface']">
3867
+ <xsl:value-of select="$level_total - 1"/>
3868
+ </xsl:when>
3869
+ <xsl:when test="ancestor::*[local-name() = 'preface']">
3870
+ <xsl:value-of select="$level_total - 2"/>
3871
+ </xsl:when>
3872
+ <!-- <xsl:when test="parent::*[local-name() = 'sections']">
3873
+ <xsl:value-of select="$level_total - 1"/>
3874
+ </xsl:when> -->
3875
+ <xsl:when test="ancestor::*[local-name() = 'sections']">
3876
+ <xsl:value-of select="$level_total - 1"/>
3877
+ </xsl:when>
3878
+ <xsl:when test="ancestor::*[local-name() = 'bibliography']">
3879
+ <xsl:value-of select="$level_total - 1"/>
3880
+ </xsl:when>
3881
+ <xsl:when test="parent::*[local-name() = 'annex']">
3882
+ <xsl:value-of select="$level_total - 1"/>
3883
+ </xsl:when>
3884
+ <xsl:when test="ancestor::*[local-name() = 'annex']">
3885
+ <xsl:value-of select="$level_total"/>
3886
+ </xsl:when>
3887
+ <xsl:when test="local-name() = 'annex'">1</xsl:when>
3888
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
3889
+ <xsl:otherwise>
3890
+ <xsl:value-of select="$level_total - 1"/>
3891
+ </xsl:otherwise>
3892
+ </xsl:choose>
3893
+ </xsl:variable>
3894
+ <xsl:value-of select="$level"/>
3895
+ </xsl:otherwise>
3896
+ </xsl:choose>
3608
3897
  </xsl:template><xsl:template name="split">
3609
3898
  <xsl:param name="pText" select="."/>
3610
3899
  <xsl:param name="sep" select="','"/>
@@ -3635,7 +3924,8 @@
3635
3924
 
3636
3925
 
3637
3926
  <xsl:value-of select="document('')//*/namespace::gb"/>
3638
-
3927
+
3928
+
3639
3929
  </xsl:variable>
3640
3930
  <xsl:if test="$documentNS != $XSLNS">
3641
3931
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -3650,4 +3940,15 @@
3650
3940
  <xsl:when test="$language = 'cn'">Chinese</xsl:when>
3651
3941
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3652
3942
  </xsl:choose>
3943
+ </xsl:template><xsl:template name="setId">
3944
+ <xsl:attribute name="id">
3945
+ <xsl:choose>
3946
+ <xsl:when test="@id">
3947
+ <xsl:value-of select="@id"/>
3948
+ </xsl:when>
3949
+ <xsl:otherwise>
3950
+ <xsl:value-of select="generate-id()"/>
3951
+ </xsl:otherwise>
3952
+ </xsl:choose>
3953
+ </xsl:attribute>
3653
3954
  </xsl:template></xsl:stylesheet>