metanorma-itu 1.3.9 → 1.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12737ac0ba4d8fd85515b4c370ccab8fe12d1ab51f3c5fedcec3c42e72dbd925
4
- data.tar.gz: d8994b2ddb5d16f89c52a61d6f4eb273149febc6789dfc1df9a65cfcafeee1a0
3
+ metadata.gz: c9fedf3f6b88ed3fec5d058a59d289f893646fbcdea430d5f628c2c5f4801b4e
4
+ data.tar.gz: e569b3339b3437a5ac5db0b72a94fa6b6c8647e64d64e7c6690a3af5c9cc57b2
5
5
  SHA512:
6
- metadata.gz: f185faea621b1a4c0ed692c4683b15a14fe8b5ca5aaddd173b16db1d6d61eb9cbf355de886cbdcf90acb97a4cacb2178a9842f6c8d0d83c66e10310fd6bb6d03
7
- data.tar.gz: d9b414079f9642a01ef663bc8f86c9770cc7031ec813dd4d4f5505532a2cdf6699be23ff3e1b7a7952967d72517e2ca199bc8f532fc10b659a39da96503a00f7
6
+ metadata.gz: b7870e02cd137d2f25bc39b552dee726ec92144e45b60a3aaf733285eb2394a5cb040f0a38eeef43a0f7fca7f5fca54326c780e4c9c2a0a502667ee497d7ae54
7
+ data.tar.gz: 02d819038572881fb4882a20cc4a5ee18c96853226e8ca6820600391af390230128cbf32842660ede1e756976efbbfbcc73990bbb4caa51551f9943f20f2aa04
@@ -1,17 +1,19 @@
1
1
  module Asciidoctor
2
2
  module ITU
3
3
  class Converter < Standoc::Converter
4
- def sections_cleanup(x)
4
+ def sections_cleanup(xml)
5
5
  super
6
- insert_missing_sections(x) unless @no_insert_missing_sections
7
- insert_empty_clauses(x)
8
- resolution_inline_header(x)
6
+ insert_missing_sections(xml) unless @no_insert_missing_sections
7
+ insert_empty_clauses(xml)
8
+ resolution_inline_header(xml)
9
9
  end
10
10
 
11
- def resolution_inline_header(x)
12
- return unless x&.at("//bibdata/ext/doctype")&.text == "resolution"
13
- x.xpath("//clause//clause").each do |c|
14
- next if title = c.at("./title") and !title&.text&.empty?
11
+ def resolution_inline_header(xml)
12
+ return unless xml&.at("//bibdata/ext/doctype")&.text == "resolution"
13
+
14
+ xml.xpath("//clause//clause").each do |c|
15
+ next if (title = c.at("./title")) && !title&.text&.empty?
16
+
15
17
  c["inline-header"] = true
16
18
  end
17
19
  end
@@ -36,67 +38,67 @@ module Asciidoctor
36
38
  %(id="_#{UUIDTools::UUID.random_create}")
37
39
  end
38
40
 
39
- def insert_scope(x)
40
- x.at("./*/sections") or
41
- x.at("./*/preface | ./*/boilerplate | ./*/bibdata").next =
42
- "<sections><sentinel/></sections>"
43
- x.at("./*/sections/*") or x.at("./*/sections") << "<sentinel/>"
44
- ins = x.at("//sections").elements.first
45
- x.at("//sections/clause[@type = 'scope']") or
41
+ def insert_scope(xml)
42
+ xml.at("./*/sections") or
43
+ xml.at("./*/preface | ./*/boilerplate | ./*/bibdata").next =
44
+ "<sections><sentinel/></sections>"
45
+ xml.at("./*/sections/*") or xml.at("./*/sections") << "<sentinel/>"
46
+ ins = xml.at("//sections").elements.first
47
+ xml.at("//sections/clause[@type = 'scope']") or
46
48
  ins.previous =
47
49
  "<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>"\
48
50
  "#{@i18n.clause_empty}</p></clause>"
49
- x&.at("//sentinel")&.remove
51
+ xml&.at("//sentinel")&.remove
50
52
  end
51
53
 
52
- def insert_norm_ref(x)
53
- x.at("//bibliography") or
54
- x.at("./*/annex[last()] | ./*/sections").next =
55
- "<bibliography><sentinel/></bibliography>"
56
- ins = x.at("//bibliography").elements.first
57
- x.at("//bibliography/references[@normative = 'true']") or
54
+ def insert_norm_ref(xml)
55
+ xml.at("//bibliography") or
56
+ xml.at("./*/annex[last()] | ./*/sections").next =
57
+ "<bibliography><sentinel/></bibliography>"
58
+ ins = xml.at("//bibliography").elements.first
59
+ xml.at("//bibliography/references[@normative = 'true']") or
58
60
  ins.previous = "<references #{add_id} normative='true'>"\
59
- "<title>#{@i18n.normref}</title></references>"
60
- x&.at("//sentinel")&.remove
61
+ "<title>#{@i18n.normref}</title></references>"
62
+ xml&.at("//sentinel")&.remove
61
63
  end
62
64
 
63
- def insert_terms(x)
64
- ins = x.at("//sections/clause[@type = 'scope']")
65
- x.at("//sections//terms") or
65
+ def insert_terms(xml)
66
+ ins = xml.at("//sections/clause[@type = 'scope']")
67
+ xml.at("//sections//terms") or
66
68
  ins.next = "<terms #{add_id}><title>#{@i18n.termsdef}</title></terms>"
67
69
  end
68
70
 
69
- def insert_symbols(x)
70
- ins = x.at("//sections/terms") ||
71
- x.at("//sections/clause[descendant::terms]")
72
- unless x.at("//sections//definitions")
71
+ def insert_symbols(xml)
72
+ ins = xml.at("//sections/terms") ||
73
+ xml.at("//sections/clause[descendant::terms]")
74
+ unless xml.at("//sections//definitions")
73
75
  ins.next = "<definitions #{add_id}>"\
74
- "<title>#{@i18n.symbolsabbrev}</title></definitions>"
76
+ "<title>#{@i18n.symbolsabbrev}</title></definitions>"
75
77
  end
76
78
  end
77
79
 
78
- def insert_conventions(x)
79
- ins = x.at("//sections//definitions") ||
80
- x.at("//sections/clause[descendant::definitions]")
81
- unless x.at("//sections/clause[@type = 'conventions']")
80
+ def insert_conventions(xml)
81
+ ins = xml.at("//sections//definitions") ||
82
+ xml.at("//sections/clause[descendant::definitions]")
83
+ unless xml.at("//sections/clause[@type = 'conventions']")
82
84
  ins.next = "<clause #{add_id} type='conventions'>"\
83
- "<title>#{@i18n.conventions}</title><p>"\
84
- "#{@i18n.clause_empty}</p></clause>"
85
+ "<title>#{@i18n.conventions}</title><p>"\
86
+ "#{@i18n.clause_empty}</p></clause>"
85
87
  end
86
88
  end
87
89
 
88
- def insert_empty_clauses(x)
89
- x.xpath("//terms[not(./term)][not(.//terms)]").each do |c|
90
+ def insert_empty_clauses(xml)
91
+ xml.xpath("//terms[not(./term)][not(.//terms)]").each do |c|
90
92
  insert_empty_clauses1(c, @i18n.clause_empty)
91
93
  end
92
- x.xpath("//definitions[not(./dl)]").each do |c|
94
+ xml.xpath("//definitions[not(./dl)]").each do |c|
93
95
  insert_empty_clauses1(c, @i18n.clause_empty)
94
96
  end
95
97
  end
96
98
 
97
- def insert_empty_clauses1(c, text)
98
- c.at("./p") and return
99
- ins = c.at("./title") or return
99
+ def insert_empty_clauses1(clause, text)
100
+ clause.at("./p") and return
101
+ ins = clause.at("./title") or return
100
102
  ins.next = "<p>#{text}</p>"
101
103
  end
102
104
 
@@ -114,14 +116,14 @@ module Asciidoctor
114
116
  next unless n.text?
115
117
 
116
118
  n.replace(HTMLEntities.new.encode(
117
- n.text.gsub(/\u2019|\u2018|\u201a|\u201b/, "'").
118
- gsub(/\u201c|\u201d|\u201e|\u201f/, '"'), :basic))
119
+ n.text.gsub(/\u2019|\u2018|\u201a|\u201b/, "'")
120
+ .gsub(/\u201c|\u201d|\u201e|\u201f/, '"'), :basic
121
+ ))
119
122
  end
120
123
  xmldoc
121
124
  end
122
125
 
123
- def termdef_boilerplate_cleanup(xmldoc)
124
- end
126
+ def termdef_boilerplate_cleanup(xmldoc); end
125
127
 
126
128
  def terms_extract(div)
127
129
  internal = div.at("./terms[@type = 'internal']/title")
@@ -129,7 +131,7 @@ module Asciidoctor
129
131
  [internal, external]
130
132
  end
131
133
 
132
- def term_defs_boilerplate(div, source, term, preface, isodoc)
134
+ def term_defs_boilerplate(div, _source, _term, _preface, _isodoc)
133
135
  internal, external = terms_extract(div.parent)
134
136
  internal&.next_element&.name == "term" and
135
137
  internal.next = "<p>#{@i18n.internal_terms_boilerplate}</p>"
@@ -144,16 +146,20 @@ module Asciidoctor
144
146
  div.next = "<p>#{@i18n.term_def_boilerplate}</p>"
145
147
  end
146
148
 
147
- def section_names_terms_cleanup(x)
149
+ def section_names_terms_cleanup(xml)
148
150
  super
149
151
  replace_title(
150
- x, "//terms[@type = 'internal'] | "\
151
- "//clause[./terms[@type = 'internal']][not(./terms[@type = 'external'])]",
152
- @i18n&.internal_termsdef)
152
+ xml, "//terms[@type = 'internal'] | "\
153
+ "//clause[./terms[@type = 'internal']]"\
154
+ "[not(./terms[@type = 'external'])]",
155
+ @i18n&.internal_termsdef
156
+ )
153
157
  replace_title(
154
- x, "//terms[@type = 'external'] | "\
155
- "//clause[./terms[@type = 'external']][not(./terms[@type = 'internal'])]",
156
- @i18n&.external_termsdef)
158
+ xml, "//terms[@type = 'external'] | "\
159
+ "//clause[./terms[@type = 'external']]"\
160
+ "[not(./terms[@type = 'internal'])]",
161
+ @i18n&.external_termsdef
162
+ )
157
163
  end
158
164
 
159
165
  def symbols_cleanup(xmldoc)
@@ -193,12 +199,11 @@ module Asciidoctor
193
199
  # then title
194
200
  def sort_biblio_key(bib)
195
201
  pubclass = pub_class(bib)
196
- num = bib&.at("./docnumber")&.text
197
202
  id = bib&.at("./docidentifier[not(@type = 'DOI' or @type = "\
198
203
  "'metanorma' or @type = 'ISSN' or @type = 'ISBN')]")
199
204
  metaid = bib&.at("./docidentifier[@type = 'metanorma']")&.text
200
- abbrid = metaid unless /^\[\d+\]$/.match(metaid)
201
- type = id['type'] if id
205
+ abbrid = metaid unless /^\[\d+\]$/.match?(metaid)
206
+ type = id["type"] if id
202
207
  title = bib&.at("./title[@type = 'main']")&.text ||
203
208
  bib&.at("./title")&.text || bib&.at("./formattedref")&.text
204
209
  "#{pubclass} :: #{type} :: #{id&.text || metaid} :: #{title}"
@@ -32,6 +32,18 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="section-title">
36
+ <element name="title">
37
+ <zeroOrMore>
38
+ <ref name="TextElement"/>
39
+ </zeroOrMore>
40
+ </element>
41
+ <zeroOrMore>
42
+ <element name="variant-title">
43
+ <ref name="TypedTitleString"/>
44
+ </element>
45
+ </zeroOrMore>
46
+ </define>
35
47
  <define name="hyperlink">
36
48
  <element name="link">
37
49
  <attribute name="target">
@@ -158,15 +170,17 @@
158
170
  <data type="boolean"/>
159
171
  </attribute>
160
172
  </optional>
161
- <attribute name="type">
162
- <choice>
163
- <value>roman</value>
164
- <value>alphabet</value>
165
- <value>arabic</value>
166
- <value>roman_upper</value>
167
- <value>alphabet_upper</value>
168
- </choice>
169
- </attribute>
173
+ <optional>
174
+ <attribute name="type">
175
+ <choice>
176
+ <value>roman</value>
177
+ <value>alphabet</value>
178
+ <value>arabic</value>
179
+ <value>roman_upper</value>
180
+ <value>alphabet_upper</value>
181
+ </choice>
182
+ </attribute>
183
+ </optional>
170
184
  <oneOrMore>
171
185
  <ref name="li"/>
172
186
  </oneOrMore>
@@ -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
- <fo:block-container>
1001
- <fo:block margin-top="6pt" text-align="center" font-weight="bold">
1002
- <xsl:call-template name="getLocalizedString">
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) &gt; 10">27mm</xsl:when>
1028
- <xsl:when test="string-length(@section) &gt; 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">Page.sg</xsl:with-param>
1080
- </xsl:call-template>
1081
- </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'"/>
1004
+ <xsl:with-param name="key">table_of_contents</xsl:with-param>
1102
1005
  </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
1006
  </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
- <fo:block-container>
1116
- <xsl:for-each select="//itu:figure[@id and itu:name]">
1117
- <fo:block text-align-last="justify" margin-top="6pt">
1118
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
1119
- <xsl:apply-templates select="itu:name" mode="contents"/>
1120
- <fo:inline keep-together.within-line="always">
1121
- <fo:leader leader-pattern="dots"/>
1122
- <fo:page-number-citation ref-id="{@id}"/>
1123
- </fo:inline>
1124
- </fo:basic-link>
1125
- </fo:block>
1126
- </xsl:for-each>
1127
- </fo:block-container>
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) &gt; 10">27mm</xsl:when>
1029
+ <xsl:when test="string-length(@section) &gt; 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
- </xsl:if>
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>&#xa0;</fo:block>
1388
1389
  <fo:block>&#xa0;</fo:block>
1389
1390
  </xsl:if> -->
1390
- <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt" keep-with-next="always">
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">&#xa0;</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><xsl:apply-templates/></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
- <fo:block text-align="center" margin-top="6pt">
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
- <fo:block space-before="6pt" text-align="justify">
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="requirement-subject-style">
2529
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
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
 
@@ -2726,7 +2750,8 @@
2726
2750
 
2727
2751
 
2728
2752
 
2729
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
2753
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
2754
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
2730
2755
 
2731
2756
 
2732
2757
 
@@ -2934,7 +2959,9 @@
2934
2959
 
2935
2960
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2936
2961
 
2937
-
2962
+
2963
+
2964
+
2938
2965
 
2939
2966
  <xsl:call-template name="fn_name_display"/>
2940
2967
 
@@ -4885,16 +4912,68 @@
4885
4912
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4886
4913
  </xsl:call-template>
4887
4914
 
4915
+
4916
+
4888
4917
  <xsl:variable name="mathml">
4889
4918
  <xsl:apply-templates select="." mode="mathml"/>
4890
4919
  </xsl:variable>
4891
4920
  <fo:instream-foreign-object fox:alt-text="Math">
4892
4921
 
4893
4922
 
4923
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4924
+ <xsl:variable name="comment_text_">
4925
+ <xsl:choose>
4926
+ <xsl:when test="normalize-space($comment_text_following) != ''">
4927
+ <xsl:value-of select="$comment_text_following"/>
4928
+ </xsl:when>
4929
+ <xsl:otherwise>
4930
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4931
+ </xsl:otherwise>
4932
+ </xsl:choose>
4933
+ </xsl:variable>
4934
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4935
+
4936
+ <xsl:if test="normalize-space($comment_text) != ''">
4937
+ <!-- put Mathin Alternate Text -->
4938
+ <xsl:attribute name="fox:alt-text">
4939
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
4940
+ </xsl:attribute>
4941
+ </xsl:if>
4942
+
4943
+ <xsl:variable name="mathml_content">
4944
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
4945
+ </xsl:variable>
4946
+ <!-- put MathML in Actual Text -->
4947
+ <xsl:attribute name="fox:actual-text">
4948
+ <xsl:value-of select="$mathml_content"/>
4949
+ </xsl:attribute>
4950
+
4951
+
4894
4952
  <!-- <xsl:copy-of select="."/> -->
4895
4953
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4896
4954
  </fo:instream-foreign-object>
4897
4955
  </fo:inline>
4956
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4957
+ <!-- <xsl:text>a+b</xsl:text> -->
4958
+ <xsl:text>&lt;</xsl:text>
4959
+ <xsl:value-of select="local-name()"/>
4960
+ <xsl:if test="local-name() = 'math'">
4961
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
4962
+ </xsl:if>
4963
+ <xsl:for-each select="@*">
4964
+ <xsl:text> </xsl:text>
4965
+ <xsl:value-of select="local-name()"/>
4966
+ <xsl:text>="</xsl:text>
4967
+ <xsl:value-of select="."/>
4968
+ <xsl:text>"</xsl:text>
4969
+ </xsl:for-each>
4970
+ <xsl:text>&gt;</xsl:text>
4971
+ <xsl:apply-templates mode="mathml_actual_text"/>
4972
+ <xsl:text>&lt;/</xsl:text>
4973
+ <xsl:value-of select="local-name()"/>
4974
+ <xsl:text>&gt;</xsl:text>
4975
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
4976
+ <xsl:value-of select="normalize-space()"/>
4898
4977
  </xsl:template><xsl:template match="@*|node()" mode="mathml">
4899
4978
  <xsl:copy>
4900
4979
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
@@ -4956,7 +5035,10 @@
4956
5035
  </fo:block>
4957
5036
  <xsl:apply-templates/>
4958
5037
  </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4959
- <fo:inline><xsl:apply-templates/></fo:inline>
5038
+ <xsl:variable name="level">
5039
+ <xsl:call-template name="getLevel"/>
5040
+ </xsl:variable>
5041
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
4960
5042
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
4961
5043
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
4962
5044
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4991,9 +5073,10 @@
4991
5073
 
4992
5074
  </xsl:variable>
4993
5075
 
5076
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4994
5077
  <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>
5078
+ <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>
5079
+ <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
5080
  </xsl:choose>
4998
5081
  <xsl:apply-templates/>
4999
5082
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
@@ -5145,7 +5228,10 @@
5145
5228
  </fo:block>
5146
5229
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
5147
5230
  <xsl:if test="normalize-space() != ''">
5148
- <fo:inline>
5231
+ <xsl:variable name="level">
5232
+ <xsl:call-template name="getLevelTermName"/>
5233
+ </xsl:variable>
5234
+ <fo:inline role="H{$level}">
5149
5235
  <xsl:apply-templates/>
5150
5236
  <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
5151
5237
  <xsl:text>.</xsl:text>
@@ -5776,6 +5862,7 @@
5776
5862
  </xsl:when>
5777
5863
  <xsl:otherwise>
5778
5864
  <xsl:apply-templates/>
5865
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
5779
5866
  </xsl:otherwise>
5780
5867
  </xsl:choose>
5781
5868
  </fo:block>
@@ -5916,14 +6003,6 @@
5916
6003
  <fo:block>
5917
6004
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5918
6005
  </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
6006
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5928
6007
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5929
6008
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -5940,6 +6019,38 @@
5940
6019
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5941
6020
  <xsl:apply-templates/>
5942
6021
  </fo:block>
6022
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
6023
+ <fo:block xsl:use-attribute-sets="subject-style">
6024
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
6025
+ </fo:block>
6026
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
6027
+ <fo:block xsl:use-attribute-sets="subject-style">
6028
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
6029
+ </fo:block>
6030
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
6031
+ <fo:block xsl:use-attribute-sets="inherit-style">
6032
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
6033
+ </fo:block>
6034
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
6035
+ <fo:block xsl:use-attribute-sets="description-style">
6036
+ <xsl:apply-templates/>
6037
+ </fo:block>
6038
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
6039
+ <fo:block xsl:use-attribute-sets="specification-style">
6040
+ <xsl:apply-templates/>
6041
+ </fo:block>
6042
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
6043
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
6044
+ <xsl:apply-templates/>
6045
+ </fo:block>
6046
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
6047
+ <fo:block xsl:use-attribute-sets="verification-style">
6048
+ <xsl:apply-templates/>
6049
+ </fo:block>
6050
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
6051
+ <fo:block xsl:use-attribute-sets="import-style">
6052
+ <xsl:apply-templates/>
6053
+ </fo:block>
5943
6054
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
5944
6055
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
5945
6056
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
@@ -6809,6 +6920,9 @@
6809
6920
  <fo:block-container border="1pt solid black" width="50%">
6810
6921
  <fo:block> </fo:block>
6811
6922
  </fo:block-container>
6923
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6924
+ <fo:inline padding-right="5mm"> </fo:inline>
6925
+ <fo:inline><xsl:apply-templates/></fo:inline>
6812
6926
  </xsl:template><xsl:template name="convertDate">
6813
6927
  <xsl:param name="date"/>
6814
6928
  <xsl:param name="format" select="'short'"/>
@@ -7047,6 +7161,26 @@
7047
7161
  <xsl:value-of select="$level"/>
7048
7162
  </xsl:otherwise>
7049
7163
  </xsl:choose>
7164
+ </xsl:template><xsl:template name="getLevelTermName">
7165
+ <xsl:choose>
7166
+ <xsl:when test="normalize-space(../@depth) != ''">
7167
+ <xsl:value-of select="../@depth"/>
7168
+ </xsl:when>
7169
+ <xsl:otherwise>
7170
+ <xsl:variable name="title_level_">
7171
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
7172
+ <xsl:call-template name="getLevel"/>
7173
+ </xsl:for-each>
7174
+ </xsl:variable>
7175
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
7176
+ <xsl:choose>
7177
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
7178
+ <xsl:otherwise>
7179
+ <xsl:call-template name="getLevel"/>
7180
+ </xsl:otherwise>
7181
+ </xsl:choose>
7182
+ </xsl:otherwise>
7183
+ </xsl:choose>
7050
7184
  </xsl:template><xsl:template name="split">
7051
7185
  <xsl:param name="pText" select="."/>
7052
7186
  <xsl:param name="sep" select="','"/>