metanorma-itu 2.4.3 → 2.4.4

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: 88c9cda54d65dc977de6157a86d64cb8b3b977a347fe637d813abd77b882c541
4
- data.tar.gz: 16c113945987104a36166192a7eb94d0974ba4b16b68a3330930656de0366c8a
3
+ metadata.gz: b5ec3cdcd778596dec27ae55cc44308d184a8e93180c51085c1ea9e4f4ee8b83
4
+ data.tar.gz: 0de91af4f5b675f4920e6a5c28699edd8de0c2e062c548f0be106ee732dfccc0
5
5
  SHA512:
6
- metadata.gz: 69c3ec98cef4498116163748e8df52e9a916f0c8deaff2a304b22e3833762b484834f76498dd5e790e60692552a8cf6954bb3837ec16686848239ba0159d1ba5
7
- data.tar.gz: c34d03b056b582e885de905006b18c96a5b22bd23cc998882dc9c99a082873e9ee2d55f91f506683e4d68e5b6b89fa45968b9518cdf0465c6d4b1722a4e64e09
6
+ metadata.gz: a18bf663e1a3f340e945021db942703e5b6d2c089a0f635cee55422931f420d94e838009717726a9a11fb58d9474e439b5b9cbb42fc9a018cb107d55a222597f
7
+ data.tar.gz: 1679c63b7d644d6ca96b5a1ed26f66ae275b2159dca9f84b00b06480df8c1f3d48353a58ef08113242df7d574b64c3739479d32df072624459093420fa9f1a7e
@@ -43,7 +43,8 @@
43
43
 
44
44
  <div class="doc-info-left">
45
45
  <div class="doc-identifier">
46
- {% if doctype != "Recommendation" %}{{doctype }} {% endif %}{{ docnumeric }}
46
+ {% if collectiontitle %}<div>{{ collectiontitle}}</div>{%endif%}
47
+ <div>{% if doctype != "Recommendation" %}{{doctype }} {% endif %}{{ docnumeric }}</div>
47
48
  {% if amendmentid %}<div class="doc-subidentifier">{{ amendmentid }}</div>{% endif %}
48
49
  {% if corrigendumid %}<div class="doc-subidentifier">{{ corrigendumid }}</div>{% endif %}
49
50
  {% if edition %} <div> Revision {{ edition }}</div> {% endif %}
@@ -59,9 +60,11 @@
59
60
  </div>
60
61
 
61
62
  <div class="doc-category">
62
- {% if bureau == "T" %}Telecommunication <br/>Standardization Sector <br/>of ITU{% endif %}
63
- {% if bureau == "D" %}Telecommunication <br/>Development Sector <br/>of ITU{% endif %}
64
- {% if bureau == "R" %}Radiocommunication <br/>Sector of ITU{% endif %}
63
+ {% if sector %}{{sector}}{%else%}
64
+ {% if bureau == "T" %}{{ labels["tsb_full"] }}{% endif %}
65
+ {% if bureau == "D" %}{{ labels["bdt_full"] }}{% endif %}
66
+ {% if bureau == "R" %}{{ labels["br_full"] }}{% endif %}
67
+ {%endif%}
65
68
  </div>
66
69
 
67
70
  <div class="coverpage-title">
@@ -223,44 +223,27 @@
223
223
  width="95" colspan="2"><p class='MsoNormal'>&#xA0;</p></td>
224
224
  <td width="303" colspan="2" valign="top" style='width:227.45pt;padding:0cm 4.25pt 0cm 4.25pt;
225
225
  height:48.7pt'>
226
- {% if bureau == "T" %}
227
- <p class="MsoNormal" align="left" style='text-align:left'><span style='mso-bookmark:
228
- _Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
229
- mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>TELECOMMUNICATION</span></span><span
230
- style='mso-bookmark:_Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;
231
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'><br/>
232
- </span></span><span style='mso-bookmark:_Hlk526346232'><span lang="EN-US"
233
- style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:
234
- "Times New Roman";mso-ansi-language:EN-US'>STANDARDIZATION SECTOR<br/>
235
- OF ITU</span></span><span style='mso-bookmark:_Hlk526346232'><b
236
- style='mso-bidi-font-weight:normal'><span lang="EN-US" style='font-size:10.0pt;
237
- mso-ansi-language:EN-US'><o:p></o:p></span></b></span></p>
226
+
227
+ {% if sector %}
228
+ <p class="MsoNormal" align="left" style='text-align:left'>
229
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
230
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ sector }}</span></p>
231
+ {% else %}
232
+ {% if bureau == "T" %}
233
+ <p class="MsoNormal" align="left" style='text-align:left'>
234
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
235
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ labels["tsb_full"] }}</span></p>
238
236
  {% endif %}
239
237
  {% if bureau == "D" %}
240
- <p class="MsoNormal" align="left" style='text-align:left'><span style='mso-bookmark:
241
- _Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
242
- mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>TELECOMMUNICATION</span></span><span
243
- style='mso-bookmark:_Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;
244
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'><br/>
245
- </span></span><span style='mso-bookmark:_Hlk526346232'><span lang="EN-US"
246
- style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:
247
- "Times New Roman";mso-ansi-language:EN-US'>DEVELOPMENT SECTOR<br/>
248
- OF ITU</span></span><span style='mso-bookmark:_Hlk526346232'><b
249
- style='mso-bidi-font-weight:normal'><span lang="EN-US" style='font-size:10.0pt;
250
- mso-ansi-language:EN-US'><o:p></o:p></span></b></span></p>
238
+ <p class="MsoNormal" align="left" style='text-align:left'>
239
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
240
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ labels["bdt_full"] }}</span></p>
251
241
  {% endif %}
252
242
  {% if bureau == "R" %}
253
- <p class="MsoNormal" align="left" style='text-align:left'><span style='mso-bookmark:
254
- _Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
255
- mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>RADIOCOMMUNICATION</span></span><span
256
- style='mso-bookmark:_Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;
257
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'><br/>
258
- </span></span><span style='mso-bookmark:_Hlk526346232'><span lang="EN-US"
259
- style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:
260
- "Times New Roman";mso-ansi-language:EN-US'>SECTOR<br/>
261
- OF ITU</span></span><span style='mso-bookmark:_Hlk526346232'><b
262
- style='mso-bidi-font-weight:normal'><span lang="EN-US" style='font-size:10.0pt;
263
- mso-ansi-language:EN-US'><o:p></o:p></span></b></span></p>
243
+ <p class="MsoNormal" align="left" style='text-align:left'>
244
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
245
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ labels["br_full"] }}</span></p>
246
+ {% endif %}
264
247
  {% endif %}
265
248
 
266
249
  </td>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>
@@ -9284,16 +9284,44 @@
9284
9284
  </xsl:choose>
9285
9285
 
9286
9286
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9287
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
9288
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
9287
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
9288
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
9289
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
9290
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
9291
+
9292
+ <!-- Example: -->
9289
9293
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
9290
9294
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
9291
9295
  <!-- effective height / width = 1.48, 1.4 - with title -->
9292
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
9296
+
9297
+ <xsl:variable name="scale_x">
9298
+ <xsl:choose>
9299
+ <xsl:when test="$svg_width &gt; $width_effective_px">
9300
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
9301
+ </xsl:when>
9302
+ <xsl:otherwise>1</xsl:otherwise>
9303
+ </xsl:choose>
9304
+ </xsl:variable>
9305
+ <xsl:variable name="scale_y">
9306
+ <xsl:choose>
9307
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
9308
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
9309
+ </xsl:when>
9310
+ <xsl:otherwise>1</xsl:otherwise>
9311
+ </xsl:choose>
9312
+ </xsl:variable>
9313
+
9314
+ <!-- for images with big height -->
9315
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
9293
9316
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
9294
9317
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
9295
- </xsl:if>
9318
+ </xsl:if> -->
9296
9319
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9320
+
9321
+ <xsl:if test="$scale_y != 1">
9322
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
9323
+ </xsl:if>
9324
+
9297
9325
  <xsl:copy-of select="$svg_content"/>
9298
9326
  </fo:instream-foreign-object>
9299
9327
  <!-- </fo:block> -->
@@ -11452,7 +11480,9 @@
11452
11480
  </xsl:template> <!-- sections_element_style -->
11453
11481
 
11454
11482
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11455
- <fo:block break-after="page"/>
11483
+
11484
+ <fo:block break-after="page"/>
11485
+
11456
11486
  <fo:block>
11457
11487
  <xsl:call-template name="setId"/>
11458
11488
  <xsl:apply-templates/>
@@ -11523,7 +11553,7 @@
11523
11553
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11524
11554
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11525
11555
  </xsl:when>
11526
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11556
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11527
11557
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11528
11558
  </xsl:when>
11529
11559
  </xsl:choose>