metanorma-ribose 2.7.3 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/html/header.html +9 -9
- data/lib/isodoc/ribose/html/html_rsd_titlepage.html +3 -3
- data/lib/isodoc/ribose/html/htmlstyle.css +24 -30
- data/lib/isodoc/ribose/html/word_rsd_titlepage.html +2 -2
- data/lib/isodoc/ribose/ribose.standard.xsl +357 -159
- data/lib/metanorma/ribose/isodoc.rng +26 -19
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma.yml +6 -1
- metadata +2 -2
@@ -333,6 +333,8 @@
|
|
333
333
|
|
334
334
|
<xsl:call-template name="cover-page"/>
|
335
335
|
|
336
|
+
<xsl:call-template name="inner-cover-page"/>
|
337
|
+
|
336
338
|
<xsl:variable name="updated_xml">
|
337
339
|
<xsl:call-template name="updateXML"/>
|
338
340
|
<!-- <xsl:copy-of select="."/> -->
|
@@ -350,9 +352,13 @@
|
|
350
352
|
<xsl:variable name="toc_and_boilerplate">
|
351
353
|
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[@type = 'toc']"/>
|
352
354
|
|
355
|
+
<!-- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement"/>
|
356
|
+
|
353
357
|
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
|
358
|
+
|
359
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/> -->
|
354
360
|
|
355
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate
|
361
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*"/>
|
356
362
|
</xsl:variable>
|
357
363
|
|
358
364
|
<xsl:if test="normalize-space($toc_and_boilerplate) != ''">
|
@@ -388,9 +394,9 @@
|
|
388
394
|
<xsl:call-template name="insertHeaderFooter">
|
389
395
|
<xsl:with-param name="section">main</xsl:with-param>
|
390
396
|
</xsl:call-template>
|
391
|
-
<fo:flow flow-name="xsl-region-body">
|
397
|
+
<fo:flow flow-name="xsl-region-body" role="SKIP">
|
392
398
|
|
393
|
-
<fo:block line-height="130%">
|
399
|
+
<fo:block line-height="130%" role="SKIP">
|
394
400
|
|
395
401
|
<!-- <xsl:apply-templates select="/mn:metanorma/mn:preface/mn:abstract" />
|
396
402
|
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:foreword" />
|
@@ -410,6 +416,8 @@
|
|
410
416
|
</xsl:for-each>
|
411
417
|
</xsl:for-each>
|
412
418
|
|
419
|
+
<xsl:call-template name="back-page"/>
|
420
|
+
|
413
421
|
</fo:root>
|
414
422
|
</xsl:template>
|
415
423
|
|
@@ -500,9 +508,17 @@
|
|
500
508
|
<xsl:if test="string-length($title) > 80">
|
501
509
|
<xsl:attribute name="margin-right">-30mm</xsl:attribute>
|
502
510
|
</xsl:if>
|
503
|
-
|
504
|
-
|
505
|
-
|
511
|
+
|
512
|
+
<xsl:variable name="titles">
|
513
|
+
<xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and (@type = 'intro' or not(@type))]"/>
|
514
|
+
<xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and @type = 'main'][last()]"/>
|
515
|
+
</xsl:variable>
|
516
|
+
<xsl:for-each select="xalan:nodeset($titles)/mn:title">
|
517
|
+
<fo:block font-size="27pt" font-weight="bold" role="H1">
|
518
|
+
<xsl:apply-templates/><xsl:if test="position() != last()"><xsl:value-of select="$nonbreak_space_em_dash"/></xsl:if>
|
519
|
+
</fo:block>
|
520
|
+
</xsl:for-each>
|
521
|
+
|
506
522
|
<fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
|
507
523
|
<xsl:value-of select="$docnumber_version"/>
|
508
524
|
</fo:block>
|
@@ -511,6 +527,12 @@
|
|
511
527
|
</fo:page-sequence>
|
512
528
|
</xsl:template> <!-- END: cover-page -->
|
513
529
|
|
530
|
+
<xsl:template name="inner-cover-page">
|
531
|
+
</xsl:template>
|
532
|
+
|
533
|
+
<xsl:template name="back-page">
|
534
|
+
</xsl:template>
|
535
|
+
|
514
536
|
<xsl:template name="processPrefaceAndMainSectionsRibose_items">
|
515
537
|
<xsl:variable name="updated_xml_step_move_pagebreak">
|
516
538
|
|
@@ -598,12 +620,10 @@
|
|
598
620
|
</fo:block>
|
599
621
|
</xsl:template>
|
600
622
|
|
601
|
-
<xsl:
|
602
|
-
<xsl:apply-templates/>
|
603
|
-
</xsl:template>
|
623
|
+
<xsl:variable name="toc_item_indent">7</xsl:variable>
|
604
624
|
|
605
625
|
<xsl:template match="mn:preface/mn:clause[@type = 'toc']" name="toc" priority="3">
|
606
|
-
<fo:block role="
|
626
|
+
<fo:block role="SKIP">
|
607
627
|
<xsl:apply-templates/>
|
608
628
|
|
609
629
|
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
@@ -611,7 +631,7 @@
|
|
611
631
|
<xsl:if test="$contents//mnx:item[@display = 'true']">
|
612
632
|
|
613
633
|
<fo:block-container xsl:use-attribute-sets="toc-style">
|
614
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
634
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
615
635
|
<xsl:for-each select="$contents//mnx:item[@display = 'true']">
|
616
636
|
<fo:block xsl:use-attribute-sets="toc-item-style">
|
617
637
|
|
@@ -744,18 +764,20 @@
|
|
744
764
|
<!-- ============================= -->
|
745
765
|
<!-- ============================= -->
|
746
766
|
|
767
|
+
<xsl:template match="mn:copyright-statement" priority="2"/>
|
768
|
+
|
769
|
+
<xsl:template match="mn:legal-statement" priority="2">
|
770
|
+
<xsl:apply-templates/>
|
771
|
+
</xsl:template>
|
772
|
+
|
747
773
|
<xsl:template match="mn:feedback-statement" priority="2">
|
748
|
-
<fo:block-container
|
774
|
+
<fo:block-container xsl:use-attribute-sets="feedback-statement-style">
|
749
775
|
<fo:block>
|
750
776
|
<xsl:apply-templates/>
|
751
777
|
</fo:block>
|
752
778
|
</fo:block-container>
|
753
779
|
</xsl:template>
|
754
780
|
|
755
|
-
<xsl:template match="mn:legal-statement" priority="2">
|
756
|
-
<xsl:apply-templates/>
|
757
|
-
</xsl:template>
|
758
|
-
|
759
781
|
<!-- ====== -->
|
760
782
|
<!-- title -->
|
761
783
|
<!-- ====== -->
|
@@ -786,9 +808,11 @@
|
|
786
808
|
<!-- <xsl:when test="ancestor::mn:preface and $level >= 2">12pt</xsl:when>
|
787
809
|
<xsl:when test="ancestor::mn:preface">13pt</xsl:when> -->
|
788
810
|
<xsl:when test="$level = 1">22pt</xsl:when>
|
789
|
-
<xsl:when test="$level = 2">13pt</xsl:when>
|
811
|
+
<!-- <xsl:when test="$level = 2">13pt</xsl:when>
|
790
812
|
<xsl:when test="$level >= 3">11pt</xsl:when>
|
791
|
-
<xsl:otherwise>16pt</xsl:otherwise>
|
813
|
+
<xsl:otherwise>16pt</xsl:otherwise> -->
|
814
|
+
<xsl:when test="$level >= 2">13pt</xsl:when>
|
815
|
+
<xsl:otherwise>13pt</xsl:otherwise>
|
792
816
|
</xsl:choose>
|
793
817
|
</xsl:variable>
|
794
818
|
|
@@ -843,20 +867,21 @@
|
|
843
867
|
|
844
868
|
<xsl:choose>
|
845
869
|
<xsl:when test="$level = 1">
|
846
|
-
<fo:block-container margin-left="-15mm">
|
847
|
-
<fo:block-container margin-left="0mm">
|
848
|
-
<fo:table width="100%" table-layout="fixed">
|
870
|
+
<fo:block-container margin-left="-15mm" role="SKIP">
|
871
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
872
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
849
873
|
<fo:table-column column-width="15mm"/>
|
850
874
|
<fo:table-column column-width="150mm"/>
|
851
|
-
<fo:table-body>
|
852
|
-
<fo:table-row>
|
853
|
-
<fo:table-cell text-align="left">
|
854
|
-
<fo:block>
|
875
|
+
<fo:table-body role="SKIP">
|
876
|
+
<fo:table-row role="SKIP">
|
877
|
+
<fo:table-cell text-align="left" role="SKIP">
|
878
|
+
<fo:block role="SKIP">
|
879
|
+
<xsl:call-template name="setIDforNamedDestinationInline"/>
|
855
880
|
<xsl:call-template name="extractSection"/><!-- section number 1 2 3 ... -->
|
856
881
|
</fo:block>
|
857
882
|
</fo:table-cell>
|
858
|
-
<fo:table-cell>
|
859
|
-
<fo:block>
|
883
|
+
<fo:table-cell role="SKIP">
|
884
|
+
<fo:block role="SKIP">
|
860
885
|
<xsl:call-template name="extractTitle"/> <!-- section title -->
|
861
886
|
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
862
887
|
</fo:block>
|
@@ -868,6 +893,7 @@
|
|
868
893
|
</fo:block-container>
|
869
894
|
</xsl:when>
|
870
895
|
<xsl:otherwise>
|
896
|
+
<xsl:call-template name="setIDforNamedDestinationInline"/>
|
871
897
|
<xsl:apply-templates/>
|
872
898
|
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
873
899
|
</xsl:otherwise>
|
@@ -889,7 +915,9 @@
|
|
889
915
|
</xsl:template> -->
|
890
916
|
|
891
917
|
<xsl:template match="mn:terms" priority="3">
|
892
|
-
<
|
918
|
+
<xsl:if test="not(ancestor::*[@type = 'terms'])">
|
919
|
+
<fo:block break-after="page"/>
|
920
|
+
</xsl:if>
|
893
921
|
<fo:block id="{@id}">
|
894
922
|
<xsl:apply-templates/>
|
895
923
|
</fo:block>
|
@@ -907,6 +935,8 @@
|
|
907
935
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
908
936
|
</xsl:choose>
|
909
937
|
</xsl:variable>
|
938
|
+
|
939
|
+
<xsl:call-template name="setNamedDestination"/>
|
910
940
|
<xsl:element name="{$element-name}">
|
911
941
|
<xsl:attribute name="id">
|
912
942
|
<xsl:value-of select="@id"/>
|
@@ -944,11 +974,11 @@
|
|
944
974
|
</xsl:template>
|
945
975
|
|
946
976
|
<xsl:template match="mn:ul | mn:ol" mode="list" priority="2">
|
947
|
-
<fo:block-container>
|
948
|
-
<fo:block-container margin-left="0mm">
|
977
|
+
<fo:block-container role="SKIP">
|
978
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
949
979
|
<xsl:choose>
|
950
980
|
<xsl:when test="not(ancestor::mn:ul) and not(ancestor::mn:ol)">
|
951
|
-
<fo:block padding-bottom="12pt" padding-top="4pt">
|
981
|
+
<fo:block padding-bottom="12pt" padding-top="4pt" role="SKIP">
|
952
982
|
<xsl:call-template name="listProcessing"/>
|
953
983
|
</fo:block>
|
954
984
|
</xsl:when>
|
@@ -982,21 +1012,10 @@
|
|
982
1012
|
</xsl:template>
|
983
1013
|
|
984
1014
|
<xsl:template match="mn:fmt-preferred | mn:fmt-deprecates | mn:fmt-admitted" priority="2">
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
<xsl:variable name="font-size">
|
989
|
-
<xsl:choose>
|
990
|
-
<xsl:when test="$level >= 2">13pt</xsl:when>
|
991
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
992
|
-
</xsl:choose>
|
993
|
-
</xsl:variable>
|
994
|
-
<xsl:variable name="levelTerm">
|
995
|
-
<xsl:call-template name="getLevelTermName"/>
|
996
|
-
</xsl:variable>
|
997
|
-
<fo:block font-weight="bold" color="black" font-size="{$font-size}" keep-with-next="always" role="H{$levelTerm}"> <!-- 600 - semibold -->
|
1015
|
+
|
1016
|
+
<fo:block xsl:use-attribute-sets="preferred-style">
|
1017
|
+
<xsl:call-template name="refine_preferred-style"/>
|
998
1018
|
<xsl:if test="preceding-sibling::*[1][self::mn:fmt-name]">
|
999
|
-
<xsl:attribute name="space-before">11mm</xsl:attribute>
|
1000
1019
|
<fo:inline padding-right="1mm">
|
1001
1020
|
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
1002
1021
|
</fo:inline>
|
@@ -1030,52 +1049,54 @@
|
|
1030
1049
|
</fo:inline>
|
1031
1050
|
</fo:block>
|
1032
1051
|
</fo:inline-container>
|
1033
|
-
|
1034
1052
|
</fo:block>
|
1035
1053
|
</xsl:template>
|
1036
1054
|
|
1037
1055
|
<xsl:template match="mn:references[not(@normative='true')]" priority="3">
|
1038
1056
|
<fo:block break-after="page"/>
|
1039
|
-
<fo:block id="{@id}">
|
1040
|
-
<fo:table width="100%" table-layout="fixed">
|
1057
|
+
<fo:block id="{@id}" role="SKIP">
|
1058
|
+
<fo:table width="100%" table-layout="fixed" role="Sect">
|
1041
1059
|
<fo:table-column column-width="100%"/>
|
1042
|
-
<fo:table-header>
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1048
|
-
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
1049
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
1050
|
-
<xsl:attribute name="line-height">125%</xsl:attribute>
|
1060
|
+
<fo:table-header role="SKIP">
|
1061
|
+
<!-- repeat table header on each page -->
|
1062
|
+
<fo:table-row role="SKIP">
|
1063
|
+
<fo:table-cell text-align="left" role="SKIP">
|
1064
|
+
<fo:block xsl:use-attribute-sets="references-non-normative-title-style"> <!-- Bibliography section title -->
|
1051
1065
|
<xsl:apply-templates select="mn:fmt-title/node()"/>
|
1052
1066
|
</fo:block>
|
1053
1067
|
</fo:table-cell>
|
1054
1068
|
</fo:table-row>
|
1055
1069
|
</fo:table-header>
|
1056
|
-
<fo:table-body>
|
1057
|
-
<fo:table-row>
|
1058
|
-
<fo:table-cell text-align="left">
|
1059
|
-
<fo:block>
|
1070
|
+
<fo:table-body role="SKIP">
|
1071
|
+
<fo:table-row role="SKIP">
|
1072
|
+
<fo:table-cell text-align="left" role="SKIP">
|
1073
|
+
<fo:block role="L">
|
1060
1074
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
1061
1075
|
</fo:block>
|
1062
1076
|
</fo:table-cell>
|
1063
1077
|
</fo:table-row>
|
1064
1078
|
</fo:table-body>
|
1065
1079
|
</fo:table>
|
1066
|
-
|
1067
1080
|
</fo:block>
|
1068
1081
|
</xsl:template>
|
1069
1082
|
|
1070
1083
|
<xsl:template match="*[self::mn:table or self::mn:figure or self::mn:sourcecode]/mn:fmt-name/node()[1][self::text()]" priority="2">
|
1084
|
+
<xsl:variable name="styles_">
|
1085
|
+
<xsl:choose>
|
1086
|
+
<xsl:when test="ancestor::mn:table"><styles xsl:use-attribute-sets="table-number-style"><xsl:call-template name="refine_table-number-style"/></styles></xsl:when>
|
1087
|
+
<xsl:when test="ancestor::mn:figure"><styles xsl:use-attribute-sets="figure-number-style"><xsl:call-template name="refine_figure-number-style"/></styles></xsl:when>
|
1088
|
+
<xsl:when test="ancestor::mn:sourcecode"><styles xsl:use-attribute-sets="sourcecode-number-style"><xsl:call-template name="refine_sourcecode-number-style"/></styles></xsl:when>
|
1089
|
+
</xsl:choose>
|
1090
|
+
</xsl:variable>
|
1091
|
+
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
1071
1092
|
<xsl:choose>
|
1072
1093
|
<xsl:when test="contains(., '—')">
|
1073
1094
|
<xsl:variable name="name_number" select="normalize-space(translate(substring-before(., '—'), ' ', ' '))"/>
|
1074
|
-
<fo:inline
|
1095
|
+
<fo:inline><xsl:copy-of select="$styles/styles/@*"/><xsl:value-of select="$name_number"/><xsl:text>:</xsl:text></fo:inline>
|
1075
1096
|
<xsl:value-of select="substring-after(., '—')"/>
|
1076
1097
|
</xsl:when>
|
1077
1098
|
<xsl:when test="starts-with(., 'Figure ') or starts-with(., 'Table ')">
|
1078
|
-
<fo:inline
|
1099
|
+
<fo:inline><xsl:copy-of select="$styles/styles/@*"/><xsl:value-of select="."/></fo:inline>
|
1079
1100
|
</xsl:when>
|
1080
1101
|
<xsl:otherwise>
|
1081
1102
|
<xsl:value-of select="."/>
|
@@ -1083,18 +1104,38 @@
|
|
1083
1104
|
</xsl:choose>
|
1084
1105
|
</xsl:template>
|
1085
1106
|
|
1086
|
-
<xsl:template match="
|
1087
|
-
<xsl:variable name="
|
1088
|
-
<xsl:
|
1089
|
-
<xsl:
|
1090
|
-
|
1107
|
+
<xsl:template match="*[local-name() = 'td']//text() | *[local-name() = 'th']//text()" priority="3">
|
1108
|
+
<xsl:variable name="content">
|
1109
|
+
<xsl:choose>
|
1110
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
1111
|
+
<!-- url -->
|
1112
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
1113
|
+
</xsl:when>
|
1114
|
+
<xsl:otherwise>
|
1115
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
1116
|
+
</xsl:otherwise>
|
1117
|
+
</xsl:choose>
|
1091
1118
|
</xsl:variable>
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1119
|
+
|
1120
|
+
<!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
|
1121
|
+
<xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1$2$3')"/>
|
1122
|
+
|
1123
|
+
<!-- add zero-width space (#x200B) before character '(' if preceding and following are word chars -->
|
1124
|
+
<xsl:variable name="content3" select="java:replaceAll(java:java.lang.String.new($content2), '(\w)(\()(\w)', '$1$2$3')"/>
|
1125
|
+
|
1126
|
+
<!-- replace sequence #x200B to one ​ -->
|
1127
|
+
<xsl:variable name="content4" select="java:replaceAll(java:java.lang.String.new($content3), '\u200b{2,}', '')"/>
|
1128
|
+
|
1129
|
+
<xsl:value-of select="$content4"/>
|
1130
|
+
</xsl:template>
|
1131
|
+
|
1132
|
+
<xsl:template match="mn:clause" priority="2">
|
1133
|
+
<fo:block-container xsl:use-attribute-sets="clause-style">
|
1134
|
+
<xsl:call-template name="refine_clause-style"/>
|
1135
|
+
|
1136
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
1137
|
+
<xsl:call-template name="setNamedDestination"/>
|
1138
|
+
<fo:block role="SKIP">
|
1098
1139
|
<xsl:call-template name="setId"/>
|
1099
1140
|
<xsl:call-template name="addReviewHelper"/>
|
1100
1141
|
<xsl:apply-templates/>
|
@@ -1105,11 +1146,21 @@
|
|
1105
1146
|
|
1106
1147
|
<xsl:template name="insertHeaderFooter">
|
1107
1148
|
<xsl:param name="section"/>
|
1149
|
+
|
1150
|
+
<xsl:call-template name="insertHoneycomb">
|
1151
|
+
<xsl:with-param name="section" select="$section"/>
|
1152
|
+
</xsl:call-template>
|
1153
|
+
|
1154
|
+
<xsl:call-template name="insertFooter"/>
|
1155
|
+
</xsl:template>
|
1156
|
+
|
1157
|
+
<xsl:template name="insertHoneycomb">
|
1158
|
+
<xsl:param name="section"/>
|
1108
1159
|
<!-- LT - left top -->
|
1109
1160
|
<!-- RT - right top -->
|
1110
1161
|
<!-- LB - left bottom -->
|
1111
1162
|
<!-- RB - right bottom -->
|
1112
|
-
<xsl:variable name="width">170,26</xsl:variable>
|
1163
|
+
<!-- <xsl:variable name="width">170,26</xsl:variable> -->
|
1113
1164
|
<xsl:variable name="left_left">-28.02</xsl:variable>
|
1114
1165
|
<xsl:variable name="left_right">72</xsl:variable>
|
1115
1166
|
<xsl:variable name="top_top">-25.75</xsl:variable>
|
@@ -1201,19 +1252,36 @@
|
|
1201
1252
|
</fo:block>
|
1202
1253
|
</fo:block-container>
|
1203
1254
|
</fo:static-content>
|
1204
|
-
|
1205
|
-
<xsl:call-template name="insertFooter"/>
|
1206
1255
|
</xsl:template>
|
1207
1256
|
|
1208
1257
|
<xsl:template name="insertFooter">
|
1209
|
-
<xsl:param name="invert"/>
|
1258
|
+
<!-- <xsl:param name="invert"/> -->
|
1210
1259
|
<xsl:variable name="footerText">
|
1211
1260
|
<xsl:text>Ribose</xsl:text>
|
1212
1261
|
<xsl:text> </xsl:text>
|
1213
|
-
<xsl:call-template name="
|
1214
|
-
<xsl:with-param name="str"
|
1262
|
+
<xsl:call-template name="capitalizeWords">
|
1263
|
+
<xsl:with-param name="str">
|
1264
|
+
<xsl:choose>
|
1265
|
+
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias">
|
1266
|
+
<xsl:value-of select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias"/>
|
1267
|
+
</xsl:when>
|
1268
|
+
<xsl:otherwise>
|
1269
|
+
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
|
1270
|
+
</xsl:otherwise>
|
1271
|
+
</xsl:choose>
|
1272
|
+
</xsl:with-param>
|
1215
1273
|
</xsl:call-template>
|
1216
1274
|
</xsl:variable>
|
1275
|
+
<xsl:call-template name="insertFooterOdd">
|
1276
|
+
<xsl:with-param name="footerText" select="$footerText"/>
|
1277
|
+
</xsl:call-template>
|
1278
|
+
<xsl:call-template name="insertFooterEven">
|
1279
|
+
<xsl:with-param name="footerText" select="$footerText"/>
|
1280
|
+
</xsl:call-template>
|
1281
|
+
</xsl:template>
|
1282
|
+
|
1283
|
+
<xsl:template name="insertFooterOdd">
|
1284
|
+
<xsl:param name="footerText"/>
|
1217
1285
|
<fo:static-content flow-name="footer-odd" role="artifact">
|
1218
1286
|
<fo:block-container font-size="8pt" height="100%" color="black">
|
1219
1287
|
<fo:block text-align-last="justify" margin-right="1mm">
|
@@ -1226,14 +1294,18 @@
|
|
1226
1294
|
</fo:block>
|
1227
1295
|
</fo:block-container>
|
1228
1296
|
</fo:static-content>
|
1297
|
+
</xsl:template>
|
1298
|
+
|
1299
|
+
<xsl:template name="insertFooterEven">
|
1300
|
+
<xsl:param name="footerText"/>
|
1229
1301
|
<fo:static-content flow-name="footer-even" role="artifact">
|
1230
1302
|
<fo:block-container font-size="8pt" height="100%" color="black">
|
1231
1303
|
<fo:block text-align-last="justify" margin-right="1mm">
|
1232
1304
|
<fo:inline padding-right="11mm"><fo:page-number/></fo:inline>
|
1233
1305
|
<fo:inline>
|
1234
|
-
<xsl:if test="$invert = 'true'">
|
1306
|
+
<!-- <xsl:if test="$invert = 'true'">
|
1235
1307
|
<xsl:attribute name="color">white</xsl:attribute>
|
1236
|
-
</xsl:if>
|
1308
|
+
</xsl:if> -->
|
1237
1309
|
<xsl:value-of select="$footerText"/>
|
1238
1310
|
</fo:inline>
|
1239
1311
|
<fo:inline keep-together.within-line="always">
|
@@ -1529,6 +1601,7 @@
|
|
1529
1601
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1530
1602
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1531
1603
|
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
1604
|
+
<xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
|
1532
1605
|
<xsl:variable name="cr"> </xsl:variable>
|
1533
1606
|
<xsl:variable name="lf">
|
1534
1607
|
</xsl:variable>
|
@@ -1614,11 +1687,12 @@
|
|
1614
1687
|
<xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
|
1615
1688
|
<xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable>
|
1616
1689
|
<xsl:attribute-set name="root-style">
|
1617
|
-
<xsl:attribute name="font-family">
|
1690
|
+
<xsl:attribute name="font-family">Open Sans, Source Sans 3, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
|
1618
1691
|
<xsl:attribute name="font-family-generic">Sans</xsl:attribute>
|
1619
1692
|
<xsl:attribute name="font-weight">300</xsl:attribute>
|
1620
1693
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1621
1694
|
<xsl:attribute name="color">rgb(88, 88, 90)</xsl:attribute>
|
1695
|
+
<xsl:attribute name="font-selection-strategy">character-by-character</xsl:attribute>
|
1622
1696
|
</xsl:attribute-set> <!-- root-style -->
|
1623
1697
|
|
1624
1698
|
<xsl:template name="insertRootStyle">
|
@@ -2073,6 +2147,7 @@
|
|
2073
2147
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
|
2074
2148
|
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
|
2075
2149
|
<xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
2150
|
+
<xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
2076
2151
|
<!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
2077
2152
|
<xsl:template match="mn:preferred" mode="update_xml_step1"/>
|
2078
2153
|
<!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
@@ -2087,10 +2162,10 @@
|
|
2087
2162
|
|
2088
2163
|
<xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
2089
2164
|
|
2090
|
-
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
|
2165
|
+
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
|
2091
2166
|
<xsl:copy>
|
2092
2167
|
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
2093
|
-
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
|
2168
|
+
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
|
2094
2169
|
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
2095
2170
|
</xsl:copy>
|
2096
2171
|
</xsl:template>
|
@@ -2260,10 +2335,20 @@
|
|
2260
2335
|
|
2261
2336
|
<xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
|
2262
2337
|
|
2263
|
-
<xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
|
2264
|
-
<xsl:
|
2265
|
-
|
2266
|
-
|
2338
|
+
<xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1"> <!-- https://github.com/metanorma/metanorma-ribose/issues/421 -->
|
2339
|
+
<xsl:choose>
|
2340
|
+
<!-- commented (ancestor::mn:td or ancestor::mn:th) and
|
2341
|
+
for https://github.com/metanorma/metanorma-taste/issues/24#issuecomment-3302963697 -->
|
2342
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new(.), '^(http://|https://|www\.)?(.*)')) = 'true'">
|
2343
|
+
<xsl:value-of select="."/>
|
2344
|
+
</xsl:when>
|
2345
|
+
<xsl:otherwise>
|
2346
|
+
<xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
|
2347
|
+
<xsl:value-of select="."/>
|
2348
|
+
</xsl:element>
|
2349
|
+
</xsl:otherwise>
|
2350
|
+
</xsl:choose>
|
2351
|
+
|
2267
2352
|
</xsl:template>
|
2268
2353
|
|
2269
2354
|
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
@@ -2925,6 +3010,9 @@
|
|
2925
3010
|
</xsl:template>
|
2926
3011
|
|
2927
3012
|
<xsl:attribute-set name="feedback-statement-style">
|
3013
|
+
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3014
|
+
<xsl:attribute name="padding">1mm</xsl:attribute>
|
3015
|
+
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
2928
3016
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
2929
3017
|
|
2930
3018
|
<xsl:template name="refine_feedback-statement-style">
|
@@ -2935,7 +3023,6 @@
|
|
2935
3023
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
2936
3024
|
|
2937
3025
|
<xsl:template name="refine_feedback-statement-title-style">
|
2938
|
-
|
2939
3026
|
</xsl:template>
|
2940
3027
|
|
2941
3028
|
<xsl:attribute-set name="feedback-statement-p-style">
|
@@ -3196,7 +3283,6 @@
|
|
3196
3283
|
<xsl:attribute name="role">Code</xsl:attribute>
|
3197
3284
|
<xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
3198
3285
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3199
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3200
3286
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
3201
3287
|
</xsl:attribute-set> <!-- sourcecode-style -->
|
3202
3288
|
|
@@ -3215,13 +3301,23 @@
|
|
3215
3301
|
</xsl:if>
|
3216
3302
|
</xsl:template> <!-- refine_sourcecode-style -->
|
3217
3303
|
|
3304
|
+
<xsl:attribute-set name="sourcecode-number-style">
|
3305
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3306
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
3307
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
3308
|
+
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
3309
|
+
</xsl:attribute-set>
|
3310
|
+
|
3311
|
+
<xsl:template name="refine_sourcecode-number-style">
|
3312
|
+
</xsl:template>
|
3313
|
+
|
3218
3314
|
<xsl:attribute-set name="sourcecode-name-style">
|
3219
3315
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
3220
3316
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3221
3317
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
3222
3318
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3223
3319
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
3224
|
-
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
3320
|
+
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
3225
3321
|
<xsl:attribute name="font-weight">300</xsl:attribute>
|
3226
3322
|
<xsl:attribute name="color">black</xsl:attribute>
|
3227
3323
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -3283,7 +3379,8 @@
|
|
3283
3379
|
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
3284
3380
|
<xsl:variable name="_font-size"><!-- inherit -->
|
3285
3381
|
<xsl:choose>
|
3286
|
-
<xsl:when test="ancestor::mn:table[not(parent::mn:sourcecode[@linenums = 'true'])]">inherit</xsl:when>
|
3382
|
+
<!-- <xsl:when test="ancestor::mn:table[not(parent::mn:sourcecode[@linenums = 'true'])]">inherit</xsl:when> -->
|
3383
|
+
<xsl:when test="ancestor::mn:table">95%</xsl:when>
|
3287
3384
|
<xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
|
3288
3385
|
</xsl:choose>
|
3289
3386
|
</xsl:variable>
|
@@ -3713,7 +3810,7 @@
|
|
3713
3810
|
<xsl:template name="refine_tt-style">
|
3714
3811
|
<xsl:variable name="_font-size"> <!-- inherit -->
|
3715
3812
|
<xsl:choose>
|
3716
|
-
<xsl:when test="ancestor::mn:table">
|
3813
|
+
<xsl:when test="ancestor::mn:table">95%</xsl:when> <!-- 95% in https://github.com/metanorma/metanorma-ribose/issues/421, was inherit -->
|
3717
3814
|
<xsl:otherwise>95%</xsl:otherwise> <!-- 110% -->
|
3718
3815
|
</xsl:choose>
|
3719
3816
|
</xsl:variable>
|
@@ -4621,6 +4718,32 @@
|
|
4621
4718
|
<xsl:template name="refine_term-name-style">
|
4622
4719
|
</xsl:template>
|
4623
4720
|
|
4721
|
+
<xsl:attribute-set name="preferred-style">
|
4722
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4723
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
4724
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4725
|
+
</xsl:attribute-set> <!-- preferred-style -->
|
4726
|
+
|
4727
|
+
<xsl:template name="refine_preferred-style">
|
4728
|
+
<xsl:variable name="level">
|
4729
|
+
<xsl:call-template name="getLevel"/>
|
4730
|
+
</xsl:variable>
|
4731
|
+
<xsl:variable name="font-size">
|
4732
|
+
<xsl:choose>
|
4733
|
+
<xsl:when test="$level >= 2">13pt</xsl:when>
|
4734
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
4735
|
+
</xsl:choose>
|
4736
|
+
</xsl:variable>
|
4737
|
+
<xsl:variable name="levelTerm">
|
4738
|
+
<xsl:call-template name="getLevelTermName"/>
|
4739
|
+
</xsl:variable>
|
4740
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
4741
|
+
<xsl:attribute name="role">H<xsl:value-of select="$levelTerm"/></xsl:attribute>
|
4742
|
+
<xsl:if test="preceding-sibling::*[1][self::mn:fmt-name]">
|
4743
|
+
<xsl:attribute name="space-before">11mm</xsl:attribute>
|
4744
|
+
</xsl:if>
|
4745
|
+
</xsl:template>
|
4746
|
+
|
4624
4747
|
<xsl:attribute-set name="preferred-block-style">
|
4625
4748
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
4626
4749
|
|
@@ -4981,6 +5104,7 @@
|
|
4981
5104
|
</xsl:template>
|
4982
5105
|
|
4983
5106
|
<xsl:attribute-set name="example-name-style">
|
5107
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4984
5108
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4985
5109
|
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
4986
5110
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
@@ -5268,10 +5392,20 @@
|
|
5268
5392
|
<xsl:call-template name="setBordersTableArray"/>
|
5269
5393
|
</xsl:template> <!-- refine_table-style -->
|
5270
5394
|
|
5395
|
+
<xsl:attribute-set name="table-number-style">
|
5396
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5397
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
5398
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
5399
|
+
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
5400
|
+
</xsl:attribute-set>
|
5401
|
+
|
5402
|
+
<xsl:template name="refine_table-number-style">
|
5403
|
+
</xsl:template>
|
5404
|
+
|
5271
5405
|
<xsl:attribute-set name="table-name-style">
|
5272
5406
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
5273
5407
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5274
|
-
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
5408
|
+
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
5275
5409
|
<xsl:attribute name="font-weight">300</xsl:attribute>
|
5276
5410
|
<xsl:attribute name="color">black</xsl:attribute>
|
5277
5411
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -5722,7 +5856,7 @@
|
|
5722
5856
|
|
5723
5857
|
</fo:block>
|
5724
5858
|
|
5725
|
-
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
5859
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
5726
5860
|
<xsl:if test="$continued = 'true'">
|
5727
5861
|
|
5728
5862
|
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
@@ -8766,16 +8900,23 @@
|
|
8766
8900
|
</xsl:attribute-set> <!-- quote-style -->
|
8767
8901
|
|
8768
8902
|
<xsl:template name="refine_quote-style">
|
8769
|
-
</xsl:template>
|
8903
|
+
</xsl:template> <!-- refine_quote-style -->
|
8770
8904
|
|
8771
8905
|
<xsl:attribute-set name="quote-source-style">
|
8772
8906
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
8773
8907
|
<xsl:attribute name="margin-right">25mm</xsl:attribute>
|
8774
|
-
</xsl:attribute-set>
|
8908
|
+
</xsl:attribute-set> <!-- quote-source-style -->
|
8775
8909
|
|
8776
8910
|
<xsl:template name="refine_quote-source-style">
|
8777
8911
|
</xsl:template>
|
8778
8912
|
|
8913
|
+
<xsl:attribute-set name="source-style">
|
8914
|
+
</xsl:attribute-set> <!-- source-style -->
|
8915
|
+
|
8916
|
+
<xsl:template name="refine_source-style">
|
8917
|
+
|
8918
|
+
</xsl:template> <!-- refine_source-style -->
|
8919
|
+
|
8779
8920
|
<!-- ====== -->
|
8780
8921
|
<!-- quote -->
|
8781
8922
|
<!-- source -->
|
@@ -8823,7 +8964,9 @@
|
|
8823
8964
|
</xsl:if>
|
8824
8965
|
<xsl:choose>
|
8825
8966
|
<xsl:when test="not(parent::quote)">
|
8826
|
-
<fo:block>
|
8967
|
+
<fo:block xsl:use-attribute-sets="source-style">
|
8968
|
+
<xsl:call-template name="refine_source-style"/>
|
8969
|
+
|
8827
8970
|
<xsl:call-template name="insert_basic_link">
|
8828
8971
|
<xsl:with-param name="element">
|
8829
8972
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -8877,9 +9020,19 @@
|
|
8877
9020
|
<xsl:template name="refine_figure-style">
|
8878
9021
|
</xsl:template>
|
8879
9022
|
|
9023
|
+
<xsl:attribute-set name="figure-number-style">
|
9024
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9025
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
9026
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
9027
|
+
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
9028
|
+
</xsl:attribute-set>
|
9029
|
+
|
9030
|
+
<xsl:template name="refine_figure-number-style">
|
9031
|
+
</xsl:template>
|
9032
|
+
|
8880
9033
|
<xsl:attribute-set name="figure-name-style">
|
8881
9034
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
8882
|
-
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
9035
|
+
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
8883
9036
|
<xsl:attribute name="font-weight">300</xsl:attribute>
|
8884
9037
|
<xsl:attribute name="color">black</xsl:attribute>
|
8885
9038
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -10927,7 +11080,7 @@
|
|
10927
11080
|
|
10928
11081
|
<xsl:template name="refine_fn-reference-style">
|
10929
11082
|
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
10930
|
-
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]"
|
11083
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
|
10931
11084
|
</xsl:template> <!-- refine_fn-reference-style -->
|
10932
11085
|
|
10933
11086
|
<xsl:attribute-set name="fn-style">
|
@@ -10938,6 +11091,7 @@
|
|
10938
11091
|
</xsl:template>
|
10939
11092
|
|
10940
11093
|
<xsl:attribute-set name="fn-num-style">
|
11094
|
+
<xsl:attribute name="role">Reference</xsl:attribute>
|
10941
11095
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10942
11096
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
10943
11097
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -11013,33 +11167,16 @@
|
|
11013
11167
|
<xsl:variable name="ref_id" select="@target"/>
|
11014
11168
|
|
11015
11169
|
<xsl:variable name="footnote_inline">
|
11016
|
-
<fo:inline
|
11017
|
-
|
11018
|
-
<xsl:variable name="fn_styles">
|
11019
|
-
<xsl:choose>
|
11020
|
-
<xsl:when test="ancestor::mn:bibitem">
|
11021
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
11022
|
-
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
11023
|
-
</fn_styles>
|
11024
|
-
</xsl:when>
|
11025
|
-
<xsl:otherwise>
|
11026
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
11027
|
-
<xsl:call-template name="refine_fn-num-style"/>
|
11028
|
-
</fn_styles>
|
11029
|
-
</xsl:otherwise>
|
11030
|
-
</xsl:choose>
|
11031
|
-
</xsl:variable>
|
11170
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
11032
11171
|
|
11033
|
-
<xsl:
|
11034
|
-
<xsl:copy-of select="."/>
|
11035
|
-
</xsl:for-each>
|
11172
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
11036
11173
|
|
11037
11174
|
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
11038
11175
|
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
11039
11176
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
11040
11177
|
</xsl:if> -->
|
11041
11178
|
|
11042
|
-
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]"
|
11179
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
|
11043
11180
|
|
11044
11181
|
<xsl:call-template name="insert_basic_link">
|
11045
11182
|
<xsl:with-param name="element">
|
@@ -11286,6 +11423,13 @@
|
|
11286
11423
|
<!-- ================ -->
|
11287
11424
|
|
11288
11425
|
<xsl:attribute-set name="references-non-normative-title-style">
|
11426
|
+
<xsl:attribute name="margin-left">-15mm</xsl:attribute>
|
11427
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
11428
|
+
<xsl:attribute name="font-size">22pt</xsl:attribute>
|
11429
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11430
|
+
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
11431
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
11432
|
+
<xsl:attribute name="line-height">125%</xsl:attribute>
|
11289
11433
|
</xsl:attribute-set>
|
11290
11434
|
|
11291
11435
|
<xsl:template name="refine_references-non-normative-title-style">
|
@@ -11324,9 +11468,45 @@
|
|
11324
11468
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11325
11469
|
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
11326
11470
|
<xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
|
11471
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
11327
11472
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
11328
11473
|
|
11329
11474
|
<xsl:template name="refine_bibitem-non-normative-list-style">
|
11475
|
+
<xsl:variable name="bibitems_bibliotag_num_only">
|
11476
|
+
<xsl:for-each select="following-sibling::mn:bibitem[not(@hidden='true')]/mn:biblio-tag">
|
11477
|
+
<xsl:copy>
|
11478
|
+
<xsl:apply-templates select=".">
|
11479
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
11480
|
+
</xsl:apply-templates>
|
11481
|
+
</xsl:copy>
|
11482
|
+
</xsl:for-each>
|
11483
|
+
</xsl:variable>
|
11484
|
+
<xsl:variable name="bibitems_bibliotag">
|
11485
|
+
<xsl:copy-of select="xalan:nodeset($bibitems_bibliotag_num_only)/mn:biblio-tag[normalize-space(translate(., '[]1234567890', '')) = '']"/>
|
11486
|
+
<xsl:if test="not(xalan:nodeset($bibitems_bibliotag_num_only)/mn:biblio-tag[normalize-space(translate(., '[]1234567890', '')) = ''])">
|
11487
|
+
<mn:biblio-tag>
|
11488
|
+
<xsl:apply-templates select="mn:biblio-tag">
|
11489
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
11490
|
+
</xsl:apply-templates>
|
11491
|
+
</mn:biblio-tag>
|
11492
|
+
</xsl:if>
|
11493
|
+
</xsl:variable>
|
11494
|
+
<!-- <xsl:copy-of select="$bibitems_bibliotag"/> -->
|
11495
|
+
<xsl:variable name="last_bibitem_bibliotag" select="xalan:nodeset($bibitems_bibliotag)/mn:biblio-tag[normalize-space(translate(., '[]1234567890', '')) = ''][last()]"/>
|
11496
|
+
<xsl:variable name="last_bibitem_bibliotag_number_length" select="string-length(translate($last_bibitem_bibliotag, '[] ', ''))"/>
|
11497
|
+
<xsl:if test="$last_bibitem_bibliotag_number_length > 1">
|
11498
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
11499
|
+
<!-- if biblio-tag is number, i.e. [1], [10] -->
|
11500
|
+
<xsl:choose>
|
11501
|
+
<xsl:when test="$last_bibitem_bibliotag_number_length = 2">9.2mm</xsl:when>
|
11502
|
+
<xsl:when test="$last_bibitem_bibliotag_number_length >= 3">11mm</xsl:when>
|
11503
|
+
</xsl:choose>
|
11504
|
+
</xsl:attribute>
|
11505
|
+
</xsl:if>
|
11506
|
+
<xsl:if test="$last_bibitem_bibliotag_number_length = 0">
|
11507
|
+
<!-- <biblio-tag>[PDF Declarations]</biblio-tag> -->
|
11508
|
+
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
11509
|
+
</xsl:if>
|
11330
11510
|
</xsl:template>
|
11331
11511
|
|
11332
11512
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
@@ -11350,31 +11530,6 @@
|
|
11350
11530
|
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
11351
11531
|
</xsl:template>
|
11352
11532
|
|
11353
|
-
<!-- footnote reference number for bibitem, in the text -->
|
11354
|
-
<xsl:attribute-set name="bibitem-note-fn-style">
|
11355
|
-
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11356
|
-
<xsl:attribute name="font-size">65%</xsl:attribute>
|
11357
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
11358
|
-
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
11359
|
-
|
11360
|
-
<xsl:template name="refine_bibitem-note-fn-style">
|
11361
|
-
</xsl:template>
|
11362
|
-
|
11363
|
-
<!-- footnote number on the page bottom -->
|
11364
|
-
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
11365
|
-
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
11366
|
-
<xsl:attribute name="font-size">60%</xsl:attribute>
|
11367
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
11368
|
-
</xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
|
11369
|
-
|
11370
|
-
<!-- footnote body (text) on the page bottom -->
|
11371
|
-
<xsl:attribute-set name="bibitem-note-fn-body-style">
|
11372
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
11373
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11374
|
-
<xsl:attribute name="start-indent">0pt</xsl:attribute>
|
11375
|
-
<xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
|
11376
|
-
</xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
|
11377
|
-
|
11378
11533
|
<xsl:attribute-set name="references-non-normative-style">
|
11379
11534
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
11380
11535
|
|
@@ -11447,18 +11602,34 @@
|
|
11447
11602
|
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
11448
11603
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11449
11604
|
<xsl:call-template name="setNamedDestination"/>
|
11605
|
+
<!-- continue from <xsl:template match="mn:references[not(@normative='true')]" priority="3"> -->
|
11450
11606
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
11451
11607
|
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
11608
|
+
<xsl:variable name="biblio_tag_first_part">
|
11609
|
+
<xsl:apply-templates select="mn:biblio-tag">
|
11610
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
11611
|
+
</xsl:apply-templates>
|
11612
|
+
</xsl:variable>
|
11452
11613
|
<fo:list-item>
|
11453
11614
|
<fo:list-item-label end-indent="label-end()">
|
11454
|
-
<fo:block>
|
11455
|
-
|
11456
|
-
|
11457
|
-
|
11615
|
+
<fo:block role="SKIP">
|
11616
|
+
<!-- if biblio-tag is number -->
|
11617
|
+
<xsl:if test="normalize-space(translate($biblio_tag_first_part, '[] 1234567890', '')) = ''">
|
11618
|
+
<xsl:value-of select="$biblio_tag_first_part"/>
|
11619
|
+
</xsl:if>
|
11458
11620
|
</fo:block>
|
11459
11621
|
</fo:list-item-label>
|
11460
11622
|
<fo:list-item-body start-indent="body-start()">
|
11461
11623
|
<fo:block>
|
11624
|
+
<!-- if biblio-tag isn't number -->
|
11625
|
+
<xsl:if test="normalize-space(translate($biblio_tag_first_part, '[] 1234567890', '')) != ''">
|
11626
|
+
<xsl:attribute name="margin-left">8mm</xsl:attribute>
|
11627
|
+
<xsl:attribute name="text-indent">-8mm</xsl:attribute>
|
11628
|
+
<xsl:if test="not(contains($biblio_tag_first_part, '['))">[</xsl:if>
|
11629
|
+
<xsl:value-of select="$biblio_tag_first_part"/>
|
11630
|
+
<xsl:if test="not(contains($biblio_tag_first_part, '['))">]</xsl:if>
|
11631
|
+
<xsl:text> </xsl:text>
|
11632
|
+
</xsl:if>
|
11462
11633
|
<xsl:apply-templates select="mn:biblio-tag">
|
11463
11634
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
11464
11635
|
</xsl:apply-templates>
|
@@ -12104,8 +12275,9 @@
|
|
12104
12275
|
<!-- =================== -->
|
12105
12276
|
|
12106
12277
|
<xsl:attribute-set name="toc-style">
|
12107
|
-
<xsl:attribute name="margin-left">
|
12278
|
+
<xsl:attribute name="margin-left">10mm</xsl:attribute> <!-- 32mm -->
|
12108
12279
|
<xsl:attribute name="margin-right">-17mm</xsl:attribute>
|
12280
|
+
<xsl:attribute name="role">TOC</xsl:attribute>
|
12109
12281
|
</xsl:attribute-set>
|
12110
12282
|
|
12111
12283
|
<xsl:template name="refine_toc-style">
|
@@ -12113,7 +12285,7 @@
|
|
12113
12285
|
|
12114
12286
|
<xsl:attribute-set name="toc-title-style">
|
12115
12287
|
<xsl:attribute name="role">H1</xsl:attribute>
|
12116
|
-
<xsl:attribute name="font-size">
|
12288
|
+
<xsl:attribute name="font-size">22pt</xsl:attribute> <!-- 27pt -->
|
12117
12289
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12118
12290
|
<xsl:attribute name="color">black</xsl:attribute>
|
12119
12291
|
<xsl:attribute name="margin-left">-15mm</xsl:attribute>
|
@@ -12137,7 +12309,7 @@
|
|
12137
12309
|
|
12138
12310
|
<xsl:attribute-set name="toc-item-style">
|
12139
12311
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12140
|
-
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
12312
|
+
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
12141
12313
|
</xsl:attribute-set> <!-- END: toc-item-style -->
|
12142
12314
|
|
12143
12315
|
<xsl:template name="refine_toc-item-style">
|
@@ -12151,7 +12323,7 @@
|
|
12151
12323
|
<xsl:attribute name="color">black</xsl:attribute>
|
12152
12324
|
</xsl:if>
|
12153
12325
|
<xsl:if test="@level >= 2">
|
12154
|
-
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) *
|
12326
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * $toc_item_indent"/>mm</xsl:attribute> <!-- 16.5 -->
|
12155
12327
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
12156
12328
|
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
12157
12329
|
</xsl:if>
|
@@ -12174,7 +12346,7 @@
|
|
12174
12346
|
|
12175
12347
|
<!-- List of Figures, Tables -->
|
12176
12348
|
<xsl:attribute-set name="toc-listof-title-style">
|
12177
|
-
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
12349
|
+
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
12178
12350
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12179
12351
|
<xsl:attribute name="color">black</xsl:attribute>
|
12180
12352
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -12193,8 +12365,8 @@
|
|
12193
12365
|
|
12194
12366
|
<xsl:attribute-set name="toc-listof-item-style">
|
12195
12367
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12196
|
-
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
12197
|
-
<xsl:attribute name="margin-left"
|
12368
|
+
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
12369
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="$toc_item_indent"/>mm</xsl:attribute> <!-- 16.5mm -->
|
12198
12370
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
12199
12371
|
</xsl:attribute-set>
|
12200
12372
|
|
@@ -13740,13 +13912,35 @@
|
|
13740
13912
|
</xsl:choose>
|
13741
13913
|
</xsl:template>
|
13742
13914
|
|
13915
|
+
<xsl:attribute-set name="clause-style">
|
13916
|
+
|
13917
|
+
</xsl:attribute-set>
|
13918
|
+
|
13919
|
+
<xsl:template name="refine_clause-style">
|
13920
|
+
<!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
|
13921
|
+
<!-- <xsl:if test="$namespace = 'rsd'">
|
13922
|
+
<xsl:variable name="level">
|
13923
|
+
<xsl:call-template name="getLevel">
|
13924
|
+
<xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
|
13925
|
+
</xsl:call-template>
|
13926
|
+
</xsl:variable>
|
13927
|
+
<xsl:if test="$level >= 4">
|
13928
|
+
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
13929
|
+
</xsl:if>
|
13930
|
+
</xsl:if> -->
|
13931
|
+
</xsl:template>
|
13932
|
+
|
13743
13933
|
<!-- main sections -->
|
13744
13934
|
<xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
|
13935
|
+
<xsl:if test="@type = 'terms'">
|
13936
|
+
<fo:block break-after="page"/>
|
13937
|
+
</xsl:if>
|
13745
13938
|
<xsl:call-template name="setNamedDestination"/>
|
13746
|
-
<fo:block>
|
13939
|
+
<fo:block role="Sect">
|
13747
13940
|
<xsl:call-template name="setId"/>
|
13748
13941
|
|
13749
13942
|
<xsl:call-template name="sections_element_style"/>
|
13943
|
+
<xsl:call-template name="addTagElementT"/>
|
13750
13944
|
|
13751
13945
|
<xsl:call-template name="addReviewHelper"/>
|
13752
13946
|
|
@@ -13871,6 +14065,10 @@
|
|
13871
14065
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
13872
14066
|
</xsl:template>
|
13873
14067
|
|
14068
|
+
<!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
|
14069
|
+
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
|
14070
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14071
|
+
|
13874
14072
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
13875
14073
|
<xsl:template name="insert_basic_link">
|
13876
14074
|
<xsl:param name="element"/>
|