metanorma-itu 1.3.9 → 1.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Rakefile +2 -2
- data/bin/rspec +1 -2
- data/lib/asciidoctor/itu/basicdoc.rng +21 -4
- data/lib/asciidoctor/itu/cleanup.rb +64 -59
- data/lib/asciidoctor/itu/converter.rb +3 -7
- data/lib/asciidoctor/itu/front.rb +5 -61
- data/lib/asciidoctor/itu/front_id.rb +67 -0
- data/lib/asciidoctor/itu/isodoc.rng +241 -61
- data/lib/asciidoctor/itu/itu.rng +3 -8
- data/lib/asciidoctor/itu/reqt.rng +23 -2
- data/lib/asciidoctor/itu.rb +0 -1
- data/lib/isodoc/itu/base_convert.rb +5 -2
- data/lib/isodoc/itu/html/htmlstyle.css +6 -0
- data/lib/isodoc/itu/html/htmlstyle.scss +7 -0
- data/lib/isodoc/itu/html/wordstyle.css +29 -8
- data/lib/isodoc/itu/html/wordstyle.scss +29 -8
- data/lib/isodoc/itu/i18n-ar.yaml +1 -0
- data/lib/isodoc/itu/i18n-de.yaml +1 -0
- data/lib/isodoc/itu/i18n-en.yaml +1 -0
- data/lib/isodoc/itu/i18n-es.yaml +1 -0
- data/lib/isodoc/itu/i18n-fr.yaml +1 -0
- data/lib/isodoc/itu/i18n-ru.yaml +1 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/itu/i18n.rb +1 -2
- data/lib/isodoc/itu/init.rb +1 -2
- data/lib/isodoc/itu/itu.implementers-guide.xsl +462 -173
- data/lib/isodoc/itu/itu.in-force.xsl +462 -173
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +462 -173
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +462 -173
- data/lib/isodoc/itu/itu.recommendation.xsl +462 -173
- data/lib/isodoc/itu/itu.resolution.xsl +462 -173
- data/lib/isodoc/itu/itu.service-publication.xsl +462 -173
- data/lib/isodoc/itu/itu.technical-paper.xsl +462 -173
- data/lib/isodoc/itu/itu.technical-report.xsl +462 -173
- data/lib/isodoc/itu/metadata.rb +19 -18
- data/lib/isodoc/itu/pdf_convert.rb +5 -4
- data/lib/isodoc/itu/presentation_xml_convert.rb +86 -75
- data/lib/isodoc/itu/word_cleanup.rb +30 -21
- data/lib/isodoc/itu.rb +0 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
@@ -125,10 +125,10 @@
|
|
125
125
|
|
126
126
|
<xsl:template match="/">
|
127
127
|
<xsl:call-template name="namespaceCheck"/>
|
128
|
-
<fo:root xsl:use-attribute-sets="root-style">
|
129
|
-
<xsl:if test="$lang != 'ar'">
|
128
|
+
<fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
|
129
|
+
<!-- <xsl:if test="$lang != 'ar'">
|
130
130
|
<xsl:attribute name="xml:lang"><xsl:value-of select="$lang"/></xsl:attribute>
|
131
|
-
</xsl:if>
|
131
|
+
</xsl:if> -->
|
132
132
|
<xsl:if test="$doctype = 'resolution'">
|
133
133
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
134
134
|
</xsl:if>
|
@@ -302,7 +302,7 @@
|
|
302
302
|
<fo:block font-weight="bold">Title:</fo:block>
|
303
303
|
</fo:table-cell>
|
304
304
|
<fo:table-cell number-columns-spanned="4" padding-top="2mm">
|
305
|
-
<fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
|
305
|
+
<fo:block role="H1"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
|
306
306
|
</fo:table-cell>
|
307
307
|
</fo:table-row>
|
308
308
|
</fo:table-body>
|
@@ -418,7 +418,7 @@
|
|
418
418
|
<xsl:variable name="series_main" select="normalize-space(/*/itu:bibdata/itu:series[@type='main']/itu:title)"/>
|
419
419
|
<xsl:variable name="series_secondary" select="normalize-space(/*/itu:bibdata/itu:series[@type='secondary']/itu:title)"/>
|
420
420
|
<xsl:variable name="series_tertiary" select="normalize-space(/*/itu:bibdata/itu:series[@type='tertiary']/itu:title)"/>
|
421
|
-
<fo:block font-weight="bold">
|
421
|
+
<fo:block font-weight="bold" role="H1">
|
422
422
|
<xsl:choose>
|
423
423
|
<xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary = ''">
|
424
424
|
<fo:block font-size="16pt">
|
@@ -774,7 +774,7 @@
|
|
774
774
|
<fo:table-cell font-size="18pt" number-columns-spanned="3">
|
775
775
|
<fo:block-container>
|
776
776
|
<xsl:call-template name="setWritingMode"/>
|
777
|
-
<fo:block padding-right="2mm" margin-top="6pt">
|
777
|
+
<fo:block padding-right="2mm" margin-top="6pt" role="H1">
|
778
778
|
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
|
779
779
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
780
780
|
</xsl:if>
|
@@ -795,12 +795,12 @@
|
|
795
795
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
|
796
796
|
</fo:block>
|
797
797
|
<xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
|
798
|
-
<fo:block font-weight="bold">
|
798
|
+
<fo:block font-weight="bold" role="H1">
|
799
799
|
<xsl:value-of select="."/>
|
800
800
|
</fo:block>
|
801
801
|
</xsl:for-each>
|
802
802
|
<xsl:if test="$isAmendment != ''">
|
803
|
-
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
|
803
|
+
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
|
804
804
|
<xsl:value-of select="$isAmendment"/>
|
805
805
|
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
|
806
806
|
<xsl:text>: </xsl:text>
|
@@ -809,7 +809,7 @@
|
|
809
809
|
</fo:block>
|
810
810
|
</xsl:if>
|
811
811
|
<xsl:if test="$isCorrigendum != ''">
|
812
|
-
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
|
812
|
+
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
|
813
813
|
<xsl:value-of select="$isCorrigendum"/>
|
814
814
|
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
|
815
815
|
<xsl:text>: </xsl:text>
|
@@ -945,7 +945,7 @@
|
|
945
945
|
</fo:block>
|
946
946
|
</xsl:otherwise>
|
947
947
|
</xsl:choose>
|
948
|
-
<fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
|
948
|
+
<fo:block text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
|
949
949
|
<xsl:if test="$doctype = 'service-publication'">
|
950
950
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
951
951
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
@@ -997,137 +997,138 @@
|
|
997
997
|
|
998
998
|
<xsl:if test="xalan:nodeset($contents)//item[@display = 'true'] and $doctype != 'resolution' and $doctype != 'service-publication'">
|
999
999
|
<fo:block break-after="page"/>
|
1000
|
-
|
1001
|
-
|
1002
|
-
<
|
1003
|
-
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1004
|
-
</xsl:call-template>
|
1005
|
-
</fo:block>
|
1006
|
-
<fo:block margin-top="6pt" text-align="end" font-weight="bold">
|
1007
|
-
<xsl:call-template name="getLocalizedString">
|
1008
|
-
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1009
|
-
</xsl:call-template>
|
1010
|
-
</fo:block>
|
1011
|
-
|
1012
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
1013
|
-
<fo:block>
|
1014
|
-
<xsl:if test="@level = 1">
|
1015
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1016
|
-
</xsl:if>
|
1017
|
-
<xsl:if test="@level = 2">
|
1018
|
-
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1019
|
-
<!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
|
1020
|
-
</xsl:if>
|
1021
|
-
<fo:list-block provisional-label-separation="3mm">
|
1022
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
1023
|
-
<xsl:choose>
|
1024
|
-
<xsl:when test="@section != ''">
|
1025
|
-
<xsl:if test="@level = 1">
|
1026
|
-
<xsl:choose>
|
1027
|
-
<xsl:when test="string-length(@section) > 10">27mm</xsl:when>
|
1028
|
-
<xsl:when test="string-length(@section) > 5">22mm</xsl:when>
|
1029
|
-
<!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
|
1030
|
-
<xsl:otherwise>12mm</xsl:otherwise>
|
1031
|
-
</xsl:choose>
|
1032
|
-
</xsl:if>
|
1033
|
-
<xsl:if test="@level = 2">26mm</xsl:if>
|
1034
|
-
</xsl:when> <!-- -->
|
1035
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
1036
|
-
</xsl:choose>
|
1037
|
-
</xsl:attribute>
|
1038
|
-
<fo:list-item>
|
1039
|
-
<fo:list-item-label end-indent="label-end()">
|
1040
|
-
<xsl:if test="@level =2">
|
1041
|
-
<xsl:attribute name="start-indent">12mm</xsl:attribute>
|
1042
|
-
</xsl:if>
|
1043
|
-
<fo:block>
|
1044
|
-
<xsl:if test="@section">
|
1045
|
-
<xsl:value-of select="@section"/>
|
1046
|
-
</xsl:if>
|
1047
|
-
</fo:block>
|
1048
|
-
</fo:list-item-label>
|
1049
|
-
<fo:list-item-body start-indent="body-start()">
|
1050
|
-
<fo:block text-align-last="justify">
|
1051
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1052
|
-
<xsl:apply-templates select="title"/>
|
1053
|
-
<fo:inline keep-together.within-line="always">
|
1054
|
-
<fo:leader leader-pattern="dots"/>
|
1055
|
-
<fo:page-number-citation ref-id="{@id}"/>
|
1056
|
-
</fo:inline>
|
1057
|
-
</fo:basic-link>
|
1058
|
-
</fo:block>
|
1059
|
-
</fo:list-item-body>
|
1060
|
-
</fo:list-item>
|
1061
|
-
</fo:list-block>
|
1062
|
-
</fo:block>
|
1063
|
-
</xsl:for-each>
|
1064
|
-
|
1065
|
-
|
1066
|
-
<xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
1067
|
-
<xsl:if test="//itu:table[@id and itu:name]">
|
1068
|
-
<xsl:variable name="title-list-tables">
|
1069
|
-
<xsl:call-template name="getTitle">
|
1070
|
-
<xsl:with-param name="name" select="'title-list-tables'"/>
|
1071
|
-
</xsl:call-template>
|
1072
|
-
</xsl:variable>
|
1073
|
-
|
1074
|
-
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
|
1075
|
-
<xsl:value-of select="$title-list-tables"/>
|
1076
|
-
</fo:block>
|
1077
|
-
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
1000
|
+
<fo:block-container>
|
1001
|
+
<fo:block role="TOC">
|
1002
|
+
<fo:block margin-top="6pt" text-align="center" font-weight="bold" role="H1">
|
1078
1003
|
<xsl:call-template name="getLocalizedString">
|
1079
|
-
<xsl:with-param name="key">
|
1004
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1080
1005
|
</xsl:call-template>
|
1081
1006
|
</fo:block>
|
1082
|
-
|
1083
|
-
<fo:block-container>
|
1084
|
-
<xsl:for-each select="//itu:table[@id and itu:name]">
|
1085
|
-
<fo:block text-align-last="justify" margin-top="6pt">
|
1086
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
|
1087
|
-
<xsl:apply-templates select="itu:name" mode="contents"/>
|
1088
|
-
<fo:inline keep-together.within-line="always">
|
1089
|
-
<fo:leader leader-pattern="dots"/>
|
1090
|
-
<fo:page-number-citation ref-id="{@id}"/>
|
1091
|
-
</fo:inline>
|
1092
|
-
</fo:basic-link>
|
1093
|
-
</fo:block>
|
1094
|
-
</xsl:for-each>
|
1095
|
-
</fo:block-container>
|
1096
|
-
</xsl:if>
|
1097
|
-
|
1098
|
-
<xsl:if test="//itu:figure[@id and itu:name]">
|
1099
|
-
<xsl:variable name="title-list-figures">
|
1100
|
-
<xsl:call-template name="getTitle">
|
1101
|
-
<xsl:with-param name="name" select="'title-list-figures'"/>
|
1102
|
-
</xsl:call-template>
|
1103
|
-
</xsl:variable>
|
1104
|
-
|
1105
|
-
|
1106
|
-
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
|
1107
|
-
<xsl:value-of select="$title-list-figures"/>
|
1108
|
-
</fo:block>
|
1109
|
-
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
1007
|
+
<fo:block margin-top="6pt" text-align="end" font-weight="bold">
|
1110
1008
|
<xsl:call-template name="getLocalizedString">
|
1111
1009
|
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1112
1010
|
</xsl:call-template>
|
1113
1011
|
</fo:block>
|
1114
1012
|
|
1115
|
-
<
|
1116
|
-
<
|
1117
|
-
<
|
1118
|
-
<
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1013
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
1014
|
+
<fo:block role="TOCI">
|
1015
|
+
<xsl:if test="@level = 1">
|
1016
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1017
|
+
</xsl:if>
|
1018
|
+
<xsl:if test="@level = 2">
|
1019
|
+
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1020
|
+
<!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
|
1021
|
+
</xsl:if>
|
1022
|
+
<fo:list-block provisional-label-separation="3mm">
|
1023
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
1024
|
+
<xsl:choose>
|
1025
|
+
<xsl:when test="@section != ''">
|
1026
|
+
<xsl:if test="@level = 1">
|
1027
|
+
<xsl:choose>
|
1028
|
+
<xsl:when test="string-length(@section) > 10">27mm</xsl:when>
|
1029
|
+
<xsl:when test="string-length(@section) > 5">22mm</xsl:when>
|
1030
|
+
<!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
|
1031
|
+
<xsl:otherwise>12mm</xsl:otherwise>
|
1032
|
+
</xsl:choose>
|
1033
|
+
</xsl:if>
|
1034
|
+
<xsl:if test="@level = 2">26mm</xsl:if>
|
1035
|
+
</xsl:when> <!-- -->
|
1036
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1037
|
+
</xsl:choose>
|
1038
|
+
</xsl:attribute>
|
1039
|
+
<fo:list-item>
|
1040
|
+
<fo:list-item-label end-indent="label-end()">
|
1041
|
+
<xsl:if test="@level =2">
|
1042
|
+
<xsl:attribute name="start-indent">12mm</xsl:attribute>
|
1043
|
+
</xsl:if>
|
1044
|
+
<fo:block>
|
1045
|
+
<xsl:if test="@section">
|
1046
|
+
<xsl:value-of select="@section"/>
|
1047
|
+
</xsl:if>
|
1048
|
+
</fo:block>
|
1049
|
+
</fo:list-item-label>
|
1050
|
+
<fo:list-item-body start-indent="body-start()">
|
1051
|
+
<fo:block text-align-last="justify">
|
1052
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1053
|
+
<xsl:apply-templates select="title"/>
|
1054
|
+
<fo:inline keep-together.within-line="always">
|
1055
|
+
<fo:leader leader-pattern="dots"/>
|
1056
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1057
|
+
</fo:inline>
|
1058
|
+
</fo:basic-link>
|
1059
|
+
</fo:block>
|
1060
|
+
</fo:list-item-body>
|
1061
|
+
</fo:list-item>
|
1062
|
+
</fo:list-block>
|
1063
|
+
</fo:block>
|
1064
|
+
</xsl:for-each>
|
1065
|
+
|
1066
|
+
|
1067
|
+
<xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
1068
|
+
<xsl:if test="//itu:table[@id and itu:name]">
|
1069
|
+
<xsl:variable name="title-list-tables">
|
1070
|
+
<xsl:call-template name="getTitle">
|
1071
|
+
<xsl:with-param name="name" select="'title-list-tables'"/>
|
1072
|
+
</xsl:call-template>
|
1073
|
+
</xsl:variable>
|
1074
|
+
|
1075
|
+
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
|
1076
|
+
<xsl:value-of select="$title-list-tables"/>
|
1077
|
+
</fo:block>
|
1078
|
+
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
1079
|
+
<xsl:call-template name="getLocalizedString">
|
1080
|
+
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1081
|
+
</xsl:call-template>
|
1082
|
+
</fo:block>
|
1083
|
+
|
1084
|
+
<fo:block-container>
|
1085
|
+
<xsl:for-each select="//itu:table[@id and itu:name]">
|
1086
|
+
<fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
|
1087
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
|
1088
|
+
<xsl:apply-templates select="itu:name" mode="contents"/>
|
1089
|
+
<fo:inline keep-together.within-line="always">
|
1090
|
+
<fo:leader leader-pattern="dots"/>
|
1091
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1092
|
+
</fo:inline>
|
1093
|
+
</fo:basic-link>
|
1094
|
+
</fo:block>
|
1095
|
+
</xsl:for-each>
|
1096
|
+
</fo:block-container>
|
1097
|
+
</xsl:if>
|
1098
|
+
|
1099
|
+
<xsl:if test="//itu:figure[@id and itu:name]">
|
1100
|
+
<xsl:variable name="title-list-figures">
|
1101
|
+
<xsl:call-template name="getTitle">
|
1102
|
+
<xsl:with-param name="name" select="'title-list-figures'"/>
|
1103
|
+
</xsl:call-template>
|
1104
|
+
</xsl:variable>
|
1105
|
+
|
1106
|
+
|
1107
|
+
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
|
1108
|
+
<xsl:value-of select="$title-list-figures"/>
|
1109
|
+
</fo:block>
|
1110
|
+
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
1111
|
+
<xsl:call-template name="getLocalizedString">
|
1112
|
+
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1113
|
+
</xsl:call-template>
|
1114
|
+
</fo:block>
|
1115
|
+
|
1116
|
+
<fo:block-container>
|
1117
|
+
<xsl:for-each select="//itu:figure[@id and itu:name]">
|
1118
|
+
<fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
|
1119
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
|
1120
|
+
<xsl:apply-templates select="itu:name" mode="contents"/>
|
1121
|
+
<fo:inline keep-together.within-line="always">
|
1122
|
+
<fo:leader leader-pattern="dots"/>
|
1123
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1124
|
+
</fo:inline>
|
1125
|
+
</fo:basic-link>
|
1126
|
+
</fo:block>
|
1127
|
+
</xsl:for-each>
|
1128
|
+
</fo:block-container>
|
1129
|
+
</xsl:if>
|
1128
1130
|
</xsl:if>
|
1129
|
-
</
|
1130
|
-
|
1131
|
+
</fo:block>
|
1131
1132
|
</fo:block-container>
|
1132
1133
|
</xsl:if>
|
1133
1134
|
|
@@ -1178,7 +1179,7 @@
|
|
1178
1179
|
</xsl:otherwise>
|
1179
1180
|
</xsl:choose>
|
1180
1181
|
|
1181
|
-
<fo:block font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt">
|
1182
|
+
<fo:block font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
|
1182
1183
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
|
1183
1184
|
|
1184
1185
|
<xsl:variable name="subtitle" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
|
@@ -1387,13 +1388,17 @@
|
|
1387
1388
|
<fo:block> </fo:block>
|
1388
1389
|
<fo:block> </fo:block>
|
1389
1390
|
</xsl:if> -->
|
1390
|
-
<
|
1391
|
+
<xsl:variable name="level">
|
1392
|
+
<xsl:call-template name="getLevel"/>
|
1393
|
+
</xsl:variable>
|
1394
|
+
<fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt" keep-with-next="always" role="H{$level}">
|
1391
1395
|
<xsl:if test="$doctype = 'service-publication'">
|
1392
1396
|
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
1393
1397
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1394
1398
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1395
1399
|
</xsl:if>
|
1396
1400
|
<xsl:apply-templates/>
|
1401
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1397
1402
|
</fo:block>
|
1398
1403
|
<!-- <xsl:if test="$doctype = 'service-publication'">
|
1399
1404
|
<fo:block keep-with-next="always"> </fo:block>
|
@@ -1582,14 +1587,16 @@
|
|
1582
1587
|
|
1583
1588
|
|
1584
1589
|
<xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
|
1585
|
-
<fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt">
|
1590
|
+
<fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
|
1586
1591
|
<xsl:apply-templates/>
|
1592
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1587
1593
|
</fo:block>
|
1588
1594
|
</xsl:template>
|
1589
1595
|
|
1590
1596
|
<xsl:template match="itu:clause[@id='draft-warning']/itu:p" mode="caution">
|
1591
1597
|
<fo:block font-size="12pt" font-family="Times New Roman" text-align="justify">
|
1592
1598
|
<xsl:apply-templates/>
|
1599
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1593
1600
|
</fo:block>
|
1594
1601
|
</xsl:template>
|
1595
1602
|
|
@@ -1597,8 +1604,11 @@
|
|
1597
1604
|
<!-- title -->
|
1598
1605
|
<!-- ====== -->
|
1599
1606
|
<xsl:template match="itu:annex/itu:title">
|
1600
|
-
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
|
1601
|
-
<fo:block
|
1607
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
|
1608
|
+
<fo:block>
|
1609
|
+
<xsl:apply-templates/>
|
1610
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1611
|
+
</fo:block>
|
1602
1612
|
<xsl:if test="$doctype != 'resolution'">
|
1603
1613
|
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
|
1604
1614
|
<xsl:choose>
|
@@ -1616,7 +1626,7 @@
|
|
1616
1626
|
|
1617
1627
|
<!-- Bibliography -->
|
1618
1628
|
<xsl:template match="itu:references[not(@normative='true')]/itu:title">
|
1619
|
-
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
|
1629
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
|
1620
1630
|
<xsl:if test="$doctype = 'implementers-guide'">
|
1621
1631
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
1622
1632
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1692,7 +1702,9 @@
|
|
1692
1702
|
</xsl:choose>
|
1693
1703
|
</xsl:attribute>
|
1694
1704
|
</xsl:if>
|
1705
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
1695
1706
|
<xsl:apply-templates/>
|
1707
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1696
1708
|
</xsl:element>
|
1697
1709
|
|
1698
1710
|
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::itu:p)">
|
@@ -1703,7 +1715,10 @@
|
|
1703
1715
|
|
1704
1716
|
|
1705
1717
|
<xsl:template match="itu:legal-statement//itu:title | itu:license-statement//itu:title">
|
1706
|
-
<
|
1718
|
+
<xsl:variable name="level">
|
1719
|
+
<xsl:call-template name="getLevel"/>
|
1720
|
+
</xsl:variable>
|
1721
|
+
<fo:block text-align="center" margin-top="6pt" role="H{$level}">
|
1707
1722
|
<xsl:apply-templates/>
|
1708
1723
|
</fo:block>
|
1709
1724
|
</xsl:template>
|
@@ -1737,11 +1752,14 @@
|
|
1737
1752
|
|
1738
1753
|
<xsl:template match="itu:preferred">
|
1739
1754
|
<!-- DEBUG need -->
|
1740
|
-
<
|
1755
|
+
<xsl:variable name="level">
|
1756
|
+
<xsl:call-template name="getLevel"/>
|
1757
|
+
</xsl:variable>
|
1758
|
+
<xsl:variable name="levelTerm">
|
1759
|
+
<xsl:call-template name="getLevelTermName"/>
|
1760
|
+
</xsl:variable>
|
1761
|
+
<fo:block space-before="6pt" text-align="justify" role="H{$levelTerm}">
|
1741
1762
|
<fo:inline padding-right="5mm" font-weight="bold">
|
1742
|
-
<xsl:variable name="level">
|
1743
|
-
<xsl:call-template name="getLevel"/>
|
1744
|
-
</xsl:variable>
|
1745
1763
|
<!-- level=<xsl:value-of select="$level"/> -->
|
1746
1764
|
<xsl:attribute name="padding-right">
|
1747
1765
|
<xsl:choose>
|
@@ -2127,7 +2145,7 @@
|
|
2127
2145
|
|
2128
2146
|
|
2129
2147
|
<xsl:template name="insertHeaderFooter">
|
2130
|
-
<fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt">
|
2148
|
+
<fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
|
2131
2149
|
<fo:block-container height="19mm" display-align="after">
|
2132
2150
|
<fo:table table-layout="fixed" width="100%" display-align="after">
|
2133
2151
|
<fo:table-column column-width="10%"/>
|
@@ -2145,7 +2163,7 @@
|
|
2145
2163
|
</fo:table>
|
2146
2164
|
</fo:block-container>
|
2147
2165
|
</fo:static-content>
|
2148
|
-
<fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt">
|
2166
|
+
<fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt" role="artifact">
|
2149
2167
|
<fo:block-container height="19mm" display-align="after">
|
2150
2168
|
<fo:table table-layout="fixed" width="100%" display-align="after">
|
2151
2169
|
<fo:table-column column-width="90%"/>
|
@@ -2166,7 +2184,7 @@
|
|
2166
2184
|
</xsl:template>
|
2167
2185
|
|
2168
2186
|
<xsl:template name="insertHeaderFooterSP">
|
2169
|
-
<fo:static-content flow-name="footer-even">
|
2187
|
+
<fo:static-content flow-name="footer-even" role="artifact">
|
2170
2188
|
<fo:block-container height="20mm">
|
2171
2189
|
<fo:table table-layout="fixed" width="100%" margin-top="3mm">
|
2172
2190
|
<fo:table-column column-width="proportional-column-width(2)"/>
|
@@ -2188,7 +2206,7 @@
|
|
2188
2206
|
</fo:table>
|
2189
2207
|
</fo:block-container>
|
2190
2208
|
</fo:static-content>
|
2191
|
-
<fo:static-content flow-name="footer-odd">
|
2209
|
+
<fo:static-content flow-name="footer-odd" role="artifact">
|
2192
2210
|
<fo:block-container height="20mm">
|
2193
2211
|
<fo:table table-layout="fixed" width="100%" margin-top="3mm">
|
2194
2212
|
<fo:table-column column-width="proportional-column-width(2)"/>
|
@@ -2500,6 +2518,7 @@
|
|
2500
2518
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2501
2519
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2502
2520
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2521
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
2503
2522
|
|
2504
2523
|
|
2505
2524
|
|
@@ -2525,8 +2544,13 @@
|
|
2525
2544
|
|
2526
2545
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
2527
2546
|
|
2528
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
2529
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
2547
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
2548
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
2549
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
2550
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
2551
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
2552
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
2553
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
2530
2554
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
2531
2555
|
|
2532
2556
|
|
@@ -2695,6 +2719,11 @@
|
|
2695
2719
|
|
2696
2720
|
|
2697
2721
|
|
2722
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
2723
|
+
|
2724
|
+
|
2725
|
+
|
2726
|
+
|
2698
2727
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2699
2728
|
|
2700
2729
|
|
@@ -2726,7 +2755,8 @@
|
|
2726
2755
|
|
2727
2756
|
|
2728
2757
|
|
2729
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2758
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2759
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
2730
2760
|
|
2731
2761
|
|
2732
2762
|
|
@@ -2863,13 +2893,20 @@
|
|
2863
2893
|
|
2864
2894
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2865
2895
|
|
2866
|
-
</xsl:attribute-set><xsl:
|
2896
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2897
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2898
|
+
</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">
|
2867
2899
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2868
2900
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2869
2901
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2870
2902
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
2871
2903
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2872
|
-
</xsl:template><xsl:template name="
|
2904
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2905
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2906
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2907
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2908
|
+
</xsl:for-each>
|
2909
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
2873
2910
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2874
2911
|
|
2875
2912
|
<!-- Normative references -->
|
@@ -2882,13 +2919,33 @@
|
|
2882
2919
|
<!-- Bibliography -->
|
2883
2920
|
<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"/>
|
2884
2921
|
|
2885
|
-
</xsl:template><xsl:template name="
|
2922
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2923
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2924
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2925
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2926
|
+
</xsl:for-each>
|
2927
|
+
|
2928
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2929
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2930
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2931
|
+
</xsl:for-each>
|
2932
|
+
|
2933
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2934
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2935
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2936
|
+
</xsl:for-each>
|
2937
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
2886
2938
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2887
2939
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2888
2940
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2889
2941
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2890
2942
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2891
|
-
</xsl:template><xsl:template name="
|
2943
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2944
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2945
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2946
|
+
<xsl:apply-templates select="."/>
|
2947
|
+
</xsl:for-each>
|
2948
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
2892
2949
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2893
2950
|
|
2894
2951
|
<!-- Normative references -->
|
@@ -2900,6 +2957,22 @@
|
|
2900
2957
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2901
2958
|
<!-- Bibliography -->
|
2902
2959
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2960
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2961
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2962
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2963
|
+
<xsl:apply-templates select="."/>
|
2964
|
+
|
2965
|
+
</xsl:for-each>
|
2966
|
+
|
2967
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2968
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2969
|
+
<xsl:apply-templates select="."/>
|
2970
|
+
</xsl:for-each>
|
2971
|
+
|
2972
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2973
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2974
|
+
<xsl:apply-templates select="."/>
|
2975
|
+
</xsl:for-each>
|
2903
2976
|
</xsl:template><xsl:template match="text()">
|
2904
2977
|
<xsl:value-of select="."/>
|
2905
2978
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2934,7 +3007,9 @@
|
|
2934
3007
|
|
2935
3008
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2936
3009
|
|
2937
|
-
|
3010
|
+
|
3011
|
+
|
3012
|
+
|
2938
3013
|
|
2939
3014
|
<xsl:call-template name="fn_name_display"/>
|
2940
3015
|
|
@@ -3801,9 +3876,8 @@
|
|
3801
3876
|
|
3802
3877
|
<!-- Table's note name (NOTE, for example) -->
|
3803
3878
|
|
3804
|
-
<fo:inline padding-right="2mm">
|
3879
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
3805
3880
|
|
3806
|
-
|
3807
3881
|
|
3808
3882
|
|
3809
3883
|
|
@@ -4451,6 +4525,8 @@
|
|
4451
4525
|
<xsl:if test="$font-size != ''">
|
4452
4526
|
<xsl:attribute name="font-size">
|
4453
4527
|
<xsl:choose>
|
4528
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4529
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4454
4530
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4455
4531
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4456
4532
|
</xsl:choose>
|
@@ -4885,16 +4961,68 @@
|
|
4885
4961
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4886
4962
|
</xsl:call-template>
|
4887
4963
|
|
4964
|
+
|
4965
|
+
|
4888
4966
|
<xsl:variable name="mathml">
|
4889
4967
|
<xsl:apply-templates select="." mode="mathml"/>
|
4890
4968
|
</xsl:variable>
|
4891
4969
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4892
4970
|
|
4893
4971
|
|
4972
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
4973
|
+
<xsl:variable name="comment_text_">
|
4974
|
+
<xsl:choose>
|
4975
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
4976
|
+
<xsl:value-of select="$comment_text_following"/>
|
4977
|
+
</xsl:when>
|
4978
|
+
<xsl:otherwise>
|
4979
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
4980
|
+
</xsl:otherwise>
|
4981
|
+
</xsl:choose>
|
4982
|
+
</xsl:variable>
|
4983
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
4984
|
+
|
4985
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
4986
|
+
<!-- put Mathin Alternate Text -->
|
4987
|
+
<xsl:attribute name="fox:alt-text">
|
4988
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
4989
|
+
</xsl:attribute>
|
4990
|
+
</xsl:if>
|
4991
|
+
|
4992
|
+
<xsl:variable name="mathml_content">
|
4993
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
4994
|
+
</xsl:variable>
|
4995
|
+
<!-- put MathML in Actual Text -->
|
4996
|
+
<xsl:attribute name="fox:actual-text">
|
4997
|
+
<xsl:value-of select="$mathml_content"/>
|
4998
|
+
</xsl:attribute>
|
4999
|
+
|
5000
|
+
|
4894
5001
|
<!-- <xsl:copy-of select="."/> -->
|
4895
5002
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4896
5003
|
</fo:instream-foreign-object>
|
4897
5004
|
</fo:inline>
|
5005
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
5006
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
5007
|
+
<xsl:text><</xsl:text>
|
5008
|
+
<xsl:value-of select="local-name()"/>
|
5009
|
+
<xsl:if test="local-name() = 'math'">
|
5010
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
5011
|
+
</xsl:if>
|
5012
|
+
<xsl:for-each select="@*">
|
5013
|
+
<xsl:text> </xsl:text>
|
5014
|
+
<xsl:value-of select="local-name()"/>
|
5015
|
+
<xsl:text>="</xsl:text>
|
5016
|
+
<xsl:value-of select="."/>
|
5017
|
+
<xsl:text>"</xsl:text>
|
5018
|
+
</xsl:for-each>
|
5019
|
+
<xsl:text>></xsl:text>
|
5020
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
5021
|
+
<xsl:text></</xsl:text>
|
5022
|
+
<xsl:value-of select="local-name()"/>
|
5023
|
+
<xsl:text>></xsl:text>
|
5024
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
5025
|
+
<xsl:value-of select="normalize-space()"/>
|
4898
5026
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
4899
5027
|
<xsl:copy>
|
4900
5028
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -4956,7 +5084,10 @@
|
|
4956
5084
|
</fo:block>
|
4957
5085
|
<xsl:apply-templates/>
|
4958
5086
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
4959
|
-
<
|
5087
|
+
<xsl:variable name="level">
|
5088
|
+
<xsl:call-template name="getLevel"/>
|
5089
|
+
</xsl:variable>
|
5090
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
4960
5091
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
4961
5092
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
4962
5093
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4991,9 +5122,10 @@
|
|
4991
5122
|
|
4992
5123
|
</xsl:variable>
|
4993
5124
|
|
5125
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
4994
5126
|
<xsl:choose>
|
4995
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4996
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
5127
|
+
<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>
|
5128
|
+
<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>
|
4997
5129
|
</xsl:choose>
|
4998
5130
|
<xsl:apply-templates/>
|
4999
5131
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -5145,7 +5277,10 @@
|
|
5145
5277
|
</fo:block>
|
5146
5278
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
5147
5279
|
<xsl:if test="normalize-space() != ''">
|
5148
|
-
<
|
5280
|
+
<xsl:variable name="level">
|
5281
|
+
<xsl:call-template name="getLevelTermName"/>
|
5282
|
+
</xsl:variable>
|
5283
|
+
<fo:inline role="H{$level}">
|
5149
5284
|
<xsl:apply-templates/>
|
5150
5285
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
5151
5286
|
<xsl:text>.</xsl:text>
|
@@ -5446,6 +5581,13 @@
|
|
5446
5581
|
</xsl:attribute>
|
5447
5582
|
<xsl:apply-templates mode="svg_update"/>
|
5448
5583
|
</xsl:copy>
|
5584
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
5585
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
5586
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
5587
|
+
<xsl:call-template name="image_svg">
|
5588
|
+
<xsl:with-param name="name" select="$name"/>
|
5589
|
+
</xsl:call-template>
|
5590
|
+
</xsl:for-each>
|
5449
5591
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
5450
5592
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
5451
5593
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -5550,7 +5692,7 @@
|
|
5550
5692
|
</fo:basic-link>
|
5551
5693
|
</fo:block>
|
5552
5694
|
</fo:block-container>
|
5553
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
5695
|
+
</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">
|
5554
5696
|
<xsl:apply-templates mode="contents"/>
|
5555
5697
|
<xsl:text> </xsl:text>
|
5556
5698
|
</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']" mode="bookmarks">
|
@@ -5776,6 +5918,7 @@
|
|
5776
5918
|
</xsl:when>
|
5777
5919
|
<xsl:otherwise>
|
5778
5920
|
<xsl:apply-templates/>
|
5921
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
5779
5922
|
</xsl:otherwise>
|
5780
5923
|
</xsl:choose>
|
5781
5924
|
</fo:block>
|
@@ -5848,12 +5991,16 @@
|
|
5848
5991
|
<xsl:if test="$font-size != ''">
|
5849
5992
|
<xsl:attribute name="font-size">
|
5850
5993
|
<xsl:choose>
|
5994
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
5995
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
5851
5996
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
5852
5997
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
5853
5998
|
</xsl:choose>
|
5854
5999
|
</xsl:attribute>
|
5855
6000
|
</xsl:if>
|
5856
6001
|
|
6002
|
+
|
6003
|
+
|
5857
6004
|
<xsl:apply-templates/>
|
5858
6005
|
</fo:block>
|
5859
6006
|
|
@@ -5916,14 +6063,6 @@
|
|
5916
6063
|
<fo:block>
|
5917
6064
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
5918
6065
|
</fo:block>
|
5919
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
5920
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
5921
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5922
|
-
</fo:block>
|
5923
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
5924
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
5925
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
5926
|
-
</fo:block>
|
5927
6066
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
5928
6067
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
5929
6068
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -5940,6 +6079,38 @@
|
|
5940
6079
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
5941
6080
|
<xsl:apply-templates/>
|
5942
6081
|
</fo:block>
|
6082
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
6083
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6084
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6085
|
+
</fo:block>
|
6086
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
6087
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6088
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6089
|
+
</fo:block>
|
6090
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
6091
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
6092
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
6093
|
+
</fo:block>
|
6094
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
6095
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
6096
|
+
<xsl:apply-templates/>
|
6097
|
+
</fo:block>
|
6098
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
6099
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
6100
|
+
<xsl:apply-templates/>
|
6101
|
+
</fo:block>
|
6102
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
6103
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
6104
|
+
<xsl:apply-templates/>
|
6105
|
+
</fo:block>
|
6106
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
6107
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
6108
|
+
<xsl:apply-templates/>
|
6109
|
+
</fo:block>
|
6110
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
6111
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
6112
|
+
<xsl:apply-templates/>
|
6113
|
+
</fo:block>
|
5943
6114
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
5944
6115
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
5945
6116
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -6205,8 +6376,8 @@
|
|
6205
6376
|
</xsl:if>
|
6206
6377
|
</xsl:template><xsl:variable name="localized.source">
|
6207
6378
|
<xsl:call-template name="getLocalizedString">
|
6208
|
-
|
6209
|
-
|
6379
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
6380
|
+
</xsl:call-template>
|
6210
6381
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
6211
6382
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6212
6383
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -6216,6 +6387,7 @@
|
|
6216
6387
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6217
6388
|
<xsl:apply-templates/>
|
6218
6389
|
</fo:inline>
|
6390
|
+
|
6219
6391
|
</fo:basic-link>
|
6220
6392
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6221
6393
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -6282,6 +6454,9 @@
|
|
6282
6454
|
|
6283
6455
|
</xsl:if>
|
6284
6456
|
|
6457
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
6458
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
6459
|
+
|
6285
6460
|
|
6286
6461
|
|
6287
6462
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -6294,7 +6469,9 @@
|
|
6294
6469
|
|
6295
6470
|
|
6296
6471
|
</xsl:if>
|
6297
|
-
|
6472
|
+
|
6473
|
+
|
6474
|
+
|
6298
6475
|
<xsl:apply-templates/>
|
6299
6476
|
</fo:basic-link>
|
6300
6477
|
|
@@ -6641,6 +6818,7 @@
|
|
6641
6818
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
6642
6819
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
6643
6820
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6821
|
+
|
6644
6822
|
<xsl:apply-templates/>
|
6645
6823
|
</fo:block>
|
6646
6824
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -6809,6 +6987,97 @@
|
|
6809
6987
|
<fo:block-container border="1pt solid black" width="50%">
|
6810
6988
|
<fo:block> </fo:block>
|
6811
6989
|
</fo:block-container>
|
6990
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
6991
|
+
<xsl:param name="colwidths"/>
|
6992
|
+
<xsl:variable name="colwidths_">
|
6993
|
+
<xsl:choose>
|
6994
|
+
<xsl:when test="not($colwidths)">
|
6995
|
+
<xsl:variable name="toc_table_simple">
|
6996
|
+
<tbody>
|
6997
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6998
|
+
</tbody>
|
6999
|
+
</xsl:variable>
|
7000
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
7001
|
+
<xsl:call-template name="calculate-column-widths">
|
7002
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
7003
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
7004
|
+
</xsl:call-template>
|
7005
|
+
</xsl:when>
|
7006
|
+
<xsl:otherwise>
|
7007
|
+
<xsl:copy-of select="$colwidths"/>
|
7008
|
+
</xsl:otherwise>
|
7009
|
+
</xsl:choose>
|
7010
|
+
</xsl:variable>
|
7011
|
+
<fo:block role="TOCI" space-after="16pt">
|
7012
|
+
<fo:table width="100%" table-layout="fixed">
|
7013
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
7014
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
7015
|
+
</xsl:for-each>
|
7016
|
+
<fo:table-body>
|
7017
|
+
<xsl:apply-templates/>
|
7018
|
+
</fo:table-body>
|
7019
|
+
</fo:table>
|
7020
|
+
</fo:block>
|
7021
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
7022
|
+
<fo:table-row min-height="5mm">
|
7023
|
+
<xsl:apply-templates/>
|
7024
|
+
</fo:table-row>
|
7025
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
7026
|
+
<xsl:apply-templates/>
|
7027
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
7028
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7029
|
+
<xsl:variable name="target" select="@target"/>
|
7030
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7031
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7032
|
+
<fo:table-cell>
|
7033
|
+
<fo:block>
|
7034
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7035
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7036
|
+
<xsl:choose>
|
7037
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
7038
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
7039
|
+
</xsl:choose>
|
7040
|
+
</xsl:for-each>
|
7041
|
+
</fo:basic-link>
|
7042
|
+
</fo:block>
|
7043
|
+
</fo:table-cell>
|
7044
|
+
</xsl:for-each>
|
7045
|
+
<!-- last column - for page numbers -->
|
7046
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
7047
|
+
<fo:block>
|
7048
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7049
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
7050
|
+
</fo:basic-link>
|
7051
|
+
</fo:block>
|
7052
|
+
</fo:table-cell>
|
7053
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
7054
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7055
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
7056
|
+
<tr>
|
7057
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7058
|
+
</tr>
|
7059
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
7060
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7061
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7062
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7063
|
+
<td>
|
7064
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7065
|
+
<xsl:copy-of select="."/>
|
7066
|
+
</xsl:for-each>
|
7067
|
+
</td>
|
7068
|
+
</xsl:for-each>
|
7069
|
+
<td>333</td> <!-- page number, just for fill -->
|
7070
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7071
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
7072
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
7073
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
7074
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
7075
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
7076
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
7077
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
7078
|
+
</svg>
|
7079
|
+
</fo:instream-foreign-object>
|
7080
|
+
</fo:inline>
|
6812
7081
|
</xsl:template><xsl:template name="convertDate">
|
6813
7082
|
<xsl:param name="date"/>
|
6814
7083
|
<xsl:param name="format" select="'short'"/>
|
@@ -7047,6 +7316,26 @@
|
|
7047
7316
|
<xsl:value-of select="$level"/>
|
7048
7317
|
</xsl:otherwise>
|
7049
7318
|
</xsl:choose>
|
7319
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
7320
|
+
<xsl:choose>
|
7321
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
7322
|
+
<xsl:value-of select="../@depth"/>
|
7323
|
+
</xsl:when>
|
7324
|
+
<xsl:otherwise>
|
7325
|
+
<xsl:variable name="title_level_">
|
7326
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
7327
|
+
<xsl:call-template name="getLevel"/>
|
7328
|
+
</xsl:for-each>
|
7329
|
+
</xsl:variable>
|
7330
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
7331
|
+
<xsl:choose>
|
7332
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
7333
|
+
<xsl:otherwise>
|
7334
|
+
<xsl:call-template name="getLevel"/>
|
7335
|
+
</xsl:otherwise>
|
7336
|
+
</xsl:choose>
|
7337
|
+
</xsl:otherwise>
|
7338
|
+
</xsl:choose>
|
7050
7339
|
</xsl:template><xsl:template name="split">
|
7051
7340
|
<xsl:param name="pText" select="."/>
|
7052
7341
|
<xsl:param name="sep" select="','"/>
|