metanorma-un 0.12.4 → 0.12.5

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: 6a6a30ba559e99be775cb5171f13cd196f8a2f3f47416c6fe5125d4a3b2ae158
4
- data.tar.gz: 5247a58efec6e008bbbe5e30bfd6838662e0c066d1105a8765c5c18d2e71381b
3
+ metadata.gz: 2ea1d0a3c64d0112d31b61f1ea0bccf373a6b56140c824dba7fa8013d30c50c9
4
+ data.tar.gz: bba26136fc35c6f240f631bf70996c1e36b510ad555421e3c07a1221821680c0
5
5
  SHA512:
6
- metadata.gz: 675bb2c90ca90d8e4c3401b5f14f0231a36370277d241bd3779499ba1d51ab6d327cbba318d3c19e9675cd9a33c911f7a87cf048d77c0540f3da9fd1c8f5762b
7
- data.tar.gz: a5ed94230bf8b0a1bf4c2de826717cd1a07ee0ff2eb68a1e258aa57e64ed7f5db2e04e46cbfc86b7d1d99a6acb0c9a4e674e6d164cf5059a199af4ba510bd118
6
+ metadata.gz: cb9884d76badbeb5d8f61e60dbe379ec1c1580fb1758ec2649ed36c6cbd8760b7533536dd129c53f9d9c6aa27c101c90dbd70d5c248070ad81eb994721aea4dc
7
+ data.tar.gz: c98cfb6f6fe725362740900f1dbabe87b8d88197db2740559f31ed1d47c2fca79a0853749195a8e48a89a9540b215d7cf0f9e3b628f02e01b66592b89b165abe
@@ -4978,7 +4978,8 @@
4978
4978
  </xsl:template>
4979
4979
 
4980
4980
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4981
- <xsl:variable name="text" select="normalize-space(.)"/>
4981
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
4982
+ <xsl:variable name="text" select="."/>
4982
4983
  <fo:inline font-size="75%" role="SKIP">
4983
4984
  <xsl:if test="string-length($text) &gt; 0">
4984
4985
  <xsl:variable name="smallCapsText">
@@ -7126,16 +7127,44 @@
7126
7127
  </xsl:choose>
7127
7128
 
7128
7129
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7129
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7130
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
7130
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
7131
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
7132
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
7133
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
7134
+
7135
+ <!-- Example: -->
7131
7136
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
7132
7137
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
7133
7138
  <!-- effective height / width = 1.48, 1.4 - with title -->
7134
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
7139
+
7140
+ <xsl:variable name="scale_x">
7141
+ <xsl:choose>
7142
+ <xsl:when test="$svg_width &gt; $width_effective_px">
7143
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
7144
+ </xsl:when>
7145
+ <xsl:otherwise>1</xsl:otherwise>
7146
+ </xsl:choose>
7147
+ </xsl:variable>
7148
+ <xsl:variable name="scale_y">
7149
+ <xsl:choose>
7150
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
7151
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
7152
+ </xsl:when>
7153
+ <xsl:otherwise>1</xsl:otherwise>
7154
+ </xsl:choose>
7155
+ </xsl:variable>
7156
+
7157
+ <!-- for images with big height -->
7158
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
7135
7159
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
7136
7160
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
7137
- </xsl:if>
7161
+ </xsl:if> -->
7138
7162
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7163
+
7164
+ <xsl:if test="$scale_y != 1">
7165
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
7166
+ </xsl:if>
7167
+
7139
7168
  <xsl:copy-of select="$svg_content"/>
7140
7169
  </fo:instream-foreign-object>
7141
7170
  <!-- </fo:block> -->
@@ -7173,8 +7202,12 @@
7173
7202
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
7174
7203
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
7175
7204
 
7205
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
7206
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
7207
+
7176
7208
  <xsl:attribute name="width">
7177
7209
  <xsl:choose>
7210
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7178
7211
  <xsl:when test="$width != ''">
7179
7212
  <xsl:value-of select="round($width)"/>
7180
7213
  </xsl:when>
@@ -7183,6 +7216,7 @@
7183
7216
  </xsl:attribute>
7184
7217
  <xsl:attribute name="height">
7185
7218
  <xsl:choose>
7219
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7186
7220
  <xsl:when test="$height != ''">
7187
7221
  <xsl:value-of select="round($height)"/>
7188
7222
  </xsl:when>
@@ -7194,6 +7228,28 @@
7194
7228
  </xsl:copy>
7195
7229
  </xsl:template>
7196
7230
 
7231
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
7232
+ <!-- image[@width]/svg -->
7233
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
7234
+ <xsl:attribute name="width">
7235
+ <xsl:choose>
7236
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7237
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7238
+ </xsl:choose>
7239
+ </xsl:attribute>
7240
+ </xsl:template>
7241
+
7242
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
7243
+ <!-- image[@height]/svg -->
7244
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
7245
+ <xsl:attribute name="height">
7246
+ <xsl:choose>
7247
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7248
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7249
+ </xsl:choose>
7250
+ </xsl:attribute>
7251
+ </xsl:template>
7252
+
7197
7253
  <!-- regex for 'display: inline-block;' -->
7198
7254
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
7199
7255
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -9263,7 +9319,9 @@
9263
9319
  </xsl:template> <!-- sections_element_style -->
9264
9320
 
9265
9321
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9266
- <fo:block break-after="page"/>
9322
+
9323
+ <fo:block break-after="page"/>
9324
+
9267
9325
  <fo:block>
9268
9326
  <xsl:call-template name="setId"/>
9269
9327
  <xsl:apply-templates/>
@@ -9335,7 +9393,7 @@
9335
9393
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9336
9394
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9337
9395
  </xsl:when>
9338
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9396
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9339
9397
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9340
9398
  </xsl:when>
9341
9399
  </xsl:choose>
@@ -4978,7 +4978,8 @@
4978
4978
  </xsl:template>
4979
4979
 
4980
4980
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4981
- <xsl:variable name="text" select="normalize-space(.)"/>
4981
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
4982
+ <xsl:variable name="text" select="."/>
4982
4983
  <fo:inline font-size="75%" role="SKIP">
4983
4984
  <xsl:if test="string-length($text) &gt; 0">
4984
4985
  <xsl:variable name="smallCapsText">
@@ -7126,16 +7127,44 @@
7126
7127
  </xsl:choose>
7127
7128
 
7128
7129
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7129
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7130
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
7130
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
7131
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
7132
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
7133
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
7134
+
7135
+ <!-- Example: -->
7131
7136
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
7132
7137
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
7133
7138
  <!-- effective height / width = 1.48, 1.4 - with title -->
7134
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
7139
+
7140
+ <xsl:variable name="scale_x">
7141
+ <xsl:choose>
7142
+ <xsl:when test="$svg_width &gt; $width_effective_px">
7143
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
7144
+ </xsl:when>
7145
+ <xsl:otherwise>1</xsl:otherwise>
7146
+ </xsl:choose>
7147
+ </xsl:variable>
7148
+ <xsl:variable name="scale_y">
7149
+ <xsl:choose>
7150
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
7151
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
7152
+ </xsl:when>
7153
+ <xsl:otherwise>1</xsl:otherwise>
7154
+ </xsl:choose>
7155
+ </xsl:variable>
7156
+
7157
+ <!-- for images with big height -->
7158
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
7135
7159
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
7136
7160
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
7137
- </xsl:if>
7161
+ </xsl:if> -->
7138
7162
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7163
+
7164
+ <xsl:if test="$scale_y != 1">
7165
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
7166
+ </xsl:if>
7167
+
7139
7168
  <xsl:copy-of select="$svg_content"/>
7140
7169
  </fo:instream-foreign-object>
7141
7170
  <!-- </fo:block> -->
@@ -7173,8 +7202,12 @@
7173
7202
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
7174
7203
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
7175
7204
 
7205
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
7206
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
7207
+
7176
7208
  <xsl:attribute name="width">
7177
7209
  <xsl:choose>
7210
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7178
7211
  <xsl:when test="$width != ''">
7179
7212
  <xsl:value-of select="round($width)"/>
7180
7213
  </xsl:when>
@@ -7183,6 +7216,7 @@
7183
7216
  </xsl:attribute>
7184
7217
  <xsl:attribute name="height">
7185
7218
  <xsl:choose>
7219
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7186
7220
  <xsl:when test="$height != ''">
7187
7221
  <xsl:value-of select="round($height)"/>
7188
7222
  </xsl:when>
@@ -7194,6 +7228,28 @@
7194
7228
  </xsl:copy>
7195
7229
  </xsl:template>
7196
7230
 
7231
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
7232
+ <!-- image[@width]/svg -->
7233
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
7234
+ <xsl:attribute name="width">
7235
+ <xsl:choose>
7236
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7237
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7238
+ </xsl:choose>
7239
+ </xsl:attribute>
7240
+ </xsl:template>
7241
+
7242
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
7243
+ <!-- image[@height]/svg -->
7244
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
7245
+ <xsl:attribute name="height">
7246
+ <xsl:choose>
7247
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7248
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7249
+ </xsl:choose>
7250
+ </xsl:attribute>
7251
+ </xsl:template>
7252
+
7197
7253
  <!-- regex for 'display: inline-block;' -->
7198
7254
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
7199
7255
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -9263,7 +9319,9 @@
9263
9319
  </xsl:template> <!-- sections_element_style -->
9264
9320
 
9265
9321
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9266
- <fo:block break-after="page"/>
9322
+
9323
+ <fo:block break-after="page"/>
9324
+
9267
9325
  <fo:block>
9268
9326
  <xsl:call-template name="setId"/>
9269
9327
  <xsl:apply-templates/>
@@ -9335,7 +9393,7 @@
9335
9393
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9336
9394
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9337
9395
  </xsl:when>
9338
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9396
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9339
9397
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9340
9398
  </xsl:when>
9341
9399
  </xsl:choose>
@@ -5105,7 +5105,8 @@
5105
5105
  </xsl:template>
5106
5106
 
5107
5107
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5108
- <xsl:variable name="text" select="normalize-space(.)"/>
5108
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
5109
+ <xsl:variable name="text" select="."/>
5109
5110
  <fo:inline font-size="75%" role="SKIP">
5110
5111
  <xsl:if test="string-length($text) &gt; 0">
5111
5112
  <xsl:variable name="smallCapsText">
@@ -7253,16 +7254,44 @@
7253
7254
  </xsl:choose>
7254
7255
 
7255
7256
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7256
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7257
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
7257
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
7258
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
7259
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
7260
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
7261
+
7262
+ <!-- Example: -->
7258
7263
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
7259
7264
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
7260
7265
  <!-- effective height / width = 1.48, 1.4 - with title -->
7261
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
7266
+
7267
+ <xsl:variable name="scale_x">
7268
+ <xsl:choose>
7269
+ <xsl:when test="$svg_width &gt; $width_effective_px">
7270
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
7271
+ </xsl:when>
7272
+ <xsl:otherwise>1</xsl:otherwise>
7273
+ </xsl:choose>
7274
+ </xsl:variable>
7275
+ <xsl:variable name="scale_y">
7276
+ <xsl:choose>
7277
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
7278
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
7279
+ </xsl:when>
7280
+ <xsl:otherwise>1</xsl:otherwise>
7281
+ </xsl:choose>
7282
+ </xsl:variable>
7283
+
7284
+ <!-- for images with big height -->
7285
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
7262
7286
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
7263
7287
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
7264
- </xsl:if>
7288
+ </xsl:if> -->
7265
7289
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7290
+
7291
+ <xsl:if test="$scale_y != 1">
7292
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
7293
+ </xsl:if>
7294
+
7266
7295
  <xsl:copy-of select="$svg_content"/>
7267
7296
  </fo:instream-foreign-object>
7268
7297
  <!-- </fo:block> -->
@@ -7300,8 +7329,12 @@
7300
7329
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
7301
7330
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
7302
7331
 
7332
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
7333
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
7334
+
7303
7335
  <xsl:attribute name="width">
7304
7336
  <xsl:choose>
7337
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7305
7338
  <xsl:when test="$width != ''">
7306
7339
  <xsl:value-of select="round($width)"/>
7307
7340
  </xsl:when>
@@ -7310,6 +7343,7 @@
7310
7343
  </xsl:attribute>
7311
7344
  <xsl:attribute name="height">
7312
7345
  <xsl:choose>
7346
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7313
7347
  <xsl:when test="$height != ''">
7314
7348
  <xsl:value-of select="round($height)"/>
7315
7349
  </xsl:when>
@@ -7321,6 +7355,28 @@
7321
7355
  </xsl:copy>
7322
7356
  </xsl:template>
7323
7357
 
7358
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
7359
+ <!-- image[@width]/svg -->
7360
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
7361
+ <xsl:attribute name="width">
7362
+ <xsl:choose>
7363
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7364
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7365
+ </xsl:choose>
7366
+ </xsl:attribute>
7367
+ </xsl:template>
7368
+
7369
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
7370
+ <!-- image[@height]/svg -->
7371
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
7372
+ <xsl:attribute name="height">
7373
+ <xsl:choose>
7374
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7375
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7376
+ </xsl:choose>
7377
+ </xsl:attribute>
7378
+ </xsl:template>
7379
+
7324
7380
  <!-- regex for 'display: inline-block;' -->
7325
7381
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
7326
7382
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -9390,7 +9446,9 @@
9390
9446
  </xsl:template> <!-- sections_element_style -->
9391
9447
 
9392
9448
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9393
- <fo:block break-after="page"/>
9449
+
9450
+ <fo:block break-after="page"/>
9451
+
9394
9452
  <fo:block>
9395
9453
  <xsl:call-template name="setId"/>
9396
9454
  <xsl:apply-templates/>
@@ -9462,7 +9520,7 @@
9462
9520
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9463
9521
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9464
9522
  </xsl:when>
9465
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9523
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9466
9524
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9467
9525
  </xsl:when>
9468
9526
  </xsl:choose>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.12.4".freeze
3
+ VERSION = "0.12.5".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4
4
+ version: 0.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-04 00:00:00.000000000 Z
11
+ date: 2024-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639