metanorma-bipm 2.4.6 → 2.4.7
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 +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +129 -30
- data/lib/isodoc/bipm/bipm.guide.xsl +129 -30
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +129 -30
- data/lib/isodoc/bipm/bipm.rapport.xsl +129 -30
- data/lib/isodoc/bipm/jcgm.standard.xsl +129 -30
- data/lib/metanorma/bipm/biblio.rng +22 -23
- data/lib/metanorma/bipm/isodoc.rng +37 -116
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876d0c08428a0b610702a31bc81f0abc40e9d6971499b3ab38bebb1959702ae4
|
4
|
+
data.tar.gz: cc408bfe1f6ba24ddb238479073a58e943953359548650b134bd002562ea1822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58da984950bbdaf3321b18c8a0164921d4dd1802636c3761992caad1bce8de8cd2961ac558dc7d87f04f964ad018a2f3ced1cfcd360fc8e7c9fda36abeeab3ff
|
7
|
+
data.tar.gz: ce5701587a038e45d1f327a6597da194bb1a8585d283414cf6d9829fd58cf011a743fc35b2afc1b7522ef541f7b94a1bc8c60c4248810fac749d457c9586ea87
|
@@ -10204,10 +10204,11 @@
|
|
10204
10204
|
</xsl:template>
|
10205
10205
|
|
10206
10206
|
<xsl:template match="*[local-name() = 'image']">
|
10207
|
+
<xsl:param name="indent">0</xsl:param>
|
10207
10208
|
<xsl:variable name="isAdded" select="../@added"/>
|
10208
10209
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
10209
10210
|
<xsl:choose>
|
10210
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
10211
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
10211
10212
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
10212
10213
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
10213
10214
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -10216,7 +10217,43 @@
|
|
10216
10217
|
<xsl:variable name="src">
|
10217
10218
|
<xsl:call-template name="image_src"/>
|
10218
10219
|
</xsl:variable>
|
10219
|
-
|
10220
|
+
|
10221
|
+
<xsl:variable name="scale">
|
10222
|
+
<xsl:call-template name="getImageScale">
|
10223
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10224
|
+
</xsl:call-template>
|
10225
|
+
</xsl:variable>
|
10226
|
+
|
10227
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
10228
|
+
|
10229
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
10230
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
10231
|
+
|
10232
|
+
<xsl:variable name="width">
|
10233
|
+
<xsl:call-template name="setImageWidth"/>
|
10234
|
+
</xsl:variable>
|
10235
|
+
<xsl:if test="$width != ''">
|
10236
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
10237
|
+
</xsl:if>
|
10238
|
+
<xsl:variable name="height">
|
10239
|
+
<xsl:call-template name="setImageHeight"/>
|
10240
|
+
</xsl:variable>
|
10241
|
+
<xsl:if test="$height != ''">
|
10242
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
10243
|
+
</xsl:if>
|
10244
|
+
|
10245
|
+
<xsl:if test="$width = '' and $height = ''">
|
10246
|
+
<xsl:if test="number($scale) < 100">
|
10247
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
10248
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
10249
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
10250
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
10251
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
10252
|
+
</xsl:if>
|
10253
|
+
</xsl:if>
|
10254
|
+
|
10255
|
+
</fo:external-graphic>
|
10256
|
+
|
10220
10257
|
</fo:inline>
|
10221
10258
|
</xsl:when>
|
10222
10259
|
<xsl:otherwise>
|
@@ -10237,25 +10274,23 @@
|
|
10237
10274
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
10238
10275
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
10239
10276
|
|
10240
|
-
|
10277
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
10241
10278
|
|
10242
10279
|
</fo:instream-foreign-object>
|
10243
10280
|
</xsl:when>
|
10244
10281
|
<xsl:otherwise>
|
10282
|
+
<!-- <fo:block>debug block image:
|
10283
|
+
<xsl:variable name="scale">
|
10284
|
+
<xsl:call-template name="getImageScale">
|
10285
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10286
|
+
</xsl:call-template>
|
10287
|
+
</xsl:variable>
|
10288
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
10289
|
+
</fo:block> -->
|
10245
10290
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
10246
10291
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
10247
10292
|
|
10248
|
-
<xsl:
|
10249
|
-
<xsl:attribute name="width">
|
10250
|
-
<xsl:value-of select="@width"/>
|
10251
|
-
</xsl:attribute>
|
10252
|
-
</xsl:if>
|
10253
|
-
|
10254
|
-
<xsl:if test="@height != '' and @height != 'auto'">
|
10255
|
-
<xsl:attribute name="height">
|
10256
|
-
<xsl:value-of select="@height"/>
|
10257
|
-
</xsl:attribute>
|
10258
|
-
</xsl:if>
|
10293
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
10259
10294
|
|
10260
10295
|
<xsl:choose>
|
10261
10296
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -10263,24 +10298,18 @@
|
|
10263
10298
|
</xsl:when>
|
10264
10299
|
<xsl:otherwise>
|
10265
10300
|
|
10266
|
-
<xsl:variable name="
|
10267
|
-
<xsl:
|
10268
|
-
<xsl:
|
10269
|
-
|
10270
|
-
</xsl:choose>
|
10301
|
+
<xsl:variable name="scale">
|
10302
|
+
<xsl:call-template name="getImageScale">
|
10303
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10304
|
+
</xsl:call-template>
|
10271
10305
|
</xsl:variable>
|
10272
10306
|
|
10273
|
-
<xsl:variable name="
|
10274
|
-
|
10275
|
-
<xsl:value-of select="$width_effective"/>
|
10276
|
-
|
10307
|
+
<xsl:variable name="scaleRatio">
|
10308
|
+
1
|
10277
10309
|
</xsl:variable>
|
10278
10310
|
|
10279
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10280
10311
|
<xsl:if test="number($scale) < 100">
|
10281
|
-
|
10282
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
10283
|
-
|
10312
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
10284
10313
|
</xsl:if>
|
10285
10314
|
</xsl:otherwise>
|
10286
10315
|
</xsl:choose>
|
@@ -10296,6 +10325,62 @@
|
|
10296
10325
|
</xsl:choose>
|
10297
10326
|
</xsl:template>
|
10298
10327
|
|
10328
|
+
<xsl:template name="setImageWidth">
|
10329
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
10330
|
+
<xsl:value-of select="@width"/>
|
10331
|
+
</xsl:if>
|
10332
|
+
</xsl:template>
|
10333
|
+
<xsl:template name="setImageHeight">
|
10334
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
10335
|
+
<xsl:value-of select="@height"/>
|
10336
|
+
</xsl:if>
|
10337
|
+
</xsl:template>
|
10338
|
+
<xsl:template name="setImageWidthHeight">
|
10339
|
+
<xsl:variable name="width">
|
10340
|
+
<xsl:call-template name="setImageWidth"/>
|
10341
|
+
</xsl:variable>
|
10342
|
+
<xsl:if test="$width != ''">
|
10343
|
+
<xsl:attribute name="width">
|
10344
|
+
<xsl:value-of select="$width"/>
|
10345
|
+
</xsl:attribute>
|
10346
|
+
</xsl:if>
|
10347
|
+
<xsl:variable name="height">
|
10348
|
+
<xsl:call-template name="setImageHeight"/>
|
10349
|
+
</xsl:variable>
|
10350
|
+
<xsl:if test="$height != ''">
|
10351
|
+
<xsl:attribute name="height">
|
10352
|
+
<xsl:value-of select="$height"/>
|
10353
|
+
</xsl:attribute>
|
10354
|
+
</xsl:if>
|
10355
|
+
</xsl:template>
|
10356
|
+
|
10357
|
+
<xsl:template name="getImageScale">
|
10358
|
+
<xsl:param name="indent"/>
|
10359
|
+
<xsl:variable name="indent_left">
|
10360
|
+
<xsl:choose>
|
10361
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
10362
|
+
<xsl:otherwise>0</xsl:otherwise>
|
10363
|
+
</xsl:choose>
|
10364
|
+
</xsl:variable>
|
10365
|
+
<xsl:variable name="img_src">
|
10366
|
+
<xsl:choose>
|
10367
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
10368
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10369
|
+
</xsl:choose>
|
10370
|
+
</xsl:variable>
|
10371
|
+
|
10372
|
+
<xsl:variable name="image_width_effective">
|
10373
|
+
|
10374
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
10375
|
+
|
10376
|
+
</xsl:variable>
|
10377
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
10378
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
10379
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
10380
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10381
|
+
<xsl:value-of select="$scale"/>
|
10382
|
+
</xsl:template>
|
10383
|
+
|
10299
10384
|
<xsl:template name="image_src">
|
10300
10385
|
<xsl:choose>
|
10301
10386
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -12990,6 +13075,7 @@
|
|
12990
13075
|
</xsl:template>
|
12991
13076
|
|
12992
13077
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
13078
|
+
<xsl:param name="indent">0</xsl:param>
|
12993
13079
|
<xsl:choose>
|
12994
13080
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
12995
13081
|
<fo:block-container role="SKIP">
|
@@ -13004,7 +13090,9 @@
|
|
13004
13090
|
|
13005
13091
|
<fo:block-container margin-left="0mm" role="SKIP">
|
13006
13092
|
<fo:block>
|
13007
|
-
<xsl:apply-templates select="." mode="list"
|
13093
|
+
<xsl:apply-templates select="." mode="list">
|
13094
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13095
|
+
</xsl:apply-templates>
|
13008
13096
|
</fo:block>
|
13009
13097
|
</fo:block-container>
|
13010
13098
|
</fo:block-container>
|
@@ -13012,7 +13100,9 @@
|
|
13012
13100
|
<xsl:otherwise>
|
13013
13101
|
|
13014
13102
|
<fo:block role="SKIP">
|
13015
|
-
<xsl:apply-templates select="." mode="list"
|
13103
|
+
<xsl:apply-templates select="." mode="list">
|
13104
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13105
|
+
</xsl:apply-templates>
|
13016
13106
|
</fo:block>
|
13017
13107
|
|
13018
13108
|
</xsl:otherwise>
|
@@ -13099,6 +13189,13 @@
|
|
13099
13189
|
</xsl:template>
|
13100
13190
|
|
13101
13191
|
<xsl:template match="*[local-name()='li']">
|
13192
|
+
<xsl:param name="indent">0</xsl:param>
|
13193
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
13194
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
13195
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
13196
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
13197
|
+
</fo:list-item-body>
|
13198
|
+
</fo:list-item> -->
|
13102
13199
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
13103
13200
|
<xsl:copy-of select="@id"/>
|
13104
13201
|
|
@@ -13123,7 +13220,9 @@
|
|
13123
13220
|
|
13124
13221
|
<xsl:call-template name="refine_list-item-body-style"/>
|
13125
13222
|
|
13126
|
-
<xsl:apply-templates
|
13223
|
+
<xsl:apply-templates>
|
13224
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13225
|
+
</xsl:apply-templates>
|
13127
13226
|
|
13128
13227
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
13129
13228
|
|
@@ -10204,10 +10204,11 @@
|
|
10204
10204
|
</xsl:template>
|
10205
10205
|
|
10206
10206
|
<xsl:template match="*[local-name() = 'image']">
|
10207
|
+
<xsl:param name="indent">0</xsl:param>
|
10207
10208
|
<xsl:variable name="isAdded" select="../@added"/>
|
10208
10209
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
10209
10210
|
<xsl:choose>
|
10210
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
10211
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
10211
10212
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
10212
10213
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
10213
10214
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -10216,7 +10217,43 @@
|
|
10216
10217
|
<xsl:variable name="src">
|
10217
10218
|
<xsl:call-template name="image_src"/>
|
10218
10219
|
</xsl:variable>
|
10219
|
-
|
10220
|
+
|
10221
|
+
<xsl:variable name="scale">
|
10222
|
+
<xsl:call-template name="getImageScale">
|
10223
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10224
|
+
</xsl:call-template>
|
10225
|
+
</xsl:variable>
|
10226
|
+
|
10227
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
10228
|
+
|
10229
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
10230
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
10231
|
+
|
10232
|
+
<xsl:variable name="width">
|
10233
|
+
<xsl:call-template name="setImageWidth"/>
|
10234
|
+
</xsl:variable>
|
10235
|
+
<xsl:if test="$width != ''">
|
10236
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
10237
|
+
</xsl:if>
|
10238
|
+
<xsl:variable name="height">
|
10239
|
+
<xsl:call-template name="setImageHeight"/>
|
10240
|
+
</xsl:variable>
|
10241
|
+
<xsl:if test="$height != ''">
|
10242
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
10243
|
+
</xsl:if>
|
10244
|
+
|
10245
|
+
<xsl:if test="$width = '' and $height = ''">
|
10246
|
+
<xsl:if test="number($scale) < 100">
|
10247
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
10248
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
10249
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
10250
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
10251
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
10252
|
+
</xsl:if>
|
10253
|
+
</xsl:if>
|
10254
|
+
|
10255
|
+
</fo:external-graphic>
|
10256
|
+
|
10220
10257
|
</fo:inline>
|
10221
10258
|
</xsl:when>
|
10222
10259
|
<xsl:otherwise>
|
@@ -10237,25 +10274,23 @@
|
|
10237
10274
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
10238
10275
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
10239
10276
|
|
10240
|
-
|
10277
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
10241
10278
|
|
10242
10279
|
</fo:instream-foreign-object>
|
10243
10280
|
</xsl:when>
|
10244
10281
|
<xsl:otherwise>
|
10282
|
+
<!-- <fo:block>debug block image:
|
10283
|
+
<xsl:variable name="scale">
|
10284
|
+
<xsl:call-template name="getImageScale">
|
10285
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10286
|
+
</xsl:call-template>
|
10287
|
+
</xsl:variable>
|
10288
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
10289
|
+
</fo:block> -->
|
10245
10290
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
10246
10291
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
10247
10292
|
|
10248
|
-
<xsl:
|
10249
|
-
<xsl:attribute name="width">
|
10250
|
-
<xsl:value-of select="@width"/>
|
10251
|
-
</xsl:attribute>
|
10252
|
-
</xsl:if>
|
10253
|
-
|
10254
|
-
<xsl:if test="@height != '' and @height != 'auto'">
|
10255
|
-
<xsl:attribute name="height">
|
10256
|
-
<xsl:value-of select="@height"/>
|
10257
|
-
</xsl:attribute>
|
10258
|
-
</xsl:if>
|
10293
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
10259
10294
|
|
10260
10295
|
<xsl:choose>
|
10261
10296
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -10263,24 +10298,18 @@
|
|
10263
10298
|
</xsl:when>
|
10264
10299
|
<xsl:otherwise>
|
10265
10300
|
|
10266
|
-
<xsl:variable name="
|
10267
|
-
<xsl:
|
10268
|
-
<xsl:
|
10269
|
-
|
10270
|
-
</xsl:choose>
|
10301
|
+
<xsl:variable name="scale">
|
10302
|
+
<xsl:call-template name="getImageScale">
|
10303
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10304
|
+
</xsl:call-template>
|
10271
10305
|
</xsl:variable>
|
10272
10306
|
|
10273
|
-
<xsl:variable name="
|
10274
|
-
|
10275
|
-
<xsl:value-of select="$width_effective"/>
|
10276
|
-
|
10307
|
+
<xsl:variable name="scaleRatio">
|
10308
|
+
1
|
10277
10309
|
</xsl:variable>
|
10278
10310
|
|
10279
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10280
10311
|
<xsl:if test="number($scale) < 100">
|
10281
|
-
|
10282
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
10283
|
-
|
10312
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
10284
10313
|
</xsl:if>
|
10285
10314
|
</xsl:otherwise>
|
10286
10315
|
</xsl:choose>
|
@@ -10296,6 +10325,62 @@
|
|
10296
10325
|
</xsl:choose>
|
10297
10326
|
</xsl:template>
|
10298
10327
|
|
10328
|
+
<xsl:template name="setImageWidth">
|
10329
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
10330
|
+
<xsl:value-of select="@width"/>
|
10331
|
+
</xsl:if>
|
10332
|
+
</xsl:template>
|
10333
|
+
<xsl:template name="setImageHeight">
|
10334
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
10335
|
+
<xsl:value-of select="@height"/>
|
10336
|
+
</xsl:if>
|
10337
|
+
</xsl:template>
|
10338
|
+
<xsl:template name="setImageWidthHeight">
|
10339
|
+
<xsl:variable name="width">
|
10340
|
+
<xsl:call-template name="setImageWidth"/>
|
10341
|
+
</xsl:variable>
|
10342
|
+
<xsl:if test="$width != ''">
|
10343
|
+
<xsl:attribute name="width">
|
10344
|
+
<xsl:value-of select="$width"/>
|
10345
|
+
</xsl:attribute>
|
10346
|
+
</xsl:if>
|
10347
|
+
<xsl:variable name="height">
|
10348
|
+
<xsl:call-template name="setImageHeight"/>
|
10349
|
+
</xsl:variable>
|
10350
|
+
<xsl:if test="$height != ''">
|
10351
|
+
<xsl:attribute name="height">
|
10352
|
+
<xsl:value-of select="$height"/>
|
10353
|
+
</xsl:attribute>
|
10354
|
+
</xsl:if>
|
10355
|
+
</xsl:template>
|
10356
|
+
|
10357
|
+
<xsl:template name="getImageScale">
|
10358
|
+
<xsl:param name="indent"/>
|
10359
|
+
<xsl:variable name="indent_left">
|
10360
|
+
<xsl:choose>
|
10361
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
10362
|
+
<xsl:otherwise>0</xsl:otherwise>
|
10363
|
+
</xsl:choose>
|
10364
|
+
</xsl:variable>
|
10365
|
+
<xsl:variable name="img_src">
|
10366
|
+
<xsl:choose>
|
10367
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
10368
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10369
|
+
</xsl:choose>
|
10370
|
+
</xsl:variable>
|
10371
|
+
|
10372
|
+
<xsl:variable name="image_width_effective">
|
10373
|
+
|
10374
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
10375
|
+
|
10376
|
+
</xsl:variable>
|
10377
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
10378
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
10379
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
10380
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10381
|
+
<xsl:value-of select="$scale"/>
|
10382
|
+
</xsl:template>
|
10383
|
+
|
10299
10384
|
<xsl:template name="image_src">
|
10300
10385
|
<xsl:choose>
|
10301
10386
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -12990,6 +13075,7 @@
|
|
12990
13075
|
</xsl:template>
|
12991
13076
|
|
12992
13077
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
13078
|
+
<xsl:param name="indent">0</xsl:param>
|
12993
13079
|
<xsl:choose>
|
12994
13080
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
12995
13081
|
<fo:block-container role="SKIP">
|
@@ -13004,7 +13090,9 @@
|
|
13004
13090
|
|
13005
13091
|
<fo:block-container margin-left="0mm" role="SKIP">
|
13006
13092
|
<fo:block>
|
13007
|
-
<xsl:apply-templates select="." mode="list"
|
13093
|
+
<xsl:apply-templates select="." mode="list">
|
13094
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13095
|
+
</xsl:apply-templates>
|
13008
13096
|
</fo:block>
|
13009
13097
|
</fo:block-container>
|
13010
13098
|
</fo:block-container>
|
@@ -13012,7 +13100,9 @@
|
|
13012
13100
|
<xsl:otherwise>
|
13013
13101
|
|
13014
13102
|
<fo:block role="SKIP">
|
13015
|
-
<xsl:apply-templates select="." mode="list"
|
13103
|
+
<xsl:apply-templates select="." mode="list">
|
13104
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13105
|
+
</xsl:apply-templates>
|
13016
13106
|
</fo:block>
|
13017
13107
|
|
13018
13108
|
</xsl:otherwise>
|
@@ -13099,6 +13189,13 @@
|
|
13099
13189
|
</xsl:template>
|
13100
13190
|
|
13101
13191
|
<xsl:template match="*[local-name()='li']">
|
13192
|
+
<xsl:param name="indent">0</xsl:param>
|
13193
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
13194
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
13195
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
13196
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
13197
|
+
</fo:list-item-body>
|
13198
|
+
</fo:list-item> -->
|
13102
13199
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
13103
13200
|
<xsl:copy-of select="@id"/>
|
13104
13201
|
|
@@ -13123,7 +13220,9 @@
|
|
13123
13220
|
|
13124
13221
|
<xsl:call-template name="refine_list-item-body-style"/>
|
13125
13222
|
|
13126
|
-
<xsl:apply-templates
|
13223
|
+
<xsl:apply-templates>
|
13224
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13225
|
+
</xsl:apply-templates>
|
13127
13226
|
|
13128
13227
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
13129
13228
|
|