metanorma-csa 1.9.3 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,8 @@
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
8
  <xsl:param name="basepath"/>
9
+
10
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
9
11
 
10
12
  <xsl:variable name="pageWidth" select="215.9"/>
11
13
  <xsl:variable name="pageHeight" select="279.4"/>
@@ -40,7 +42,7 @@
40
42
 
41
43
  <xsl:template match="/">
42
44
  <xsl:call-template name="namespaceCheck"/>
43
- <fo:root font-family="Azo Sans, STIX Two Math" font-size="10pt" xml:lang="{$lang}">
45
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
44
46
  <fo:layout-master-set>
45
47
  <!-- Cover page -->
46
48
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -140,12 +142,11 @@
140
142
 
141
143
  <fo:block break-after="page"/>
142
144
 
143
- <xsl:variable name="title-acknowledgements">
144
- <xsl:call-template name="getTitle">
145
- <xsl:with-param name="name" select="'title-acknowledgements'"/>
145
+ <fo:block font-size="26pt" margin-bottom="18pt" role="H1">
146
+ <xsl:call-template name="getLocalizedString">
147
+ <xsl:with-param name="key">acknowledgements</xsl:with-param>
146
148
  </xsl:call-template>
147
- </xsl:variable>
148
- <fo:block font-size="26pt" margin-bottom="18pt" role="H1"><xsl:value-of select="$title-acknowledgements"/></fo:block>
149
+ </fo:block>
149
150
 
150
151
  <xsl:variable name="persons">
151
152
  <xsl:for-each select="/csa:csa-standard/csa:bibdata/csa:contributor[csa:person]">
@@ -214,7 +215,7 @@
214
215
  <fo:list-block>
215
216
  <xsl:attribute name="provisional-distance-between-starts">
216
217
  <xsl:choose>
217
- <xsl:when test="@level = 2">10mm</xsl:when>
218
+ <xsl:when test="@level &gt;= 2"><xsl:value-of select="(@level - 1) * 10"/>mm</xsl:when>
218
219
  <xsl:otherwise>3mm</xsl:otherwise>
219
220
  </xsl:choose>
220
221
  </xsl:attribute>
@@ -263,10 +264,7 @@
263
264
  <!-- ============================= -->
264
265
  <!-- CONTENTS -->
265
266
  <!-- ============================= -->
266
- <xsl:template match="node()" mode="contents">
267
- <xsl:apply-templates mode="contents"/>
268
- </xsl:template>
269
-
267
+
270
268
  <!-- element with title -->
271
269
  <xsl:template match="*[csa:title]" mode="contents">
272
270
  <xsl:variable name="level">
@@ -278,7 +276,7 @@
278
276
 
279
277
  <xsl:variable name="display">
280
278
  <xsl:choose>
281
- <xsl:when test="$level &gt;= 3">false</xsl:when>
279
+ <xsl:when test="$level &gt; $toc_level">false</xsl:when>
282
280
  <xsl:otherwise>true</xsl:otherwise>
283
281
  </xsl:choose>
284
282
  </xsl:variable>
@@ -417,7 +415,7 @@
417
415
  </fo:block>
418
416
  </xsl:template>
419
417
 
420
- <xsl:template match="csa:title">
418
+ <xsl:template match="csa:title" name="title">
421
419
 
422
420
  <xsl:variable name="level">
423
421
  <xsl:call-template name="getLevel"/>
@@ -481,7 +479,7 @@
481
479
  <!-- ====== -->
482
480
  <!-- ====== -->
483
481
 
484
- <xsl:template match="csa:p">
482
+ <xsl:template match="csa:p" name="paragraph">
485
483
  <xsl:param name="inline" select="'false'"/>
486
484
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
487
485
  <xsl:variable name="element-name">
@@ -525,32 +523,6 @@
525
523
  </xsl:if>
526
524
  </xsl:template>
527
525
 
528
- <!--
529
- <fn reference="1">
530
- <p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
531
- </fn>
532
- -->
533
- <xsl:template match="csa:title/csa:fn | csa:p/csa:fn[not(ancestor::csa:table)]" priority="2">
534
- <fo:footnote keep-with-previous.within-line="always">
535
- <xsl:variable name="number" select="@reference"/>
536
-
537
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
538
- <fo:basic-link internal-destination="footnote_{@reference}" fox:alt-text="footnote {@reference}">
539
- <xsl:value-of select="$number"/><!-- + count(//csa:bibitem/csa:note) -->
540
- </fo:basic-link>
541
- </fo:inline>
542
- <fo:footnote-body>
543
- <fo:block font-family="Azo Sans Lt" font-size="10pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" color="rgb(168, 170, 173)" text-align="left">
544
- <fo:inline id="footnote_{@reference}" keep-with-next.within-line="always" font-size="60%" vertical-align="super">
545
- <xsl:value-of select="$number "/><!-- + count(//csa:bibitem/csa:note) -->
546
- </fo:inline>
547
- <xsl:for-each select="csa:p">
548
- <xsl:apply-templates/>
549
- </xsl:for-each>
550
- </fo:block>
551
- </fo:footnote-body>
552
- </fo:footnote>
553
- </xsl:template>
554
526
 
555
527
  <xsl:template match="csa:fn/csa:p">
556
528
  <fo:block>
@@ -559,82 +531,6 @@
559
531
  </xsl:template>
560
532
 
561
533
 
562
- <xsl:template match="csa:bibitem">
563
- <fo:block id="{@id}" margin-bottom="12pt" start-indent="12mm" text-indent="-12mm" line-height="145%">
564
- <xsl:if test=".//csa:fn">
565
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
566
- </xsl:if>
567
- <xsl:choose>
568
- <xsl:when test="csa:formattedref">
569
- <xsl:apply-templates select="csa:formattedref"/>
570
- </xsl:when>
571
- <xsl:otherwise>
572
- <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
573
- <xsl:apply-templates/>
574
- <xsl:if test="position() != last()">, </xsl:if>
575
- <xsl:if test="position() = last()">: </xsl:if>
576
- </xsl:for-each>
577
- <!-- csa:docidentifier -->
578
- <!-- <xsl:if test="csa:docidentifier">
579
- <xsl:value-of select="csa:docidentifier/@type"/><xsl:text> </xsl:text>
580
- <xsl:value-of select="csa:docidentifier"/>
581
- </xsl:if> -->
582
- <xsl:value-of select="csa:docidentifier"/>
583
- <xsl:apply-templates select="csa:note"/>
584
- <xsl:if test="csa:docidentifier">, </xsl:if>
585
- <fo:inline font-style="italic">
586
- <xsl:choose>
587
- <xsl:when test="csa:title[@type = 'main' and @language = 'en']">
588
- <xsl:value-of select="csa:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text>
589
- </xsl:when>
590
- <xsl:otherwise>
591
- <xsl:value-of select="csa:title"/><xsl:text>. </xsl:text>
592
- </xsl:otherwise>
593
- </xsl:choose>
594
- </fo:inline>
595
- <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
596
- <xsl:apply-templates/>
597
- <xsl:if test="position() != last()">, </xsl:if>
598
- </xsl:for-each>
599
- <xsl:if test="csa:date[@type='published']/csa:on">
600
- <xsl:text>(</xsl:text><xsl:value-of select="csa:date[@type='published']/csa:on"/><xsl:text>)</xsl:text>
601
- </xsl:if>
602
- </xsl:otherwise>
603
- </xsl:choose>
604
- </fo:block>
605
- </xsl:template>
606
-
607
-
608
- <xsl:template match="csa:bibitem/csa:note" priority="2">
609
- <fo:footnote>
610
- <xsl:variable name="number">
611
- <xsl:choose>
612
- <xsl:when test="ancestor::csa:references[preceding-sibling::csa:references]">
613
- <xsl:number level="any" count="csa:references[preceding-sibling::csa:references]//csa:bibitem/csa:note"/>
614
- </xsl:when>
615
- <xsl:otherwise>
616
- <xsl:number level="any" count="csa:bibitem/csa:note"/>
617
- </xsl:otherwise>
618
- </xsl:choose>
619
- </xsl:variable>
620
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
621
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
622
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
623
- </fo:basic-link>
624
- </fo:inline>
625
- <fo:footnote-body>
626
- <fo:block font-family="Azo Sans Lt" font-size="10pt" margin-bottom="12pt" start-indent="0pt" color="rgb(168, 170, 173)">
627
- <fo:inline id="{generate-id()}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"><!-- baseline-shift="30%" padding-right="9mm" alignment-baseline="hanging" -->
628
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
629
- </fo:inline>
630
- <xsl:apply-templates/>
631
- </fo:block>
632
- </fo:footnote-body>
633
- </fo:footnote>
634
- </xsl:template>
635
-
636
-
637
-
638
534
  <xsl:template match="csa:ul | csa:ol" mode="ul_ol">
639
535
  <xsl:choose>
640
536
  <xsl:when test="not(ancestor::csa:ul) and not(ancestor::csa:ol)">
@@ -675,8 +571,11 @@
675
571
  <fo:list-item-label end-indent="label-end()">
676
572
  <fo:block>
677
573
  <xsl:choose>
678
- <xsl:when test="local-name(..) = 'ul' and (../ancestor::csa:ul or ../ancestor::csa:ol)">-</xsl:when> <!-- &#x2014; dash -->
679
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- &#x2014; dash -->
574
+ <xsl:when test="local-name(..) = 'ul'">
575
+ <xsl:call-template name="setULLabel"/>
576
+ </xsl:when>
577
+ <!-- <xsl:when test="local-name(..) = 'ul' and (../ancestor::csa:ul or ../ancestor::csa:ol)">-</xsl:when> --> <!-- &#x2014; dash -->
578
+ <!-- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> --> <!-- &#x2014; dash -->
680
579
  <xsl:otherwise> <!-- for ordered lists -->
681
580
  <xsl:choose>
682
581
  <xsl:when test="../@type = 'arabic'">
@@ -713,8 +612,8 @@
713
612
  <fo:list-item-label><fo:block/></fo:list-item-label>
714
613
  <fo:list-item-body>
715
614
  <fo:block>
716
- <xsl:apply-templates select="csa:name" mode="presentation"/>
717
- <xsl:apply-templates/>
615
+ <xsl:apply-templates select="csa:name"/>
616
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
718
617
  </fo:block>
719
618
  </fo:list-item-body>
720
619
  </fo:list-item>
@@ -735,7 +634,7 @@
735
634
  </xsl:variable>
736
635
  <fo:block font-size="{$font-size}" role="H{$levelTerm}">
737
636
  <fo:block font-weight="bold" keep-with-next="always">
738
- <xsl:apply-templates select="ancestor::csa:term[1]/csa:name" mode="presentation"/>
637
+ <xsl:apply-templates select="ancestor::csa:term[1]/csa:name"/>
739
638
  </fo:block>
740
639
  <fo:block font-weight="bold" keep-with-next="always" line-height="1">
741
640
  <xsl:call-template name="setStyle_preferred"/>
@@ -745,105 +644,6 @@
745
644
  </xsl:template>
746
645
 
747
646
 
748
-
749
- <!-- [position() &gt; 1] -->
750
- <xsl:template match="csa:references[not(@normative='true')]">
751
- <fo:block break-after="page"/>
752
- <fo:block id="{@id}" line-height="145%">
753
- <xsl:apply-templates/>
754
- </fo:block>
755
- </xsl:template>
756
-
757
-
758
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
759
- <!-- <xsl:template match="csa:references[@id = '_bibliography']/csa:bibitem"> [position() &gt; 1] -->
760
- <xsl:template match="csa:references[not(@normative='true')]/csa:bibitem">
761
- <fo:block margin-bottom="12pt" line-height="145%">
762
- <fo:inline id="{@id}">
763
- <xsl:number format="[1]"/>
764
- </fo:inline>
765
-
766
- <xsl:if test="not(csa:formattedref)">
767
- <xsl:choose>
768
- <xsl:when test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:abbreviation">
769
- <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:abbreviation">
770
- <xsl:value-of select="."/>
771
- <xsl:if test="position() != last()">/</xsl:if>
772
- </xsl:for-each>
773
- <xsl:text>: </xsl:text>
774
- </xsl:when>
775
- <xsl:when test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
776
- <xsl:value-of select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name"/>
777
- <xsl:text>: </xsl:text>
778
- </xsl:when>
779
- </xsl:choose>
780
-
781
- </xsl:if>
782
-
783
- <xsl:if test="csa:docidentifier">
784
- <xsl:choose>
785
- <xsl:when test="csa:docidentifier/@type = 'ISO' and csa:formattedref"/>
786
- <xsl:when test="csa:docidentifier/@type = 'OGC' and csa:formattedref"/>
787
- <xsl:otherwise><fo:inline>
788
- <!-- <xsl:if test="csa:docidentifier/@type = 'OGC'">OGC </xsl:if> -->
789
- <xsl:value-of select="csa:docidentifier"/><xsl:apply-templates select="csa:note"/>, </fo:inline></xsl:otherwise>
790
- </xsl:choose>
791
- </xsl:if>
792
-
793
- <xsl:choose>
794
- <xsl:when test="csa:title[@type = 'main' and @language = 'en']">
795
- <xsl:apply-templates select="csa:title[@type = 'main' and @language = 'en']"/>
796
- </xsl:when>
797
- <xsl:otherwise>
798
- <xsl:apply-templates select="csa:title"/>
799
- </xsl:otherwise>
800
- </xsl:choose>
801
- <xsl:if test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
802
- <xsl:text>, </xsl:text>
803
- <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
804
- <xsl:if test="position() != last()">and </xsl:if>
805
- <xsl:value-of select="."/>
806
- </xsl:for-each>
807
-
808
- </xsl:if>
809
- <xsl:if test="csa:place">
810
- <xsl:text>, </xsl:text>
811
- <xsl:value-of select="csa:place"/>
812
- </xsl:if>
813
- <xsl:if test="csa:date[@type='published']/csa:on">
814
- <xsl:text> (</xsl:text><xsl:value-of select="csa:date[@type='published']/csa:on"/><xsl:text>).</xsl:text>
815
- </xsl:if>
816
- <xsl:apply-templates select="csa:formattedref"/>
817
-
818
-
819
- </fo:block>
820
- </xsl:template>
821
-
822
- <!-- <xsl:template match="csa:references[@id = '_bibliography']/csa:bibitem" mode="contents"/> [position() &gt; 1] -->
823
- <xsl:template match="csa:references[not(@normative='true')]/csa:bibitem" mode="contents"/>
824
-
825
- <!-- <xsl:template match="csa:references[@id = '_bibliography']/csa:bibitem/csa:title"> [position() &gt; 1]-->
826
- <xsl:template match="csa:references[not(@normative='true')]/csa:bibitem/csa:title">
827
- <fo:inline font-style="italic">
828
- <xsl:apply-templates/>
829
- </fo:inline>
830
- </xsl:template>
831
-
832
-
833
-
834
- <xsl:template match="csa:admonition">
835
- <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
836
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
837
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="bold" font-style="italic" text-align="center">
838
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
839
- </fo:block>
840
- <fo:block font-style="italic">
841
- <xsl:apply-templates/>
842
- </fo:block>
843
- </fo:block-container>
844
- </fo:block-container>
845
- </xsl:template>
846
-
847
647
 
848
648
  <xsl:template match="csa:formula/csa:stem">
849
649
  <fo:block margin-top="6pt" margin-bottom="12pt">
@@ -859,7 +659,7 @@
859
659
  </fo:table-cell>
860
660
  <fo:table-cell display-align="center">
861
661
  <fo:block text-align="right">
862
- <xsl:apply-templates select="../csa:name" mode="presentation"/>
662
+ <xsl:apply-templates select="../csa:name" mode="formula_number"/>
863
663
  </fo:block>
864
664
  </fo:table-cell>
865
665
  </fo:table-row>
@@ -899,29 +699,19 @@
899
699
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAASEAAAEhCAYAAAAwHRYbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJ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z6WE+juR7XGoOlUBJSWG3vJnNTKJxDE90rFAolIYVCoSSkUCgUSkIKhUJJSKFQKJSEFAqFkpBCoVAoCSkUCiUhhUKhUBJSKBRKQgqFQuEF/yfAACbVBNmSyrCxAAAAAElFTkSuQmCC</xsl:text>
900
700
  </xsl:variable>
901
701
 
902
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
903
-
904
- <title-annex lang="en">Annex </title-annex>
905
- <title-annex lang="fr">Annexe </title-annex>
906
-
907
- <title-annex lang="zh">Annex </title-annex>
908
-
909
-
702
+ <xsl:variable name="titles_">
910
703
 
911
704
  <title-edition lang="en">
912
705
 
913
-
914
- <xsl:text>Version</xsl:text>
915
-
706
+ <xsl:text>Version</xsl:text>
707
+
916
708
  </title-edition>
917
709
 
918
710
  <title-edition lang="fr">
919
-
920
- <xsl:text>Édition </xsl:text>
921
-
711
+ <xsl:text>Édition </xsl:text>
922
712
  </title-edition>
923
713
 
924
-
714
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
925
715
  <title-toc lang="en">
926
716
 
927
717
 
@@ -930,24 +720,13 @@
930
720
 
931
721
  </title-toc>
932
722
  <title-toc lang="fr">
723
+ <xsl:text>Sommaire</xsl:text>
724
+ </title-toc>
725
+ <title-toc lang="zh">
933
726
 
934
- <xsl:text>Sommaire</xsl:text>
935
-
936
-
937
- </title-toc>
938
-
939
- <title-toc lang="zh">Contents</title-toc>
940
-
941
-
942
-
943
- <title-page lang="en">Page</title-page>
944
- <title-page lang="fr">Page</title-page>
945
-
946
- <title-key lang="en">Key</title-key>
947
- <title-key lang="fr">Légende</title-key>
948
-
949
- <title-where lang="en">where</title-where>
950
- <title-where lang="fr">où</title-where>
727
+ <xsl:text>Contents</xsl:text>
728
+
729
+ </title-toc>
951
730
 
952
731
  <title-descriptors lang="en">Descriptors</title-descriptors>
953
732
 
@@ -963,32 +742,9 @@
963
742
  </title-part>
964
743
  <title-part lang="zh">第 # 部分:</title-part>
965
744
 
966
- <title-subpart lang="en">
967
-
968
- </title-subpart>
969
- <title-subpart lang="fr">
970
-
971
- </title-subpart>
972
-
973
- <title-modified lang="en">modified</title-modified>
974
- <title-modified lang="fr">modifiée</title-modified>
975
-
976
- <title-modified lang="zh">modified</title-modified>
745
+ <title-subpart lang="en">Sub-part #</title-subpart>
746
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
977
747
 
978
-
979
-
980
- <title-source lang="en">
981
-
982
- <xsl:text>SOURCE</xsl:text>
983
-
984
-
985
- </title-source>
986
-
987
- <title-keywords lang="en">Keywords</title-keywords>
988
-
989
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
990
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
991
-
992
748
  <title-list-tables lang="en">List of Tables</title-list-tables>
993
749
 
994
750
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -997,41 +753,12 @@
997
753
 
998
754
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
999
755
 
1000
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1001
-
1002
- <title-abstract lang="en">Abstract</title-abstract>
1003
-
1004
756
  <title-summary lang="en">Summary</title-summary>
1005
757
 
1006
- <title-in lang="en">in </title-in>
1007
-
1008
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1009
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1010
-
1011
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
1012
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
1013
-
1014
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
1015
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
1016
-
1017
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
1018
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
1019
-
1020
- <title-obligation-normative lang="en">normative</title-obligation-normative>
1021
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
1022
-
1023
- <title-caution lang="en">CAUTION</title-caution>
1024
- <title-caution lang="zh">注意</title-caution>
1025
-
1026
- <title-warning lang="en">WARNING</title-warning>
1027
- <title-warning lang="zh">警告</title-warning>
1028
-
1029
- <title-amendment lang="en">AMENDMENT</title-amendment>
1030
-
1031
758
  <title-continued lang="en">(continued)</title-continued>
1032
759
  <title-continued lang="fr">(continué)</title-continued>
1033
760
 
1034
- </xsl:variable><xsl:variable name="bibdata">
761
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1035
762
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1036
763
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1037
764
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1060,6 +787,23 @@
1060
787
  </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">
1061
788
 
1062
789
 
790
+
791
+ <xsl:attribute name="font-family">Azo Sans, STIX Two Math</xsl:attribute>
792
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
1063
807
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1064
808
 
1065
809
 
@@ -1069,6 +813,9 @@
1069
813
  <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
1070
814
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1071
815
 
816
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
817
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
818
+
1072
819
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1073
820
  <xsl:attribute name="white-space">pre</xsl:attribute>
1074
821
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1083,10 +830,17 @@
1083
830
 
1084
831
 
1085
832
 
833
+
834
+
835
+
836
+
837
+
1086
838
 
1087
839
 
1088
840
 
1089
841
 
842
+
843
+
1090
844
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1091
845
 
1092
846
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1140,6 +894,7 @@
1140
894
 
1141
895
 
1142
896
 
897
+
1143
898
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1144
899
 
1145
900
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
@@ -1147,12 +902,13 @@
1147
902
 
1148
903
 
1149
904
 
905
+
1150
906
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
907
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1151
908
 
1152
909
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1153
910
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1154
911
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1155
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1156
912
 
1157
913
 
1158
914
 
@@ -1187,6 +943,7 @@
1187
943
 
1188
944
 
1189
945
 
946
+
1190
947
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1191
948
 
1192
949
  <xsl:attribute name="padding-right">10mm</xsl:attribute>
@@ -1197,101 +954,104 @@
1197
954
 
1198
955
  </xsl:attribute-set><xsl:variable name="table-border_">
1199
956
 
1200
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1201
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1202
-
957
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
958
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
959
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1203
960
 
1204
961
 
1205
962
 
1206
963
 
1207
-
964
+
1208
965
 
1209
966
 
1210
967
 
1211
-
1212
968
 
1213
969
 
1214
970
 
1215
971
 
1216
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1217
972
 
1218
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1219
973
 
1220
974
 
1221
975
 
1222
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1223
976
 
1224
977
 
1225
978
 
1226
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1227
979
 
980
+
1228
981
 
1229
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1230
982
 
983
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
984
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
985
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
986
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
987
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1231
988
 
1232
989
 
1233
990
 
1234
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1235
991
 
992
+
1236
993
 
1237
- <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
1238
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1239
994
 
1240
995
 
1241
996
 
1242
997
 
1243
998
 
1244
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1245
999
 
1246
1000
 
1247
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1248
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1249
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1250
- <xsl:attribute name="line-height">115%</xsl:attribute>
1251
1001
 
1252
1002
 
1253
1003
 
1254
-
1255
1004
 
1256
1005
 
1257
1006
 
1258
1007
 
1259
1008
 
1260
1009
 
1010
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1011
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1012
+
1261
1013
 
1262
1014
 
1263
1015
 
1264
1016
 
1017
+
1265
1018
 
1266
- </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">
1267
1019
 
1268
1020
 
1269
- <xsl:attribute name="padding-right">4mm</xsl:attribute>
1021
+
1270
1022
 
1271
1023
 
1272
1024
 
1273
1025
 
1026
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1027
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1274
1028
 
1275
1029
 
1276
1030
 
1277
1031
 
1032
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1033
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1278
1034
 
1279
1035
 
1280
1036
 
1281
1037
 
1282
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1283
1038
 
1284
1039
 
1285
1040
 
1041
+
1286
1042
 
1287
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1043
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1288
1044
 
1289
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1290
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1291
1045
 
1292
1046
 
1047
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1048
+
1049
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1050
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1051
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1052
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1053
+ <xsl:attribute name="display-align">center</xsl:attribute>
1293
1054
 
1294
-
1295
1055
 
1296
1056
 
1297
1057
 
@@ -1301,68 +1061,261 @@
1301
1061
 
1302
1062
 
1303
1063
 
1304
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1305
1064
 
1306
1065
 
1307
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1308
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1309
1066
 
1067
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1068
+ <xsl:attribute name="display-align">center</xsl:attribute>
1069
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1070
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1310
1071
 
1311
1072
 
1312
1073
 
1313
1074
 
1314
1075
 
1315
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1316
1076
 
1317
-
1318
1077
 
1319
1078
 
1320
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1321
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
1322
1079
 
1323
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1324
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
1325
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
1326
1080
 
1327
1081
 
1328
1082
 
1329
1083
 
1084
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1085
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1086
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1087
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1088
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1330
1089
 
1331
1090
 
1332
1091
 
1333
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1334
1092
 
1335
- <xsl:attribute name="text-align">right</xsl:attribute>
1336
- <xsl:attribute name="margin-right">25mm</xsl:attribute>
1337
1093
 
1338
-
1339
-
1340
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1341
1094
 
1342
1095
 
1343
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1344
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1096
+
1345
1097
 
1346
1098
 
1347
1099
 
1100
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1101
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1102
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1348
1103
 
1349
1104
 
1350
1105
 
1351
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1352
1106
 
1353
- <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
1354
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1355
1107
 
1356
1108
 
1357
1109
 
1358
1110
 
1359
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1111
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1112
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1360
1113
 
1361
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1362
1114
 
1363
1115
 
1364
1116
 
1365
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1117
+
1118
+
1119
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1120
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1121
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1135
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1136
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1137
+
1138
+
1139
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1140
+
1141
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1142
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1143
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1144
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1145
+
1146
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1147
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1148
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1149
+
1150
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1151
+
1152
+
1153
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1154
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1166
+
1167
+
1168
+
1169
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1170
+
1171
+
1172
+
1173
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1174
+
1175
+
1176
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1177
+
1178
+
1179
+
1180
+
1181
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1182
+
1183
+
1184
+ <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
1185
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1186
+
1187
+
1188
+
1189
+
1190
+
1191
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1192
+
1193
+
1194
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1195
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1196
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1197
+ <xsl:attribute name="line-height">115%</xsl:attribute>
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+ </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">
1214
+
1215
+
1216
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1230
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1231
+
1232
+
1233
+
1234
+
1235
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1236
+
1237
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1238
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1253
+
1254
+
1255
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1256
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1264
+
1265
+
1266
+
1267
+
1268
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1269
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1270
+
1271
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1272
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
1273
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1282
+
1283
+ <xsl:attribute name="text-align">right</xsl:attribute>
1284
+ <xsl:attribute name="margin-right">25mm</xsl:attribute>
1285
+
1286
+
1287
+
1288
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1289
+
1290
+
1291
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1292
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1300
+
1301
+
1302
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1303
+
1304
+ <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
1305
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1306
+
1307
+
1308
+
1309
+
1310
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1311
+
1312
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1313
+
1314
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1315
+
1316
+
1317
+
1318
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1366
1319
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1367
1320
  <xsl:attribute name="text-align">center</xsl:attribute>
1368
1321
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -1381,108 +1334,378 @@
1381
1334
 
1382
1335
 
1383
1336
 
1384
-
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1343
+
1344
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1345
+ <xsl:attribute name="text-align">center</xsl:attribute>
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1353
+
1354
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1355
+
1356
+
1357
+ <xsl:attribute name="width">100%</xsl:attribute>
1358
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1359
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1366
+
1367
+ <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1368
+
1369
+
1370
+
1371
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1372
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1373
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1374
+ <xsl:attribute name="text-align">center</xsl:attribute>
1375
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1376
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1377
+
1378
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1379
+
1380
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1381
+
1382
+
1383
+
1384
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1385
+
1386
+
1387
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1388
+
1389
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
1390
+
1391
+
1392
+
1393
+ </xsl:attribute-set><xsl:variable name="color-added-text">
1394
+ <xsl:text>rgb(0, 255, 0)</xsl:text>
1395
+ </xsl:variable><xsl:attribute-set name="add-style">
1396
+ <xsl:attribute name="color">red</xsl:attribute>
1397
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1398
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1399
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1400
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1401
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1402
+ </xsl:attribute-set><xsl:variable name="color-deleted-text">
1403
+ <xsl:text>red</xsl:text>
1404
+ </xsl:variable><xsl:attribute-set name="del-style">
1405
+ <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
1406
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1407
+ </xsl:attribute-set><xsl:attribute-set name="mathml-style">
1408
+ <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1409
+
1410
+
1411
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
1412
+
1413
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
1414
+ <xsl:attribute name="line-height">135%</xsl:attribute>
1415
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
1416
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1417
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+
1426
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
1427
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1428
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
1429
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1430
+
1431
+
1432
+
1433
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1434
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
1450
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1451
+ <xsl:attribute name="font-style">normal</xsl:attribute>
1452
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1453
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1454
+
1455
+
1456
+
1457
+ <xsl:attribute name="font-family">Azo Sans Lt</xsl:attribute>
1458
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1459
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1460
+ <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
1461
+ <xsl:attribute name="text-align">left</xsl:attribute>
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
1479
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1480
+
1481
+
1482
+
1483
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1484
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1485
+
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
1501
+
1502
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
1503
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
1504
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
1505
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
1506
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1522
+
1523
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1524
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1525
+ <xsl:attribute name="padding">2mm</xsl:attribute>
1526
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
1538
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1539
+
1540
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1541
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1542
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1543
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1544
+ <xsl:attribute name="text-align">center</xsl:attribute>
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1385
1557
 
1558
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
1386
1559
 
1560
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1387
1561
 
1388
-
1389
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
1390
1562
 
1391
- </xsl:attribute-set><xsl:attribute-set name="image-style">
1392
- <xsl:attribute name="text-align">center</xsl:attribute>
1393
1563
 
1394
1564
 
1395
1565
 
1396
1566
 
1397
1567
 
1398
1568
 
1399
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1400
1569
 
1401
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1402
1570
 
1403
1571
 
1404
- <xsl:attribute name="width">100%</xsl:attribute>
1405
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1406
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1572
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
1407
1573
 
1408
1574
 
1409
1575
 
1410
-
1411
-
1412
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
1576
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1577
+ <xsl:attribute name="start-indent">12mm</xsl:attribute>
1578
+ <xsl:attribute name="text-indent">-12mm</xsl:attribute>
1579
+ <xsl:attribute name="line-height">145%</xsl:attribute>
1413
1580
 
1414
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1415
1581
 
1416
1582
 
1417
1583
 
1418
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1419
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1420
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1421
- <xsl:attribute name="text-align">center</xsl:attribute>
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
1597
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1422
1598
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1423
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1424
1599
 
1425
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
1426
-
1427
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1428
1600
 
1429
1601
 
1430
1602
 
1431
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1432
1603
 
1433
1604
 
1434
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
1435
1605
 
1436
- <xsl:attribute name="space-after">6pt</xsl:attribute>
1437
1606
 
1438
1607
 
1439
1608
 
1440
- </xsl:attribute-set><xsl:variable name="color-added-text">
1441
- <xsl:text>rgb(0, 255, 0)</xsl:text>
1442
- </xsl:variable><xsl:attribute-set name="add-style">
1443
- <xsl:attribute name="color">red</xsl:attribute>
1444
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1445
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1446
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1447
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1448
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1449
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1450
- <xsl:text>red</xsl:text>
1451
- </xsl:variable><xsl:attribute-set name="del-style">
1452
- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
1453
- <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1454
- </xsl:attribute-set><xsl:attribute-set name="mathml-style">
1455
- <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1456
1609
 
1610
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1457
1611
 
1458
- </xsl:attribute-set><xsl:attribute-set name="list-style">
1459
1612
 
1460
- </xsl:attribute-set><xsl:attribute-set name="toc-style">
1461
- <xsl:attribute name="line-height">135%</xsl:attribute>
1462
- </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">
1463
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1464
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1465
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1466
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1467
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1468
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1613
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1614
+ <xsl:attribute name="line-height">145%</xsl:attribute>
1615
+
1616
+
1617
+
1618
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
1619
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1620
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1633
+
1634
+
1635
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1636
+
1637
+
1638
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1639
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1640
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1641
+
1642
+
1643
+
1644
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
1660
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1661
+
1662
+
1663
+
1664
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1665
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
1681
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1682
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1683
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
1684
+
1685
+
1686
+ <xsl:attribute name="font-family">Azo Sans Lt</xsl:attribute>
1687
+ <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
1699
+
1700
+
1701
+ <xsl:attribute name="line-height">145%</xsl:attribute>
1702
+
1703
+
1704
+ </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">
1469
1705
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1470
1706
  <xsl:sort select="@displayorder" data-type="number"/>
1471
1707
  <xsl:apply-templates select="." mode="contents"/>
1472
1708
  </xsl:for-each>
1473
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1474
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1475
-
1476
- <!-- Normative references -->
1477
- <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"/>
1478
- <!-- Terms and definitions -->
1479
- <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"/>
1480
- <!-- Another main sections -->
1481
- <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"/>
1482
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1483
- <!-- Bibliography -->
1484
- <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"/>
1485
-
1486
1709
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1487
1710
 
1488
1711
  <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']]">
@@ -1499,29 +1722,11 @@
1499
1722
  <xsl:sort select="@displayorder" data-type="number"/>
1500
1723
  <xsl:apply-templates select="." mode="contents"/>
1501
1724
  </xsl:for-each>
1502
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1503
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1504
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1505
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1506
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1507
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1508
1725
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1509
1726
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1510
1727
  <xsl:sort select="@displayorder" data-type="number"/>
1511
1728
  <xsl:apply-templates select="."/>
1512
1729
  </xsl:for-each>
1513
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1514
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1515
-
1516
- <!-- Normative references -->
1517
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1518
- <!-- Terms and definitions -->
1519
- <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']]"/>
1520
- <!-- Another main sections -->
1521
- <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'])]"/>
1522
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1523
- <!-- Bibliography -->
1524
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1525
1730
  </xsl:template><xsl:template name="processMainSectionsDefault">
1526
1731
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1527
1732
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1558,41 +1763,17 @@
1558
1763
  <xsl:call-template name="getSimpleTable"/>
1559
1764
  </xsl:variable>
1560
1765
 
1561
- <!-- <xsl:if test="$namespace = 'bipm'">
1562
- <fo:block>&#xA0;</fo:block>
1563
- </xsl:if> -->
1564
-
1565
1766
 
1566
1767
  <!-- Display table's name before table as standalone block -->
1567
1768
  <!-- $namespace = 'iso' or -->
1568
1769
 
1569
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1570
-
1571
-
1572
-
1770
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
1771
+
1573
1772
 
1574
1773
 
1575
-
1576
1774
 
1577
1775
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
1578
1776
 
1579
- <!-- <xsl:variable name="cols-count">
1580
- <xsl:choose>
1581
- <xsl:when test="*[local-name()='thead']">
1582
- <xsl:call-template name="calculate-columns-numbers">
1583
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1584
- </xsl:call-template>
1585
- </xsl:when>
1586
- <xsl:otherwise>
1587
- <xsl:call-template name="calculate-columns-numbers">
1588
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1589
- </xsl:call-template>
1590
- </xsl:otherwise>
1591
- </xsl:choose>
1592
- </xsl:variable> -->
1593
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1594
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1595
-
1596
1777
  <xsl:variable name="colwidths">
1597
1778
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1598
1779
  <xsl:call-template name="calculate-column-widths">
@@ -1603,17 +1784,8 @@
1603
1784
  </xsl:variable>
1604
1785
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1605
1786
 
1606
- <!-- <xsl:variable name="colwidths2">
1607
- <xsl:call-template name="calculate-column-widths">
1608
- <xsl:with-param name="cols-count" select="$cols-count"/>
1609
- </xsl:call-template>
1610
- </xsl:variable> -->
1611
-
1612
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1613
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1614
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1615
1787
 
1616
- <xsl:variable name="margin-left">
1788
+ <xsl:variable name="margin-side">
1617
1789
  <xsl:choose>
1618
1790
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1619
1791
  <xsl:otherwise>0</xsl:otherwise>
@@ -1621,63 +1793,67 @@
1621
1793
  </xsl:variable>
1622
1794
 
1623
1795
 
1624
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1625
-
1626
-
1627
-
1628
-
1629
-
1630
-
1796
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
1797
+
1631
1798
 
1799
+ <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1800
+ <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1632
1801
 
1633
-
1802
+
1634
1803
 
1804
+
1635
1805
 
1806
+
1636
1807
 
1637
1808
 
1638
1809
 
1810
+
1639
1811
 
1640
1812
 
1641
1813
 
1642
1814
 
1643
1815
 
1816
+ <!-- end table block-container attributes -->
1644
1817
 
1645
1818
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1646
1819
 
1647
1820
 
1821
+ <xsl:variable name="table_width_default">100%</xsl:variable>
1648
1822
  <xsl:variable name="table_width">
1649
1823
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1650
- 100%
1651
-
1652
-
1824
+ <xsl:value-of select="$table_width_default"/>
1653
1825
  </xsl:variable>
1654
1826
 
1827
+
1655
1828
  <xsl:variable name="table_attributes">
1656
- <attribute name="table-layout">fixed</attribute>
1657
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1658
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1659
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1660
-
1661
-
1662
-
1663
-
1664
-
1665
-
1666
-
1667
-
1668
-
1669
-
1670
-
1671
-
1672
-
1673
-
1829
+
1830
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
1831
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
1832
+
1833
+
1834
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1835
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+ </xsl:element>
1674
1850
  </xsl:variable>
1675
1851
 
1676
1852
 
1677
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1853
+ <fo:table id="{@id}">
1678
1854
 
1679
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1680
- <xsl:attribute name="{@name}">
1855
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
1856
+ <xsl:attribute name="{local-name()}">
1681
1857
  <xsl:value-of select="."/>
1682
1858
  </xsl:attribute>
1683
1859
  </xsl:for-each>
@@ -1688,7 +1864,6 @@
1688
1864
  </xsl:if>
1689
1865
 
1690
1866
 
1691
-
1692
1867
  <xsl:choose>
1693
1868
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1694
1869
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1714,7 +1889,7 @@
1714
1889
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1715
1890
  </xsl:when>
1716
1891
  <xsl:otherwise>
1717
- <xsl:apply-templates/>
1892
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1718
1893
  </xsl:otherwise>
1719
1894
  </xsl:choose>
1720
1895
 
@@ -1729,25 +1904,6 @@
1729
1904
  </xsl:call-template>
1730
1905
  </xsl:for-each>
1731
1906
 
1732
- <!-- insert footer as table -->
1733
- <!-- <fo:table>
1734
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1735
- <xsl:attribute name="{@name}">
1736
- <xsl:value-of select="."/>
1737
- </xsl:attribute>
1738
- </xsl:for-each>
1739
-
1740
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1741
- <xsl:choose>
1742
- <xsl:when test=". = 1 or . = 0">
1743
- <fo:table-column column-width="proportional-column-width(2)"/>
1744
- </xsl:when>
1745
- <xsl:otherwise>
1746
- <fo:table-column column-width="proportional-column-width({.})"/>
1747
- </xsl:otherwise>
1748
- </xsl:choose>
1749
- </xsl:for-each>
1750
- </fo:table>-->
1751
1907
 
1752
1908
 
1753
1909
 
@@ -1808,18 +1964,17 @@
1808
1964
  </xsl:otherwise>
1809
1965
  </xsl:choose>
1810
1966
 
1811
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1967
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
1812
1968
  <xsl:param name="continued"/>
1813
1969
  <xsl:if test="normalize-space() != ''">
1814
1970
  <fo:block xsl:use-attribute-sets="table-name-style">
1815
-
1971
+
1816
1972
 
1817
1973
 
1818
1974
 
1819
1975
 
1820
1976
  <xsl:choose>
1821
1977
  <xsl:when test="$continued = 'true'">
1822
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
1823
1978
 
1824
1979
  </xsl:when>
1825
1980
  <xsl:otherwise>
@@ -1882,13 +2037,6 @@
1882
2037
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
1883
2038
  <xsl:variable name="td_text">
1884
2039
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1885
-
1886
- <!-- <xsl:if test="$namespace = 'bipm'">
1887
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1888
- <word><xsl:value-of select="normalize-space(.)"/></word>
1889
- </xsl:for-each>
1890
- </xsl:if> -->
1891
-
1892
2040
  </xsl:variable>
1893
2041
  <xsl:variable name="words">
1894
2042
  <xsl:variable name="string_with_added_zerospaces">
@@ -1925,7 +2073,6 @@
1925
2073
  </xsl:otherwise>
1926
2074
  </xsl:choose>
1927
2075
  </xsl:variable>
1928
-
1929
2076
 
1930
2077
  <column>
1931
2078
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -1961,7 +2108,6 @@
1961
2108
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1962
2109
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1963
2110
  <xsl:param name="cols-count"/>
1964
- <!-- font-weight="bold" -->
1965
2111
  <fo:table-header>
1966
2112
 
1967
2113
 
@@ -1973,13 +2119,12 @@
1973
2119
  <fo:table-row>
1974
2120
  <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">
1975
2121
 
1976
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2122
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
1977
2123
  <xsl:with-param name="continued">true</xsl:with-param>
1978
2124
  </xsl:apply-templates>
1979
2125
 
1980
2126
 
1981
2127
 
1982
-
1983
2128
  </fo:table-cell>
1984
2129
  </fo:table-row>
1985
2130
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -1995,64 +2140,6 @@
1995
2140
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1996
2141
  </fo:table-footer>
1997
2142
  </xsl:if>
1998
- </xsl:template><xsl:template name="insertTableFooter2">
1999
- <xsl:param name="cols-count"/>
2000
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2001
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2002
-
2003
- <fo:table-footer>
2004
-
2005
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2006
-
2007
- <!-- if there are note(s) or fn(s) then create footer row -->
2008
- <xsl:if test="$isNoteOrFnExist = 'true'">
2009
-
2010
-
2011
-
2012
- <fo:table-row>
2013
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2014
-
2015
-
2016
-
2017
- <!-- fn will be processed inside 'note' processing -->
2018
-
2019
-
2020
-
2021
-
2022
-
2023
-
2024
- <!-- except gb -->
2025
-
2026
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2027
-
2028
-
2029
- <!-- show Note under table in preface (ex. abstract) sections -->
2030
- <!-- empty, because notes show at page side in main sections -->
2031
- <!-- <xsl:if test="$namespace = 'bipm'">
2032
- <xsl:choose>
2033
- <xsl:when test="ancestor::*[local-name()='preface']">
2034
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2035
- </xsl:when>
2036
- <xsl:otherwise>
2037
- <fo:block/>
2038
- </xsl:otherwise>
2039
- </xsl:choose>
2040
- </xsl:if> -->
2041
-
2042
-
2043
- <!-- horizontal row separator -->
2044
-
2045
-
2046
- <!-- fn processing -->
2047
- <xsl:call-template name="fn_display"/>
2048
-
2049
- </fo:table-cell>
2050
- </fo:table-row>
2051
-
2052
- </xsl:if>
2053
- </fo:table-footer>
2054
-
2055
- </xsl:if>
2056
2143
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2057
2144
  <xsl:param name="table_attributes"/>
2058
2145
  <xsl:param name="colwidths"/>
@@ -2078,17 +2165,18 @@
2078
2165
  </xsl:variable>
2079
2166
 
2080
2167
  <fo:table keep-with-previous="always">
2081
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2168
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2169
+ <xsl:variable name="name" select="local-name()"/>
2082
2170
  <xsl:choose>
2083
- <xsl:when test="@name = 'border-top'">
2084
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2171
+ <xsl:when test="$name = 'border-top'">
2172
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2085
2173
  </xsl:when>
2086
- <xsl:when test="@name = 'border'">
2087
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2174
+ <xsl:when test="$name = 'border'">
2175
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2088
2176
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2089
2177
  </xsl:when>
2090
2178
  <xsl:otherwise>
2091
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2179
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2092
2180
  </xsl:otherwise>
2093
2181
  </xsl:choose>
2094
2182
  </xsl:for-each>
@@ -2117,15 +2205,13 @@
2117
2205
 
2118
2206
  <fo:table-body>
2119
2207
  <fo:table-row>
2120
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2121
-
2208
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2122
2209
 
2123
2210
 
2124
-
2125
- <!-- fn will be processed inside 'note' processing -->
2126
-
2211
+
2127
2212
 
2128
2213
 
2214
+ <!-- fn will be processed inside 'note' processing -->
2129
2215
 
2130
2216
 
2131
2217
 
@@ -2135,31 +2221,17 @@
2135
2221
  <!-- for BSI (not PAS) display Notes before footnotes -->
2136
2222
 
2137
2223
 
2138
- <!-- except gb -->
2139
-
2140
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2224
+ <!-- except gb and bsi -->
2141
2225
 
2142
-
2143
- <!-- <xsl:if test="$namespace = 'bipm'">
2144
- <xsl:choose>
2145
- <xsl:when test="ancestor::*[local-name()='preface']">
2146
- show Note under table in preface (ex. abstract) sections
2147
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2148
- </xsl:when>
2149
- <xsl:otherwise>
2150
- empty, because notes show at page side in main sections
2151
- <fo:block/>
2152
- </xsl:otherwise>
2153
- </xsl:choose>
2154
- </xsl:if> -->
2226
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2227
+
2155
2228
 
2156
2229
 
2157
2230
  <!-- horizontal row separator -->
2158
2231
 
2159
2232
 
2160
2233
  <!-- fn processing -->
2161
- <xsl:call-template name="fn_display"/>
2162
-
2234
+ <xsl:call-template name="table_fn_display"/>
2163
2235
 
2164
2236
  <!-- for PAS display Notes after footnotes -->
2165
2237
 
@@ -2201,78 +2273,57 @@
2201
2273
 
2202
2274
 
2203
2275
  <xsl:apply-templates/>
2204
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2205
-
2276
+
2206
2277
  </fo:table-body>
2207
2278
 
2208
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2209
- <xsl:choose>
2210
- <xsl:when test="substring-after(., '—') != ''">
2211
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2212
- </xsl:when>
2213
- <xsl:otherwise>
2214
- <xsl:value-of select="."/>
2215
- </xsl:otherwise>
2216
- </xsl:choose>
2217
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2218
- <xsl:apply-templates mode="presentation_name"/>
2219
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2220
- <xsl:apply-templates select="."/>
2221
- </xsl:template><xsl:template match="*[local-name()='tr']">
2222
- <xsl:variable name="parent-name" select="local-name(..)"/>
2223
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2224
- <fo:table-row min-height="4mm">
2225
- <xsl:if test="$parent-name = 'thead'">
2226
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2227
-
2228
-
2229
-
2230
-
2231
-
2232
-
2233
-
2234
-
2235
- </xsl:if>
2236
- <xsl:if test="$parent-name = 'tfoot'">
2237
-
2238
-
2239
-
2240
- </xsl:if>
2241
-
2242
-
2243
-
2244
-
2245
-
2246
-
2247
-
2248
-
2249
-
2250
-
2251
- <!-- <xsl:if test="$namespace = 'bipm'">
2252
- <xsl:attribute name="height">8mm</xsl:attribute>
2253
- </xsl:if> -->
2254
-
2279
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2280
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2281
+
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+ <xsl:call-template name="setTableRowAttributes"/>
2289
+
2255
2290
  <xsl:apply-templates/>
2256
2291
  </fo:table-row>
2257
- </xsl:template><xsl:template match="*[local-name()='th']">
2258
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2259
- <xsl:attribute name="text-align">
2260
- <xsl:choose>
2261
- <xsl:when test="@align">
2262
- <xsl:call-template name="setAlignment"/>
2263
- <!-- <xsl:value-of select="@align"/> -->
2264
- </xsl:when>
2265
- <xsl:otherwise>center</xsl:otherwise>
2266
- </xsl:choose>
2267
- </xsl:attribute>
2268
-
2292
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2293
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2269
2294
 
2295
+ <xsl:call-template name="setTableRowAttributes"/>
2296
+ <xsl:apply-templates/>
2297
+ </fo:table-row>
2298
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2299
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2300
+
2270
2301
 
2302
+
2271
2303
 
2304
+
2305
+ <xsl:call-template name="setTableRowAttributes"/>
2306
+ <xsl:apply-templates/>
2307
+ </fo:table-row>
2308
+ </xsl:template><xsl:template name="setTableRowAttributes">
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+ </xsl:template><xsl:template match="*[local-name()='th']">
2318
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
2319
+ <xsl:call-template name="setTextAlignment">
2320
+ <xsl:with-param name="default">center</xsl:with-param>
2321
+ </xsl:call-template>
2272
2322
 
2273
2323
 
2274
2324
 
2275
2325
 
2326
+
2276
2327
 
2277
2328
 
2278
2329
 
@@ -2281,21 +2332,25 @@
2281
2332
  <xsl:if test="$lang = 'ar'">
2282
2333
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2283
2334
  </xsl:if>
2284
- <xsl:if test="@colspan">
2285
- <xsl:attribute name="number-columns-spanned">
2286
- <xsl:value-of select="@colspan"/>
2287
- </xsl:attribute>
2288
- </xsl:if>
2289
- <xsl:if test="@rowspan">
2290
- <xsl:attribute name="number-rows-spanned">
2291
- <xsl:value-of select="@rowspan"/>
2292
- </xsl:attribute>
2293
- </xsl:if>
2294
- <xsl:call-template name="display-align"/>
2335
+
2336
+ <xsl:call-template name="setTableCellAttributes"/>
2337
+
2295
2338
  <fo:block>
2296
2339
  <xsl:apply-templates/>
2297
2340
  </fo:block>
2298
2341
  </fo:table-cell>
2342
+ </xsl:template><xsl:template name="setTableCellAttributes">
2343
+ <xsl:if test="@colspan">
2344
+ <xsl:attribute name="number-columns-spanned">
2345
+ <xsl:value-of select="@colspan"/>
2346
+ </xsl:attribute>
2347
+ </xsl:if>
2348
+ <xsl:if test="@rowspan">
2349
+ <xsl:attribute name="number-rows-spanned">
2350
+ <xsl:value-of select="@rowspan"/>
2351
+ </xsl:attribute>
2352
+ </xsl:if>
2353
+ <xsl:call-template name="display-align"/>
2299
2354
  </xsl:template><xsl:template name="display-align">
2300
2355
  <xsl:if test="@valign">
2301
2356
  <xsl:attribute name="display-align">
@@ -2308,22 +2363,19 @@
2308
2363
  </xsl:attribute>
2309
2364
  </xsl:if>
2310
2365
  </xsl:template><xsl:template match="*[local-name()='td']">
2311
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2312
- <xsl:attribute name="text-align">
2313
- <xsl:choose>
2314
- <xsl:when test="@align">
2315
- <xsl:call-template name="setAlignment"/>
2316
- <!-- <xsl:value-of select="@align"/> -->
2317
- </xsl:when>
2318
- <xsl:otherwise>left</xsl:otherwise>
2319
- </xsl:choose>
2320
- </xsl:attribute>
2366
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2367
+ <xsl:call-template name="setTextAlignment">
2368
+ <xsl:with-param name="default">left</xsl:with-param>
2369
+ </xsl:call-template>
2370
+
2321
2371
  <xsl:if test="$lang = 'ar'">
2322
2372
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2323
2373
  </xsl:if>
2324
2374
 
2325
2375
 
2326
2376
 
2377
+ <!-- bsi -->
2378
+
2327
2379
 
2328
2380
 
2329
2381
 
@@ -2331,36 +2383,36 @@
2331
2383
 
2332
2384
 
2333
2385
 
2386
+
2334
2387
 
2335
2388
 
2336
2389
 
2337
2390
 
2338
2391
 
2339
2392
 
2340
- <xsl:if test=".//*[local-name() = 'table']">
2393
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2341
2394
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2342
2395
  </xsl:if>
2343
- <xsl:if test="@colspan">
2344
- <xsl:attribute name="number-columns-spanned">
2345
- <xsl:value-of select="@colspan"/>
2346
- </xsl:attribute>
2347
- </xsl:if>
2348
- <xsl:if test="@rowspan">
2349
- <xsl:attribute name="number-rows-spanned">
2350
- <xsl:value-of select="@rowspan"/>
2351
- </xsl:attribute>
2352
- </xsl:if>
2353
- <xsl:call-template name="display-align"/>
2396
+
2397
+ <xsl:call-template name="setTableCellAttributes"/>
2398
+
2354
2399
  <fo:block>
2355
-
2400
+
2401
+
2402
+
2356
2403
  <xsl:apply-templates/>
2357
2404
  </fo:block>
2358
2405
  </fo:table-cell>
2359
2406
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2407
+
2408
+ <fo:block xsl:use-attribute-sets="table-note-style">
2409
+
2410
+
2411
+
2412
+
2360
2413
 
2361
-
2362
- <fo:block font-size="10pt" margin-bottom="12pt">
2363
-
2414
+ <!-- Table's note name (NOTE, for example) -->
2415
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
2364
2416
 
2365
2417
 
2366
2418
 
@@ -2368,26 +2420,113 @@
2368
2420
 
2369
2421
 
2370
2422
 
2371
- <!-- Table's note name (NOTE, for example) -->
2372
-
2373
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2374
-
2375
-
2376
-
2423
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2377
2424
 
2378
-
2379
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2380
-
2381
- </fo:inline>
2382
-
2383
-
2384
-
2385
- <xsl:apply-templates mode="process"/>
2386
- </fo:block>
2425
+ </fo:inline>
2426
+
2427
+
2428
+
2429
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
2430
+ </fo:block>
2387
2431
 
2388
2432
  </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">
2389
2433
  <xsl:apply-templates/>
2390
- </xsl:template><xsl:template name="fn_display">
2434
+ </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">
2435
+
2436
+ <!-- list of footnotes to calculate actual footnotes number -->
2437
+ <xsl:variable name="p_fn_">
2438
+ <xsl:choose>
2439
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2440
+ <fn gen_id="{generate-id(.)}">
2441
+ <xsl:copy-of select="@*"/>
2442
+ <xsl:copy-of select="node()"/>
2443
+ </fn>
2444
+ </xsl:when>
2445
+ <xsl:otherwise>
2446
+ <!-- itetation for:
2447
+ footnotes in bibdata/title
2448
+ footnotes in bibliography
2449
+ footnotes in document's body (except table's head/body/foot and figure text)
2450
+ -->
2451
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2452
+ <fn gen_id="{generate-id(.)}">
2453
+ <xsl:copy-of select="@*"/>
2454
+ <xsl:copy-of select="node()"/>
2455
+ </fn>
2456
+ </xsl:for-each>
2457
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
2458
+ <xsl:sort select="@displayorder" data-type="number"/>
2459
+ <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
2460
+ <!-- copy unique fn -->
2461
+ <fn gen_id="{generate-id(.)}">
2462
+ <xsl:copy-of select="@*"/>
2463
+ <xsl:copy-of select="node()"/>
2464
+ </fn>
2465
+ </xsl:for-each>
2466
+ </xsl:for-each>
2467
+ </xsl:otherwise>
2468
+ </xsl:choose>
2469
+ </xsl:variable>
2470
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
2471
+
2472
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
2473
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
2474
+ <xsl:variable name="reference" select="@reference"/>
2475
+ <!-- fn sequence number in document -->
2476
+ <xsl:variable name="current_fn_number">
2477
+ <xsl:choose>
2478
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
2479
+ <xsl:otherwise>
2480
+ <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
2481
+ </xsl:otherwise>
2482
+ </xsl:choose>
2483
+ </xsl:variable>
2484
+ <xsl:variable name="current_fn_number_text">
2485
+ <xsl:value-of select="$current_fn_number"/>
2486
+
2487
+
2488
+ </xsl:variable>
2489
+
2490
+ <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
2491
+ <xsl:variable name="footnote_inline">
2492
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
2493
+
2494
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
2495
+ <xsl:value-of select="$current_fn_number_text"/>
2496
+ </fo:basic-link>
2497
+ </fo:inline>
2498
+ </xsl:variable>
2499
+ <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
2500
+ gen_id=<xsl:value-of select="$gen_id"/> -->
2501
+ <xsl:choose>
2502
+ <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
2503
+ <xsl:copy-of select="$footnote_inline"/>
2504
+ </xsl:when>
2505
+ <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
2506
+ <fo:footnote xsl:use-attribute-sets="fn-style">
2507
+ <xsl:copy-of select="$footnote_inline"/>
2508
+ <fo:footnote-body>
2509
+
2510
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
2511
+
2512
+ <fo:block xsl:use-attribute-sets="fn-body-style">
2513
+
2514
+
2515
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
2516
+
2517
+ <xsl:value-of select="$current_fn_number_text"/>
2518
+ </fo:inline>
2519
+ <xsl:apply-templates/>
2520
+ </fo:block>
2521
+ </fo:block-container>
2522
+ </fo:footnote-body>
2523
+ </fo:footnote>
2524
+ </xsl:when>
2525
+ <xsl:otherwise>
2526
+ <xsl:copy-of select="$footnote_inline"/>
2527
+ </xsl:otherwise>
2528
+ </xsl:choose>
2529
+ </xsl:template><xsl:template name="table_fn_display">
2391
2530
  <xsl:variable name="references">
2392
2531
 
2393
2532
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -2398,31 +2537,26 @@
2398
2537
  <xsl:for-each select="xalan:nodeset($references)//fn">
2399
2538
  <xsl:variable name="reference" select="@reference"/>
2400
2539
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2401
- <fo:block margin-bottom="12pt">
2540
+ <fo:block xsl:use-attribute-sets="table-fn-style">
2402
2541
 
2403
2542
 
2404
2543
 
2405
-
2406
-
2407
-
2408
-
2409
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2544
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
2410
2545
 
2411
2546
 
2412
2547
 
2413
2548
 
2414
2549
 
2550
+ <xsl:value-of select="@reference"/>
2415
2551
 
2416
2552
 
2417
2553
 
2418
- <xsl:value-of select="@reference"/>
2419
2554
 
2420
2555
 
2421
2556
 
2422
- </fo:inline>
2423
- <fo:inline>
2424
2557
 
2425
- <!-- <xsl:apply-templates /> -->
2558
+ </fo:inline>
2559
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
2426
2560
  <xsl:copy-of select="./node()"/>
2427
2561
  </fo:inline>
2428
2562
  </fo:block>
@@ -2434,15 +2568,7 @@
2434
2568
 
2435
2569
  <xsl:apply-templates/>
2436
2570
  </fn>
2437
- </xsl:template><xsl:template name="fn_name_display">
2438
- <!-- <xsl:variable name="references">
2439
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2440
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2441
- <xsl:apply-templates />
2442
- </fn>
2443
- </xsl:for-each>
2444
- </xsl:variable>
2445
- $references=<xsl:copy-of select="$references"/> -->
2571
+ </xsl:template><xsl:template name="table_name_fn_display">
2446
2572
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2447
2573
  <xsl:variable name="reference" select="@reference"/>
2448
2574
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -2451,9 +2577,7 @@
2451
2577
  </fo:block>
2452
2578
  </xsl:for-each>
2453
2579
  </xsl:template><xsl:template name="fn_display_figure">
2454
- <xsl:variable name="key_iso">
2455
- <!-- and (not(@class) or @class !='pseudocode') -->
2456
- </xsl:variable>
2580
+
2457
2581
  <xsl:variable name="references">
2458
2582
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2459
2583
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2461,50 +2585,52 @@
2461
2585
  </fn>
2462
2586
  </xsl:for-each>
2463
2587
  </xsl:variable>
2588
+
2589
+ <xsl:if test="xalan:nodeset($references)//fn">
2464
2590
 
2465
- <!-- current hierarchy is 'figure' element -->
2466
- <xsl:variable name="following_dl_colwidths">
2467
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2468
- <xsl:variable name="html-table">
2469
- <xsl:variable name="doc_ns">
2591
+ <xsl:variable name="key_iso">
2592
+
2593
+ </xsl:variable>
2594
+
2595
+ <!-- current hierarchy is 'figure' element -->
2596
+ <xsl:variable name="following_dl_colwidths">
2597
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2598
+ <xsl:variable name="html-table">
2599
+ <xsl:variable name="doc_ns">
2600
+
2601
+ </xsl:variable>
2602
+ <xsl:variable name="ns">
2603
+ <xsl:choose>
2604
+ <xsl:when test="normalize-space($doc_ns) != ''">
2605
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2606
+ </xsl:when>
2607
+ <xsl:otherwise>
2608
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2609
+ </xsl:otherwise>
2610
+ </xsl:choose>
2611
+ </xsl:variable>
2470
2612
 
2471
- </xsl:variable>
2472
- <xsl:variable name="ns">
2473
- <xsl:choose>
2474
- <xsl:when test="normalize-space($doc_ns) != ''">
2475
- <xsl:value-of select="normalize-space($doc_ns)"/>
2476
- </xsl:when>
2477
- <xsl:otherwise>
2478
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2479
- </xsl:otherwise>
2480
- </xsl:choose>
2481
- </xsl:variable>
2482
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2483
- <!-- <xsl:element name="{$ns}:table"> -->
2484
2613
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2485
2614
  <tbody>
2486
2615
  <xsl:apply-templates mode="dl"/>
2487
2616
  </tbody>
2488
2617
  </xsl:for-each>
2489
- <!-- </xsl:element> -->
2490
- </xsl:variable>
2491
-
2492
- <xsl:call-template name="calculate-column-widths">
2493
- <xsl:with-param name="cols-count" select="2"/>
2494
- <xsl:with-param name="table" select="$html-table"/>
2495
- </xsl:call-template>
2496
-
2497
- </xsl:if>
2498
- </xsl:variable>
2499
-
2500
-
2501
- <xsl:variable name="maxlength_dt">
2502
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2503
- <xsl:call-template name="getMaxLength_dt"/>
2504
- </xsl:for-each>
2505
- </xsl:variable>
2506
-
2507
- <xsl:if test="xalan:nodeset($references)//fn">
2618
+ </xsl:variable>
2619
+
2620
+ <xsl:call-template name="calculate-column-widths">
2621
+ <xsl:with-param name="cols-count" select="2"/>
2622
+ <xsl:with-param name="table" select="$html-table"/>
2623
+ </xsl:call-template>
2624
+
2625
+ </xsl:if>
2626
+ </xsl:variable>
2627
+
2628
+ <xsl:variable name="maxlength_dt">
2629
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2630
+ <xsl:call-template name="getMaxLength_dt"/>
2631
+ </xsl:for-each>
2632
+ </xsl:variable>
2633
+
2508
2634
  <fo:block>
2509
2635
  <fo:table width="95%" table-layout="fixed">
2510
2636
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -2531,20 +2657,18 @@
2531
2657
  <fo:table-row>
2532
2658
  <fo:table-cell>
2533
2659
  <fo:block>
2534
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2535
-
2660
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
2536
2661
  <xsl:value-of select="@reference"/>
2537
2662
  </fo:inline>
2538
2663
  </fo:block>
2539
2664
  </fo:table-cell>
2540
2665
  <fo:table-cell>
2541
- <fo:block text-align="justify" margin-bottom="12pt">
2542
-
2666
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
2543
2667
  <xsl:if test="normalize-space($key_iso) = 'true'">
2544
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2668
+
2669
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
2670
+
2545
2671
  </xsl:if>
2546
-
2547
- <!-- <xsl:apply-templates /> -->
2548
2672
  <xsl:copy-of select="./node()"/>
2549
2673
  </fo:block>
2550
2674
  </fo:table-cell>
@@ -2557,14 +2681,8 @@
2557
2681
  </xsl:if>
2558
2682
 
2559
2683
  </xsl:template><xsl:template match="*[local-name()='fn']">
2560
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2561
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2562
-
2563
-
2564
-
2565
-
2566
-
2567
-
2684
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
2685
+
2568
2686
 
2569
2687
 
2570
2688
 
@@ -2577,6 +2695,8 @@
2577
2695
 
2578
2696
  </fo:basic-link>
2579
2697
  </fo:inline>
2698
+ </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
2699
+ <fo:inline><xsl:value-of select="."/></fo:inline>
2580
2700
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
2581
2701
  <fo:inline>
2582
2702
  <xsl:apply-templates/>
@@ -2586,10 +2706,10 @@
2586
2706
  <xsl:variable name="isDeleted" select="@deleted"/>
2587
2707
  <fo:block-container>
2588
2708
 
2589
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2590
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2591
- </xsl:if>
2592
-
2709
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2710
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2711
+ </xsl:if>
2712
+
2593
2713
 
2594
2714
  <xsl:if test="parent::*[local-name() = 'note']">
2595
2715
  <xsl:attribute name="margin-left">
@@ -2606,11 +2726,11 @@
2606
2726
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
2607
2727
  </xsl:call-template>
2608
2728
 
2609
- <fo:block-container>
2610
-
2611
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2612
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2729
+ <fo:block-container margin-left="0mm">
2730
+
2613
2731
 
2732
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2733
+
2614
2734
 
2615
2735
  <xsl:variable name="parent" select="local-name(..)"/>
2616
2736
 
@@ -2621,23 +2741,19 @@
2621
2741
  <xsl:choose>
2622
2742
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2623
2743
 
2624
-
2625
- <fo:block margin-bottom="12pt" text-align="left">
2626
-
2627
- <xsl:variable name="title-where">
2744
+ <fo:block margin-bottom="12pt" text-align="left">
2628
2745
 
2629
-
2630
- <xsl:call-template name="getTitle">
2631
- <xsl:with-param name="name" select="'title-where'"/>
2746
+ <xsl:variable name="title-where">
2747
+ <xsl:call-template name="getLocalizedString">
2748
+ <xsl:with-param name="key">where</xsl:with-param>
2632
2749
  </xsl:call-template>
2633
-
2634
- </xsl:variable>
2635
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2636
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2637
- <xsl:text/>
2638
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2639
- </fo:block>
2640
-
2750
+ </xsl:variable>
2751
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2752
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2753
+ <xsl:text/>
2754
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2755
+ </fo:block>
2756
+
2641
2757
  </xsl:when>
2642
2758
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2643
2759
  <fo:block margin-bottom="12pt" text-align="left">
@@ -2646,12 +2762,9 @@
2646
2762
 
2647
2763
 
2648
2764
  <xsl:variable name="title-where">
2649
-
2650
-
2651
- <xsl:call-template name="getTitle">
2652
- <xsl:with-param name="name" select="'title-where'"/>
2653
- </xsl:call-template>
2654
-
2765
+ <xsl:call-template name="getLocalizedString">
2766
+ <xsl:with-param name="key">where</xsl:with-param>
2767
+ </xsl:call-template>
2655
2768
  </xsl:variable>
2656
2769
  <xsl:value-of select="$title-where"/>
2657
2770
  </fo:block>
@@ -2663,12 +2776,9 @@
2663
2776
 
2664
2777
 
2665
2778
  <xsl:variable name="title-key">
2666
-
2667
-
2668
- <xsl:call-template name="getTitle">
2669
- <xsl:with-param name="name" select="'title-key'"/>
2670
- </xsl:call-template>
2671
-
2779
+ <xsl:call-template name="getLocalizedString">
2780
+ <xsl:with-param name="key">key</xsl:with-param>
2781
+ </xsl:call-template>
2672
2782
  </xsl:variable>
2673
2783
  <xsl:value-of select="$title-key"/>
2674
2784
  </fo:block>
@@ -2690,9 +2800,7 @@
2690
2800
  <fo:table width="95%" table-layout="fixed">
2691
2801
 
2692
2802
  <xsl:choose>
2693
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2694
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2695
- </xsl:when>
2803
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
2696
2804
  <xsl:when test="normalize-space($key_iso) = 'true'">
2697
2805
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2698
2806
 
@@ -2713,12 +2821,9 @@
2713
2821
  </xsl:otherwise>
2714
2822
  </xsl:choose>
2715
2823
  </xsl:variable>
2716
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2717
- <!-- <xsl:element name="{$ns}:table"> -->
2718
- <tbody>
2719
- <xsl:apply-templates mode="dl"/>
2720
- </tbody>
2721
- <!-- </xsl:element> -->
2824
+ <tbody>
2825
+ <xsl:apply-templates mode="dl"/>
2826
+ </tbody>
2722
2827
  </xsl:variable>
2723
2828
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
2724
2829
  <xsl:variable name="colwidths">
@@ -2798,8 +2903,6 @@
2798
2903
  </xsl:for-each>
2799
2904
  </xsl:otherwise>
2800
2905
  </xsl:choose>
2801
- <!-- <fo:table-column column-width="15%"/>
2802
- <fo:table-column column-width="85%"/> -->
2803
2906
  </xsl:otherwise>
2804
2907
  </xsl:choose>
2805
2908
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -2814,12 +2917,6 @@
2814
2917
  </xsl:for-each>
2815
2918
  </xsl:variable>
2816
2919
  <xsl:variable name="maxLength">
2817
- <!-- <xsl:for-each select="*[local-name()='dt']">
2818
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2819
- <xsl:if test="position() = 1">
2820
- <xsl:value-of select="string-length(normalize-space(.))"/>
2821
- </xsl:if>
2822
- </xsl:for-each> -->
2823
2920
  <xsl:for-each select="xalan:nodeset($lengths)/length">
2824
2921
  <xsl:sort select="." data-type="number" order="descending"/>
2825
2922
  <xsl:if test="position() = 1">
@@ -2845,12 +2942,12 @@
2845
2942
  <xsl:if test="normalize-space($key_iso) = 'true'">
2846
2943
  <xsl:attribute name="margin-top">0</xsl:attribute>
2847
2944
  </xsl:if>
2848
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2945
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2849
2946
  </fo:block>
2850
2947
  </fo:table-cell>
2851
2948
  <fo:table-cell>
2852
2949
  <fo:block>
2853
- <xsl:apply-templates/>
2950
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2854
2951
  </fo:block>
2855
2952
  </fo:table-cell>
2856
2953
  </fo:table-row>
@@ -2861,79 +2958,41 @@
2861
2958
  </td>
2862
2959
  <td>
2863
2960
 
2864
-
2865
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2866
-
2961
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2962
+
2867
2963
  </td>
2868
2964
  </tr>
2869
2965
 
2870
2966
  </xsl:template><xsl:template match="*[local-name()='dt']">
2871
2967
  <xsl:param name="key_iso"/>
2872
2968
 
2873
- <fo:table-row>
2874
-
2875
-
2969
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
2876
2970
  <fo:table-cell>
2877
2971
 
2878
- <fo:block margin-top="6pt">
2972
+ <fo:block xsl:use-attribute-sets="dt-style">
2879
2973
  <xsl:copy-of select="@id"/>
2880
2974
 
2881
-
2882
2975
  <xsl:if test="normalize-space($key_iso) = 'true'">
2883
2976
  <xsl:attribute name="margin-top">0</xsl:attribute>
2884
-
2885
2977
  </xsl:if>
2886
2978
 
2887
2979
 
2888
2980
 
2889
-
2890
-
2891
-
2892
-
2893
2981
  <xsl:apply-templates/>
2894
- <!-- <xsl:if test="$namespace = 'gb'">
2895
- <xsl:if test="ancestor::*[local-name()='formula']">
2896
- <xsl:text>—</xsl:text>
2897
- </xsl:if>
2898
- </xsl:if> -->
2899
2982
  </fo:block>
2900
2983
  </fo:table-cell>
2901
2984
  <fo:table-cell>
2902
2985
  <fo:block>
2903
2986
 
2904
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2905
- <xsl:if test="local-name(*[1]) != 'stem'">
2906
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2907
- </xsl:if>
2908
- </xsl:if> -->
2909
-
2910
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2911
-
2987
+
2988
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2912
2989
  </fo:block>
2913
2990
  </fo:table-cell>
2914
2991
  </fo:table-row>
2915
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2916
- <xsl:if test="local-name(*[1]) = 'stem'">
2917
- <fo:table-row>
2918
- <fo:table-cell>
2919
- <fo:block margin-top="6pt">
2920
- <xsl:if test="normalize-space($key_iso) = 'true'">
2921
- <xsl:attribute name="margin-top">0</xsl:attribute>
2922
- </xsl:if>
2923
- <xsl:text>&#xA0;</xsl:text>
2924
- </fo:block>
2925
- </fo:table-cell>
2926
- <fo:table-cell>
2927
- <fo:block>
2928
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2929
- </fo:block>
2930
- </fo:table-cell>
2931
- </fo:table-row>
2932
- </xsl:if>
2933
- </xsl:if> -->
2934
2992
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2935
2993
  <xsl:apply-templates/>
2936
2994
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
2995
+ <xsl:apply-templates select="@language"/>
2937
2996
  <xsl:apply-templates/>
2938
2997
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2939
2998
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
@@ -2958,6 +3017,7 @@
2958
3017
  </fo:inline>
2959
3018
  </xsl:template><xsl:template match="*[local-name()='tt']">
2960
3019
  <fo:inline xsl:use-attribute-sets="tt-style">
3020
+
2961
3021
  <xsl:variable name="_font-size">
2962
3022
  10
2963
3023
 
@@ -2994,7 +3054,22 @@
2994
3054
  <xsl:apply-templates/>
2995
3055
  </fo:inline>
2996
3056
  </xsl:template><xsl:template match="*[local-name()='add']">
3057
+ <xsl:param name="skip">true</xsl:param>
2997
3058
  <xsl:choose>
3059
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3060
+ <xsl:choose>
3061
+ <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>
3062
+ <xsl:otherwise>
3063
+ <fo:inline>
3064
+ <xsl:call-template name="insertTag">
3065
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3066
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3067
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3068
+ </xsl:call-template>
3069
+ </fo:inline>
3070
+ </xsl:otherwise>
3071
+ </xsl:choose>
3072
+ </xsl:when>
2998
3073
  <xsl:when test="@amendment">
2999
3074
  <fo:inline>
3000
3075
  <xsl:call-template name="insertTag">
@@ -3029,7 +3104,6 @@
3029
3104
  </fo:inline>
3030
3105
  </xsl:otherwise>
3031
3106
  </xsl:choose>
3032
-
3033
3107
  </xsl:template><xsl:template name="insertTag">
3034
3108
  <xsl:param name="type"/>
3035
3109
  <xsl:param name="kind"/>
@@ -3037,22 +3111,20 @@
3037
3111
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3038
3112
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3039
3113
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3040
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3041
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3042
3114
  <xsl:attribute name="height">5mm</xsl:attribute>
3043
3115
  <xsl:attribute name="content-width">100%</xsl:attribute>
3044
3116
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3045
3117
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3046
3118
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
3047
3119
  <g>
3048
- <xsl:if test="$type = 'closing'">
3120
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3049
3121
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
3050
3122
  </xsl:if>
3051
3123
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
3052
3124
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
3053
3125
  </g>
3054
3126
  <text font-family="Arial" x="15" y="57" font-size="40pt">
3055
- <xsl:if test="$type = 'closing'">
3127
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3056
3128
  <xsl:attribute name="x">25</xsl:attribute>
3057
3129
  </xsl:if>
3058
3130
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -3256,14 +3328,6 @@
3256
3328
 
3257
3329
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3258
3330
 
3259
- <!-- <xsl:choose>
3260
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3261
-
3262
- </xsl:when>
3263
- <xsl:otherwise>
3264
- <xsl:copy-of select="current()"/>
3265
- </xsl:otherwise>
3266
- </xsl:choose> -->
3267
3331
  </xsl:variable>
3268
3332
  <xsl:copy-of select="$simple-table"/>
3269
3333
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -3382,8 +3446,6 @@
3382
3446
  <xsl:choose>
3383
3447
  <xsl:when test="contains($str2, ' ')">
3384
3448
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3385
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3386
- <xsl:value-of select="substring($substr, 2)"/> -->
3387
3449
  <xsl:call-template name="capitalize">
3388
3450
  <xsl:with-param name="str" select="$substr"/>
3389
3451
  </xsl:call-template>
@@ -3393,8 +3455,6 @@
3393
3455
  </xsl:call-template>
3394
3456
  </xsl:when>
3395
3457
  <xsl:otherwise>
3396
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3397
- <xsl:value-of select="substring($str2, 2)"/> -->
3398
3458
  <xsl:call-template name="capitalize">
3399
3459
  <xsl:with-param name="str" select="$str2"/>
3400
3460
  </xsl:call-template>
@@ -3422,6 +3482,7 @@
3422
3482
  <xsl:apply-templates select="." mode="mathml"/>
3423
3483
  </xsl:variable>
3424
3484
  <fo:instream-foreign-object fox:alt-text="Math">
3485
+
3425
3486
 
3426
3487
 
3427
3488
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -3453,7 +3514,7 @@
3453
3514
  </xsl:attribute>
3454
3515
 
3455
3516
 
3456
- <!-- <xsl:copy-of select="."/> -->
3517
+
3457
3518
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3458
3519
  </fo:instream-foreign-object>
3459
3520
  </fo:inline>
@@ -3512,6 +3573,10 @@
3512
3573
 
3513
3574
 
3514
3575
 
3576
+
3577
+
3578
+
3579
+
3515
3580
  <xsl:choose>
3516
3581
  <xsl:when test="$target_text = ''">
3517
3582
  <xsl:apply-templates/>
@@ -3545,9 +3610,9 @@
3545
3610
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3546
3611
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3547
3612
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3548
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3613
+ <xsl:apply-templates select="*[local-name()='name']"/>
3549
3614
  </fo:block>
3550
- <xsl:apply-templates/>
3615
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
3551
3616
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
3552
3617
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3553
3618
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -3567,25 +3632,8 @@
3567
3632
  <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3568
3633
  <xsl:apply-templates/>
3569
3634
  </fo:inline>
3570
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
3571
- <xsl:variable name="title-modified">
3572
-
3573
-
3574
- <xsl:call-template name="getTitle">
3575
- <xsl:with-param name="name" select="'title-modified'"/>
3576
- </xsl:call-template>
3577
-
3578
- </xsl:variable>
3579
-
3580
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
3581
- <xsl:choose>
3582
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
3583
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
3584
- </xsl:choose>
3585
- <xsl:apply-templates/>
3586
3635
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3587
3636
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3588
-
3589
3637
  <xsl:apply-templates/>
3590
3638
  </fo:basic-link>
3591
3639
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3613,22 +3661,26 @@
3613
3661
  <fo:inline>
3614
3662
  <xsl:apply-templates/>
3615
3663
  </fo:inline>
3616
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3664
+ </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 -->
3617
3665
  <xsl:if test="normalize-space() != ''">
3618
3666
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3619
3667
  </xsl:if>
3620
3668
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3621
3669
 
3622
3670
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3671
+
3672
+
3623
3673
 
3624
3674
 
3625
3675
 
3626
3676
 
3627
3677
 
3678
+
3679
+
3680
+
3681
+
3628
3682
  <fo:block-container margin-left="0mm">
3629
-
3630
-
3631
-
3683
+
3632
3684
 
3633
3685
  <xsl:if test="ancestor::csa:ul or ancestor::csa:ol and not(ancestor::csa:note[1]/following-sibling::*)">
3634
3686
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
@@ -3636,30 +3688,41 @@
3636
3688
 
3637
3689
 
3638
3690
 
3639
-
3691
+
3640
3692
 
3641
- <fo:block>
3642
-
3643
-
3644
-
3645
-
3646
-
3693
+ <fo:block>
3694
+
3695
+
3647
3696
 
3648
- <fo:inline xsl:use-attribute-sets="note-name-style">
3649
3697
 
3650
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3651
- </fo:inline>
3652
- <xsl:apply-templates/>
3653
- </fo:block>
3654
-
3655
-
3698
+
3699
+
3700
+
3701
+ <fo:inline xsl:use-attribute-sets="note-name-style">
3702
+
3703
+
3704
+
3705
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3706
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3707
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3708
+ <xsl:with-param name="skip">false</xsl:with-param>
3709
+ </xsl:apply-templates>
3710
+ </xsl:if>
3711
+
3712
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3713
+
3714
+ </fo:inline>
3715
+
3716
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3717
+ </fo:block>
3718
+
3656
3719
  </fo:block-container>
3657
3720
  </fo:block-container>
3658
3721
 
3659
3722
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3660
3723
  <xsl:variable name="num"><xsl:number/></xsl:variable>
3661
3724
  <xsl:choose>
3662
- <xsl:when test="$num = 1">
3725
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
3663
3726
  <fo:inline xsl:use-attribute-sets="note-p-style">
3664
3727
  <xsl:apply-templates/>
3665
3728
  </fo:inline>
@@ -3674,12 +3737,16 @@
3674
3737
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3675
3738
 
3676
3739
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3740
+
3741
+
3742
+
3743
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3677
3744
 
3678
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3679
3745
  </fo:inline>
3680
- <xsl:apply-templates/>
3746
+
3747
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3681
3748
  </fo:block>
3682
- </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">
3749
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
3683
3750
  <xsl:param name="sfx"/>
3684
3751
  <xsl:variable name="suffix">
3685
3752
  <xsl:choose>
@@ -3696,7 +3763,7 @@
3696
3763
  <xsl:apply-templates/>
3697
3764
  <xsl:value-of select="$suffix"/>
3698
3765
  </xsl:if>
3699
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
3766
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
3700
3767
  <xsl:param name="sfx"/>
3701
3768
  <xsl:variable name="suffix">
3702
3769
  <xsl:choose>
@@ -3721,25 +3788,23 @@
3721
3788
  <xsl:apply-templates/>
3722
3789
  </fo:block>
3723
3790
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3724
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
3725
3791
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3726
3792
 
3727
3793
 
3794
+
3795
+
3728
3796
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
3729
3797
 
3730
3798
  </xsl:if>
3731
- <xsl:apply-templates/>
3799
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3732
3800
  </fo:block>
3733
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3801
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
3734
3802
  <xsl:if test="normalize-space() != ''">
3735
3803
  <xsl:variable name="level">
3736
3804
  <xsl:call-template name="getLevelTermName"/>
3737
3805
  </xsl:variable>
3738
3806
  <fo:inline role="H{$level}">
3739
3807
  <xsl:apply-templates/>
3740
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3741
- <xsl:text>.</xsl:text>
3742
- </xsl:if> -->
3743
3808
  </fo:inline>
3744
3809
  </xsl:if>
3745
3810
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -3752,9 +3817,10 @@
3752
3817
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3753
3818
  </xsl:call-template>
3754
3819
 
3755
- <fo:block>
3756
-
3757
- <xsl:apply-templates/>
3820
+
3821
+
3822
+ <fo:block xsl:use-attribute-sets="figure-style">
3823
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3758
3824
  </fo:block>
3759
3825
  <xsl:call-template name="fn_display_figure"/>
3760
3826
  <xsl:for-each select="*[local-name() = 'note']">
@@ -3762,14 +3828,15 @@
3762
3828
  </xsl:for-each>
3763
3829
 
3764
3830
 
3765
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3831
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
3832
+
3766
3833
 
3767
3834
  </fo:block-container>
3768
3835
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3769
3836
  <fo:block id="{@id}">
3770
- <xsl:apply-templates/>
3837
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3771
3838
  </fo:block>
3772
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3839
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3773
3840
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3774
3841
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3775
3842
  <xsl:apply-templates/>
@@ -3876,9 +3943,7 @@
3876
3943
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
3877
3944
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
3878
3945
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
3879
- <!-- width=<xsl:value-of select="$width"/> -->
3880
3946
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
3881
- <!-- height=<xsl:value-of select="$height"/> -->
3882
3947
  <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">
3883
3948
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
3884
3949
  <xsl:call-template name="svg_cross">
@@ -4148,7 +4213,7 @@
4148
4213
  </fo:basic-link>
4149
4214
  </fo:block>
4150
4215
  </fo:block-container>
4151
- </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">
4216
+ </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">
4152
4217
  <xsl:apply-templates mode="contents"/>
4153
4218
  <xsl:text> </xsl:text>
4154
4219
  </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">
@@ -4160,11 +4225,58 @@
4160
4225
  <xsl:value-of select="."/>
4161
4226
  </xsl:template><xsl:template match="node()" mode="contents">
4162
4227
  <xsl:apply-templates mode="contents"/>
4228
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
4229
+ <xsl:variable name="level">
4230
+ <xsl:call-template name="getLevel">
4231
+ <xsl:with-param name="depth" select="@depth"/>
4232
+ </xsl:call-template>
4233
+ </xsl:variable>
4234
+
4235
+ <xsl:variable name="section">
4236
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4237
+ </xsl:variable>
4238
+
4239
+ <xsl:variable name="type">floating-title</xsl:variable>
4240
+
4241
+ <xsl:variable name="display">
4242
+ <xsl:choose>
4243
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
4244
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
4245
+ <xsl:otherwise>false</xsl:otherwise>
4246
+ </xsl:choose>
4247
+ </xsl:variable>
4248
+
4249
+ <xsl:variable name="skip">false</xsl:variable>
4250
+
4251
+ <xsl:if test="$skip = 'false'">
4252
+
4253
+ <xsl:variable name="title">
4254
+ <xsl:choose>
4255
+ <xsl:when test="*[local-name() = 'tab']">
4256
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4257
+ </xsl:when>
4258
+ <xsl:otherwise>
4259
+ <xsl:copy-of select="node()"/>
4260
+ </xsl:otherwise>
4261
+ </xsl:choose>
4262
+ </xsl:variable>
4263
+
4264
+ <xsl:variable name="root">
4265
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
4266
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
4267
+ </xsl:variable>
4268
+
4269
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
4270
+ <title>
4271
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
4272
+ </title>
4273
+ </item>
4274
+ </xsl:if>
4163
4275
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4164
4276
  <xsl:apply-templates mode="bookmarks"/>
4165
4277
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4166
4278
  <xsl:apply-templates select="."/>
4167
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4279
+ </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">
4168
4280
  <xsl:apply-templates mode="bookmarks"/>
4169
4281
  </xsl:template><xsl:template name="addBookmarks">
4170
4282
  <xsl:param name="contents"/>
@@ -4254,8 +4366,6 @@
4254
4366
 
4255
4367
 
4256
4368
 
4257
-
4258
-
4259
4369
  </fo:bookmark-tree>
4260
4370
  </xsl:if>
4261
4371
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4326,7 +4436,7 @@
4326
4436
  <xsl:apply-templates mode="bookmark"/>
4327
4437
  </xsl:otherwise>
4328
4438
  </xsl:choose>
4329
- </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">
4439
+ </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']">
4330
4440
  <xsl:if test="normalize-space() != ''">
4331
4441
  <fo:block xsl:use-attribute-sets="figure-name-style">
4332
4442
 
@@ -4335,16 +4445,13 @@
4335
4445
  </fo:block>
4336
4446
  </xsl:if>
4337
4447
  </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">
4338
- <xsl:apply-templates mode="contents_item"/>
4448
+ <xsl:param name="mode">bookmarks</xsl:param>
4449
+ <xsl:apply-templates mode="contents_item">
4450
+ <xsl:with-param name="mode" select="$mode"/>
4451
+ </xsl:apply-templates>
4339
4452
  <!-- <xsl:text> </xsl:text> -->
4340
4453
  </xsl:template><xsl:template name="getSection">
4341
4454
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4342
- <!--
4343
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
4344
- <xsl:value-of select="."/>
4345
- </xsl:for-each>
4346
- -->
4347
-
4348
4455
  </xsl:template><xsl:template name="getName">
4349
4456
  <xsl:choose>
4350
4457
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4408,9 +4515,26 @@
4408
4515
  <xsl:copy-of select="."/>
4409
4516
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4410
4517
  <xsl:text> </xsl:text>
4518
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
4519
+ <xsl:param name="mode">bookmarks</xsl:param>
4520
+ <xsl:apply-templates mode="contents_item">
4521
+ <xsl:with-param name="mode" select="$mode"/>
4522
+ </xsl:apply-templates>
4523
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
4524
+ <xsl:param name="mode">bookmarks</xsl:param>
4525
+ <xsl:choose>
4526
+ <xsl:when test="starts-with(text(), $ace_tag)">
4527
+ <xsl:if test="$mode = 'contents'">
4528
+ <xsl:copy>
4529
+ <xsl:apply-templates mode="contents_item"/>
4530
+ </xsl:copy>
4531
+ </xsl:if>
4532
+ </xsl:when>
4533
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4534
+ </xsl:choose>
4411
4535
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4412
4536
 
4413
- <fo:block-container margin-left="0mm">
4537
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
4414
4538
  <xsl:copy-of select="@id"/>
4415
4539
 
4416
4540
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -4447,6 +4571,7 @@
4447
4571
 
4448
4572
 
4449
4573
  </xsl:variable>
4574
+
4450
4575
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4451
4576
  <xsl:if test="$font-size != ''">
4452
4577
  <xsl:attribute name="font-size">
@@ -4463,11 +4588,11 @@
4463
4588
 
4464
4589
 
4465
4590
 
4466
- <xsl:apply-templates/>
4591
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4467
4592
  </fo:block>
4468
4593
 
4469
4594
 
4470
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4595
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
4471
4596
 
4472
4597
 
4473
4598
 
@@ -4481,7 +4606,7 @@
4481
4606
  <xsl:call-template name="add-zero-spaces-java">
4482
4607
  <xsl:with-param name="text" select="$text"/>
4483
4608
  </xsl:call-template>
4484
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4609
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
4485
4610
  <xsl:if test="normalize-space() != ''">
4486
4611
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4487
4612
  <xsl:apply-templates/>
@@ -4489,10 +4614,10 @@
4489
4614
  </xsl:if>
4490
4615
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
4491
4616
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4492
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4493
- <xsl:apply-templates/>
4617
+ <xsl:apply-templates select="*[local-name()='name']"/>
4618
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4494
4619
  </fo:block>
4495
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4620
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
4496
4621
  <xsl:if test="normalize-space() != ''">
4497
4622
  <fo:block xsl:use-attribute-sets="permission-name-style">
4498
4623
  <xsl:apply-templates/>
@@ -4505,13 +4630,13 @@
4505
4630
  </fo:block>
4506
4631
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4507
4632
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4508
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4509
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4510
- <xsl:apply-templates select="@obligation" mode="presentation"/>
4511
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4512
- <xsl:apply-templates/>
4633
+ <xsl:apply-templates select="*[local-name()='name']"/>
4634
+ <xsl:apply-templates select="*[local-name()='label']"/>
4635
+ <xsl:apply-templates select="@obligation"/>
4636
+ <xsl:apply-templates select="*[local-name()='subject']"/>
4637
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
4513
4638
  </fo:block>
4514
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4639
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
4515
4640
  <xsl:if test="normalize-space() != ''">
4516
4641
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4517
4642
 
@@ -4519,20 +4644,24 @@
4519
4644
 
4520
4645
  </fo:block>
4521
4646
  </xsl:if>
4522
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4647
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
4523
4648
  <fo:block xsl:use-attribute-sets="requirement-label-style">
4524
4649
  <xsl:apply-templates/>
4525
4650
  </fo:block>
4526
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4651
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
4527
4652
  <fo:block>
4528
4653
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4529
4654
  </fo:block>
4655
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
4656
+ <fo:block xsl:use-attribute-sets="subject-style">
4657
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4658
+ </fo:block>
4530
4659
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4531
4660
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4532
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4533
- <xsl:apply-templates/>
4661
+ <xsl:apply-templates select="*[local-name()='name']"/>
4662
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4534
4663
  </fo:block>
4535
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4664
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
4536
4665
  <xsl:if test="normalize-space() != ''">
4537
4666
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
4538
4667
  <xsl:apply-templates/>
@@ -4543,10 +4672,6 @@
4543
4672
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4544
4673
  <xsl:apply-templates/>
4545
4674
  </fo:block>
4546
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4547
- <fo:block xsl:use-attribute-sets="subject-style">
4548
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4549
- </fo:block>
4550
4675
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
4551
4676
  <fo:block xsl:use-attribute-sets="subject-style">
4552
4677
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -4590,8 +4715,6 @@
4590
4715
  </xsl:variable>
4591
4716
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4592
4717
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4593
- <!-- <fo:table-column column-width="35mm"/>
4594
- <fo:table-column column-width="115mm"/> -->
4595
4718
  <fo:table-column column-width="30%"/>
4596
4719
  <fo:table-column column-width="70%"/>
4597
4720
  </xsl:if>
@@ -4601,7 +4724,7 @@
4601
4724
  <xsl:if test=".//*[local-name() = 'fn']">
4602
4725
  <xsl:for-each select="*[local-name() = 'tbody']">
4603
4726
  <fo:block font-size="90%" border-bottom="1pt solid black">
4604
- <xsl:call-template name="fn_display"/>
4727
+ <xsl:call-template name="table_fn_display"/>
4605
4728
  </fo:block>
4606
4729
  </xsl:for-each>
4607
4730
  </xsl:if>
@@ -4618,7 +4741,6 @@
4618
4741
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4619
4742
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4620
4743
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4621
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4622
4744
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4623
4745
  </xsl:if>
4624
4746
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -4631,34 +4753,11 @@
4631
4753
  </fo:table-row>
4632
4754
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4633
4755
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4634
- <xsl:attribute name="text-align">
4635
- <xsl:choose>
4636
- <xsl:when test="@align">
4637
- <xsl:value-of select="@align"/>
4638
- </xsl:when>
4639
- <xsl:otherwise>left</xsl:otherwise>
4640
- </xsl:choose>
4641
- </xsl:attribute>
4642
- <xsl:if test="@colspan">
4643
- <xsl:attribute name="number-columns-spanned">
4644
- <xsl:value-of select="@colspan"/>
4645
- </xsl:attribute>
4646
- </xsl:if>
4647
- <xsl:if test="@rowspan">
4648
- <xsl:attribute name="number-rows-spanned">
4649
- <xsl:value-of select="@rowspan"/>
4650
- </xsl:attribute>
4651
- </xsl:if>
4652
- <xsl:call-template name="display-align"/>
4756
+ <xsl:call-template name="setTextAlignment">
4757
+ <xsl:with-param name="default">left</xsl:with-param>
4758
+ </xsl:call-template>
4653
4759
 
4654
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4655
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4656
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
4657
- </xsl:if>
4658
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
4659
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4660
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4661
- </xsl:if> -->
4760
+ <xsl:call-template name="setTableCellAttributes"/>
4662
4761
 
4663
4762
  <fo:block>
4664
4763
  <xsl:apply-templates/>
@@ -4670,37 +4769,15 @@
4670
4769
  <xsl:attribute name="padding">0mm</xsl:attribute>
4671
4770
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
4672
4771
  </xsl:if>
4673
- <xsl:attribute name="text-align">
4674
- <xsl:choose>
4675
- <xsl:when test="@align">
4676
- <xsl:value-of select="@align"/>
4677
- </xsl:when>
4678
- <xsl:otherwise>left</xsl:otherwise>
4679
- </xsl:choose>
4680
- </xsl:attribute>
4772
+ <xsl:call-template name="setTextAlignment">
4773
+ <xsl:with-param name="default">left</xsl:with-param>
4774
+ </xsl:call-template>
4775
+
4681
4776
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
4682
4777
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4683
4778
  </xsl:if>
4684
- <xsl:if test="@colspan">
4685
- <xsl:attribute name="number-columns-spanned">
4686
- <xsl:value-of select="@colspan"/>
4687
- </xsl:attribute>
4688
- </xsl:if>
4689
- <xsl:if test="@rowspan">
4690
- <xsl:attribute name="number-rows-spanned">
4691
- <xsl:value-of select="@rowspan"/>
4692
- </xsl:attribute>
4693
- </xsl:if>
4694
- <xsl:call-template name="display-align"/>
4695
4779
 
4696
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4697
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
4698
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4699
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
4700
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4701
- </xsl:if>
4702
- </xsl:if> -->
4703
- <!-- 2nd line and below -->
4780
+ <xsl:call-template name="setTableCellAttributes"/>
4704
4781
 
4705
4782
  <fo:block>
4706
4783
  <xsl:apply-templates/>
@@ -4712,15 +4789,15 @@
4712
4789
  <xsl:apply-templates/>
4713
4790
  </fo:block>
4714
4791
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
4715
- <fo:block> <!-- margin-bottom="10pt" -->
4792
+ <fo:block>
4716
4793
  <xsl:apply-templates/>
4717
4794
  </fo:block>
4718
4795
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4719
4796
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4720
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4721
- <xsl:apply-templates/>
4797
+ <xsl:apply-templates select="*[local-name()='name']"/>
4798
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4722
4799
  </fo:block>
4723
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
4800
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
4724
4801
  <xsl:if test="normalize-space() != ''">
4725
4802
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4726
4803
  <xsl:apply-templates/>
@@ -4744,42 +4821,46 @@
4744
4821
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4745
4822
 
4746
4823
 
4747
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4748
-
4749
- <xsl:variable name="element">
4750
- block
4751
-
4752
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
4824
+ <xsl:variable name="fo_element">
4825
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
4826
+ block
4753
4827
  </xsl:variable>
4754
4828
 
4829
+ <!-- display 'EXAMPLE' -->
4830
+ <xsl:apply-templates select="*[local-name()='name']">
4831
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4832
+ </xsl:apply-templates>
4833
+
4755
4834
  <xsl:choose>
4756
- <xsl:when test="contains(normalize-space($element), 'block')">
4757
- <fo:block xsl:use-attribute-sets="example-body-style">
4758
- <xsl:apply-templates/>
4759
- </fo:block>
4835
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4836
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
4837
+ <fo:block-container margin-left="0mm" margin-right="0mm">
4838
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
4839
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4840
+ </xsl:apply-templates>
4841
+ </fo:block-container>
4842
+ </fo:block-container>
4760
4843
  </xsl:when>
4761
4844
  <xsl:otherwise>
4762
4845
  <fo:inline>
4763
- <xsl:apply-templates/>
4846
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
4847
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4848
+ </xsl:apply-templates>
4764
4849
  </fo:inline>
4765
4850
  </xsl:otherwise>
4766
4851
  </xsl:choose>
4767
4852
 
4768
4853
  </fo:block>
4769
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
4770
-
4771
- <xsl:variable name="element">
4772
- block
4773
-
4774
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
4775
- </xsl:variable>
4854
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
4855
+ <xsl:param name="fo_element">block</xsl:param>
4856
+
4776
4857
  <xsl:choose>
4777
4858
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
4778
4859
  <fo:inline>
4779
4860
  <xsl:apply-templates/>
4780
4861
  </fo:inline>
4781
4862
  </xsl:when>
4782
- <xsl:when test="contains(normalize-space($element), 'block')">
4863
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4783
4864
  <fo:block xsl:use-attribute-sets="example-name-style">
4784
4865
  <xsl:apply-templates/>
4785
4866
  </fo:block>
@@ -4792,14 +4873,15 @@
4792
4873
  </xsl:choose>
4793
4874
 
4794
4875
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4876
+ <xsl:param name="fo_element">block</xsl:param>
4877
+
4795
4878
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4796
4879
  <xsl:variable name="element">
4797
- block
4798
-
4799
4880
 
4881
+ <xsl:value-of select="$fo_element"/>
4800
4882
  </xsl:variable>
4801
4883
  <xsl:choose>
4802
- <xsl:when test="normalize-space($element) = 'block'">
4884
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
4803
4885
  <fo:block xsl:use-attribute-sets="example-p-style">
4804
4886
 
4805
4887
  <xsl:apply-templates/>
@@ -4814,66 +4896,70 @@
4814
4896
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4815
4897
  <fo:block xsl:use-attribute-sets="termsource-style">
4816
4898
 
4899
+
4900
+
4817
4901
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4818
4902
  <xsl:variable name="termsource_text">
4819
4903
  <xsl:apply-templates/>
4820
4904
  </xsl:variable>
4821
-
4822
- <xsl:choose>
4905
+ <xsl:copy-of select="$termsource_text"/>
4906
+ <!-- <xsl:choose>
4823
4907
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
4824
- <!-- <xsl:apply-templates /> -->
4825
4908
  <xsl:copy-of select="$termsource_text"/>
4826
4909
  </xsl:when>
4827
4910
  <xsl:otherwise>
4828
-
4829
-
4911
+ <xsl:if test="$namespace = 'bsi'">
4912
+ <xsl:choose>
4913
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
4914
+ <xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
4915
+ </xsl:choose>
4916
+ </xsl:if>
4917
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
4830
4918
  <xsl:text>[</xsl:text>
4831
-
4832
- <!-- <xsl:apply-templates /> -->
4919
+ </xsl:if>
4833
4920
  <xsl:copy-of select="$termsource_text"/>
4834
-
4835
-
4921
+ <xsl:if test="$namespace = 'bsi'">
4922
+ <xsl:choose>
4923
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
4924
+ <xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
4925
+ </xsl:choose>
4926
+ </xsl:if>
4927
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
4836
4928
  <xsl:text>]</xsl:text>
4837
-
4929
+ </xsl:if>
4838
4930
  </xsl:otherwise>
4839
- </xsl:choose>
4931
+ </xsl:choose> -->
4840
4932
  </fo:block>
4841
4933
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
4842
4934
  <xsl:if test="normalize-space() != ''">
4843
4935
  <xsl:value-of select="."/>
4844
4936
  </xsl:if>
4845
- </xsl:template><xsl:variable name="localized.source">
4846
- <xsl:call-template name="getLocalizedString">
4847
- <xsl:with-param name="key">source</xsl:with-param>
4848
- </xsl:call-template>
4849
- </xsl:variable><xsl:template match="*[local-name() = 'origin']">
4937
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
4938
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
4939
+ <xsl:value-of select="."/>
4940
+ </fo:inline>
4941
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
4850
4942
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4851
4943
  <xsl:if test="normalize-space(@citeas) = ''">
4852
4944
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4853
4945
  </xsl:if>
4854
-
4855
-
4856
- <fo:inline>
4857
-
4858
-
4859
-
4860
-
4861
-
4862
-
4863
-
4864
- <xsl:call-template name="getTitle">
4865
- <xsl:with-param name="name" select="'title-source'"/>
4866
- </xsl:call-template>
4867
- <xsl:text>: </xsl:text>
4868
-
4869
-
4870
- </fo:inline>
4871
-
4872
4946
  <fo:inline xsl:use-attribute-sets="origin-style">
4873
4947
  <xsl:apply-templates/>
4874
4948
  </fo:inline>
4875
-
4876
- </fo:basic-link>
4949
+ </fo:basic-link>
4950
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
4951
+ <xsl:variable name="title-modified">
4952
+ <xsl:call-template name="getLocalizedString">
4953
+ <xsl:with-param name="key">modified</xsl:with-param>
4954
+ </xsl:call-template>
4955
+ </xsl:variable>
4956
+
4957
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4958
+ <xsl:choose>
4959
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
4960
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
4961
+ </xsl:choose>
4962
+ <xsl:apply-templates/>
4877
4963
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
4878
4964
  <fo:inline><xsl:apply-templates/></fo:inline>
4879
4965
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
@@ -4892,7 +4978,6 @@
4892
4978
  <fo:block-container margin-left="0mm">
4893
4979
 
4894
4980
  <fo:block xsl:use-attribute-sets="quote-style">
4895
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4896
4981
 
4897
4982
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4898
4983
  </fo:block>
@@ -4935,15 +5020,13 @@
4935
5020
  </xsl:variable>
4936
5021
 
4937
5022
  <xsl:choose>
4938
- <xsl:when test="normalize-space($bibitemid) != ''">
5023
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
4939
5024
  <fo:inline xsl:use-attribute-sets="eref-style">
4940
5025
  <xsl:if test="@type = 'footnote'">
4941
-
4942
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4943
- <xsl:attribute name="font-size">80%</xsl:attribute>
4944
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4945
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4946
-
5026
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5027
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5028
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5029
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4947
5030
 
4948
5031
  </xsl:if>
4949
5032
 
@@ -4960,7 +5043,6 @@
4960
5043
 
4961
5044
 
4962
5045
 
4963
-
4964
5046
  </xsl:if>
4965
5047
 
4966
5048
 
@@ -5013,8 +5095,6 @@
5013
5095
  </xsl:choose>
5014
5096
  </xsl:variable>
5015
5097
 
5016
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5017
-
5018
5098
  <xsl:choose>
5019
5099
  <xsl:when test="$lang = 'zh'">
5020
5100
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5049,12 +5129,9 @@
5049
5129
  </fo:block>
5050
5130
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5051
5131
  <xsl:variable name="title-deprecated">
5052
-
5053
- <xsl:call-template name="getLocalizedString">
5054
- <xsl:with-param name="key">deprecated</xsl:with-param>
5055
- </xsl:call-template>
5056
-
5057
-
5132
+ <xsl:call-template name="getLocalizedString">
5133
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5134
+ </xsl:call-template>
5058
5135
  </xsl:variable>
5059
5136
  <fo:block xsl:use-attribute-sets="deprecates-style">
5060
5137
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -5063,6 +5140,8 @@
5063
5140
  <xsl:if test="*[local-name() = 'strong']">
5064
5141
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5065
5142
  </xsl:if>
5143
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
5144
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5066
5145
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5067
5146
  <fo:block xsl:use-attribute-sets="definition-style">
5068
5147
  <xsl:apply-templates/>
@@ -5071,7 +5150,6 @@
5071
5150
  <xsl:apply-templates/>
5072
5151
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5073
5152
  <fo:inline> <xsl:apply-templates/></fo:inline>
5074
- <!-- <fo:block>&#xA0;</fo:block> -->
5075
5153
  <fo:block/>
5076
5154
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5077
5155
 
@@ -5112,11 +5190,6 @@
5112
5190
  <xsl:apply-templates/>
5113
5191
  </fo:block>
5114
5192
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5115
- <fo:block id="{@id}">
5116
- <xsl:apply-templates/>
5117
- </fo:block>
5118
- </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']">
5119
-
5120
5193
  <fo:block id="{@id}">
5121
5194
  <xsl:apply-templates/>
5122
5195
  </fo:block>
@@ -5133,6 +5206,53 @@
5133
5206
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5134
5207
  <!-- 0xA0 to space replacement -->
5135
5208
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5209
+ </xsl:template><xsl:variable name="ul_labels_">
5210
+
5211
+
5212
+
5213
+ <label level="1">•</label>
5214
+ <label level="2">-</label><!-- minus -->
5215
+ <label level="3" font-size="75%">o</label> <!-- white circle -->
5216
+
5217
+
5218
+
5219
+
5220
+
5221
+
5222
+
5223
+
5224
+
5225
+
5226
+
5227
+
5228
+
5229
+
5230
+
5231
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
5232
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
5233
+ <xsl:variable name="list_level">
5234
+ <xsl:choose>
5235
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
5236
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
5237
+ </xsl:choose>
5238
+ </xsl:variable>
5239
+ <xsl:choose>
5240
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
5241
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
5242
+ </xsl:when>
5243
+ <xsl:when test="$list_level mod 3 = 0">
5244
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
5245
+ </xsl:when>
5246
+ <xsl:when test="$list_level mod 2 = 0">
5247
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
5248
+ </xsl:when>
5249
+ <xsl:otherwise>
5250
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
5251
+ </xsl:otherwise>
5252
+ </xsl:choose>
5253
+ </xsl:template><xsl:template match="label" mode="ul_labels">
5254
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
5255
+ <xsl:value-of select="."/>
5136
5256
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5137
5257
  <xsl:choose>
5138
5258
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -5339,20 +5459,150 @@
5339
5459
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
5340
5460
  <fo:block><xsl:apply-templates/></fo:block>
5341
5461
  </fo:table-cell>
5342
- </xsl:template><xsl:template name="processBibitem">
5462
+ </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">
5463
+
5464
+
5465
+
5466
+ <fo:block id="{@id}">
5467
+ <xsl:apply-templates/>
5468
+ </fo:block>
5469
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
5470
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
5471
+
5472
+ <fo:block break-after="page"/>
5473
+
5474
+ </xsl:if>
5475
+
5476
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
5477
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
5478
+ <fo:block break-after="page"/>
5479
+ </xsl:if>
5480
+ </xsl:if> -->
5481
+
5482
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
5483
+ <xsl:apply-templates/>
5484
+ </fo:block>
5343
5485
 
5344
5486
 
5345
5487
 
5346
-
5347
5488
 
5489
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
5490
+ <xsl:call-template name="bibitem"/>
5491
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
5492
+
5493
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
5494
+ <xsl:call-template name="processBibitem"/>
5495
+ </fo:block>
5496
+
5497
+
5498
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
5348
5499
 
5349
-
5350
5500
 
5501
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-style">
5502
+ <fo:inline id="{@id}">
5503
+ <xsl:value-of select="csa:docidentifier[@type = 'metanorma-ordinal']"/>
5504
+ <xsl:if test="not(csa:docidentifier[@type = 'metanorma-ordinal'])">
5505
+ <xsl:number format="[1]"/>
5506
+ </xsl:if>
5507
+ </fo:inline>
5508
+
5509
+ <xsl:if test="not(csa:formattedref)">
5510
+ <xsl:choose>
5511
+ <xsl:when test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:abbreviation">
5512
+ <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:abbreviation">
5513
+ <xsl:value-of select="."/>
5514
+ <xsl:if test="position() != last()">/</xsl:if>
5515
+ </xsl:for-each>
5516
+ <xsl:text>: </xsl:text>
5517
+ </xsl:when>
5518
+ <xsl:when test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
5519
+ <xsl:value-of select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name"/>
5520
+ <xsl:text>: </xsl:text>
5521
+ </xsl:when>
5522
+ </xsl:choose>
5523
+
5524
+ </xsl:if>
5525
+
5526
+ <xsl:if test="csa:docidentifier[not(@type = 'metanorma-ordinal')]">
5527
+ <xsl:choose>
5528
+ <xsl:when test="csa:docidentifier/@type = 'ISO' and csa:formattedref"/>
5529
+ <xsl:when test="csa:docidentifier/@type = 'OGC' and csa:formattedref"/>
5530
+ <xsl:otherwise><fo:inline>
5531
+ <!-- <xsl:if test="csa:docidentifier/@type = 'OGC'">OGC </xsl:if> -->
5532
+ <xsl:value-of select="csa:docidentifier[not(@type = 'metanorma-ordinal')]"/><xsl:apply-templates select="csa:note"/>, </fo:inline></xsl:otherwise>
5533
+ </xsl:choose>
5534
+ </xsl:if>
5535
+
5536
+ <xsl:choose>
5537
+ <xsl:when test="csa:title[@type = 'main' and @language = 'en']">
5538
+ <xsl:apply-templates select="csa:title[@type = 'main' and @language = 'en']"/>
5539
+ </xsl:when>
5540
+ <xsl:otherwise>
5541
+ <xsl:apply-templates select="csa:title"/>
5542
+ </xsl:otherwise>
5543
+ </xsl:choose>
5544
+ <xsl:if test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
5545
+ <xsl:text>, </xsl:text>
5546
+ <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
5547
+ <xsl:if test="position() != last()">and </xsl:if>
5548
+ <xsl:value-of select="."/>
5549
+ </xsl:for-each>
5550
+
5551
+ </xsl:if>
5552
+ <xsl:if test="csa:place">
5553
+ <xsl:text>, </xsl:text>
5554
+ <xsl:value-of select="csa:place"/>
5555
+ </xsl:if>
5556
+ <xsl:if test="csa:date[@type='published']/csa:on">
5557
+ <xsl:text> (</xsl:text><xsl:value-of select="csa:date[@type='published']/csa:on"/><xsl:text>).</xsl:text>
5558
+ </xsl:if>
5559
+ <xsl:apply-templates select="csa:formattedref"/>
5560
+
5561
+ </fo:block>
5562
+
5351
5563
 
5564
+ </xsl:template><xsl:template name="processBibitem">
5352
5565
 
5353
5566
 
5567
+ <!-- start CSA bibitem processing -->
5568
+ <xsl:if test=".//csa:fn">
5569
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
5570
+ </xsl:if>
5571
+ <xsl:choose>
5572
+ <xsl:when test="csa:formattedref">
5573
+ <xsl:apply-templates select="csa:formattedref"/>
5574
+ </xsl:when>
5575
+ <xsl:otherwise>
5576
+ <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
5577
+ <xsl:apply-templates/>
5578
+ <xsl:if test="position() != last()">, </xsl:if>
5579
+ <xsl:if test="position() = last()">: </xsl:if>
5580
+ </xsl:for-each>
5581
+ <!-- csa:docidentifier -->
5582
+ <xsl:value-of select="csa:docidentifier[not(@type = 'metanorma-ordinal')]"/>
5583
+ <xsl:apply-templates select="csa:note"/>
5584
+ <xsl:if test="csa:docidentifier[not(@type = 'metanorma-ordinal')]">, </xsl:if>
5585
+ <xsl:choose>
5586
+ <xsl:when test="csa:title[@type = 'main' and @language = 'en']">
5587
+ <fo:inline><xsl:apply-templates select="csa:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text></fo:inline>
5588
+ </xsl:when>
5589
+ <xsl:otherwise>
5590
+ <fo:inline><xsl:apply-templates select="csa:title"/><xsl:text>. </xsl:text></fo:inline>
5591
+ </xsl:otherwise>
5592
+ </xsl:choose>
5593
+ <xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
5594
+ <xsl:apply-templates/>
5595
+ <xsl:if test="position() != last()">, </xsl:if>
5596
+ </xsl:for-each>
5597
+ <xsl:if test="csa:date[@type='published']/csa:on">
5598
+ <xsl:text>(</xsl:text><xsl:value-of select="csa:date[@type='published']/csa:on"/><xsl:text>)</xsl:text>
5599
+ </xsl:if>
5600
+ </xsl:otherwise>
5601
+ </xsl:choose>
5602
+ <!-- end CSA bibitem processing -->
5603
+
5354
5604
  </xsl:template><xsl:template name="processBibitemDocId">
5355
- <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')]"/>
5605
+ <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')]"/>
5356
5606
  <xsl:choose>
5357
5607
  <xsl:when test="normalize-space($_doc_ident) != ''">
5358
5608
  <!-- <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"/>
@@ -5366,7 +5616,7 @@
5366
5616
  <xsl:if test="$type != ''">
5367
5617
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5368
5618
  </xsl:if> -->
5369
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
5619
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
5370
5620
  </xsl:otherwise>
5371
5621
  </xsl:choose>
5372
5622
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -5407,6 +5657,55 @@
5407
5657
  <xsl:value-of select="substring(.,1,1)"/>
5408
5658
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5409
5659
  <fo:inline><xsl:apply-templates/></fo:inline>
5660
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
5661
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
5662
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
5663
+ <xsl:apply-templates/>
5664
+ </fo:inline>
5665
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
5666
+ <fo:footnote>
5667
+ <xsl:variable name="number">
5668
+
5669
+ <xsl:choose>
5670
+ <xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
5671
+ <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5672
+ </xsl:when>
5673
+ <xsl:otherwise>
5674
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5675
+ </xsl:otherwise>
5676
+ </xsl:choose>
5677
+
5678
+ </xsl:variable>
5679
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
5680
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
5681
+ <xsl:value-of select="$number"/>
5682
+
5683
+ </fo:basic-link>
5684
+ </fo:inline>
5685
+ <fo:footnote-body>
5686
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
5687
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
5688
+ <xsl:value-of select="$number"/>
5689
+
5690
+ </fo:inline>
5691
+ <xsl:apply-templates/>
5692
+ </fo:block>
5693
+ </fo:footnote-body>
5694
+ </fo:footnote>
5695
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
5696
+ <xsl:text> edition </xsl:text>
5697
+ <xsl:value-of select="."/>
5698
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
5699
+ <xsl:text> (</xsl:text>
5700
+ <fo:inline xsl:use-attribute-sets="link-style">
5701
+ <fo:basic-link external-destination="." fox:alt-text=".">
5702
+ <xsl:value-of select="."/>
5703
+ </fo:basic-link>
5704
+ </fo:inline>
5705
+ <xsl:text>)</xsl:text>
5706
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
5707
+
5708
+ <xsl:apply-templates/>
5410
5709
  </xsl:template><xsl:template match="*[local-name() = 'form']">
5411
5710
  <fo:block>
5412
5711
  <xsl:apply-templates/>
@@ -5471,7 +5770,18 @@
5471
5770
  <fo:block-container border="1pt solid black" width="50%">
5472
5771
  <fo:block> </fo:block>
5473
5772
  </fo:block-container>
5474
- </xsl:template><xsl:template match="*[local-name() = 'toc']">
5773
+ </xsl:template><xsl:variable name="toc_level">
5774
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
5775
+ <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:-->
5776
+ <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 -->
5777
+ <xsl:choose>
5778
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
5779
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
5780
+ <xsl:otherwise><!-- default value -->
5781
+ 2
5782
+ </xsl:otherwise>
5783
+ </xsl:choose>
5784
+ </xsl:variable><xsl:template match="*[local-name() = 'toc']">
5475
5785
  <xsl:param name="colwidths"/>
5476
5786
  <xsl:variable name="colwidths_">
5477
5787
  <xsl:choose>
@@ -5551,7 +5861,7 @@
5551
5861
  </td>
5552
5862
  </xsl:for-each>
5553
5863
  <td>333</td> <!-- page number, just for fill -->
5554
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5864
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5555
5865
  <fo:inline padding-right="5mm"> </fo:inline>
5556
5866
  <fo:inline><xsl:apply-templates/></fo:inline>
5557
5867
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -5562,6 +5872,60 @@
5562
5872
  </svg>
5563
5873
  </fo:instream-foreign-object>
5564
5874
  </fo:inline>
5875
+ </xsl:template><xsl:template match="@language">
5876
+ <xsl:copy-of select="."/>
5877
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
5878
+ <xsl:call-template name="title"/>
5879
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
5880
+
5881
+
5882
+
5883
+
5884
+
5885
+ <!-- text in the box -->
5886
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
5887
+
5888
+
5889
+
5890
+
5891
+
5892
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
5893
+
5894
+
5895
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5896
+ <fo:block>
5897
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5898
+ </fo:block>
5899
+ </fo:block-container>
5900
+
5901
+ </fo:block-container>
5902
+
5903
+ </fo:block-container>
5904
+
5905
+ </xsl:template><xsl:template name="displayAdmonitionName">
5906
+
5907
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5908
+ <xsl:if test="not(*[local-name() = 'name'])">
5909
+ <xsl:apply-templates select="@type"/>
5910
+ </xsl:if>
5911
+
5912
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
5913
+ <xsl:apply-templates/>
5914
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
5915
+ <xsl:variable name="admonition_type_">
5916
+ <xsl:call-template name="getLocalizedString">
5917
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
5918
+ </xsl:call-template>
5919
+ </xsl:variable>
5920
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
5921
+ <xsl:value-of select="$admonition_type"/>
5922
+ <xsl:if test="$admonition_type = ''">
5923
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
5924
+ </xsl:if>
5925
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
5926
+ <!-- processing for admonition/p found in the template for 'p' -->
5927
+ <xsl:call-template name="paragraph"/>
5928
+
5565
5929
  </xsl:template><xsl:template name="convertDate">
5566
5930
  <xsl:param name="date"/>
5567
5931
  <xsl:param name="format" select="'short'"/>
@@ -5570,78 +5934,39 @@
5570
5934
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
5571
5935
  <xsl:variable name="monthStr">
5572
5936
  <xsl:choose>
5573
- <xsl:when test="$month = '01'">January</xsl:when>
5574
- <xsl:when test="$month = '02'">February</xsl:when>
5575
- <xsl:when test="$month = '03'">March</xsl:when>
5576
- <xsl:when test="$month = '04'">April</xsl:when>
5577
- <xsl:when test="$month = '05'">May</xsl:when>
5578
- <xsl:when test="$month = '06'">June</xsl:when>
5579
- <xsl:when test="$month = '07'">July</xsl:when>
5580
- <xsl:when test="$month = '08'">August</xsl:when>
5581
- <xsl:when test="$month = '09'">September</xsl:when>
5582
- <xsl:when test="$month = '10'">October</xsl:when>
5583
- <xsl:when test="$month = '11'">November</xsl:when>
5584
- <xsl:when test="$month = '12'">December</xsl:when>
5585
- </xsl:choose>
5586
- </xsl:variable>
5587
- <xsl:variable name="result">
5588
- <xsl:choose>
5589
- <xsl:when test="$format = 'ddMMyyyy'">
5590
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5591
- <xsl:text> </xsl:text>
5592
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5593
- </xsl:when>
5594
- <xsl:when test="$format = 'ddMM'">
5595
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5596
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5597
- </xsl:when>
5598
- <xsl:when test="$format = 'short' or $day = ''">
5599
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5600
- </xsl:when>
5601
- <xsl:otherwise>
5602
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
5603
- </xsl:otherwise>
5937
+ <xsl:when test="$month = '01'">january</xsl:when>
5938
+ <xsl:when test="$month = '02'">february</xsl:when>
5939
+ <xsl:when test="$month = '03'">march</xsl:when>
5940
+ <xsl:when test="$month = '04'">april</xsl:when>
5941
+ <xsl:when test="$month = '05'">may</xsl:when>
5942
+ <xsl:when test="$month = '06'">june</xsl:when>
5943
+ <xsl:when test="$month = '07'">july</xsl:when>
5944
+ <xsl:when test="$month = '08'">august</xsl:when>
5945
+ <xsl:when test="$month = '09'">september</xsl:when>
5946
+ <xsl:when test="$month = '10'">october</xsl:when>
5947
+ <xsl:when test="$month = '11'">november</xsl:when>
5948
+ <xsl:when test="$month = '12'">december</xsl:when>
5604
5949
  </xsl:choose>
5605
5950
  </xsl:variable>
5606
- <xsl:value-of select="$result"/>
5607
- </xsl:template><xsl:template name="convertDateLocalized">
5608
- <xsl:param name="date"/>
5609
- <xsl:param name="format" select="'short'"/>
5610
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
5611
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
5612
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
5613
- <xsl:variable name="monthStr">
5614
- <xsl:choose>
5615
- <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>
5616
- <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>
5617
- <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>
5618
- <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>
5619
- <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>
5620
- <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>
5621
- <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>
5622
- <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>
5623
- <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>
5624
- <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>
5625
- <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>
5626
- <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>
5627
- </xsl:choose>
5951
+ <xsl:variable name="monthStr_localized">
5952
+ <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>
5628
5953
  </xsl:variable>
5629
5954
  <xsl:variable name="result">
5630
5955
  <xsl:choose>
5631
5956
  <xsl:when test="$format = 'ddMMyyyy'">
5632
5957
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5633
5958
  <xsl:text> </xsl:text>
5634
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5959
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
5635
5960
  </xsl:when>
5636
5961
  <xsl:when test="$format = 'ddMM'">
5637
5962
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5638
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5963
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
5639
5964
  </xsl:when>
5640
5965
  <xsl:when test="$format = 'short' or $day = ''">
5641
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5966
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
5642
5967
  </xsl:when>
5643
5968
  <xsl:otherwise>
5644
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
5969
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
5645
5970
  </xsl:otherwise>
5646
5971
  </xsl:choose>
5647
5972
  </xsl:variable>
@@ -5693,14 +6018,9 @@
5693
6018
  <dc:title>
5694
6019
  <xsl:variable name="title">
5695
6020
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5696
-
5697
-
5698
-
5699
-
5700
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5701
-
5702
-
5703
6021
 
6022
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6023
+
5704
6024
  </xsl:for-each>
5705
6025
  </xsl:variable>
5706
6026
  <xsl:choose>
@@ -5715,21 +6035,18 @@
5715
6035
  <dc:creator>
5716
6036
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5717
6037
 
5718
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5719
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5720
- <xsl:if test="position() != last()">; </xsl:if>
5721
- </xsl:for-each>
5722
-
5723
-
5724
-
6038
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6039
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6040
+ <xsl:if test="position() != last()">; </xsl:if>
6041
+ </xsl:for-each>
6042
+
5725
6043
  </xsl:for-each>
5726
6044
  </dc:creator>
5727
6045
  <dc:description>
5728
6046
  <xsl:variable name="abstract">
5729
6047
 
5730
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5731
-
5732
-
6048
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6049
+
5733
6050
  </xsl:variable>
5734
6051
  <xsl:value-of select="normalize-space($abstract)"/>
5735
6052
  </dc:description>
@@ -5749,7 +6066,6 @@
5749
6066
  <xsl:value-of select="../@id"/>
5750
6067
  </xsl:when>
5751
6068
  <xsl:otherwise>
5752
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
5753
6069
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
5754
6070
  </xsl:otherwise>
5755
6071
  </xsl:choose>
@@ -5775,9 +6091,6 @@
5775
6091
  <xsl:when test="ancestor::*[local-name() = 'preface']">
5776
6092
  <xsl:value-of select="$level_total - 2"/>
5777
6093
  </xsl:when>
5778
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
5779
- <xsl:value-of select="$level_total - 1"/>
5780
- </xsl:when> -->
5781
6094
  <xsl:when test="ancestor::*[local-name() = 'sections']">
5782
6095
  <xsl:value-of select="$level_total - 1"/>
5783
6096
  </xsl:when>
@@ -5919,9 +6232,15 @@
5919
6232
  </xsl:template><xsl:template name="getLocalizedString">
5920
6233
  <xsl:param name="key"/>
5921
6234
  <xsl:param name="formatted">false</xsl:param>
6235
+ <xsl:param name="lang"/>
5922
6236
 
5923
6237
  <xsl:variable name="curr_lang">
5924
- <xsl:call-template name="getLang"/>
6238
+ <xsl:choose>
6239
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
6240
+ <xsl:otherwise>
6241
+ <xsl:call-template name="getLang"/>
6242
+ </xsl:otherwise>
6243
+ </xsl:choose>
5925
6244
  </xsl:variable>
5926
6245
 
5927
6246
  <xsl:variable name="data_value">
@@ -5961,7 +6280,6 @@
5961
6280
  <xsl:value-of select="$key_"/>
5962
6281
  </xsl:otherwise>
5963
6282
  </xsl:choose>
5964
-
5965
6283
  </xsl:template><xsl:template name="setTrackChangesStyles">
5966
6284
  <xsl:param name="isAdded"/>
5967
6285
  <xsl:param name="isDeleted"/>
@@ -5984,7 +6302,6 @@
5984
6302
  <xsl:if test="local-name() = 'table'">
5985
6303
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
5986
6304
  </xsl:if>
5987
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
5988
6305
  <xsl:attribute name="padding">2mm</xsl:attribute>
5989
6306
  </xsl:if>
5990
6307
  </xsl:otherwise>
@@ -6004,15 +6321,18 @@
6004
6321
  </xsl:choose>
6005
6322
  </xsl:template><xsl:template name="setTextAlignment">
6006
6323
  <xsl:param name="default">left</xsl:param>
6324
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6007
6325
  <xsl:attribute name="text-align">
6008
6326
  <xsl:choose>
6009
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6327
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
6328
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
6329
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
6010
6330
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6011
6331
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6012
6332
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6013
6333
  </xsl:choose>
6014
6334
  </xsl:attribute>
6015
- <xsl:if test="@align = 'indent'">
6335
+ <xsl:if test="$align = 'indent'">
6016
6336
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6017
6337
  </xsl:if>
6018
6338
  </xsl:template><xsl:template name="number-to-words">
@@ -6111,4 +6431,14 @@
6111
6431
  </xsl:otherwise>
6112
6432
  </xsl:choose>
6113
6433
  </xsl:if>
6434
+ </xsl:template><xsl:template name="setAltText">
6435
+ <xsl:param name="value"/>
6436
+ <xsl:attribute name="fox:alt-text">
6437
+ <xsl:choose>
6438
+ <xsl:when test="normalize-space($value) != ''">
6439
+ <xsl:value-of select="$value"/>
6440
+ </xsl:when>
6441
+ <xsl:otherwise>_</xsl:otherwise>
6442
+ </xsl:choose>
6443
+ </xsl:attribute>
6114
6444
  </xsl:template></xsl:stylesheet>