Skip to content

Commit bb1d59e

Browse files
xslt update based on metanorma/mn-native-pdf@5e5d046
1 parent 4e008c2 commit bb1d59e

9 files changed

+72
-36
lines changed

lib/isodoc/itu/itu.implementers-guide.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

lib/isodoc/itu/itu.in-force.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

lib/isodoc/itu/itu.recommendation-annex.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

lib/isodoc/itu/itu.recommendation-supplement.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

lib/isodoc/itu/itu.recommendation.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

lib/isodoc/itu/itu.resolution.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

lib/isodoc/itu/itu.service-publication.xsl

+8-4
Original file line numberDiff line numberDiff line change
@@ -9301,6 +9301,8 @@
93019301
</xsl:attribute>
93029302
</xsl:template>
93039303

9304+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
9305+
93049306
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
93059307
<xsl:copy>
93069308
<xsl:apply-templates select="@*" mode="svg_update"/>
@@ -9319,7 +9321,8 @@
93199321

93209322
<xsl:attribute name="width">
93219323
<xsl:choose>
9322-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9324+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9325+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93239326
<xsl:when test="$width != ''">
93249327
<xsl:value-of select="round($width)"/>
93259328
</xsl:when>
@@ -9328,7 +9331,8 @@
93289331
</xsl:attribute>
93299332
<xsl:attribute name="height">
93309333
<xsl:choose>
9331-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9334+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
9335+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93329336
<xsl:when test="$height != ''">
93339337
<xsl:value-of select="round($height)"/>
93349338
</xsl:when>
@@ -9345,7 +9349,7 @@
93459349
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
93469350
<xsl:attribute name="width">
93479351
<xsl:choose>
9348-
<xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9352+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
93499353
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93509354
</xsl:choose>
93519355
</xsl:attribute>
@@ -9356,7 +9360,7 @@
93569360
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
93579361
<xsl:attribute name="height">
93589362
<xsl:choose>
9359-
<xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9363+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
93609364
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
93619365
</xsl:choose>
93629366
</xsl:attribute>

0 commit comments

Comments
 (0)