metanorma-mpfa 0.7.4 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,8 +12,7 @@
12
12
 
13
13
 
14
14
  <xsl:variable name="debug">false</xsl:variable>
15
- <xsl:variable name="pageWidth" select="210"/>
16
- <xsl:variable name="pageHeight" select="297"/>
15
+
17
16
  <xsl:variable name="marginLeftRight1" select="19"/>
18
17
  <xsl:variable name="marginLeftRight2" select="19"/>
19
18
  <xsl:variable name="marginTop" select="16.5"/>
@@ -63,7 +62,7 @@
63
62
 
64
63
  <xsl:template match="/">
65
64
  <xsl:call-template name="namespaceCheck"/>
66
- <fo:root font-family="Arial" font-size="10.5pt" xml:lang="{$lang}">
65
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
67
66
  <fo:layout-master-set>
68
67
 
69
68
  <!-- cover page -->
@@ -153,9 +152,11 @@
153
152
  <xsl:with-param name="name" select="'title-edition'"/>
154
153
  </xsl:call-template>
155
154
  <xsl:value-of select="$linebreak"/>
156
- <xsl:call-template name="formatDate">
155
+ <xsl:call-template name="convertDate">
157
156
  <xsl:with-param name="date" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:revision-date"/>
158
- </xsl:call-template>
157
+ <xsl:with-param name="format">ddMMyyyy</xsl:with-param>
158
+ </xsl:call-template>
159
+
159
160
  </fo:block>
160
161
  <fo:block>Hong Kong</fo:block>
161
162
  </fo:block-container>
@@ -265,9 +266,6 @@
265
266
  <!-- ============================= -->
266
267
  <!-- CONTENTS -->
267
268
  <!-- ============================= -->
268
- <xsl:template match="node()" mode="contents">
269
- <xsl:apply-templates mode="contents"/>
270
- </xsl:template>
271
269
 
272
270
  <!-- element with title -->
273
271
  <xsl:template match="*[mpfd:title]" mode="contents">
@@ -322,8 +320,6 @@
322
320
  <fo:inline> </fo:inline>
323
321
  </xsl:template>
324
322
 
325
-
326
- <xsl:template match="mpfd:bibitem" mode="contents"/>
327
323
 
328
324
  <xsl:template match="mpfd:references" mode="contents">
329
325
  <xsl:apply-templates mode="contents"/>
@@ -332,7 +328,9 @@
332
328
 
333
329
  <xsl:template name="getListItemFormat">
334
330
  <xsl:choose>
335
- <xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!--• dash -->
331
+ <xsl:when test="local-name(..) = 'ul'">
332
+ <xsl:call-template name="setULLabel"/>
333
+ </xsl:when>
336
334
  <xsl:otherwise> <!-- for ordered lists -->
337
335
  <xsl:choose>
338
336
  <xsl:when test="../@type = 'arabic'">
@@ -357,7 +355,7 @@
357
355
 
358
356
 
359
357
 
360
- <xsl:template match="mpfd:title">
358
+ <xsl:template match="mpfd:title" name="title">
361
359
 
362
360
  <xsl:variable name="level">
363
361
  <xsl:call-template name="getLevel"/>
@@ -401,7 +399,7 @@
401
399
  </xsl:template>
402
400
 
403
401
 
404
- <xsl:template match="mpfd:p">
402
+ <xsl:template match="mpfd:p" name="paragraph">
405
403
  <xsl:param name="inline" select="'false'"/>
406
404
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
407
405
  <xsl:variable name="element-name">
@@ -459,55 +457,6 @@
459
457
  </xsl:template>
460
458
 
461
459
 
462
-
463
- <xsl:template match="mpfd:bibitem">
464
- <fo:block id="{@id}" margin-bottom="12pt" text-indent="-11.7mm" margin-left="11.7mm"> <!-- 12 pt -->
465
- <!-- mpfd:docidentifier -->
466
- <xsl:if test="mpfd:docidentifier">
467
- <xsl:choose>
468
- <xsl:when test="mpfd:docidentifier/@type = 'metanorma'"/>
469
- <xsl:otherwise><fo:inline><xsl:value-of select="mpfd:docidentifier"/></fo:inline></xsl:otherwise>
470
- </xsl:choose>
471
- </xsl:if>
472
- <xsl:apply-templates select="mpfd:note"/>
473
- <xsl:if test="mpfd:docidentifier">, </xsl:if>
474
- <fo:inline font-style="italic">
475
- <xsl:choose>
476
- <xsl:when test="mpfd:title[@type = 'main' and @language = 'en']">
477
- <xsl:value-of select="mpfd:title[@type = 'main' and @language = 'en']"/>
478
- </xsl:when>
479
- <xsl:otherwise>
480
- <xsl:value-of select="mpfd:title"/>
481
- </xsl:otherwise>
482
- </xsl:choose>
483
- </fo:inline>
484
- </fo:block>
485
- </xsl:template>
486
-
487
-
488
- <xsl:template match="mpfd:bibitem/mpfd:note">
489
- <fo:footnote>
490
- <xsl:variable name="number">
491
- <xsl:number level="any" count="mpfd:bibitem/mpfd:note"/>
492
- </xsl:variable>
493
- <fo:inline font-size="7pt" keep-with-previous.within-line="always" baseline-shift="30%">
494
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
495
- <xsl:value-of select="$number"/>
496
- </fo:basic-link>
497
- </fo:inline>
498
- <fo:footnote-body>
499
- <fo:block font-size="9pt" margin-bottom="4pt" start-indent="0pt">
500
- <fo:inline font-size="6pt" id="{generate-id()}" keep-with-next.within-line="always" baseline-shift="30%" padding-right="1mm"><!-- alignment-baseline="hanging" font-size="60%" -->
501
- <xsl:value-of select="$number"/>
502
- </fo:inline>
503
- <xsl:apply-templates/>
504
- </fo:block>
505
- </fo:footnote-body>
506
- </fo:footnote>
507
- </xsl:template>
508
-
509
-
510
-
511
460
  <xsl:template match="mpfd:ul | mpfd:ol" mode="ul_ol">
512
461
  <fo:block-container margin-left="0mm">
513
462
  <xsl:variable name="margin-left">
@@ -523,7 +472,7 @@
523
472
  <xsl:if test="local-name() = 'ol'">
524
473
  <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
525
474
  </xsl:if>
526
- <xsl:apply-templates/>
475
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
527
476
  </fo:list-block>
528
477
  <xsl:for-each select="./mpfd:note//mpfd:p">
529
478
  <xsl:call-template name="note"/>
@@ -532,31 +481,20 @@
532
481
  </fo:block-container>
533
482
  </xsl:template>
534
483
 
535
- <xsl:template match="mpfd:ul//mpfd:note | mpfd:ol//mpfd:note" priority="2"/>
536
-
537
484
  <xsl:template match="mpfd:li">
538
485
  <fo:list-item id="{@id}">
539
486
  <fo:list-item-label end-indent="label-end()">
540
487
  <fo:block>
541
- <!-- to vertical align big dot -->
542
- <!-- <xsl:if test="local-name(..) = 'ul'">
543
- <xsl:attribute name="font-size">18pt</xsl:attribute>
544
- <xsl:attribute name="margin-top">-0.5mm</xsl:attribute>
545
- </xsl:if> -->
546
488
  <xsl:call-template name="getListItemFormat"/>
547
489
  </fo:block>
548
490
  </fo:list-item-label>
549
491
  <fo:list-item-body start-indent="body-start()">
550
- <xsl:apply-templates/>
551
- <xsl:apply-templates select=".//mpfd:note" mode="process"/>
492
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
493
+ <xsl:apply-templates select=".//mpfd:note"/>
552
494
  </fo:list-item-body>
553
495
  </fo:list-item>
554
496
  </xsl:template>
555
497
 
556
- <xsl:template match="mpfd:note" mode="process">
557
- <xsl:call-template name="note"/>
558
- </xsl:template>
559
-
560
498
 
561
499
  <xsl:template match="mpfd:preferred">
562
500
  <fo:inline font-weight="bold">
@@ -577,78 +515,12 @@
577
515
  </xsl:template>
578
516
 
579
517
 
580
- <xsl:template match="mpfd:references">
581
- <fo:block break-after="page"/>
582
- <xsl:apply-templates/>
583
- <fo:block id="{@id}">
584
- <xsl:apply-templates/>
585
- </fo:block>
586
- </xsl:template>
587
-
588
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
589
- <xsl:template match="mpfd:references/mpfd:bibitem">
590
- <fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="12mm">
591
- <fo:list-item>
592
- <fo:list-item-label end-indent="label-end()">
593
- <fo:block>
594
- <fo:inline>
595
- <xsl:number format="[1]"/>
596
- </fo:inline>
597
- </fo:block>
598
- </fo:list-item-label>
599
- <fo:list-item-body start-indent="body-start()">
600
- <fo:block text-align="justify">
601
- <xsl:variable name="docidentifier">
602
- <xsl:if test="mpfd:docidentifier">
603
- <xsl:choose>
604
- <xsl:when test="mpfd:docidentifier/@type = 'metanorma'"/>
605
- <xsl:otherwise><xsl:value-of select="mpfd:docidentifier"/></xsl:otherwise>
606
- </xsl:choose>
607
- </xsl:if>
608
- </xsl:variable>
609
- <fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
610
- <xsl:apply-templates select="mpfd:note"/>
611
- <xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
612
- <xsl:choose>
613
- <xsl:when test="mpfd:title[@type = 'main' and @language = 'en']">
614
- <xsl:apply-templates select="mpfd:title[@type = 'main' and @language = 'en']"/>
615
- </xsl:when>
616
- <xsl:otherwise>
617
- <xsl:apply-templates select="mpfd:title"/>
618
- </xsl:otherwise>
619
- </xsl:choose>
620
- <xsl:apply-templates select="mpfd:formattedref"/>
621
- </fo:block>
622
- </fo:list-item-body>
623
- </fo:list-item>
624
- </fo:list-block>
625
- </xsl:template>
626
-
627
- <xsl:template match="mpfd:references[not(@normative='true')]/mpfd:bibitem" mode="contents"/>
628
-
629
- <xsl:template match="mpfd:references[not(@normative='true')]/mpfd:bibitem/mpfd:title">
630
- <fo:inline font-style="italic">
631
- <xsl:apply-templates/>
632
- </fo:inline>
633
- </xsl:template>
634
-
635
-
636
- <xsl:template match="mpfd:admonition">
637
- <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
638
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
639
- </fo:block>
640
- <fo:block font-weight="bold">
641
- <xsl:apply-templates/>
642
- </fo:block>
643
- </xsl:template>
644
-
645
-
646
518
  <xsl:template match="mpfd:formula/mpfd:stem">
647
519
  <fo:block margin-top="14pt" margin-bottom="14pt" text-align-last="justify">
648
520
  <fo:inline padding-left="5mm"><xsl:apply-templates/></fo:inline>
649
521
  <fo:inline keep-together.within-line="always">
650
522
  <fo:leader leader-pattern="space"/>
651
- <xsl:apply-templates select="../mpfd:name" mode="presentation"/>
523
+ <xsl:apply-templates select="../mpfd:name" mode="formula_number"/>
652
524
  </fo:inline>
653
525
  </fo:block>
654
526
  </xsl:template>
@@ -656,31 +528,6 @@
656
528
  <xsl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52p1EO8ASAgi4pNGU1M/qPw6LFRQZ7isAPKAiPhmoKfv9yp6zW2s4yOyrABsgIiUwUjjAKU2cgzCcaYfAGAERKQsBiomf11EvuL8lSEcAA5ARMqk0fqSqbO04KtINC4NrAcAHgARKZ+BCsrYoLtrrmJxoR+k5AI4AxGpi0bjJ0P9nFJU5ppBdRkJBwA4BxGBgX6MVGSGekXazwcbXJ25fr5RkQifr0m/BSgXRAQAALaGVvAAALA1iAgAAGwNIgIAAFuDiAAAwNYgIgAAsDWICAAAbA0iAgAAW4OIAADA1iAiAACwNYgIAABsDSICAADbISL/H/43USH4U9y8AAAAAElFTkSuQmCC</xsl:text>
658
530
  </xsl:variable>
659
-
660
- <!-- convert date from format 2007-04-01 to 1 April 2007-->
661
- <xsl:template name="formatDate">
662
- <xsl:param name="date"/>
663
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
664
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
665
- <xsl:variable name="day" select="number(substring($date, 9, 2))"/>
666
- <xsl:variable name="monthStr">
667
- <xsl:choose>
668
- <xsl:when test="$month = '01'">January</xsl:when>
669
- <xsl:when test="$month = '02'">February</xsl:when>
670
- <xsl:when test="$month = '03'">March</xsl:when>
671
- <xsl:when test="$month = '04'">April</xsl:when>
672
- <xsl:when test="$month = '05'">May</xsl:when>
673
- <xsl:when test="$month = '06'">June</xsl:when>
674
- <xsl:when test="$month = '07'">July</xsl:when>
675
- <xsl:when test="$month = '08'">August</xsl:when>
676
- <xsl:when test="$month = '09'">September</xsl:when>
677
- <xsl:when test="$month = '10'">October</xsl:when>
678
- <xsl:when test="$month = '11'">November</xsl:when>
679
- <xsl:when test="$month = '12'">December</xsl:when>
680
- </xsl:choose>
681
- </xsl:variable>
682
- <xsl:value-of select="normalize-space(concat($day, ' ', $monthStr, ' ', $year))"/>
683
- </xsl:template>
684
531
 
685
532
  <xsl:template name="insertHeaderFooter">
686
533
  <xsl:param name="font-weight">normal</xsl:param>
@@ -737,27 +584,23 @@
737
584
  </xsl:template>
738
585
 
739
586
 
740
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
741
-
742
- <title-annex lang="en">Annex </title-annex>
743
- <title-annex lang="fr">Annexe </title-annex>
744
-
745
-
587
+ <xsl:variable name="pageWidth_">
588
+ 210
589
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
590
+ 297
591
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
746
592
 
747
593
  <title-edition lang="en">
748
594
 
749
- <xsl:text>Edition </xsl:text>
750
-
751
-
595
+ <xsl:text>Edition </xsl:text>
596
+
752
597
  </title-edition>
753
598
 
754
599
  <title-edition lang="fr">
755
-
756
- <xsl:text>Édition </xsl:text>
757
-
600
+ <xsl:text>Édition </xsl:text>
758
601
  </title-edition>
759
602
 
760
-
603
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
761
604
  <title-toc lang="en">
762
605
 
763
606
  <xsl:text>Contents</xsl:text>
@@ -766,22 +609,13 @@
766
609
 
767
610
  </title-toc>
768
611
  <title-toc lang="fr">
612
+ <xsl:text>Sommaire</xsl:text>
613
+ </title-toc>
614
+ <title-toc lang="zh">
769
615
 
770
- <xsl:text>Sommaire</xsl:text>
771
-
772
-
773
- </title-toc>
774
-
775
-
776
-
777
- <title-page lang="en">Page</title-page>
778
- <title-page lang="fr">Page</title-page>
779
-
780
- <title-key lang="en">Key</title-key>
781
- <title-key lang="fr">Légende</title-key>
782
-
783
- <title-where lang="en">where</title-where>
784
- <title-where lang="fr">où</title-where>
616
+ <xsl:text>Contents</xsl:text>
617
+
618
+ </title-toc>
785
619
 
786
620
  <title-descriptors lang="en">Descriptors</title-descriptors>
787
621
 
@@ -797,32 +631,9 @@
797
631
  </title-part>
798
632
  <title-part lang="zh">第 # 部分:</title-part>
799
633
 
800
- <title-subpart lang="en">
801
-
802
- </title-subpart>
803
- <title-subpart lang="fr">
804
-
805
- </title-subpart>
806
-
807
- <title-modified lang="en">modified</title-modified>
808
- <title-modified lang="fr">modifiée</title-modified>
809
-
810
- <title-modified lang="zh">modified</title-modified>
634
+ <title-subpart lang="en">Sub-part #</title-subpart>
635
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
811
636
 
812
-
813
-
814
- <title-source lang="en">
815
-
816
- <xsl:text>SOURCE</xsl:text>
817
-
818
-
819
- </title-source>
820
-
821
- <title-keywords lang="en">Keywords</title-keywords>
822
-
823
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
824
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
825
-
826
637
  <title-list-tables lang="en">List of Tables</title-list-tables>
827
638
 
828
639
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -831,41 +642,12 @@
831
642
 
832
643
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
833
644
 
834
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
835
-
836
- <title-abstract lang="en">Abstract</title-abstract>
837
-
838
645
  <title-summary lang="en">Summary</title-summary>
839
646
 
840
- <title-in lang="en">in </title-in>
841
-
842
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
843
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
844
-
845
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
846
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
847
-
848
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
849
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
850
-
851
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
852
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
853
-
854
- <title-obligation-normative lang="en">normative</title-obligation-normative>
855
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
856
-
857
- <title-caution lang="en">CAUTION</title-caution>
858
- <title-caution lang="zh">注意</title-caution>
859
-
860
- <title-warning lang="en">WARNING</title-warning>
861
- <title-warning lang="zh">警告</title-warning>
862
-
863
- <title-amendment lang="en">AMENDMENT</title-amendment>
864
-
865
647
  <title-continued lang="en">(continued)</title-continued>
866
648
  <title-continued lang="fr">(continué)</title-continued>
867
649
 
868
- </xsl:variable><xsl:variable name="bibdata">
650
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
869
651
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
870
652
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
871
653
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -894,6 +676,70 @@
894
676
  </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
895
677
 
896
678
 
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
689
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
690
+
691
+
692
+
693
+
694
+
695
+
696
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
697
+
698
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
699
+
700
+
701
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
702
+
703
+
704
+
705
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
706
+
707
+
708
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
709
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
710
+
711
+
712
+
713
+
714
+
715
+
716
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
717
+
718
+
719
+
720
+
721
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
722
+
723
+
724
+
725
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
726
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
727
+
728
+
729
+
730
+
731
+
732
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
733
+
734
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
735
+
736
+
737
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
738
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
739
+
740
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
741
+
742
+
897
743
  </xsl:attribute-set><xsl:attribute-set name="link-style">
898
744
 
899
745
 
@@ -903,6 +749,9 @@
903
749
 
904
750
 
905
751
 
752
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
753
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
754
+
906
755
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
907
756
  <xsl:attribute name="white-space">pre</xsl:attribute>
908
757
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -912,10 +761,17 @@
912
761
 
913
762
 
914
763
 
764
+
765
+
766
+
767
+
768
+
915
769
 
916
770
 
917
771
 
918
772
 
773
+
774
+
919
775
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
920
776
 
921
777
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -964,14 +820,17 @@
964
820
 
965
821
 
966
822
 
823
+
967
824
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
968
825
 
969
826
 
970
827
 
828
+
971
829
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
972
830
  <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
973
831
 
974
832
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
833
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
975
834
 
976
835
 
977
836
 
@@ -991,7 +850,6 @@
991
850
  <xsl:attribute name="font-weight">bold</xsl:attribute>
992
851
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
993
852
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
994
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
995
853
 
996
854
 
997
855
  </xsl:attribute-set><xsl:attribute-set name="example-p-style">
@@ -1009,6 +867,7 @@
1009
867
 
1010
868
 
1011
869
 
870
+
1012
871
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1013
872
 
1014
873
 
@@ -1020,61 +879,52 @@
1020
879
 
1021
880
  </xsl:attribute-set><xsl:variable name="table-border_">
1022
881
 
1023
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1024
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1025
-
1026
-
1027
-
882
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
883
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
884
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1028
885
 
1029
886
 
1030
-
1031
887
 
1032
888
 
1033
889
 
1034
-
1035
890
 
1036
891
 
1037
- <xsl:attribute name="text-align">center</xsl:attribute>
1038
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1039
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1040
892
 
1041
893
 
1042
894
 
1043
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1044
895
 
1045
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1046
896
 
1047
897
 
898
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1048
899
 
1049
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1050
900
 
1051
901
 
1052
902
 
1053
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1054
903
 
1055
904
 
905
+
1056
906
 
1057
- <xsl:attribute name="color">blue</xsl:attribute>
1058
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1059
907
 
908
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
909
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
910
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
911
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
912
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1060
913
 
1061
914
 
1062
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1063
915
 
1064
916
 
1065
917
 
1066
- <xsl:attribute name="color">blue</xsl:attribute>
1067
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1068
918
 
1069
919
 
1070
920
 
1071
921
 
1072
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1073
922
 
1074
923
 
1075
924
 
1076
925
 
1077
-
926
+ <xsl:attribute name="border-top">2pt solid black</xsl:attribute>
927
+ <xsl:attribute name="border-bottom">2pt solid black</xsl:attribute>
1078
928
 
1079
929
 
1080
930
 
@@ -1083,57 +933,76 @@
1083
933
 
1084
934
 
1085
935
 
936
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
937
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
938
+
1086
939
 
1087
940
 
1088
941
 
1089
- </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1090
942
 
943
+
1091
944
 
1092
945
 
1093
946
 
947
+
1094
948
 
1095
949
 
950
+ <xsl:attribute name="text-align">center</xsl:attribute>
951
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
952
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1096
953
 
1097
954
 
1098
955
 
956
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
957
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1099
958
 
1100
959
 
1101
960
 
1102
961
 
1103
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
962
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
963
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1104
964
 
1105
965
 
1106
966
 
1107
967
 
1108
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1109
968
 
1110
969
 
1111
970
 
1112
971
 
1113
972
 
973
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1114
974
 
1115
975
 
1116
976
 
977
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
978
+
979
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
980
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
981
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
982
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
983
+ <xsl:attribute name="display-align">center</xsl:attribute>
1117
984
 
1118
985
 
1119
986
 
1120
987
 
1121
988
 
1122
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1123
989
 
990
+
991
+ <xsl:attribute name="border-top">solid black 2pt</xsl:attribute>
992
+ <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
1124
993
 
1125
994
 
1126
995
 
1127
996
 
1128
997
 
1129
998
 
1130
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1131
999
 
1132
-
1000
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1001
+ <xsl:attribute name="display-align">center</xsl:attribute>
1002
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1003
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1133
1004
 
1134
1005
 
1135
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1136
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
1137
1006
 
1138
1007
 
1139
1008
 
@@ -1141,34 +1010,224 @@
1141
1010
 
1142
1011
 
1143
1012
 
1144
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1145
- <xsl:attribute name="margin-left">12mm</xsl:attribute>
1146
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
1147
- <xsl:attribute name="text-align">justify</xsl:attribute>
1148
1013
 
1149
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1150
1014
 
1151
-
1152
-
1153
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1154
1015
 
1155
1016
 
1017
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1018
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1019
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1020
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1021
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1156
1022
 
1157
1023
 
1158
1024
 
1159
1025
 
1160
1026
 
1161
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1162
1027
 
1163
1028
 
1029
+
1164
1030
 
1165
1031
 
1166
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1167
1032
 
1168
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1033
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1034
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1035
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1169
1036
 
1170
1037
 
1171
-
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1045
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1053
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1054
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1068
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1069
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1070
+
1071
+
1072
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1073
+
1074
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1075
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1076
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1077
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1078
+
1079
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1080
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1081
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1082
+
1083
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1084
+
1085
+
1086
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1087
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+
1097
+
1098
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1099
+
1100
+
1101
+
1102
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1103
+
1104
+
1105
+
1106
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1107
+
1108
+
1109
+
1110
+ <xsl:attribute name="color">blue</xsl:attribute>
1111
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1112
+
1113
+
1114
+
1115
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1116
+
1117
+
1118
+
1119
+ <xsl:attribute name="color">blue</xsl:attribute>
1120
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1121
+
1122
+
1123
+
1124
+
1125
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+ </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1157
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1158
+
1159
+
1160
+
1161
+
1162
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1185
+
1186
+
1187
+
1188
+
1189
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1190
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1191
+
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1199
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
1200
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1201
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1202
+
1203
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1204
+
1205
+
1206
+
1207
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1216
+
1217
+
1218
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1219
+
1220
+
1221
+
1222
+
1223
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1224
+
1225
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1226
+
1227
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1228
+
1229
+
1230
+
1172
1231
 
1173
1232
 
1174
1233
 
@@ -1262,6 +1321,17 @@
1262
1321
 
1263
1322
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
1264
1323
  <xsl:attribute name="line-height">135%</xsl:attribute>
1324
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
1325
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1326
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+
1265
1335
  </xsl:attribute-set><xsl:attribute-set name="fn-style">
1266
1336
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1267
1337
  </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
@@ -1334,30 +1404,199 @@
1334
1404
 
1335
1405
 
1336
1406
 
1337
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
1338
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1339
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1340
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1341
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1342
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1343
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1407
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
1434
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+ <xsl:attribute name="text-align">center</xsl:attribute>
1443
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1444
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1480
+ <xsl:attribute name="text-indent">-11.7mm</xsl:attribute>
1481
+ <xsl:attribute name="margin-left">11.7mm</xsl:attribute>
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+
1488
+
1489
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
1490
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1491
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1504
+
1505
+
1506
+
1507
+
1508
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
1509
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1510
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+
1522
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1523
+
1524
+
1525
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1526
+
1527
+
1528
+
1529
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1530
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1531
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+
1543
+
1544
+ <xsl:attribute name="font-size">7pt</xsl:attribute>
1545
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
1552
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+ <xsl:attribute name="font-size">6pt</xsl:attribute>
1566
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
1567
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1568
+
1569
+
1570
+
1571
+
1572
+
1573
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
1574
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1575
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1576
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
1577
+
1578
+
1579
+
1580
+
1581
+
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
1588
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
1589
+
1590
+
1591
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
1592
+
1593
+
1594
+
1595
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1344
1596
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1345
1597
  <xsl:sort select="@displayorder" data-type="number"/>
1346
1598
  <xsl:apply-templates select="." mode="contents"/>
1347
1599
  </xsl:for-each>
1348
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1349
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1350
-
1351
- <!-- Normative references -->
1352
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
1353
- <!-- Terms and definitions -->
1354
- <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"/>
1355
- <!-- Another main sections -->
1356
- <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"/>
1357
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1358
- <!-- Bibliography -->
1359
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
1360
-
1361
1600
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1362
1601
 
1363
1602
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -1374,29 +1613,11 @@
1374
1613
  <xsl:sort select="@displayorder" data-type="number"/>
1375
1614
  <xsl:apply-templates select="." mode="contents"/>
1376
1615
  </xsl:for-each>
1377
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1378
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1379
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1380
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1381
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1382
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1383
1616
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1384
1617
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1385
1618
  <xsl:sort select="@displayorder" data-type="number"/>
1386
1619
  <xsl:apply-templates select="."/>
1387
1620
  </xsl:for-each>
1388
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1389
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1390
-
1391
- <!-- Normative references -->
1392
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1393
- <!-- Terms and definitions -->
1394
- <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']]"/>
1395
- <!-- Another main sections -->
1396
- <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'])]"/>
1397
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1398
- <!-- Bibliography -->
1399
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1400
1621
  </xsl:template><xsl:template name="processMainSectionsDefault">
1401
1622
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1402
1623
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1417,6 +1638,64 @@
1417
1638
  <xsl:value-of select="."/>
1418
1639
  </xsl:template><xsl:template match="*[local-name()='br']">
1419
1640
  <xsl:value-of select="$linebreak"/>
1641
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
1642
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
1643
+ <xsl:apply-templates/>
1644
+ </fo:block>
1645
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
1646
+
1647
+ <!-- process in the template 'title' -->
1648
+ <xsl:call-template name="title"/>
1649
+
1650
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
1651
+
1652
+
1653
+ <!-- process in the template 'paragraph' -->
1654
+ <xsl:call-template name="paragraph"/>
1655
+
1656
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
1657
+ <fo:block xsl:use-attribute-sets="license-statement-style">
1658
+ <xsl:apply-templates/>
1659
+ </fo:block>
1660
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
1661
+
1662
+ <!-- process in the template 'title' -->
1663
+ <xsl:call-template name="title"/>
1664
+
1665
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
1666
+
1667
+ <!-- process in the template 'paragraph' -->
1668
+ <xsl:call-template name="paragraph"/>
1669
+
1670
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
1671
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
1672
+ <xsl:apply-templates/>
1673
+ </fo:block>
1674
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
1675
+
1676
+ <!-- process in the template 'title' -->
1677
+ <xsl:call-template name="title"/>
1678
+
1679
+
1680
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
1681
+
1682
+ <!-- process in the template 'paragraph' -->
1683
+ <xsl:call-template name="paragraph"/>
1684
+
1685
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
1686
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
1687
+ <xsl:apply-templates/>
1688
+ </fo:block>
1689
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
1690
+
1691
+ <!-- process in the template 'title' -->
1692
+ <xsl:call-template name="title"/>
1693
+
1694
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
1695
+
1696
+ <!-- process in the template 'paragraph' -->
1697
+ <xsl:call-template name="paragraph"/>
1698
+
1420
1699
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1421
1700
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1422
1701
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -1433,43 +1712,19 @@
1433
1712
  <xsl:call-template name="getSimpleTable"/>
1434
1713
  </xsl:variable>
1435
1714
 
1436
- <!-- <xsl:if test="$namespace = 'bipm'">
1437
- <fo:block>&#xA0;</fo:block>
1438
- </xsl:if> -->
1439
-
1440
1715
 
1441
1716
  <!-- Display table's name before table as standalone block -->
1442
1717
  <!-- $namespace = 'iso' or -->
1443
1718
 
1444
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1445
-
1446
-
1447
-
1448
-
1719
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
1720
+
1449
1721
 
1450
- <xsl:call-template name="fn_name_display"/>
1451
1722
 
1723
+ <xsl:call-template name="table_name_fn_display"/>
1452
1724
 
1453
1725
 
1454
1726
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
1455
1727
 
1456
- <!-- <xsl:variable name="cols-count">
1457
- <xsl:choose>
1458
- <xsl:when test="*[local-name()='thead']">
1459
- <xsl:call-template name="calculate-columns-numbers">
1460
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1461
- </xsl:call-template>
1462
- </xsl:when>
1463
- <xsl:otherwise>
1464
- <xsl:call-template name="calculate-columns-numbers">
1465
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1466
- </xsl:call-template>
1467
- </xsl:otherwise>
1468
- </xsl:choose>
1469
- </xsl:variable> -->
1470
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1471
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1472
-
1473
1728
  <xsl:variable name="colwidths">
1474
1729
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1475
1730
  <xsl:call-template name="calculate-column-widths">
@@ -1480,17 +1735,8 @@
1480
1735
  </xsl:variable>
1481
1736
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1482
1737
 
1483
- <!-- <xsl:variable name="colwidths2">
1484
- <xsl:call-template name="calculate-column-widths">
1485
- <xsl:with-param name="cols-count" select="$cols-count"/>
1486
- </xsl:call-template>
1487
- </xsl:variable> -->
1488
1738
 
1489
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1490
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1491
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1492
-
1493
- <xsl:variable name="margin-left">
1739
+ <xsl:variable name="margin-side">
1494
1740
  <xsl:choose>
1495
1741
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1496
1742
  <xsl:otherwise>0</xsl:otherwise>
@@ -1498,70 +1744,61 @@
1498
1744
  </xsl:variable>
1499
1745
 
1500
1746
 
1501
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1502
-
1503
-
1504
-
1505
-
1506
-
1507
-
1508
-
1509
-
1510
-
1511
-
1512
-
1513
-
1514
-
1747
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
1748
+
1515
1749
 
1750
+
1516
1751
 
1517
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1518
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1519
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1752
+
1520
1753
 
1754
+
1521
1755
 
1522
1756
 
1523
1757
 
1758
+
1524
1759
 
1525
1760
 
1526
- <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1527
1761
 
1528
1762
 
1529
- <xsl:variable name="table_width">
1530
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1531
- 100%
1532
-
1533
-
1534
- </xsl:variable>
1535
1763
 
1536
- <xsl:variable name="table_attributes">
1537
- <attribute name="table-layout">fixed</attribute>
1538
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1539
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1540
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1541
-
1542
-
1543
-
1544
-
1545
-
1546
-
1547
-
1548
-
1549
-
1550
-
1551
-
1552
-
1553
- <attribute name="border-top">2pt solid black</attribute>
1554
- <attribute name="border-bottom">2pt solid black</attribute>
1555
-
1556
-
1557
-
1764
+ <!-- end table block-container attributes -->
1765
+
1766
+ <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1767
+
1768
+
1769
+ <xsl:variable name="table_width_default">100%</xsl:variable>
1770
+ <xsl:variable name="table_width">
1771
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1772
+ <xsl:value-of select="$table_width_default"/>
1773
+ </xsl:variable>
1774
+
1775
+
1776
+ <xsl:variable name="table_attributes">
1777
+
1778
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
1779
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+ </xsl:element>
1558
1795
  </xsl:variable>
1559
1796
 
1560
1797
 
1561
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1798
+ <fo:table id="{@id}">
1562
1799
 
1563
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1564
- <xsl:attribute name="{@name}">
1800
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
1801
+ <xsl:attribute name="{local-name()}">
1565
1802
  <xsl:value-of select="."/>
1566
1803
  </xsl:attribute>
1567
1804
  </xsl:for-each>
@@ -1572,7 +1809,6 @@
1572
1809
  </xsl:if>
1573
1810
 
1574
1811
 
1575
-
1576
1812
  <xsl:choose>
1577
1813
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1578
1814
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1598,7 +1834,7 @@
1598
1834
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1599
1835
  </xsl:when>
1600
1836
  <xsl:otherwise>
1601
- <xsl:apply-templates/>
1837
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
1602
1838
  </xsl:otherwise>
1603
1839
  </xsl:choose>
1604
1840
 
@@ -1613,25 +1849,6 @@
1613
1849
  </xsl:call-template>
1614
1850
  </xsl:for-each>
1615
1851
 
1616
- <!-- insert footer as table -->
1617
- <!-- <fo:table>
1618
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1619
- <xsl:attribute name="{@name}">
1620
- <xsl:value-of select="."/>
1621
- </xsl:attribute>
1622
- </xsl:for-each>
1623
-
1624
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1625
- <xsl:choose>
1626
- <xsl:when test=". = 1 or . = 0">
1627
- <fo:table-column column-width="proportional-column-width(2)"/>
1628
- </xsl:when>
1629
- <xsl:otherwise>
1630
- <fo:table-column column-width="proportional-column-width({.})"/>
1631
- </xsl:otherwise>
1632
- </xsl:choose>
1633
- </xsl:for-each>
1634
- </fo:table>-->
1635
1852
 
1636
1853
 
1637
1854
 
@@ -1692,18 +1909,17 @@
1692
1909
  </xsl:otherwise>
1693
1910
  </xsl:choose>
1694
1911
 
1695
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1912
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
1696
1913
  <xsl:param name="continued"/>
1697
1914
  <xsl:if test="normalize-space() != ''">
1698
1915
  <fo:block xsl:use-attribute-sets="table-name-style">
1699
-
1916
+
1700
1917
 
1701
1918
 
1702
1919
 
1703
1920
 
1704
1921
  <xsl:choose>
1705
1922
  <xsl:when test="$continued = 'true'">
1706
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
1707
1923
 
1708
1924
  </xsl:when>
1709
1925
  <xsl:otherwise>
@@ -1766,13 +1982,6 @@
1766
1982
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
1767
1983
  <xsl:variable name="td_text">
1768
1984
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1769
-
1770
- <!-- <xsl:if test="$namespace = 'bipm'">
1771
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1772
- <word><xsl:value-of select="normalize-space(.)"/></word>
1773
- </xsl:for-each>
1774
- </xsl:if> -->
1775
-
1776
1985
  </xsl:variable>
1777
1986
  <xsl:variable name="words">
1778
1987
  <xsl:variable name="string_with_added_zerospaces">
@@ -1809,7 +2018,6 @@
1809
2018
  </xsl:otherwise>
1810
2019
  </xsl:choose>
1811
2020
  </xsl:variable>
1812
-
1813
2021
 
1814
2022
  <column>
1815
2023
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -1843,9 +2051,8 @@
1843
2051
 
1844
2052
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
1845
2053
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1846
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2054
+ </xsl:template><xsl:template match="*[local-name()='thead']">
1847
2055
  <xsl:param name="cols-count"/>
1848
- <!-- font-weight="bold" -->
1849
2056
  <fo:table-header>
1850
2057
 
1851
2058
 
@@ -1857,85 +2064,26 @@
1857
2064
  <fo:table-row>
1858
2065
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
1859
2066
 
1860
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2067
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
1861
2068
  <xsl:with-param name="continued">true</xsl:with-param>
1862
2069
  </xsl:apply-templates>
1863
2070
 
1864
2071
 
1865
2072
 
1866
-
1867
2073
  </fo:table-cell>
1868
2074
  </fo:table-row>
1869
2075
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1870
2076
  <fo:table-body>
1871
2077
  <xsl:apply-templates/>
1872
2078
  </fo:table-body>
1873
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2079
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
1874
2080
  <xsl:apply-templates/>
1875
2081
  </xsl:template><xsl:template name="insertTableFooter">
1876
2082
  <xsl:param name="cols-count"/>
1877
2083
  <xsl:if test="../*[local-name()='tfoot']">
1878
2084
  <fo:table-footer>
1879
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1880
- </fo:table-footer>
1881
- </xsl:if>
1882
- </xsl:template><xsl:template name="insertTableFooter2">
1883
- <xsl:param name="cols-count"/>
1884
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1885
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
1886
-
1887
- <fo:table-footer>
1888
-
1889
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1890
-
1891
- <!-- if there are note(s) or fn(s) then create footer row -->
1892
- <xsl:if test="$isNoteOrFnExist = 'true'">
1893
-
1894
-
1895
-
1896
- <fo:table-row>
1897
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1898
-
1899
-
1900
-
1901
- <!-- fn will be processed inside 'note' processing -->
1902
-
1903
-
1904
-
1905
-
1906
-
1907
-
1908
- <!-- except gb -->
1909
-
1910
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1911
-
1912
-
1913
- <!-- show Note under table in preface (ex. abstract) sections -->
1914
- <!-- empty, because notes show at page side in main sections -->
1915
- <!-- <xsl:if test="$namespace = 'bipm'">
1916
- <xsl:choose>
1917
- <xsl:when test="ancestor::*[local-name()='preface']">
1918
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1919
- </xsl:when>
1920
- <xsl:otherwise>
1921
- <fo:block/>
1922
- </xsl:otherwise>
1923
- </xsl:choose>
1924
- </xsl:if> -->
1925
-
1926
-
1927
- <!-- horizontal row separator -->
1928
-
1929
-
1930
- <!-- fn processing -->
1931
- <xsl:call-template name="fn_display"/>
1932
-
1933
- </fo:table-cell>
1934
- </fo:table-row>
1935
-
1936
- </xsl:if>
2085
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
1937
2086
  </fo:table-footer>
1938
-
1939
2087
  </xsl:if>
1940
2088
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1941
2089
  <xsl:param name="table_attributes"/>
@@ -1962,17 +2110,18 @@
1962
2110
  </xsl:variable>
1963
2111
 
1964
2112
  <fo:table keep-with-previous="always">
1965
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2113
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2114
+ <xsl:variable name="name" select="local-name()"/>
1966
2115
  <xsl:choose>
1967
- <xsl:when test="@name = 'border-top'">
1968
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2116
+ <xsl:when test="$name = 'border-top'">
2117
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
1969
2118
  </xsl:when>
1970
- <xsl:when test="@name = 'border'">
1971
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2119
+ <xsl:when test="$name = 'border'">
2120
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
1972
2121
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
1973
2122
  </xsl:when>
1974
2123
  <xsl:otherwise>
1975
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2124
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
1976
2125
  </xsl:otherwise>
1977
2126
  </xsl:choose>
1978
2127
  </xsl:for-each>
@@ -2001,9 +2150,10 @@
2001
2150
 
2002
2151
  <fo:table-body>
2003
2152
  <fo:table-row>
2004
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2153
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2005
2154
 
2006
2155
 
2156
+
2007
2157
 
2008
2158
 
2009
2159
  <!-- fn will be processed inside 'note' processing -->
@@ -2013,37 +2163,20 @@
2013
2163
 
2014
2164
 
2015
2165
 
2016
-
2017
-
2018
-
2019
2166
  <!-- for BSI (not PAS) display Notes before footnotes -->
2020
2167
 
2021
2168
 
2022
- <!-- except gb -->
2169
+ <!-- except gb and bsi -->
2023
2170
 
2024
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2025
-
2026
-
2027
- <!-- <xsl:if test="$namespace = 'bipm'">
2028
- <xsl:choose>
2029
- <xsl:when test="ancestor::*[local-name()='preface']">
2030
- show Note under table in preface (ex. abstract) sections
2031
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2032
- </xsl:when>
2033
- <xsl:otherwise>
2034
- empty, because notes show at page side in main sections
2035
- <fo:block/>
2036
- </xsl:otherwise>
2037
- </xsl:choose>
2038
- </xsl:if> -->
2171
+ <xsl:apply-templates select="../*[local-name()='note']"/>
2172
+
2039
2173
 
2040
2174
 
2041
2175
  <!-- horizontal row separator -->
2042
2176
 
2043
2177
 
2044
2178
  <!-- fn processing -->
2045
- <xsl:call-template name="fn_display"/>
2046
-
2179
+ <xsl:call-template name="table_fn_display"/>
2047
2180
 
2048
2181
  <!-- for PAS display Notes after footnotes -->
2049
2182
 
@@ -2073,7 +2206,7 @@
2073
2206
 
2074
2207
 
2075
2208
 
2076
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2209
+ <xsl:apply-templates select="../*[local-name()='thead']">
2077
2210
  <xsl:with-param name="cols-count" select="$cols-count"/>
2078
2211
  </xsl:apply-templates>
2079
2212
 
@@ -2085,104 +2218,84 @@
2085
2218
 
2086
2219
 
2087
2220
  <xsl:apply-templates/>
2088
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2089
-
2221
+
2090
2222
  </fo:table-body>
2091
2223
 
2092
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2093
- <xsl:choose>
2094
- <xsl:when test="substring-after(., '—') != ''">
2095
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2096
- </xsl:when>
2097
- <xsl:otherwise>
2098
- <xsl:value-of select="."/>
2099
- </xsl:otherwise>
2100
- </xsl:choose>
2101
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2102
- <xsl:apply-templates mode="presentation_name"/>
2103
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2104
- <xsl:apply-templates select="."/>
2105
- </xsl:template><xsl:template match="*[local-name()='tr']">
2106
- <xsl:variable name="parent-name" select="local-name(..)"/>
2107
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2108
- <fo:table-row min-height="4mm">
2109
- <xsl:if test="$parent-name = 'thead'">
2110
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2111
-
2112
-
2113
-
2114
-
2115
-
2116
-
2117
-
2118
-
2119
- </xsl:if>
2120
- <xsl:if test="$parent-name = 'tfoot'">
2121
-
2122
-
2123
-
2124
- </xsl:if>
2125
-
2126
-
2127
-
2128
-
2129
-
2130
-
2131
-
2132
-
2133
-
2134
-
2135
- <!-- <xsl:if test="$namespace = 'bipm'">
2136
- <xsl:attribute name="height">8mm</xsl:attribute>
2137
- </xsl:if> -->
2138
-
2224
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2225
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2226
+
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+ <xsl:call-template name="setTableRowAttributes"/>
2234
+
2139
2235
  <xsl:apply-templates/>
2140
2236
  </fo:table-row>
2141
- </xsl:template><xsl:template match="*[local-name()='th']">
2142
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2143
- <xsl:attribute name="text-align">
2144
- <xsl:choose>
2145
- <xsl:when test="@align">
2146
- <xsl:call-template name="setAlignment"/>
2147
- <!-- <xsl:value-of select="@align"/> -->
2148
- </xsl:when>
2149
- <xsl:otherwise>center</xsl:otherwise>
2150
- </xsl:choose>
2151
- </xsl:attribute>
2152
-
2237
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2238
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2153
2239
 
2240
+ <xsl:call-template name="setTableRowAttributes"/>
2241
+ <xsl:apply-templates/>
2242
+ </fo:table-row>
2243
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2244
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2245
+
2154
2246
 
2247
+
2155
2248
 
2249
+
2250
+ <xsl:call-template name="setTableRowAttributes"/>
2251
+ <xsl:apply-templates/>
2252
+ </fo:table-row>
2253
+ </xsl:template><xsl:template name="setTableRowAttributes">
2254
+
2255
+
2256
+
2257
+
2258
+
2259
+
2260
+
2261
+
2262
+ </xsl:template><xsl:template match="*[local-name()='th']">
2263
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
2264
+ <xsl:call-template name="setTextAlignment">
2265
+ <xsl:with-param name="default">center</xsl:with-param>
2266
+ </xsl:call-template>
2156
2267
 
2157
2268
 
2158
2269
 
2159
2270
 
2271
+
2160
2272
 
2161
2273
 
2162
-
2163
- <xsl:attribute name="border-top">solid black 2pt</xsl:attribute>
2164
- <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
2165
2274
 
2166
2275
 
2167
2276
 
2168
2277
  <xsl:if test="$lang = 'ar'">
2169
2278
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2170
2279
  </xsl:if>
2171
- <xsl:if test="@colspan">
2172
- <xsl:attribute name="number-columns-spanned">
2173
- <xsl:value-of select="@colspan"/>
2174
- </xsl:attribute>
2175
- </xsl:if>
2176
- <xsl:if test="@rowspan">
2177
- <xsl:attribute name="number-rows-spanned">
2178
- <xsl:value-of select="@rowspan"/>
2179
- </xsl:attribute>
2180
- </xsl:if>
2181
- <xsl:call-template name="display-align"/>
2280
+
2281
+ <xsl:call-template name="setTableCellAttributes"/>
2282
+
2182
2283
  <fo:block>
2183
2284
  <xsl:apply-templates/>
2184
2285
  </fo:block>
2185
2286
  </fo:table-cell>
2287
+ </xsl:template><xsl:template name="setTableCellAttributes">
2288
+ <xsl:if test="@colspan">
2289
+ <xsl:attribute name="number-columns-spanned">
2290
+ <xsl:value-of select="@colspan"/>
2291
+ </xsl:attribute>
2292
+ </xsl:if>
2293
+ <xsl:if test="@rowspan">
2294
+ <xsl:attribute name="number-rows-spanned">
2295
+ <xsl:value-of select="@rowspan"/>
2296
+ </xsl:attribute>
2297
+ </xsl:if>
2298
+ <xsl:call-template name="display-align"/>
2186
2299
  </xsl:template><xsl:template name="display-align">
2187
2300
  <xsl:if test="@valign">
2188
2301
  <xsl:attribute name="display-align">
@@ -2195,22 +2308,18 @@
2195
2308
  </xsl:attribute>
2196
2309
  </xsl:if>
2197
2310
  </xsl:template><xsl:template match="*[local-name()='td']">
2198
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2199
- <xsl:attribute name="text-align">
2200
- <xsl:choose>
2201
- <xsl:when test="@align">
2202
- <xsl:call-template name="setAlignment"/>
2203
- <!-- <xsl:value-of select="@align"/> -->
2204
- </xsl:when>
2205
- <xsl:otherwise>left</xsl:otherwise>
2206
- </xsl:choose>
2207
- </xsl:attribute>
2311
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2312
+ <xsl:call-template name="setTextAlignment">
2313
+ <xsl:with-param name="default">left</xsl:with-param>
2314
+ </xsl:call-template>
2315
+
2208
2316
  <xsl:if test="$lang = 'ar'">
2209
2317
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2210
2318
  </xsl:if>
2211
2319
 
2212
2320
 
2213
2321
 
2322
+ <!-- bsi -->
2214
2323
 
2215
2324
 
2216
2325
 
@@ -2219,34 +2328,36 @@
2219
2328
 
2220
2329
 
2221
2330
 
2331
+
2332
+
2222
2333
 
2223
2334
 
2224
2335
 
2225
2336
 
2226
2337
 
2227
- <xsl:if test=".//*[local-name() = 'table']">
2338
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2228
2339
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2229
2340
  </xsl:if>
2230
- <xsl:if test="@colspan">
2231
- <xsl:attribute name="number-columns-spanned">
2232
- <xsl:value-of select="@colspan"/>
2233
- </xsl:attribute>
2234
- </xsl:if>
2235
- <xsl:if test="@rowspan">
2236
- <xsl:attribute name="number-rows-spanned">
2237
- <xsl:value-of select="@rowspan"/>
2238
- </xsl:attribute>
2239
- </xsl:if>
2240
- <xsl:call-template name="display-align"/>
2341
+
2342
+ <xsl:call-template name="setTableCellAttributes"/>
2343
+
2241
2344
  <fo:block>
2242
-
2345
+
2346
+
2347
+
2243
2348
  <xsl:apply-templates/>
2244
2349
  </fo:block>
2245
2350
  </fo:table-cell>
2246
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2247
-
2351
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
2352
+
2353
+ <fo:block xsl:use-attribute-sets="table-note-style">
2354
+
2355
+
2356
+
2357
+
2248
2358
 
2249
- <fo:block font-size="10pt" margin-bottom="12pt">
2359
+ <!-- Table's note name (NOTE, for example) -->
2360
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
2250
2361
 
2251
2362
 
2252
2363
 
@@ -2254,25 +2365,16 @@
2254
2365
 
2255
2366
 
2256
2367
 
2257
-
2258
- <!-- Table's note name (NOTE, for example) -->
2259
-
2260
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2261
-
2262
-
2263
-
2264
-
2368
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2265
2369
 
2266
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2267
-
2268
- </fo:inline>
2269
-
2270
-
2271
-
2272
- <xsl:apply-templates mode="process"/>
2273
- </fo:block>
2370
+ </fo:inline>
2371
+
2372
+
2373
+
2374
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2375
+ </fo:block>
2274
2376
 
2275
- </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">
2377
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
2276
2378
  <xsl:apply-templates/>
2277
2379
  </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
2278
2380
 
@@ -2350,8 +2452,7 @@
2350
2452
  <xsl:copy-of select="$footnote_inline"/>
2351
2453
  <fo:footnote-body>
2352
2454
 
2353
- <fo:block-container text-indent="0" start-indent="0">
2354
-
2455
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
2355
2456
 
2356
2457
  <fo:block xsl:use-attribute-sets="fn-body-style">
2357
2458
 
@@ -2370,7 +2471,7 @@
2370
2471
  <xsl:copy-of select="$footnote_inline"/>
2371
2472
  </xsl:otherwise>
2372
2473
  </xsl:choose>
2373
- </xsl:template><xsl:template name="fn_display">
2474
+ </xsl:template><xsl:template name="table_fn_display">
2374
2475
  <xsl:variable name="references">
2375
2476
 
2376
2477
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -2381,31 +2482,26 @@
2381
2482
  <xsl:for-each select="xalan:nodeset($references)//fn">
2382
2483
  <xsl:variable name="reference" select="@reference"/>
2383
2484
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2384
- <fo:block margin-bottom="12pt">
2485
+ <fo:block xsl:use-attribute-sets="table-fn-style">
2385
2486
 
2386
2487
 
2387
2488
 
2388
-
2389
-
2390
-
2391
-
2392
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2489
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
2393
2490
 
2394
2491
 
2395
2492
 
2396
2493
 
2397
2494
 
2495
+ <xsl:value-of select="@reference"/>
2398
2496
 
2399
2497
 
2400
2498
 
2401
- <xsl:value-of select="@reference"/>
2402
2499
 
2403
2500
 
2404
2501
 
2405
- </fo:inline>
2406
- <fo:inline>
2407
2502
 
2408
- <!-- <xsl:apply-templates /> -->
2503
+ </fo:inline>
2504
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
2409
2505
  <xsl:copy-of select="./node()"/>
2410
2506
  </fo:inline>
2411
2507
  </fo:block>
@@ -2417,15 +2513,7 @@
2417
2513
 
2418
2514
  <xsl:apply-templates/>
2419
2515
  </fn>
2420
- </xsl:template><xsl:template name="fn_name_display">
2421
- <!-- <xsl:variable name="references">
2422
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2423
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2424
- <xsl:apply-templates />
2425
- </fn>
2426
- </xsl:for-each>
2427
- </xsl:variable>
2428
- $references=<xsl:copy-of select="$references"/> -->
2516
+ </xsl:template><xsl:template name="table_name_fn_display">
2429
2517
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2430
2518
  <xsl:variable name="reference" select="@reference"/>
2431
2519
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -2434,9 +2522,7 @@
2434
2522
  </fo:block>
2435
2523
  </xsl:for-each>
2436
2524
  </xsl:template><xsl:template name="fn_display_figure">
2437
- <xsl:variable name="key_iso">
2438
- <!-- and (not(@class) or @class !='pseudocode') -->
2439
- </xsl:variable>
2525
+
2440
2526
  <xsl:variable name="references">
2441
2527
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2442
2528
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2444,50 +2530,52 @@
2444
2530
  </fn>
2445
2531
  </xsl:for-each>
2446
2532
  </xsl:variable>
2533
+
2534
+ <xsl:if test="xalan:nodeset($references)//fn">
2447
2535
 
2448
- <!-- current hierarchy is 'figure' element -->
2449
- <xsl:variable name="following_dl_colwidths">
2450
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2451
- <xsl:variable name="html-table">
2452
- <xsl:variable name="doc_ns">
2453
-
2454
- </xsl:variable>
2455
- <xsl:variable name="ns">
2456
- <xsl:choose>
2457
- <xsl:when test="normalize-space($doc_ns) != ''">
2458
- <xsl:value-of select="normalize-space($doc_ns)"/>
2459
- </xsl:when>
2460
- <xsl:otherwise>
2461
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2462
- </xsl:otherwise>
2463
- </xsl:choose>
2464
- </xsl:variable>
2465
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2466
- <!-- <xsl:element name="{$ns}:table"> -->
2536
+ <xsl:variable name="key_iso">
2537
+
2538
+ </xsl:variable>
2539
+
2540
+ <!-- current hierarchy is 'figure' element -->
2541
+ <xsl:variable name="following_dl_colwidths">
2542
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2543
+ <xsl:variable name="html-table">
2544
+ <xsl:variable name="doc_ns">
2545
+
2546
+ </xsl:variable>
2547
+ <xsl:variable name="ns">
2548
+ <xsl:choose>
2549
+ <xsl:when test="normalize-space($doc_ns) != ''">
2550
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2551
+ </xsl:when>
2552
+ <xsl:otherwise>
2553
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2554
+ </xsl:otherwise>
2555
+ </xsl:choose>
2556
+ </xsl:variable>
2557
+
2467
2558
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2468
2559
  <tbody>
2469
2560
  <xsl:apply-templates mode="dl"/>
2470
2561
  </tbody>
2471
2562
  </xsl:for-each>
2472
- <!-- </xsl:element> -->
2473
- </xsl:variable>
2474
-
2475
- <xsl:call-template name="calculate-column-widths">
2476
- <xsl:with-param name="cols-count" select="2"/>
2477
- <xsl:with-param name="table" select="$html-table"/>
2478
- </xsl:call-template>
2479
-
2480
- </xsl:if>
2481
- </xsl:variable>
2482
-
2483
-
2484
- <xsl:variable name="maxlength_dt">
2485
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2486
- <xsl:call-template name="getMaxLength_dt"/>
2487
- </xsl:for-each>
2488
- </xsl:variable>
2489
-
2490
- <xsl:if test="xalan:nodeset($references)//fn">
2563
+ </xsl:variable>
2564
+
2565
+ <xsl:call-template name="calculate-column-widths">
2566
+ <xsl:with-param name="cols-count" select="2"/>
2567
+ <xsl:with-param name="table" select="$html-table"/>
2568
+ </xsl:call-template>
2569
+
2570
+ </xsl:if>
2571
+ </xsl:variable>
2572
+
2573
+ <xsl:variable name="maxlength_dt">
2574
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2575
+ <xsl:call-template name="getMaxLength_dt"/>
2576
+ </xsl:for-each>
2577
+ </xsl:variable>
2578
+
2491
2579
  <fo:block>
2492
2580
  <fo:table width="95%" table-layout="fixed">
2493
2581
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -2514,20 +2602,18 @@
2514
2602
  <fo:table-row>
2515
2603
  <fo:table-cell>
2516
2604
  <fo:block>
2517
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2518
-
2605
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
2519
2606
  <xsl:value-of select="@reference"/>
2520
2607
  </fo:inline>
2521
2608
  </fo:block>
2522
2609
  </fo:table-cell>
2523
2610
  <fo:table-cell>
2524
- <fo:block text-align="justify" margin-bottom="12pt">
2525
-
2611
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
2526
2612
  <xsl:if test="normalize-space($key_iso) = 'true'">
2527
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2613
+
2614
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
2615
+
2528
2616
  </xsl:if>
2529
-
2530
- <!-- <xsl:apply-templates /> -->
2531
2617
  <xsl:copy-of select="./node()"/>
2532
2618
  </fo:block>
2533
2619
  </fo:table-cell>
@@ -2540,14 +2626,8 @@
2540
2626
  </xsl:if>
2541
2627
 
2542
2628
  </xsl:template><xsl:template match="*[local-name()='fn']">
2543
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2544
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2545
-
2546
-
2547
-
2548
-
2549
-
2550
-
2629
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
2630
+
2551
2631
 
2552
2632
 
2553
2633
 
@@ -2571,10 +2651,10 @@
2571
2651
  <xsl:variable name="isDeleted" select="@deleted"/>
2572
2652
  <fo:block-container>
2573
2653
 
2574
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2575
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2576
- </xsl:if>
2577
-
2654
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2655
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2656
+ </xsl:if>
2657
+
2578
2658
 
2579
2659
  <xsl:if test="parent::*[local-name() = 'note']">
2580
2660
  <xsl:attribute name="margin-left">
@@ -2591,11 +2671,11 @@
2591
2671
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
2592
2672
  </xsl:call-template>
2593
2673
 
2594
- <fo:block-container>
2595
-
2596
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2597
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2674
+ <fo:block-container margin-left="0mm">
2675
+
2598
2676
 
2677
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2678
+
2599
2679
 
2600
2680
  <xsl:variable name="parent" select="local-name(..)"/>
2601
2681
 
@@ -2606,23 +2686,19 @@
2606
2686
  <xsl:choose>
2607
2687
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2608
2688
 
2609
-
2610
- <fo:block margin-bottom="12pt" text-align="left">
2611
-
2612
- <xsl:variable name="title-where">
2613
-
2689
+ <fo:block margin-bottom="12pt" text-align="left">
2614
2690
 
2615
- <xsl:call-template name="getTitle">
2616
- <xsl:with-param name="name" select="'title-where'"/>
2691
+ <xsl:variable name="title-where">
2692
+ <xsl:call-template name="getLocalizedString">
2693
+ <xsl:with-param name="key">where</xsl:with-param>
2617
2694
  </xsl:call-template>
2618
-
2619
- </xsl:variable>
2620
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2621
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2622
- <xsl:text/>
2623
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2624
- </fo:block>
2625
-
2695
+ </xsl:variable>
2696
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2697
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2698
+ <xsl:text/>
2699
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2700
+ </fo:block>
2701
+
2626
2702
  </xsl:when>
2627
2703
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2628
2704
  <fo:block margin-bottom="12pt" text-align="left">
@@ -2631,12 +2707,9 @@
2631
2707
 
2632
2708
 
2633
2709
  <xsl:variable name="title-where">
2634
-
2635
-
2636
- <xsl:call-template name="getTitle">
2637
- <xsl:with-param name="name" select="'title-where'"/>
2638
- </xsl:call-template>
2639
-
2710
+ <xsl:call-template name="getLocalizedString">
2711
+ <xsl:with-param name="key">where</xsl:with-param>
2712
+ </xsl:call-template>
2640
2713
  </xsl:variable>
2641
2714
  <xsl:value-of select="$title-where"/>
2642
2715
  </fo:block>
@@ -2648,12 +2721,9 @@
2648
2721
 
2649
2722
 
2650
2723
  <xsl:variable name="title-key">
2651
-
2652
-
2653
- <xsl:call-template name="getTitle">
2654
- <xsl:with-param name="name" select="'title-key'"/>
2655
- </xsl:call-template>
2656
-
2724
+ <xsl:call-template name="getLocalizedString">
2725
+ <xsl:with-param name="key">key</xsl:with-param>
2726
+ </xsl:call-template>
2657
2727
  </xsl:variable>
2658
2728
  <xsl:value-of select="$title-key"/>
2659
2729
  </fo:block>
@@ -2675,9 +2745,7 @@
2675
2745
  <fo:table width="95%" table-layout="fixed">
2676
2746
 
2677
2747
  <xsl:choose>
2678
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2679
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2680
- </xsl:when>
2748
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
2681
2749
  <xsl:when test="normalize-space($key_iso) = 'true'">
2682
2750
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2683
2751
 
@@ -2698,12 +2766,9 @@
2698
2766
  </xsl:otherwise>
2699
2767
  </xsl:choose>
2700
2768
  </xsl:variable>
2701
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2702
- <!-- <xsl:element name="{$ns}:table"> -->
2703
- <tbody>
2704
- <xsl:apply-templates mode="dl"/>
2705
- </tbody>
2706
- <!-- </xsl:element> -->
2769
+ <tbody>
2770
+ <xsl:apply-templates mode="dl"/>
2771
+ </tbody>
2707
2772
  </xsl:variable>
2708
2773
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
2709
2774
  <xsl:variable name="colwidths">
@@ -2783,8 +2848,6 @@
2783
2848
  </xsl:for-each>
2784
2849
  </xsl:otherwise>
2785
2850
  </xsl:choose>
2786
- <!-- <fo:table-column column-width="15%"/>
2787
- <fo:table-column column-width="85%"/> -->
2788
2851
  </xsl:otherwise>
2789
2852
  </xsl:choose>
2790
2853
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -2799,12 +2862,6 @@
2799
2862
  </xsl:for-each>
2800
2863
  </xsl:variable>
2801
2864
  <xsl:variable name="maxLength">
2802
- <!-- <xsl:for-each select="*[local-name()='dt']">
2803
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2804
- <xsl:if test="position() = 1">
2805
- <xsl:value-of select="string-length(normalize-space(.))"/>
2806
- </xsl:if>
2807
- </xsl:for-each> -->
2808
2865
  <xsl:for-each select="xalan:nodeset($lengths)/length">
2809
2866
  <xsl:sort select="." data-type="number" order="descending"/>
2810
2867
  <xsl:if test="position() = 1">
@@ -2830,12 +2887,12 @@
2830
2887
  <xsl:if test="normalize-space($key_iso) = 'true'">
2831
2888
  <xsl:attribute name="margin-top">0</xsl:attribute>
2832
2889
  </xsl:if>
2833
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2890
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2834
2891
  </fo:block>
2835
2892
  </fo:table-cell>
2836
2893
  <fo:table-cell>
2837
2894
  <fo:block>
2838
- <xsl:apply-templates/>
2895
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2839
2896
  </fo:block>
2840
2897
  </fo:table-cell>
2841
2898
  </fo:table-row>
@@ -2846,80 +2903,49 @@
2846
2903
  </td>
2847
2904
  <td>
2848
2905
 
2849
-
2850
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2851
-
2906
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
2907
+ <xsl:with-param name="process">true</xsl:with-param>
2908
+ </xsl:apply-templates>
2909
+
2852
2910
  </td>
2853
2911
  </tr>
2854
2912
 
2855
2913
  </xsl:template><xsl:template match="*[local-name()='dt']">
2856
2914
  <xsl:param name="key_iso"/>
2857
2915
 
2858
- <fo:table-row>
2859
-
2860
-
2916
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
2861
2917
  <fo:table-cell>
2862
2918
 
2863
- <fo:block margin-top="6pt">
2919
+ <fo:block xsl:use-attribute-sets="dt-style">
2864
2920
  <xsl:copy-of select="@id"/>
2865
2921
 
2866
-
2867
2922
  <xsl:if test="normalize-space($key_iso) = 'true'">
2868
2923
  <xsl:attribute name="margin-top">0</xsl:attribute>
2869
-
2870
2924
  </xsl:if>
2871
2925
 
2872
2926
 
2873
2927
 
2874
-
2875
-
2876
-
2877
-
2878
2928
  <xsl:apply-templates/>
2879
- <!-- <xsl:if test="$namespace = 'gb'">
2880
- <xsl:if test="ancestor::*[local-name()='formula']">
2881
- <xsl:text>—</xsl:text>
2882
- </xsl:if>
2883
- </xsl:if> -->
2884
2929
  </fo:block>
2885
2930
  </fo:table-cell>
2886
2931
  <fo:table-cell>
2887
2932
  <fo:block>
2888
2933
 
2889
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2890
- <xsl:if test="local-name(*[1]) != 'stem'">
2891
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2892
- </xsl:if>
2893
- </xsl:if> -->
2894
-
2895
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2896
-
2934
+
2935
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
2936
+ <xsl:with-param name="process">true</xsl:with-param>
2937
+ </xsl:apply-templates>
2897
2938
  </fo:block>
2898
2939
  </fo:table-cell>
2899
2940
  </fo:table-row>
2900
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2901
- <xsl:if test="local-name(*[1]) = 'stem'">
2902
- <fo:table-row>
2903
- <fo:table-cell>
2904
- <fo:block margin-top="6pt">
2905
- <xsl:if test="normalize-space($key_iso) = 'true'">
2906
- <xsl:attribute name="margin-top">0</xsl:attribute>
2907
- </xsl:if>
2908
- <xsl:text>&#xA0;</xsl:text>
2909
- </fo:block>
2910
- </fo:table-cell>
2911
- <fo:table-cell>
2912
- <fo:block>
2913
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2914
- </fo:block>
2915
- </fo:table-cell>
2916
- </fo:table-row>
2917
- </xsl:if>
2918
- </xsl:if> -->
2919
2941
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2920
2942
  <xsl:apply-templates/>
2921
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
2922
- <xsl:apply-templates/>
2943
+ </xsl:template><xsl:template match="*[local-name()='dd']">
2944
+ <xsl:param name="process">false</xsl:param>
2945
+ <xsl:if test="$process = 'true'">
2946
+ <xsl:apply-templates select="@language"/>
2947
+ <xsl:apply-templates/>
2948
+ </xsl:if>
2923
2949
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2924
2950
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
2925
2951
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -2943,6 +2969,7 @@
2943
2969
  </fo:inline>
2944
2970
  </xsl:template><xsl:template match="*[local-name()='tt']">
2945
2971
  <fo:inline xsl:use-attribute-sets="tt-style">
2972
+
2946
2973
  <xsl:variable name="_font-size">
2947
2974
 
2948
2975
 
@@ -2979,7 +3006,22 @@
2979
3006
  <xsl:apply-templates/>
2980
3007
  </fo:inline>
2981
3008
  </xsl:template><xsl:template match="*[local-name()='add']">
3009
+ <xsl:param name="skip">true</xsl:param>
2982
3010
  <xsl:choose>
3011
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3012
+ <xsl:choose>
3013
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
3014
+ <xsl:otherwise>
3015
+ <fo:inline>
3016
+ <xsl:call-template name="insertTag">
3017
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3018
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3019
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3020
+ </xsl:call-template>
3021
+ </fo:inline>
3022
+ </xsl:otherwise>
3023
+ </xsl:choose>
3024
+ </xsl:when>
2983
3025
  <xsl:when test="@amendment">
2984
3026
  <fo:inline>
2985
3027
  <xsl:call-template name="insertTag">
@@ -3014,7 +3056,6 @@
3014
3056
  </fo:inline>
3015
3057
  </xsl:otherwise>
3016
3058
  </xsl:choose>
3017
-
3018
3059
  </xsl:template><xsl:template name="insertTag">
3019
3060
  <xsl:param name="type"/>
3020
3061
  <xsl:param name="kind"/>
@@ -3022,22 +3063,20 @@
3022
3063
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3023
3064
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3024
3065
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3025
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3026
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3027
3066
  <xsl:attribute name="height">5mm</xsl:attribute>
3028
3067
  <xsl:attribute name="content-width">100%</xsl:attribute>
3029
3068
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3030
3069
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3031
3070
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
3032
3071
  <g>
3033
- <xsl:if test="$type = 'closing'">
3072
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3034
3073
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
3035
3074
  </xsl:if>
3036
3075
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
3037
3076
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
3038
3077
  </g>
3039
3078
  <text font-family="Arial" x="15" y="57" font-size="40pt">
3040
- <xsl:if test="$type = 'closing'">
3079
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3041
3080
  <xsl:attribute name="x">25</xsl:attribute>
3042
3081
  </xsl:if>
3043
3082
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -3081,7 +3120,11 @@
3081
3120
  <xsl:with-param name="text" select="substring($text,2)"/>
3082
3121
  </xsl:call-template>
3083
3122
  </xsl:if>
3084
- </xsl:template><xsl:template name="tokenize">
3123
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
3124
+ <fo:block break-after="page"/>
3125
+ <fo:block> </fo:block>
3126
+ <fo:block break-after="page"/>
3127
+ </xsl:template><xsl:template name="tokenize">
3085
3128
  <xsl:param name="text"/>
3086
3129
  <xsl:param name="separator" select="' '"/>
3087
3130
  <xsl:choose>
@@ -3241,14 +3284,6 @@
3241
3284
 
3242
3285
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3243
3286
 
3244
- <!-- <xsl:choose>
3245
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3246
-
3247
- </xsl:when>
3248
- <xsl:otherwise>
3249
- <xsl:copy-of select="current()"/>
3250
- </xsl:otherwise>
3251
- </xsl:choose> -->
3252
3287
  </xsl:variable>
3253
3288
  <xsl:copy-of select="$simple-table"/>
3254
3289
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -3367,8 +3402,6 @@
3367
3402
  <xsl:choose>
3368
3403
  <xsl:when test="contains($str2, ' ')">
3369
3404
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3370
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3371
- <xsl:value-of select="substring($substr, 2)"/> -->
3372
3405
  <xsl:call-template name="capitalize">
3373
3406
  <xsl:with-param name="str" select="$substr"/>
3374
3407
  </xsl:call-template>
@@ -3378,8 +3411,6 @@
3378
3411
  </xsl:call-template>
3379
3412
  </xsl:when>
3380
3413
  <xsl:otherwise>
3381
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3382
- <xsl:value-of select="substring($str2, 2)"/> -->
3383
3414
  <xsl:call-template name="capitalize">
3384
3415
  <xsl:with-param name="str" select="$str2"/>
3385
3416
  </xsl:call-template>
@@ -3407,6 +3438,7 @@
3407
3438
  <xsl:apply-templates select="." mode="mathml"/>
3408
3439
  </xsl:variable>
3409
3440
  <fo:instream-foreign-object fox:alt-text="Math">
3441
+
3410
3442
 
3411
3443
 
3412
3444
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -3438,7 +3470,7 @@
3438
3470
  </xsl:attribute>
3439
3471
 
3440
3472
 
3441
- <!-- <xsl:copy-of select="."/> -->
3473
+
3442
3474
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3443
3475
  </fo:instream-foreign-object>
3444
3476
  </fo:inline>
@@ -3497,6 +3529,10 @@
3497
3529
 
3498
3530
 
3499
3531
 
3532
+
3533
+
3534
+
3535
+
3500
3536
  <xsl:choose>
3501
3537
  <xsl:when test="$target_text = ''">
3502
3538
  <xsl:apply-templates/>
@@ -3520,19 +3556,19 @@
3520
3556
  </fo:inline>
3521
3557
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3522
3558
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3523
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3559
+ <xsl:apply-templates select="*[local-name()='title']"/>
3524
3560
  </fo:block>
3525
- <xsl:apply-templates/>
3526
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3561
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
3562
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
3527
3563
  <xsl:variable name="level">
3528
3564
  <xsl:call-template name="getLevel"/>
3529
3565
  </xsl:variable>
3530
3566
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3531
3567
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3532
3568
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3533
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3569
+ <xsl:apply-templates select="*[local-name()='name']"/>
3534
3570
  </fo:block>
3535
- <xsl:apply-templates/>
3571
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
3536
3572
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
3537
3573
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3538
3574
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -3554,7 +3590,6 @@
3554
3590
  </fo:inline>
3555
3591
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3556
3592
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3557
-
3558
3593
  <xsl:apply-templates/>
3559
3594
  </fo:basic-link>
3560
3595
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3582,49 +3617,64 @@
3582
3617
  <fo:inline>
3583
3618
  <xsl:apply-templates/>
3584
3619
  </fo:inline>
3585
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3620
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
3586
3621
  <xsl:if test="normalize-space() != ''">
3587
3622
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3588
3623
  </xsl:if>
3589
3624
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3590
3625
 
3591
3626
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3627
+
3628
+
3629
+
3630
+
3631
+
3592
3632
 
3593
3633
 
3594
3634
 
3635
+
3595
3636
 
3596
3637
 
3597
3638
  <fo:block-container margin-left="0mm">
3639
+
3598
3640
 
3599
3641
 
3600
3642
 
3643
+
3601
3644
 
3602
-
3603
-
3604
-
3605
-
3606
- <fo:block>
3607
-
3608
-
3609
-
3610
-
3611
-
3645
+ <fo:block>
3646
+
3647
+
3612
3648
 
3613
- <fo:inline xsl:use-attribute-sets="note-name-style">
3614
3649
 
3615
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3616
- </fo:inline>
3617
- <xsl:apply-templates/>
3618
- </fo:block>
3619
-
3620
-
3650
+
3651
+
3652
+
3653
+ <fo:inline xsl:use-attribute-sets="note-name-style">
3654
+
3655
+
3656
+
3657
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3658
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3659
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3660
+ <xsl:with-param name="skip">false</xsl:with-param>
3661
+ </xsl:apply-templates>
3662
+ </xsl:if>
3663
+
3664
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3665
+
3666
+ </fo:inline>
3667
+
3668
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3669
+ </fo:block>
3670
+
3621
3671
  </fo:block-container>
3622
3672
  </fo:block-container>
3623
3673
 
3624
3674
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3625
3675
  <xsl:variable name="num"><xsl:number/></xsl:variable>
3626
3676
  <xsl:choose>
3627
- <xsl:when test="$num = 1">
3677
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
3628
3678
  <fo:inline xsl:use-attribute-sets="note-p-style">
3629
3679
  <xsl:apply-templates/>
3630
3680
  </fo:inline>
@@ -3639,12 +3689,16 @@
3639
3689
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3640
3690
 
3641
3691
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3692
+
3693
+
3694
+
3695
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3642
3696
 
3643
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3644
3697
  </fo:inline>
3645
- <xsl:apply-templates/>
3698
+
3699
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3646
3700
  </fo:block>
3647
- </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">
3701
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
3648
3702
  <xsl:param name="sfx"/>
3649
3703
  <xsl:variable name="suffix">
3650
3704
  <xsl:choose>
@@ -3661,7 +3715,7 @@
3661
3715
  <xsl:apply-templates/>
3662
3716
  <xsl:value-of select="$suffix"/>
3663
3717
  </xsl:if>
3664
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
3718
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
3665
3719
  <xsl:param name="sfx"/>
3666
3720
  <xsl:variable name="suffix">
3667
3721
  <xsl:choose>
@@ -3686,25 +3740,23 @@
3686
3740
  <xsl:apply-templates/>
3687
3741
  </fo:block>
3688
3742
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3689
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
3690
3743
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3691
3744
 
3692
3745
 
3746
+
3747
+
3693
3748
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
3694
3749
 
3695
3750
  </xsl:if>
3696
- <xsl:apply-templates/>
3751
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3697
3752
  </fo:block>
3698
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3753
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
3699
3754
  <xsl:if test="normalize-space() != ''">
3700
3755
  <xsl:variable name="level">
3701
3756
  <xsl:call-template name="getLevelTermName"/>
3702
3757
  </xsl:variable>
3703
3758
  <fo:inline role="H{$level}">
3704
3759
  <xsl:apply-templates/>
3705
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3706
- <xsl:text>.</xsl:text>
3707
- </xsl:if> -->
3708
3760
  </fo:inline>
3709
3761
  </xsl:if>
3710
3762
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -3717,9 +3769,10 @@
3717
3769
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3718
3770
  </xsl:call-template>
3719
3771
 
3720
- <fo:block>
3721
-
3722
- <xsl:apply-templates/>
3772
+
3773
+
3774
+ <fo:block xsl:use-attribute-sets="figure-style">
3775
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3723
3776
  </fo:block>
3724
3777
  <xsl:call-template name="fn_display_figure"/>
3725
3778
  <xsl:for-each select="*[local-name() = 'note']">
@@ -3727,14 +3780,15 @@
3727
3780
  </xsl:for-each>
3728
3781
 
3729
3782
 
3730
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3783
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
3784
+
3731
3785
 
3732
3786
  </fo:block-container>
3733
3787
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3734
3788
  <fo:block id="{@id}">
3735
- <xsl:apply-templates/>
3789
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3736
3790
  </fo:block>
3737
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3791
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3738
3792
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3739
3793
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3740
3794
  <xsl:apply-templates/>
@@ -3841,9 +3895,7 @@
3841
3895
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
3842
3896
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
3843
3897
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
3844
- <!-- width=<xsl:value-of select="$width"/> -->
3845
3898
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
3846
- <!-- height=<xsl:value-of select="$height"/> -->
3847
3899
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
3848
3900
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
3849
3901
  <xsl:call-template name="svg_cross">
@@ -4113,7 +4165,7 @@
4113
4165
  </fo:basic-link>
4114
4166
  </fo:block>
4115
4167
  </fo:block-container>
4116
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
4168
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
4117
4169
  <xsl:apply-templates mode="contents"/>
4118
4170
  <xsl:text> </xsl:text>
4119
4171
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -4125,11 +4177,72 @@
4125
4177
  <xsl:value-of select="."/>
4126
4178
  </xsl:template><xsl:template match="node()" mode="contents">
4127
4179
  <xsl:apply-templates mode="contents"/>
4180
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4181
+ <xsl:variable name="level">
4182
+ <xsl:call-template name="getLevel">
4183
+ <xsl:with-param name="depth" select="@depth"/>
4184
+ </xsl:call-template>
4185
+ </xsl:variable>
4186
+
4187
+ <xsl:variable name="section">
4188
+ <xsl:choose>
4189
+ <xsl:when test="@type = 'section-title'"/>
4190
+ <xsl:otherwise>
4191
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4192
+ </xsl:otherwise>
4193
+ </xsl:choose>
4194
+ </xsl:variable>
4195
+
4196
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
4197
+
4198
+ <xsl:variable name="display">
4199
+ <xsl:choose>
4200
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
4201
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
4202
+ <xsl:otherwise>false</xsl:otherwise>
4203
+ </xsl:choose>
4204
+ </xsl:variable>
4205
+
4206
+ <xsl:variable name="skip">false</xsl:variable>
4207
+
4208
+ <xsl:if test="$skip = 'false'">
4209
+
4210
+ <xsl:variable name="title">
4211
+ <xsl:choose>
4212
+ <xsl:when test="*[local-name() = 'tab']">
4213
+ <xsl:choose>
4214
+ <xsl:when test="@type = 'section-title'">
4215
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4216
+ <xsl:text>: </xsl:text>
4217
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4218
+ </xsl:when>
4219
+ <xsl:otherwise>
4220
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4221
+ </xsl:otherwise>
4222
+ </xsl:choose>
4223
+ </xsl:when>
4224
+ <xsl:otherwise>
4225
+ <xsl:copy-of select="node()"/>
4226
+ </xsl:otherwise>
4227
+ </xsl:choose>
4228
+ </xsl:variable>
4229
+
4230
+ <xsl:variable name="root">
4231
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
4232
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
4233
+ </xsl:variable>
4234
+
4235
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
4236
+ <title>
4237
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
4238
+ </title>
4239
+ </item>
4240
+ </xsl:if>
4128
4241
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4129
4242
  <xsl:apply-templates mode="bookmarks"/>
4130
4243
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4131
4244
  <xsl:apply-templates select="."/>
4132
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4245
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4133
4246
  <xsl:apply-templates mode="bookmarks"/>
4134
4247
  </xsl:template><xsl:template name="addBookmarks">
4135
4248
  <xsl:param name="contents"/>
@@ -4219,8 +4332,6 @@
4219
4332
 
4220
4333
 
4221
4334
 
4222
-
4223
-
4224
4335
  </fo:bookmark-tree>
4225
4336
  </xsl:if>
4226
4337
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4291,7 +4402,7 @@
4291
4402
  <xsl:apply-templates mode="bookmark"/>
4292
4403
  </xsl:otherwise>
4293
4404
  </xsl:choose>
4294
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
4405
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
4295
4406
  <xsl:if test="normalize-space() != ''">
4296
4407
  <fo:block xsl:use-attribute-sets="figure-name-style">
4297
4408
 
@@ -4300,16 +4411,13 @@
4300
4411
  </fo:block>
4301
4412
  </xsl:if>
4302
4413
  </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">
4303
- <xsl:apply-templates mode="contents_item"/>
4414
+ <xsl:param name="mode">bookmarks</xsl:param>
4415
+ <xsl:apply-templates mode="contents_item">
4416
+ <xsl:with-param name="mode" select="$mode"/>
4417
+ </xsl:apply-templates>
4304
4418
  <!-- <xsl:text> </xsl:text> -->
4305
4419
  </xsl:template><xsl:template name="getSection">
4306
4420
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4307
- <!--
4308
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
4309
- <xsl:value-of select="."/>
4310
- </xsl:for-each>
4311
- -->
4312
-
4313
4421
  </xsl:template><xsl:template name="getName">
4314
4422
  <xsl:choose>
4315
4423
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4373,9 +4481,26 @@
4373
4481
  <xsl:copy-of select="."/>
4374
4482
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4375
4483
  <xsl:text> </xsl:text>
4484
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
4485
+ <xsl:param name="mode">bookmarks</xsl:param>
4486
+ <xsl:apply-templates mode="contents_item">
4487
+ <xsl:with-param name="mode" select="$mode"/>
4488
+ </xsl:apply-templates>
4489
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
4490
+ <xsl:param name="mode">bookmarks</xsl:param>
4491
+ <xsl:choose>
4492
+ <xsl:when test="starts-with(text(), $ace_tag)">
4493
+ <xsl:if test="$mode = 'contents'">
4494
+ <xsl:copy>
4495
+ <xsl:apply-templates mode="contents_item"/>
4496
+ </xsl:copy>
4497
+ </xsl:if>
4498
+ </xsl:when>
4499
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4500
+ </xsl:choose>
4376
4501
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4377
4502
 
4378
- <fo:block-container margin-left="0mm">
4503
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
4379
4504
  <xsl:copy-of select="@id"/>
4380
4505
 
4381
4506
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -4412,6 +4537,7 @@
4412
4537
 
4413
4538
 
4414
4539
  </xsl:variable>
4540
+
4415
4541
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4416
4542
  <xsl:if test="$font-size != ''">
4417
4543
  <xsl:attribute name="font-size">
@@ -4428,11 +4554,11 @@
4428
4554
 
4429
4555
 
4430
4556
 
4431
- <xsl:apply-templates/>
4557
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4432
4558
  </fo:block>
4433
4559
 
4434
4560
 
4435
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4561
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
4436
4562
 
4437
4563
 
4438
4564
 
@@ -4446,7 +4572,7 @@
4446
4572
  <xsl:call-template name="add-zero-spaces-java">
4447
4573
  <xsl:with-param name="text" select="$text"/>
4448
4574
  </xsl:call-template>
4449
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4575
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
4450
4576
  <xsl:if test="normalize-space() != ''">
4451
4577
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4452
4578
  <xsl:apply-templates/>
@@ -4454,10 +4580,10 @@
4454
4580
  </xsl:if>
4455
4581
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
4456
4582
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4457
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4458
- <xsl:apply-templates/>
4583
+ <xsl:apply-templates select="*[local-name()='name']"/>
4584
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4459
4585
  </fo:block>
4460
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4586
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
4461
4587
  <xsl:if test="normalize-space() != ''">
4462
4588
  <fo:block xsl:use-attribute-sets="permission-name-style">
4463
4589
  <xsl:apply-templates/>
@@ -4470,13 +4596,13 @@
4470
4596
  </fo:block>
4471
4597
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4472
4598
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4473
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4474
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4475
- <xsl:apply-templates select="@obligation" mode="presentation"/>
4476
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4477
- <xsl:apply-templates/>
4599
+ <xsl:apply-templates select="*[local-name()='name']"/>
4600
+ <xsl:apply-templates select="*[local-name()='label']"/>
4601
+ <xsl:apply-templates select="@obligation"/>
4602
+ <xsl:apply-templates select="*[local-name()='subject']"/>
4603
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
4478
4604
  </fo:block>
4479
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4605
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
4480
4606
  <xsl:if test="normalize-space() != ''">
4481
4607
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4482
4608
 
@@ -4484,20 +4610,24 @@
4484
4610
 
4485
4611
  </fo:block>
4486
4612
  </xsl:if>
4487
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4613
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
4488
4614
  <fo:block xsl:use-attribute-sets="requirement-label-style">
4489
4615
  <xsl:apply-templates/>
4490
4616
  </fo:block>
4491
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4617
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
4492
4618
  <fo:block>
4493
4619
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4494
4620
  </fo:block>
4621
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
4622
+ <fo:block xsl:use-attribute-sets="subject-style">
4623
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4624
+ </fo:block>
4495
4625
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4496
4626
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4497
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4498
- <xsl:apply-templates/>
4627
+ <xsl:apply-templates select="*[local-name()='name']"/>
4628
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4499
4629
  </fo:block>
4500
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4630
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
4501
4631
  <xsl:if test="normalize-space() != ''">
4502
4632
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
4503
4633
  <xsl:apply-templates/>
@@ -4508,10 +4638,6 @@
4508
4638
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4509
4639
  <xsl:apply-templates/>
4510
4640
  </fo:block>
4511
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4512
- <fo:block xsl:use-attribute-sets="subject-style">
4513
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4514
- </fo:block>
4515
4641
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
4516
4642
  <fo:block xsl:use-attribute-sets="subject-style">
4517
4643
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -4555,8 +4681,6 @@
4555
4681
  </xsl:variable>
4556
4682
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4557
4683
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4558
- <!-- <fo:table-column column-width="35mm"/>
4559
- <fo:table-column column-width="115mm"/> -->
4560
4684
  <fo:table-column column-width="30%"/>
4561
4685
  <fo:table-column column-width="70%"/>
4562
4686
  </xsl:if>
@@ -4566,7 +4690,7 @@
4566
4690
  <xsl:if test=".//*[local-name() = 'fn']">
4567
4691
  <xsl:for-each select="*[local-name() = 'tbody']">
4568
4692
  <fo:block font-size="90%" border-bottom="1pt solid black">
4569
- <xsl:call-template name="fn_display"/>
4693
+ <xsl:call-template name="table_fn_display"/>
4570
4694
  </fo:block>
4571
4695
  </xsl:for-each>
4572
4696
  </xsl:if>
@@ -4583,7 +4707,6 @@
4583
4707
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4584
4708
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4585
4709
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4586
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4587
4710
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4588
4711
  </xsl:if>
4589
4712
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -4593,37 +4716,14 @@
4593
4716
  <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
4594
4717
  </xsl:if>
4595
4718
  <xsl:apply-templates mode="requirement"/>
4596
- </fo:table-row>
4597
- </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4598
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4599
- <xsl:attribute name="text-align">
4600
- <xsl:choose>
4601
- <xsl:when test="@align">
4602
- <xsl:value-of select="@align"/>
4603
- </xsl:when>
4604
- <xsl:otherwise>left</xsl:otherwise>
4605
- </xsl:choose>
4606
- </xsl:attribute>
4607
- <xsl:if test="@colspan">
4608
- <xsl:attribute name="number-columns-spanned">
4609
- <xsl:value-of select="@colspan"/>
4610
- </xsl:attribute>
4611
- </xsl:if>
4612
- <xsl:if test="@rowspan">
4613
- <xsl:attribute name="number-rows-spanned">
4614
- <xsl:value-of select="@rowspan"/>
4615
- </xsl:attribute>
4616
- </xsl:if>
4617
- <xsl:call-template name="display-align"/>
4719
+ </fo:table-row>
4720
+ </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4721
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4722
+ <xsl:call-template name="setTextAlignment">
4723
+ <xsl:with-param name="default">left</xsl:with-param>
4724
+ </xsl:call-template>
4618
4725
 
4619
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4620
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4621
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
4622
- </xsl:if>
4623
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
4624
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4625
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4626
- </xsl:if> -->
4726
+ <xsl:call-template name="setTableCellAttributes"/>
4627
4727
 
4628
4728
  <fo:block>
4629
4729
  <xsl:apply-templates/>
@@ -4635,37 +4735,15 @@
4635
4735
  <xsl:attribute name="padding">0mm</xsl:attribute>
4636
4736
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
4637
4737
  </xsl:if>
4638
- <xsl:attribute name="text-align">
4639
- <xsl:choose>
4640
- <xsl:when test="@align">
4641
- <xsl:value-of select="@align"/>
4642
- </xsl:when>
4643
- <xsl:otherwise>left</xsl:otherwise>
4644
- </xsl:choose>
4645
- </xsl:attribute>
4738
+ <xsl:call-template name="setTextAlignment">
4739
+ <xsl:with-param name="default">left</xsl:with-param>
4740
+ </xsl:call-template>
4741
+
4646
4742
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
4647
4743
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4648
4744
  </xsl:if>
4649
- <xsl:if test="@colspan">
4650
- <xsl:attribute name="number-columns-spanned">
4651
- <xsl:value-of select="@colspan"/>
4652
- </xsl:attribute>
4653
- </xsl:if>
4654
- <xsl:if test="@rowspan">
4655
- <xsl:attribute name="number-rows-spanned">
4656
- <xsl:value-of select="@rowspan"/>
4657
- </xsl:attribute>
4658
- </xsl:if>
4659
- <xsl:call-template name="display-align"/>
4660
4745
 
4661
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4662
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
4663
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4664
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
4665
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4666
- </xsl:if>
4667
- </xsl:if> -->
4668
- <!-- 2nd line and below -->
4746
+ <xsl:call-template name="setTableCellAttributes"/>
4669
4747
 
4670
4748
  <fo:block>
4671
4749
  <xsl:apply-templates/>
@@ -4677,15 +4755,15 @@
4677
4755
  <xsl:apply-templates/>
4678
4756
  </fo:block>
4679
4757
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
4680
- <fo:block> <!-- margin-bottom="10pt" -->
4758
+ <fo:block>
4681
4759
  <xsl:apply-templates/>
4682
4760
  </fo:block>
4683
4761
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4684
4762
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4685
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4686
- <xsl:apply-templates/>
4763
+ <xsl:apply-templates select="*[local-name()='name']"/>
4764
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4687
4765
  </fo:block>
4688
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
4766
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
4689
4767
  <xsl:if test="normalize-space() != ''">
4690
4768
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4691
4769
  <xsl:apply-templates/>
@@ -4709,42 +4787,46 @@
4709
4787
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4710
4788
 
4711
4789
 
4712
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4713
-
4714
- <xsl:variable name="element">
4715
- block
4716
-
4717
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
4790
+ <xsl:variable name="fo_element">
4791
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
4792
+ block
4718
4793
  </xsl:variable>
4719
4794
 
4795
+ <!-- display 'EXAMPLE' -->
4796
+ <xsl:apply-templates select="*[local-name()='name']">
4797
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4798
+ </xsl:apply-templates>
4799
+
4720
4800
  <xsl:choose>
4721
- <xsl:when test="contains(normalize-space($element), 'block')">
4722
- <fo:block xsl:use-attribute-sets="example-body-style">
4723
- <xsl:apply-templates/>
4724
- </fo:block>
4801
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4802
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
4803
+ <fo:block-container margin-left="0mm" margin-right="0mm">
4804
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
4805
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4806
+ </xsl:apply-templates>
4807
+ </fo:block-container>
4808
+ </fo:block-container>
4725
4809
  </xsl:when>
4726
4810
  <xsl:otherwise>
4727
4811
  <fo:inline>
4728
- <xsl:apply-templates/>
4812
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
4813
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4814
+ </xsl:apply-templates>
4729
4815
  </fo:inline>
4730
4816
  </xsl:otherwise>
4731
4817
  </xsl:choose>
4732
4818
 
4733
4819
  </fo:block>
4734
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
4735
-
4736
- <xsl:variable name="element">
4737
- block
4738
-
4739
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
4740
- </xsl:variable>
4820
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
4821
+ <xsl:param name="fo_element">block</xsl:param>
4822
+
4741
4823
  <xsl:choose>
4742
4824
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
4743
4825
  <fo:inline>
4744
4826
  <xsl:apply-templates/>
4745
4827
  </fo:inline>
4746
4828
  </xsl:when>
4747
- <xsl:when test="contains(normalize-space($element), 'block')">
4829
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4748
4830
  <fo:block xsl:use-attribute-sets="example-name-style">
4749
4831
  <xsl:apply-templates/>
4750
4832
  </fo:block>
@@ -4757,14 +4839,15 @@
4757
4839
  </xsl:choose>
4758
4840
 
4759
4841
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4842
+ <xsl:param name="fo_element">block</xsl:param>
4843
+
4760
4844
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4761
4845
  <xsl:variable name="element">
4762
- block
4763
-
4764
4846
 
4847
+ <xsl:value-of select="$fo_element"/>
4765
4848
  </xsl:variable>
4766
4849
  <xsl:choose>
4767
- <xsl:when test="normalize-space($element) = 'block'">
4850
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
4768
4851
  <fo:block xsl:use-attribute-sets="example-p-style">
4769
4852
 
4770
4853
  <xsl:apply-templates/>
@@ -4779,6 +4862,8 @@
4779
4862
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4780
4863
  <fo:block xsl:use-attribute-sets="termsource-style">
4781
4864
 
4865
+
4866
+
4782
4867
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4783
4868
  <xsl:variable name="termsource_text">
4784
4869
  <xsl:apply-templates/>
@@ -4816,9 +4901,7 @@
4816
4901
  <xsl:value-of select="."/>
4817
4902
  </xsl:if>
4818
4903
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
4819
- <fo:inline>
4820
-
4821
-
4904
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
4822
4905
  <xsl:value-of select="."/>
4823
4906
  </fo:inline>
4824
4907
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -4832,12 +4915,9 @@
4832
4915
  </fo:basic-link>
4833
4916
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
4834
4917
  <xsl:variable name="title-modified">
4835
-
4836
-
4837
- <xsl:call-template name="getTitle">
4838
- <xsl:with-param name="name" select="'title-modified'"/>
4839
- </xsl:call-template>
4840
-
4918
+ <xsl:call-template name="getLocalizedString">
4919
+ <xsl:with-param name="key">modified</xsl:with-param>
4920
+ </xsl:call-template>
4841
4921
  </xsl:variable>
4842
4922
 
4843
4923
  <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
@@ -4864,7 +4944,6 @@
4864
4944
  <fo:block-container margin-left="0mm">
4865
4945
 
4866
4946
  <fo:block xsl:use-attribute-sets="quote-style">
4867
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4868
4947
 
4869
4948
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4870
4949
  </fo:block>
@@ -4907,15 +4986,13 @@
4907
4986
  </xsl:variable>
4908
4987
 
4909
4988
  <xsl:choose>
4910
- <xsl:when test="normalize-space($bibitemid) != ''">
4989
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
4911
4990
  <fo:inline xsl:use-attribute-sets="eref-style">
4912
4991
  <xsl:if test="@type = 'footnote'">
4913
-
4914
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4915
- <xsl:attribute name="font-size">80%</xsl:attribute>
4916
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4917
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4918
-
4992
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4993
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4994
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4995
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4919
4996
 
4920
4997
  </xsl:if>
4921
4998
 
@@ -4935,7 +5012,6 @@
4935
5012
 
4936
5013
 
4937
5014
 
4938
-
4939
5015
  </xsl:if>
4940
5016
 
4941
5017
 
@@ -4988,8 +5064,6 @@
4988
5064
  </xsl:choose>
4989
5065
  </xsl:variable>
4990
5066
 
4991
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
4992
-
4993
5067
  <xsl:choose>
4994
5068
  <xsl:when test="$lang = 'zh'">
4995
5069
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5024,12 +5098,9 @@
5024
5098
  </fo:block>
5025
5099
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5026
5100
  <xsl:variable name="title-deprecated">
5027
-
5028
-
5029
- <xsl:call-template name="getTitle">
5030
- <xsl:with-param name="name" select="'title-deprecated'"/>
5031
- </xsl:call-template>
5032
-
5101
+ <xsl:call-template name="getLocalizedString">
5102
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5103
+ </xsl:call-template>
5033
5104
  </xsl:variable>
5034
5105
  <fo:block xsl:use-attribute-sets="deprecates-style">
5035
5106
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -5038,6 +5109,8 @@
5038
5109
  <xsl:if test="*[local-name() = 'strong']">
5039
5110
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5040
5111
  </xsl:if>
5112
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
5113
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5041
5114
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5042
5115
  <fo:block xsl:use-attribute-sets="definition-style">
5043
5116
  <xsl:apply-templates/>
@@ -5046,7 +5119,6 @@
5046
5119
  <xsl:apply-templates/>
5047
5120
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5048
5121
  <fo:inline> <xsl:apply-templates/></fo:inline>
5049
- <!-- <fo:block>&#xA0;</fo:block> -->
5050
5122
  <fo:block/>
5051
5123
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5052
5124
 
@@ -5082,11 +5154,6 @@
5082
5154
  <xsl:apply-templates/>
5083
5155
  </fo:block>
5084
5156
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5085
- <fo:block id="{@id}">
5086
- <xsl:apply-templates/>
5087
- </fo:block>
5088
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
5089
-
5090
5157
  <fo:block id="{@id}">
5091
5158
  <xsl:apply-templates/>
5092
5159
  </fo:block>
@@ -5103,6 +5170,51 @@
5103
5170
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5104
5171
  <!-- 0xA0 to space replacement -->
5105
5172
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5173
+ </xsl:template><xsl:variable name="ul_labels_">
5174
+
5175
+
5176
+
5177
+
5178
+
5179
+
5180
+
5181
+
5182
+
5183
+
5184
+ <label>—</label> <!-- em dash -->
5185
+
5186
+
5187
+
5188
+
5189
+
5190
+
5191
+
5192
+
5193
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
5194
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
5195
+ <xsl:variable name="list_level">
5196
+ <xsl:choose>
5197
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
5198
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
5199
+ </xsl:choose>
5200
+ </xsl:variable>
5201
+ <xsl:choose>
5202
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
5203
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
5204
+ </xsl:when>
5205
+ <xsl:when test="$list_level mod 3 = 0">
5206
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
5207
+ </xsl:when>
5208
+ <xsl:when test="$list_level mod 2 = 0">
5209
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
5210
+ </xsl:when>
5211
+ <xsl:otherwise>
5212
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
5213
+ </xsl:otherwise>
5214
+ </xsl:choose>
5215
+ </xsl:template><xsl:template match="label" mode="ul_labels">
5216
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
5217
+ <xsl:value-of select="."/>
5106
5218
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5107
5219
  <xsl:choose>
5108
5220
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -5309,20 +5421,102 @@
5309
5421
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
5310
5422
  <fo:block><xsl:apply-templates/></fo:block>
5311
5423
  </fo:table-cell>
5312
- </xsl:template><xsl:template name="processBibitem">
5424
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
5425
+
5426
+
5427
+
5428
+ <fo:block id="{@id}">
5429
+ <xsl:apply-templates/>
5430
+ </fo:block>
5431
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
5432
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
5433
+
5434
+ <fo:block break-after="page"/>
5435
+
5436
+ </xsl:if>
5437
+
5438
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
5439
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
5440
+ <fo:block break-after="page"/>
5441
+ </xsl:if>
5442
+ </xsl:if> -->
5313
5443
 
5444
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
5445
+ <xsl:apply-templates/>
5446
+ </fo:block>
5314
5447
 
5315
5448
 
5316
-
5317
5449
 
5318
5450
 
5319
-
5451
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
5452
+ <xsl:call-template name="bibitem"/>
5453
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
5320
5454
 
5455
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
5456
+ <xsl:call-template name="processBibitem"/>
5457
+ </fo:block>
5458
+
5459
+
5460
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
5461
+
5462
+ <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
5463
+ $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
5464
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
5465
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
5466
+ <fo:list-item>
5467
+ <fo:list-item-label end-indent="label-end()">
5468
+ <fo:block>
5469
+ <fo:inline>
5470
+
5471
+ <xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
5472
+ <xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
5473
+ <xsl:number format="[1]"/>
5474
+ </xsl:if>
5475
+
5476
+ </fo:inline>
5477
+ </fo:block>
5478
+ </fo:list-item-label>
5479
+ <fo:list-item-body start-indent="body-start()">
5480
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
5481
+ <xsl:call-template name="processBibitem"/>
5482
+ </fo:block>
5483
+ </fo:list-item-body>
5484
+ </fo:list-item>
5485
+ </fo:list-block>
5486
+
5321
5487
 
5488
+ </xsl:template><xsl:template name="processBibitem">
5322
5489
 
5323
5490
 
5491
+ <!-- start bibitem processing -->
5492
+ <xsl:if test=".//*[local-name() = 'fn']">
5493
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
5494
+ </xsl:if>
5495
+ <xsl:variable name="docidentifier">
5496
+ <xsl:choose>
5497
+ <xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
5498
+ <xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
5499
+ </xsl:choose>
5500
+ </xsl:variable>
5501
+ <fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
5502
+ <xsl:apply-templates select="*[local-name() = 'note']"/>
5503
+ <xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
5504
+ <xsl:choose>
5505
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = $lang]">
5506
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = $lang]"/>
5507
+ </xsl:when>
5508
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
5509
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
5510
+ </xsl:when>
5511
+ <xsl:otherwise>
5512
+ <xsl:apply-templates select="*[local-name() = 'title']"/>
5513
+ </xsl:otherwise>
5514
+ </xsl:choose>
5515
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
5516
+ <!-- end bibitem processing -->
5517
+
5324
5518
  </xsl:template><xsl:template name="processBibitemDocId">
5325
- <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5519
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5326
5520
  <xsl:choose>
5327
5521
  <xsl:when test="normalize-space($_doc_ident) != ''">
5328
5522
  <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
@@ -5336,7 +5530,7 @@
5336
5530
  <xsl:if test="$type != ''">
5337
5531
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5338
5532
  </xsl:if> -->
5339
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
5533
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
5340
5534
  </xsl:otherwise>
5341
5535
  </xsl:choose>
5342
5536
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -5377,6 +5571,48 @@
5377
5571
  <xsl:value-of select="substring(.,1,1)"/>
5378
5572
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5379
5573
  <fo:inline><xsl:apply-templates/></fo:inline>
5574
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
5575
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
5576
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
5577
+ <xsl:apply-templates/>
5578
+ </fo:inline>
5579
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
5580
+ <fo:footnote>
5581
+ <xsl:variable name="number">
5582
+
5583
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5584
+
5585
+ </xsl:variable>
5586
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
5587
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
5588
+ <xsl:value-of select="$number"/>
5589
+
5590
+ </fo:basic-link>
5591
+ </fo:inline>
5592
+ <fo:footnote-body>
5593
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
5594
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
5595
+ <xsl:value-of select="$number"/>
5596
+
5597
+ </fo:inline>
5598
+ <xsl:apply-templates/>
5599
+ </fo:block>
5600
+ </fo:footnote-body>
5601
+ </fo:footnote>
5602
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
5603
+ <xsl:text> edition </xsl:text>
5604
+ <xsl:value-of select="."/>
5605
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
5606
+ <xsl:text> (</xsl:text>
5607
+ <fo:inline xsl:use-attribute-sets="link-style">
5608
+ <fo:basic-link external-destination="." fox:alt-text=".">
5609
+ <xsl:value-of select="."/>
5610
+ </fo:basic-link>
5611
+ </fo:inline>
5612
+ <xsl:text>)</xsl:text>
5613
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
5614
+
5615
+ <xsl:apply-templates/>
5380
5616
  </xsl:template><xsl:template match="*[local-name() = 'form']">
5381
5617
  <fo:block>
5382
5618
  <xsl:apply-templates/>
@@ -5442,27 +5678,14 @@
5442
5678
  <fo:block> </fo:block>
5443
5679
  </fo:block-container>
5444
5680
  </xsl:template><xsl:variable name="toc_level">
5681
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
5682
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
5683
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
5445
5684
  <xsl:choose>
5446
- <xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
5685
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
5686
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
5447
5687
  <xsl:otherwise><!-- default value -->
5448
-
5449
-
5450
-
5451
-
5452
-
5453
-
5454
-
5455
-
5456
-
5457
-
5458
5688
  2
5459
-
5460
-
5461
-
5462
-
5463
-
5464
-
5465
-
5466
5689
  </xsl:otherwise>
5467
5690
  </xsl:choose>
5468
5691
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -5545,7 +5768,7 @@
5545
5768
  </td>
5546
5769
  </xsl:for-each>
5547
5770
  <td>333</td> <!-- page number, just for fill -->
5548
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5771
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5549
5772
  <fo:inline padding-right="5mm"> </fo:inline>
5550
5773
  <fo:inline><xsl:apply-templates/></fo:inline>
5551
5774
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -5556,6 +5779,61 @@
5556
5779
  </svg>
5557
5780
  </fo:instream-foreign-object>
5558
5781
  </fo:inline>
5782
+ </xsl:template><xsl:template match="@language">
5783
+ <xsl:copy-of select="."/>
5784
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
5785
+ <xsl:call-template name="title"/>
5786
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
5787
+
5788
+
5789
+
5790
+
5791
+
5792
+ <!-- text in the box -->
5793
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
5794
+
5795
+
5796
+
5797
+
5798
+
5799
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
5800
+
5801
+
5802
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
5803
+ <xsl:call-template name="displayAdmonitionName"/>
5804
+ </fo:block>
5805
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
5806
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5807
+ </fo:block>
5808
+
5809
+ </fo:block-container>
5810
+
5811
+ </fo:block-container>
5812
+
5813
+ </xsl:template><xsl:template name="displayAdmonitionName">
5814
+
5815
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5816
+ <xsl:if test="not(*[local-name() = 'name'])">
5817
+ <xsl:apply-templates select="@type"/>
5818
+ </xsl:if>
5819
+
5820
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
5821
+ <xsl:apply-templates/>
5822
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
5823
+ <xsl:variable name="admonition_type_">
5824
+ <xsl:call-template name="getLocalizedString">
5825
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
5826
+ </xsl:call-template>
5827
+ </xsl:variable>
5828
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
5829
+ <xsl:value-of select="$admonition_type"/>
5830
+ <xsl:if test="$admonition_type = ''">
5831
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
5832
+ </xsl:if>
5833
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
5834
+ <!-- processing for admonition/p found in the template for 'p' -->
5835
+ <xsl:call-template name="paragraph"/>
5836
+
5559
5837
  </xsl:template><xsl:template name="convertDate">
5560
5838
  <xsl:param name="date"/>
5561
5839
  <xsl:param name="format" select="'short'"/>
@@ -5563,83 +5841,80 @@
5563
5841
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
5564
5842
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
5565
5843
  <xsl:variable name="monthStr">
5566
- <xsl:choose>
5567
- <xsl:when test="$month = '01'">January</xsl:when>
5568
- <xsl:when test="$month = '02'">February</xsl:when>
5569
- <xsl:when test="$month = '03'">March</xsl:when>
5570
- <xsl:when test="$month = '04'">April</xsl:when>
5571
- <xsl:when test="$month = '05'">May</xsl:when>
5572
- <xsl:when test="$month = '06'">June</xsl:when>
5573
- <xsl:when test="$month = '07'">July</xsl:when>
5574
- <xsl:when test="$month = '08'">August</xsl:when>
5575
- <xsl:when test="$month = '09'">September</xsl:when>
5576
- <xsl:when test="$month = '10'">October</xsl:when>
5577
- <xsl:when test="$month = '11'">November</xsl:when>
5578
- <xsl:when test="$month = '12'">December</xsl:when>
5579
- </xsl:choose>
5844
+ <xsl:call-template name="getMonthByNum">
5845
+ <xsl:with-param name="num" select="$month"/>
5846
+ <xsl:with-param name="lowercase" select="'true'"/>
5847
+ </xsl:call-template>
5848
+ </xsl:variable>
5849
+ <xsl:variable name="monthStr_localized">
5850
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
5580
5851
  </xsl:variable>
5581
5852
  <xsl:variable name="result">
5582
5853
  <xsl:choose>
5583
- <xsl:when test="$format = 'ddMMyyyy'">
5854
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
5584
5855
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5585
5856
  <xsl:text> </xsl:text>
5586
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5857
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
5587
5858
  </xsl:when>
5588
5859
  <xsl:when test="$format = 'ddMM'">
5589
5860
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5590
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5861
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
5591
5862
  </xsl:when>
5592
5863
  <xsl:when test="$format = 'short' or $day = ''">
5593
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5864
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
5594
5865
  </xsl:when>
5595
5866
  <xsl:otherwise>
5596
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
5867
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
5597
5868
  </xsl:otherwise>
5598
5869
  </xsl:choose>
5599
5870
  </xsl:variable>
5600
5871
  <xsl:value-of select="$result"/>
5601
- </xsl:template><xsl:template name="convertDateLocalized">
5602
- <xsl:param name="date"/>
5603
- <xsl:param name="format" select="'short'"/>
5604
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
5605
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
5606
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
5607
- <xsl:variable name="monthStr">
5608
- <xsl:choose>
5609
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
5610
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
5611
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
5612
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
5613
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
5614
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
5615
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
5616
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
5617
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
5618
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
5619
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
5620
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
5621
- </xsl:choose>
5622
- </xsl:variable>
5623
- <xsl:variable name="result">
5872
+ </xsl:template><xsl:template name="getMonthByNum">
5873
+ <xsl:param name="num"/>
5874
+ <xsl:param name="lang">en</xsl:param>
5875
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
5876
+ <xsl:variable name="monthStr_">
5624
5877
  <xsl:choose>
5625
- <xsl:when test="$format = 'ddMMyyyy'">
5626
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5627
- <xsl:text> </xsl:text>
5628
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5629
- </xsl:when>
5630
- <xsl:when test="$format = 'ddMM'">
5631
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5632
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5633
- </xsl:when>
5634
- <xsl:when test="$format = 'short' or $day = ''">
5635
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5878
+ <xsl:when test="$lang = 'fr'">
5879
+ <xsl:choose>
5880
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
5881
+ <xsl:when test="$num = '02'">Février</xsl:when>
5882
+ <xsl:when test="$num = '03'">Mars</xsl:when>
5883
+ <xsl:when test="$num = '04'">Avril</xsl:when>
5884
+ <xsl:when test="$num = '05'">Mai</xsl:when>
5885
+ <xsl:when test="$num = '06'">Juin</xsl:when>
5886
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
5887
+ <xsl:when test="$num = '08'">Août</xsl:when>
5888
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
5889
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
5890
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
5891
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
5892
+ </xsl:choose>
5636
5893
  </xsl:when>
5637
5894
  <xsl:otherwise>
5638
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
5895
+ <xsl:choose>
5896
+ <xsl:when test="$num = '01'">January</xsl:when>
5897
+ <xsl:when test="$num = '02'">February</xsl:when>
5898
+ <xsl:when test="$num = '03'">March</xsl:when>
5899
+ <xsl:when test="$num = '04'">April</xsl:when>
5900
+ <xsl:when test="$num = '05'">May</xsl:when>
5901
+ <xsl:when test="$num = '06'">June</xsl:when>
5902
+ <xsl:when test="$num = '07'">July</xsl:when>
5903
+ <xsl:when test="$num = '08'">August</xsl:when>
5904
+ <xsl:when test="$num = '09'">September</xsl:when>
5905
+ <xsl:when test="$num = '10'">October</xsl:when>
5906
+ <xsl:when test="$num = '11'">November</xsl:when>
5907
+ <xsl:when test="$num = '12'">December</xsl:when>
5908
+ </xsl:choose>
5639
5909
  </xsl:otherwise>
5640
5910
  </xsl:choose>
5641
5911
  </xsl:variable>
5642
- <xsl:value-of select="$result"/>
5912
+ <xsl:choose>
5913
+ <xsl:when test="normalize-space($lowercase) = 'true'">
5914
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
5915
+ </xsl:when>
5916
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
5917
+ </xsl:choose>
5643
5918
  </xsl:template><xsl:template name="insertKeywords">
5644
5919
  <xsl:param name="sorting" select="'true'"/>
5645
5920
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -5687,14 +5962,9 @@
5687
5962
  <dc:title>
5688
5963
  <xsl:variable name="title">
5689
5964
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5690
-
5691
-
5692
-
5693
-
5694
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5695
-
5696
-
5697
5965
 
5966
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5967
+
5698
5968
  </xsl:for-each>
5699
5969
  </xsl:variable>
5700
5970
  <xsl:choose>
@@ -5709,14 +5979,18 @@
5709
5979
  <dc:creator>
5710
5980
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5711
5981
 
5712
-
5713
-
5982
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5983
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5984
+ <xsl:if test="position() != last()">; </xsl:if>
5985
+ </xsl:for-each>
5986
+
5714
5987
  </xsl:for-each>
5715
5988
  </dc:creator>
5716
5989
  <dc:description>
5717
5990
  <xsl:variable name="abstract">
5718
5991
 
5719
-
5992
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5993
+
5720
5994
  </xsl:variable>
5721
5995
  <xsl:value-of select="normalize-space($abstract)"/>
5722
5996
  </dc:description>
@@ -5736,7 +6010,6 @@
5736
6010
  <xsl:value-of select="../@id"/>
5737
6011
  </xsl:when>
5738
6012
  <xsl:otherwise>
5739
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
5740
6013
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
5741
6014
  </xsl:otherwise>
5742
6015
  </xsl:choose>
@@ -5762,9 +6035,6 @@
5762
6035
  <xsl:when test="ancestor::*[local-name() = 'preface']">
5763
6036
  <xsl:value-of select="$level_total - 2"/>
5764
6037
  </xsl:when>
5765
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
5766
- <xsl:value-of select="$level_total - 1"/>
5767
- </xsl:when> -->
5768
6038
  <xsl:when test="ancestor::*[local-name() = 'sections']">
5769
6039
  <xsl:value-of select="$level_total - 1"/>
5770
6040
  </xsl:when>
@@ -5906,9 +6176,15 @@
5906
6176
  </xsl:template><xsl:template name="getLocalizedString">
5907
6177
  <xsl:param name="key"/>
5908
6178
  <xsl:param name="formatted">false</xsl:param>
6179
+ <xsl:param name="lang"/>
5909
6180
 
5910
6181
  <xsl:variable name="curr_lang">
5911
- <xsl:call-template name="getLang"/>
6182
+ <xsl:choose>
6183
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
6184
+ <xsl:otherwise>
6185
+ <xsl:call-template name="getLang"/>
6186
+ </xsl:otherwise>
6187
+ </xsl:choose>
5912
6188
  </xsl:variable>
5913
6189
 
5914
6190
  <xsl:variable name="data_value">
@@ -5948,7 +6224,6 @@
5948
6224
  <xsl:value-of select="$key_"/>
5949
6225
  </xsl:otherwise>
5950
6226
  </xsl:choose>
5951
-
5952
6227
  </xsl:template><xsl:template name="setTrackChangesStyles">
5953
6228
  <xsl:param name="isAdded"/>
5954
6229
  <xsl:param name="isDeleted"/>
@@ -5971,7 +6246,6 @@
5971
6246
  <xsl:if test="local-name() = 'table'">
5972
6247
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
5973
6248
  </xsl:if>
5974
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
5975
6249
  <xsl:attribute name="padding">2mm</xsl:attribute>
5976
6250
  </xsl:if>
5977
6251
  </xsl:otherwise>
@@ -5991,15 +6265,18 @@
5991
6265
  </xsl:choose>
5992
6266
  </xsl:template><xsl:template name="setTextAlignment">
5993
6267
  <xsl:param name="default">left</xsl:param>
6268
+ <xsl:variable name="align" select="normalize-space(@align)"/>
5994
6269
  <xsl:attribute name="text-align">
5995
6270
  <xsl:choose>
5996
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6271
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
6272
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
6273
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
5997
6274
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
5998
6275
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
5999
6276
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6000
6277
  </xsl:choose>
6001
6278
  </xsl:attribute>
6002
- <xsl:if test="@align = 'indent'">
6279
+ <xsl:if test="$align = 'indent'">
6003
6280
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6004
6281
  </xsl:if>
6005
6282
  </xsl:template><xsl:template name="number-to-words">
@@ -6098,6 +6375,25 @@
6098
6375
  </xsl:otherwise>
6099
6376
  </xsl:choose>
6100
6377
  </xsl:if>
6378
+ </xsl:template><xsl:template name="number-to-ordinal">
6379
+ <xsl:param name="number"/>
6380
+ <xsl:param name="curr_lang"/>
6381
+ <xsl:choose>
6382
+ <xsl:when test="$curr_lang = 'fr'">
6383
+ <xsl:choose>
6384
+ <xsl:when test="$number = '1'">re</xsl:when>
6385
+ <xsl:otherwise>e</xsl:otherwise>
6386
+ </xsl:choose>
6387
+ </xsl:when>
6388
+ <xsl:otherwise>
6389
+ <xsl:choose>
6390
+ <xsl:when test="$number = 1">st</xsl:when>
6391
+ <xsl:when test="$number = 2">nd</xsl:when>
6392
+ <xsl:when test="$number = 3">rd</xsl:when>
6393
+ <xsl:otherwise>th</xsl:otherwise>
6394
+ </xsl:choose>
6395
+ </xsl:otherwise>
6396
+ </xsl:choose>
6101
6397
  </xsl:template><xsl:template name="setAltText">
6102
6398
  <xsl:param name="value"/>
6103
6399
  <xsl:attribute name="fox:alt-text">