metanorma-ieee 1.0.15 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7baf9a088e45aeb06617388b08b5c2c6bb679e29b5e85254e9cbd8c1d487695
4
- data.tar.gz: 38325ee923392c68bb35266dca81e66cb7a7ce8f46afa65c6039a688ce52f649
3
+ metadata.gz: 1a6256a1c2f7a1bc9b09f325c6f0405efb2697524e23511ceafbae690a3eb98b
4
+ data.tar.gz: 5af212c12b8c7cdba8f222ee84f542196d92afd541df56fa4c368cc3f05710fd
5
5
  SHA512:
6
- metadata.gz: 5669cb1f37a355962a317b5b9acb2d71b062a62ebd80b23a16b8ce580a70dd2c47c1310a6c36463d5ab4595222a0c5252db3e2faa98de640b5017fa44ccb2615
7
- data.tar.gz: 589cf7c597e4dc249e4e2afeac1d5a9f41ba44588edb1af092fe5f6705655c005c7b78a5e5c705e1e0d92f502f4e032f41c14de307131d046d41d45b4aa99447
6
+ metadata.gz: e85a872ea89629b68849d43ecd9236b7470964893e4d2f7658436b0f61fb84eb9d9f186a3ca19bc4a5b6ee94b272bfeaada0fb48cbc27f12c2303be8827669c9
7
+ data.tar.gz: 2d8911d33ddb39b3ac6f748d78cb6712e98dc945e7175b6b0bf218b1fa667739c1be7c3beba7cafed9e870fc05f2c500ade54a7a7a383d1cc1b60e70f166473c
@@ -8,12 +8,17 @@ module IsoDoc
8
8
  { id: node["id"], type: node["type"] }
9
9
  end
10
10
 
11
- def scope(isoxml, out, num)
12
- f = isoxml.at(ns("//clause[@type = 'overview']")) or return num
13
- out.div **attr_code(id: f["id"]) do |div|
11
+ def top_element_render(elem, out)
12
+ elem.name == "clause" && elem["type"] == "overview" and
13
+ return scope(elem, out, 0)
14
+ super
15
+ end
16
+
17
+ def scope(node, out, num)
18
+ out.div **attr_code(id: node["id"]) do |div|
14
19
  num = num + 1
15
- clause_name(f, f&.at(ns("./title")), div, nil)
16
- f.elements.each do |e|
20
+ clause_name(node, node&.at(ns("./title")), div, nil)
21
+ node.elements.each do |e|
17
22
  parse(e, div) unless e.name == "title"
18
23
  end
19
24
  end
@@ -22,7 +27,7 @@ module IsoDoc
22
27
 
23
28
  def middle_clause(_docxml = nil)
24
29
  "//clause[parent::sections][not(@type = 'overview')]" \
25
- "[not(descendant::terms)]"
30
+ "[not(descendant::terms)][not(descendant::references)]"
26
31
  end
27
32
 
28
33
  def para_attrs(node)
@@ -301,10 +301,10 @@ blockquote,
301
301
  q {
302
302
  quotes: none; }
303
303
 
304
- blockquote:before,
305
- blockquote:after,
306
- q:before,
307
- q:after {
304
+ blockquote::before,
305
+ blockquote::after,
306
+ q::before,
307
+ q::after {
308
308
  content: '';
309
309
  content: none; }
310
310
 
@@ -455,7 +455,7 @@ h2 p, .h2 p {
455
455
  ul > li {
456
456
  list-style: none; }
457
457
 
458
- ul > li > p:first-child:before {
458
+ ul > li > p:first-child::before {
459
459
  content: "\2014";
460
460
  display: inline-block;
461
461
  width: 1em;
@@ -467,7 +467,7 @@ li p {
467
467
  margin-bottom: 0.6em;
468
468
  line-height: 1.2; }
469
469
 
470
- #toc li:before {
470
+ #toc li::before {
471
471
  content: " ";
472
472
  display: none; }
473
473
 
@@ -519,7 +519,7 @@ p.Terms {
519
519
  #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
520
520
  padding: 0 1.5em;
521
521
  overflow: visible; } }
522
- #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
522
+ #toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
523
523
  content: " ";
524
524
  display: none; }
525
525
 
@@ -994,7 +994,7 @@ ol.footnotes-list p,
994
994
  aside.footnote {
995
995
  display: inline; }
996
996
 
997
- ol > li > p:before {
997
+ ol > li > p::before {
998
998
  content: "";
999
999
  display: none; }
1000
1000
 
@@ -38,10 +38,10 @@ q {
38
38
  quotes: none;
39
39
  }
40
40
 
41
- blockquote:before,
42
- blockquote:after,
43
- q:before,
44
- q:after {
41
+ blockquote::before,
42
+ blockquote::after,
43
+ q::before,
44
+ q::after {
45
45
  content: '';
46
46
  content: none;
47
47
  }
@@ -228,7 +228,7 @@ ul>li {
228
228
  list-style: none;
229
229
  }
230
230
 
231
- ul>li>p:first-child:before {
231
+ ul>li>p:first-child::before {
232
232
  content: "\2014";
233
233
  display: inline-block;
234
234
  width: 1em;
@@ -242,7 +242,7 @@ li p {
242
242
  line-height: 1.2;
243
243
  }
244
244
 
245
- #toc li:before {
245
+ #toc li::before {
246
246
  content: " ";
247
247
  display: none;
248
248
  }
@@ -268,7 +268,7 @@ p.Terms {
268
268
  // box-shadow: inset -5px 0px 10px -5px #1d1d1d !important;
269
269
  // }
270
270
 
271
- li:before {
271
+ li::before {
272
272
  content: " ";
273
273
  display: none;
274
274
  }
@@ -655,7 +655,7 @@ aside.footnote {
655
655
  display: inline;
656
656
  }
657
657
 
658
- ol>li>p:before {
658
+ ol>li>p::before {
659
659
  content: "";
660
660
  display: none;
661
661
  }
@@ -5172,7 +5172,7 @@ span.SpellE {
5172
5172
  @list l21:level1 {
5173
5173
  mso-level-number-format: bullet;
5174
5174
  mso-level-style-link: "IEEEStds Unordered List Level 2";
5175
- mso-level-text: ;
5175
+ mso-level-text: ;
5176
5176
  mso-level-tab-stop: none;
5177
5177
  mso-level-number-position: left;
5178
5178
  margin-left: 46.1pt;
@@ -5181,25 +5181,25 @@ span.SpellE {
5181
5181
 
5182
5182
  @list l21:level2 {
5183
5183
  mso-level-number-format: bullet;
5184
- mso-level-text: o;
5184
+ mso-level-text: ;
5185
5185
  mso-level-tab-stop: none;
5186
5186
  mso-level-number-position: left;
5187
5187
  margin-left: 82.1pt;
5188
5188
  text-indent: -18.0pt;
5189
- font-family: "Courier New"; }
5189
+ font-family: Symbol; }
5190
5190
 
5191
5191
  @list l21:level3 {
5192
5192
  mso-level-number-format: bullet;
5193
- mso-level-text: ;
5193
+ mso-level-text: ;
5194
5194
  mso-level-tab-stop: none;
5195
5195
  mso-level-number-position: left;
5196
5196
  margin-left: 118.1pt;
5197
5197
  text-indent: -18.0pt;
5198
- font-family: Wingdings; }
5198
+ font-family: Symbol; }
5199
5199
 
5200
5200
  @list l21:level4 {
5201
5201
  mso-level-number-format: bullet;
5202
- mso-level-text: ;
5202
+ mso-level-text: ;
5203
5203
  mso-level-tab-stop: none;
5204
5204
  mso-level-number-position: left;
5205
5205
  margin-left: 154.1pt;
@@ -5208,25 +5208,25 @@ span.SpellE {
5208
5208
 
5209
5209
  @list l21:level5 {
5210
5210
  mso-level-number-format: bullet;
5211
- mso-level-text: o;
5211
+ mso-level-text: ;
5212
5212
  mso-level-tab-stop: none;
5213
5213
  mso-level-number-position: left;
5214
5214
  margin-left: 190.1pt;
5215
5215
  text-indent: -18.0pt;
5216
- font-family: "Courier New"; }
5216
+ font-family: Symbol; }
5217
5217
 
5218
5218
  @list l21:level6 {
5219
5219
  mso-level-number-format: bullet;
5220
- mso-level-text: ;
5220
+ mso-level-text: ;
5221
5221
  mso-level-tab-stop: none;
5222
5222
  mso-level-number-position: left;
5223
5223
  margin-left: 226.1pt;
5224
5224
  text-indent: -18.0pt;
5225
- font-family: Wingdings; }
5225
+ font-family: Symbol; }
5226
5226
 
5227
5227
  @list l21:level7 {
5228
5228
  mso-level-number-format: bullet;
5229
- mso-level-text: ;
5229
+ mso-level-text: ;
5230
5230
  mso-level-tab-stop: none;
5231
5231
  mso-level-number-position: left;
5232
5232
  margin-left: 262.1pt;
@@ -5235,21 +5235,21 @@ span.SpellE {
5235
5235
 
5236
5236
  @list l21:level8 {
5237
5237
  mso-level-number-format: bullet;
5238
- mso-level-text: o;
5238
+ mso-level-text: ;
5239
5239
  mso-level-tab-stop: none;
5240
5240
  mso-level-number-position: left;
5241
5241
  margin-left: 298.1pt;
5242
5242
  text-indent: -18.0pt;
5243
- font-family: "Courier New"; }
5243
+ font-family: Symbol; }
5244
5244
 
5245
5245
  @list l21:level9 {
5246
5246
  mso-level-number-format: bullet;
5247
- mso-level-text: ;
5247
+ mso-level-text: ;
5248
5248
  mso-level-tab-stop: none;
5249
5249
  mso-level-number-position: left;
5250
5250
  margin-left: 334.1pt;
5251
5251
  text-indent: -18.0pt;
5252
- font-family: Wingdings; }
5252
+ font-family: Symbol; }
5253
5253
 
5254
5254
  @list l20:level1 lfo31 {
5255
5255
  mso-level-start-at: 10; }
@@ -4912,7 +4912,7 @@ span.SpellE
4912
4912
  @list l21:level1
4913
4913
  {mso-level-number-format:bullet;
4914
4914
  mso-level-style-link:"IEEEStds Unordered List Level 2";
4915
- mso-level-text:;
4915
+ mso-level-text:;
4916
4916
  mso-level-tab-stop:none;
4917
4917
  mso-level-number-position:left;
4918
4918
  margin-left:46.1pt;
@@ -4920,23 +4920,23 @@ span.SpellE
4920
4920
  font-family:Symbol;}
4921
4921
  @list l21:level2
4922
4922
  {mso-level-number-format:bullet;
4923
- mso-level-text:o;
4923
+ mso-level-text:;
4924
4924
  mso-level-tab-stop:none;
4925
4925
  mso-level-number-position:left;
4926
4926
  margin-left:82.1pt;
4927
4927
  text-indent:-18.0pt;
4928
- font-family:"Courier New";}
4928
+ font-family:Symbol;}
4929
4929
  @list l21:level3
4930
4930
  {mso-level-number-format:bullet;
4931
- mso-level-text:;
4931
+ mso-level-text:;
4932
4932
  mso-level-tab-stop:none;
4933
4933
  mso-level-number-position:left;
4934
4934
  margin-left:118.1pt;
4935
4935
  text-indent:-18.0pt;
4936
- font-family:Wingdings;}
4936
+ font-family:Symbol;}
4937
4937
  @list l21:level4
4938
4938
  {mso-level-number-format:bullet;
4939
- mso-level-text:;
4939
+ mso-level-text:;
4940
4940
  mso-level-tab-stop:none;
4941
4941
  mso-level-number-position:left;
4942
4942
  margin-left:154.1pt;
@@ -4944,23 +4944,23 @@ span.SpellE
4944
4944
  font-family:Symbol;}
4945
4945
  @list l21:level5
4946
4946
  {mso-level-number-format:bullet;
4947
- mso-level-text:o;
4947
+ mso-level-text:;
4948
4948
  mso-level-tab-stop:none;
4949
4949
  mso-level-number-position:left;
4950
4950
  margin-left:190.1pt;
4951
4951
  text-indent:-18.0pt;
4952
- font-family:"Courier New";}
4952
+ font-family:Symbol;}
4953
4953
  @list l21:level6
4954
4954
  {mso-level-number-format:bullet;
4955
- mso-level-text:;
4955
+ mso-level-text:;
4956
4956
  mso-level-tab-stop:none;
4957
4957
  mso-level-number-position:left;
4958
4958
  margin-left:226.1pt;
4959
4959
  text-indent:-18.0pt;
4960
- font-family:Wingdings;}
4960
+ font-family:Symbol;}
4961
4961
  @list l21:level7
4962
4962
  {mso-level-number-format:bullet;
4963
- mso-level-text:;
4963
+ mso-level-text:;
4964
4964
  mso-level-tab-stop:none;
4965
4965
  mso-level-number-position:left;
4966
4966
  margin-left:262.1pt;
@@ -4968,20 +4968,20 @@ span.SpellE
4968
4968
  font-family:Symbol;}
4969
4969
  @list l21:level8
4970
4970
  {mso-level-number-format:bullet;
4971
- mso-level-text:o;
4971
+ mso-level-text:;
4972
4972
  mso-level-tab-stop:none;
4973
4973
  mso-level-number-position:left;
4974
4974
  margin-left:298.1pt;
4975
4975
  text-indent:-18.0pt;
4976
- font-family:"Courier New";}
4976
+ font-family:Symbol;}
4977
4977
  @list l21:level9
4978
4978
  {mso-level-number-format:bullet;
4979
- mso-level-text:;
4979
+ mso-level-text:;
4980
4980
  mso-level-tab-stop:none;
4981
4981
  mso-level-number-position:left;
4982
4982
  margin-left:334.1pt;
4983
4983
  text-indent:-18.0pt;
4984
- font-family:Wingdings;}
4984
+ font-family:Symbol;}
4985
4985
  @list l20:level1 lfo31
4986
4986
  {mso-level-start-at:10;}
4987
4987
 
@@ -1061,23 +1061,22 @@
1061
1061
  <fo:flow flow-name="xsl-region-body">
1062
1062
  <!-- debugpage=<xsl:copy-of select="."/> -->
1063
1063
 
1064
- <xsl:if test="position() = 1">
1065
-
1064
+ <!-- <xsl:if test="position() = 1">
1065
+
1066
1066
  <xsl:choose>
1067
1067
  <xsl:when test="$current_template = 'draft'">
1068
1068
  <fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
1069
-
1069
+
1070
1070
  <xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
1071
1071
  <xsl:attribute name="font-size">24pt</xsl:attribute>
1072
1072
  </xsl:if>
1073
-
1073
+
1074
1074
  <xsl:copy-of select="$title_prefix"/>
1075
1075
  <xsl:copy-of select="$title"/>
1076
-
1077
- <!-- <xsl:copy-of select="$draft_title_part"/> -->
1076
+
1078
1077
  </fo:block>
1079
1078
  </xsl:when>
1080
-
1079
+
1081
1080
  <xsl:when test="$current_template = 'standard'">
1082
1081
  <fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
1083
1082
  <fo:block font-weight="bold" space-before="13mm">
@@ -1085,30 +1084,21 @@
1085
1084
  </fo:block>
1086
1085
  </fo:block>
1087
1086
  </xsl:when>
1087
+
1088
+ <xsl:otherwise> --><!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
1088
1089
 
1089
- <xsl:otherwise> <!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
1090
-
1091
- <xsl:attribute name="font-family">Calibri Light</xsl:attribute>
1090
+ <!-- <xsl:attribute name="font-family">Calibri Light</xsl:attribute>
1092
1091
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1093
-
1092
+
1094
1093
  <fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
1095
1094
  <xsl:copy-of select="$title"/>
1096
- <!-- <xsl:copy-of select="$draft_title_part"/> -->
1097
1095
  </fo:block>
1098
1096
  <xsl:call-template name="addBlueBox"/>
1099
- <!-- <fo:block font-size="1" margin-top="3mm">
1100
- <fo:instream-foreign-object content-width="57mm" content-height="3mm" scaling="non-uniform" fox:alt-text="Image Box">
1101
- <xsl:call-template name="insertImageBoxSVG">
1102
- <xsl:with-param name="color"><xsl:value-of select="$color_blue"/></xsl:with-param>
1103
- </xsl:call-template>
1104
- </fo:instream-foreign-object>
1105
- </fo:block>
1106
- <fo:block margin-top="12pt" margin-bottom="12pt">&#xa0;</fo:block> -->
1107
- <fo:block margin-bottom="12pt"> </fo:block>
1097
+ <fo:block margin-bottom="12pt">&#xa0;</fo:block>
1108
1098
  </xsl:otherwise>
1109
1099
  </xsl:choose>
1110
-
1111
- </xsl:if>
1100
+
1101
+ </xsl:if> -->
1112
1102
 
1113
1103
  <xsl:apply-templates select="*" mode="page"/>
1114
1104
  <xsl:if test="position() = last()"><fo:block id="lastBlockMain"/></xsl:if>
@@ -1736,6 +1726,32 @@
1736
1726
  </xsl:choose>
1737
1727
  </xsl:template>
1738
1728
 
1729
+ <xsl:template match="ieee:p[@class = 'zzSTDTitle1']" priority="4">
1730
+ <xsl:choose>
1731
+ <xsl:when test="$current_template = 'draft'">
1732
+ <fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
1733
+ <xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
1734
+ <xsl:attribute name="font-size">24pt</xsl:attribute>
1735
+ </xsl:if>
1736
+ <xsl:apply-templates/>
1737
+ </fo:block>
1738
+ </xsl:when>
1739
+ <xsl:when test="$current_template = 'standard'">
1740
+ <fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
1741
+ <xsl:apply-templates/>
1742
+ </fo:block>
1743
+ </xsl:when>
1744
+ <xsl:otherwise> <!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
1745
+
1746
+ <fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
1747
+ <xsl:apply-templates/>
1748
+ </fo:block>
1749
+ <xsl:call-template name="addBlueBox"/>
1750
+ <fo:block margin-bottom="12pt"> </fo:block>
1751
+ </xsl:otherwise>
1752
+ </xsl:choose>
1753
+ </xsl:template>
1754
+
1739
1755
  <xsl:template match="node()">
1740
1756
  <xsl:apply-templates/>
1741
1757
  </xsl:template>
@@ -4056,11 +4072,26 @@
4056
4072
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
4057
4073
  </xsl:if>
4058
4074
 
4059
- <xsl:value-of select="."/>
4075
+ <xsl:variable name="font_family" select="."/>
4060
4076
 
4061
- <xsl:if test="$additional_fonts != ''">
4062
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
4063
- </xsl:if>
4077
+ <xsl:choose>
4078
+ <xsl:when test="$additional_fonts = ''">
4079
+ <xsl:value-of select="$font_family"/>
4080
+ </xsl:when>
4081
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
4082
+ <xsl:choose>
4083
+ <xsl:when test="contains($font_family, ',')">
4084
+ <xsl:value-of select="substring-before($font_family, ',')"/>
4085
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
4086
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
4087
+ </xsl:when>
4088
+ <xsl:otherwise>
4089
+ <xsl:value-of select="$font_family"/>
4090
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
4091
+ </xsl:otherwise>
4092
+ </xsl:choose>
4093
+ </xsl:otherwise>
4094
+ </xsl:choose>
4064
4095
  </xsl:attribute>
4065
4096
  </xsl:when>
4066
4097
  <xsl:otherwise>
@@ -6668,21 +6699,21 @@
6668
6699
 
6669
6700
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
6670
6701
 
6671
- <fo:block xsl:use-attribute-sets="table-note-style">
6702
+ <fo:block xsl:use-attribute-sets="table-note-style">
6672
6703
 
6673
- <xsl:call-template name="refine_table-note-style"/>
6704
+ <xsl:call-template name="refine_table-note-style"/>
6674
6705
 
6675
- <!-- Table's note/example name (NOTE, for example) -->
6676
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
6706
+ <!-- Table's note/example name (NOTE, for example) -->
6707
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
6677
6708
 
6678
- <xsl:call-template name="refine_table-note-name-style"/>
6709
+ <xsl:call-template name="refine_table-note-name-style"/>
6679
6710
 
6680
- <xsl:apply-templates select="*[local-name() = 'name']"/>
6711
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6681
6712
 
6682
- </fo:inline>
6713
+ </fo:inline>
6683
6714
 
6684
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6685
- </fo:block>
6715
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6716
+ </fo:block>
6686
6717
 
6687
6718
  </xsl:template> <!-- table/note -->
6688
6719
 
@@ -7747,6 +7778,9 @@
7747
7778
  <!-- END Definition List -->
7748
7779
  <!-- ===================== -->
7749
7780
 
7781
+ <!-- default: ignore title in sections/p -->
7782
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
7783
+
7750
7784
  <!-- ========================= -->
7751
7785
  <!-- Rich text formatting -->
7752
7786
  <!-- ========================= -->
@@ -9797,8 +9831,12 @@
9797
9831
  <xsl:variable name="isAdded" select="../@added"/>
9798
9832
  <xsl:variable name="isDeleted" select="../@deleted"/>
9799
9833
  <xsl:choose>
9800
- <xsl:when test="ancestor::*[local-name() = 'title']">
9834
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
9801
9835
  <fo:inline padding-left="1mm" padding-right="1mm">
9836
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
9837
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
9838
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
9839
+ </xsl:if>
9802
9840
  <xsl:variable name="src">
9803
9841
  <xsl:call-template name="image_src"/>
9804
9842
  </xsl:variable>
@@ -9831,25 +9869,45 @@
9831
9869
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
9832
9870
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
9833
9871
 
9834
- <xsl:variable name="img_src">
9835
- <xsl:choose>
9836
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
9837
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
9838
- </xsl:choose>
9839
- </xsl:variable>
9872
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
9873
+ <xsl:attribute name="width">
9874
+ <xsl:value-of select="@width"/>
9875
+ </xsl:attribute>
9876
+ </xsl:if>
9840
9877
 
9841
- <xsl:variable name="image_width_effective">
9878
+ <xsl:if test="@height != '' and @height != 'auto'">
9879
+ <xsl:attribute name="height">
9880
+ <xsl:value-of select="@height"/>
9881
+ </xsl:attribute>
9882
+ </xsl:if>
9842
9883
 
9843
- <xsl:value-of select="$width_effective"/>
9884
+ <xsl:choose>
9885
+ <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
9886
+ <xsl:attribute name="scaling">non-uniform</xsl:attribute>
9887
+ </xsl:when>
9888
+ <xsl:otherwise>
9844
9889
 
9845
- </xsl:variable>
9890
+ <xsl:variable name="img_src">
9891
+ <xsl:choose>
9892
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
9893
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
9894
+ </xsl:choose>
9895
+ </xsl:variable>
9846
9896
 
9847
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9848
- <xsl:if test="number($scale) &lt; 100">
9897
+ <xsl:variable name="image_width_effective">
9849
9898
 
9850
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
9899
+ <xsl:value-of select="$width_effective"/>
9851
9900
 
9852
- </xsl:if>
9901
+ </xsl:variable>
9902
+
9903
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9904
+ <xsl:if test="number($scale) &lt; 100">
9905
+
9906
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
9907
+
9908
+ </xsl:if>
9909
+ </xsl:otherwise>
9910
+ </xsl:choose>
9853
9911
 
9854
9912
  </xsl:if>
9855
9913
 
@@ -13544,7 +13602,7 @@
13544
13602
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
13545
13603
  <xsl:apply-templates mode="update_xml_step1"/>
13546
13604
  </xsl:template>
13547
- <xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
13605
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
13548
13606
  <xsl:copy>
13549
13607
  <xsl:copy-of select="@*"/>
13550
13608
  <xsl:apply-templates mode="update_xml_step1"/>