metanorma-iso 2.7.6 → 2.7.7

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: 1ea605cb2d2600317ee12d4a926aee3231e8cd789cc422990e4ea7519f5b39a4
4
- data.tar.gz: 615fdbf41b05dfe73a2e052d37b735a535bc4f8f990d99d7670562196339fd89
3
+ metadata.gz: c6561177e59665f65664fe4668ed42f3cc00b795c1831c26db3d952144639c71
4
+ data.tar.gz: bdfab13575019ed66f6c3578df616f1449970528c2e55cf6aa974ee6522cdc3a
5
5
  SHA512:
6
- metadata.gz: 6ca74e3ef2122b12b2e4ccb28f140631f83de54db8d2fda891eaee9e17849b3b8faf7eddb375dfafa6303cb4abb0042161ba0a45fbba86857a44b2a0521fcc9a
7
- data.tar.gz: c6120ebc9efd5f703261f2e47e3a28c0a2805529c5a1eda44451fccf0d0aaf5264a4298ff7babcc564f4869392b2cad9a1e4be51fe725dd24858f2a5d9695f2a
6
+ metadata.gz: 415c1d96ba2c24bd341474cf412ba6905b35de488d793abe86a12c77c80261ea629d7a134b0c610b18b740d30dae503fe7345af80e9256ad963eaf6856eda6c2
7
+ data.tar.gz: c5ace736c387bf075c9824d2ebbb2a328295c76db2d54b07ccbefebca2cb822124e86a34f576647d129d5538aa6d4d0dd3ac4d74d40889f5b24eb2e5616ae79a
@@ -11435,10 +11435,11 @@
11435
11435
  </xsl:template>
11436
11436
 
11437
11437
  <xsl:template match="*[local-name() = 'image']">
11438
+ <xsl:param name="indent">0</xsl:param>
11438
11439
  <xsl:variable name="isAdded" select="../@added"/>
11439
11440
  <xsl:variable name="isDeleted" select="../@deleted"/>
11440
11441
  <xsl:choose>
11441
- <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
11442
+ <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) -->
11442
11443
  <fo:inline padding-left="1mm" padding-right="1mm">
11443
11444
  <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
11444
11445
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -11447,7 +11448,43 @@
11447
11448
  <xsl:variable name="src">
11448
11449
  <xsl:call-template name="image_src"/>
11449
11450
  </xsl:variable>
11450
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
11451
+
11452
+ <xsl:variable name="scale">
11453
+ <xsl:call-template name="getImageScale">
11454
+ <xsl:with-param name="indent" select="$indent"/>
11455
+ </xsl:call-template>
11456
+ </xsl:variable>
11457
+
11458
+ <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
11459
+
11460
+ <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
11461
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
11462
+
11463
+ <xsl:variable name="width">
11464
+ <xsl:call-template name="setImageWidth"/>
11465
+ </xsl:variable>
11466
+ <xsl:if test="$width != ''">
11467
+ <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
11468
+ </xsl:if>
11469
+ <xsl:variable name="height">
11470
+ <xsl:call-template name="setImageHeight"/>
11471
+ </xsl:variable>
11472
+ <xsl:if test="$height != ''">
11473
+ <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
11474
+ </xsl:if>
11475
+
11476
+ <xsl:if test="$width = '' and $height = ''">
11477
+ <xsl:if test="number($scale) &lt; 100">
11478
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
11479
+ <!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
11480
+ <xsl:attribute name="content-height">100%</xsl:attribute>
11481
+ <xsl:attribute name="width">100%</xsl:attribute>
11482
+ <xsl:attribute name="scaling">uniform</xsl:attribute> -->
11483
+ </xsl:if>
11484
+ </xsl:if>
11485
+
11486
+ </fo:external-graphic>
11487
+
11451
11488
  </fo:inline>
11452
11489
  </xsl:when>
11453
11490
  <xsl:otherwise>
@@ -11468,25 +11505,23 @@
11468
11505
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
11469
11506
  <xsl:attribute name="scaling">uniform</xsl:attribute>
11470
11507
 
11471
- <xsl:apply-templates select="." mode="cross_image"/>
11508
+ <xsl:apply-templates select="." mode="cross_image"/>
11472
11509
 
11473
11510
  </fo:instream-foreign-object>
11474
11511
  </xsl:when>
11475
11512
  <xsl:otherwise>
11513
+ <!-- <fo:block>debug block image:
11514
+ <xsl:variable name="scale">
11515
+ <xsl:call-template name="getImageScale">
11516
+ <xsl:with-param name="indent" select="$indent"/>
11517
+ </xsl:call-template>
11518
+ </xsl:variable>
11519
+ <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
11520
+ </fo:block> -->
11476
11521
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
11477
11522
  <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'])">
11478
11523
 
11479
- <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
11480
- <xsl:attribute name="width">
11481
- <xsl:value-of select="@width"/>
11482
- </xsl:attribute>
11483
- </xsl:if>
11484
-
11485
- <xsl:if test="@height != '' and @height != 'auto'">
11486
- <xsl:attribute name="height">
11487
- <xsl:value-of select="@height"/>
11488
- </xsl:attribute>
11489
- </xsl:if>
11524
+ <xsl:call-template name="setImageWidthHeight"/>
11490
11525
 
11491
11526
  <xsl:choose>
11492
11527
  <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
@@ -11494,24 +11529,18 @@
11494
11529
  </xsl:when>
11495
11530
  <xsl:otherwise>
11496
11531
 
11497
- <xsl:variable name="img_src">
11498
- <xsl:choose>
11499
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
11500
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
11501
- </xsl:choose>
11532
+ <xsl:variable name="scale">
11533
+ <xsl:call-template name="getImageScale">
11534
+ <xsl:with-param name="indent" select="$indent"/>
11535
+ </xsl:call-template>
11502
11536
  </xsl:variable>
11503
11537
 
11504
- <xsl:variable name="image_width_effective">
11505
-
11506
- <xsl:value-of select="$width_effective"/>
11507
-
11538
+ <xsl:variable name="scaleRatio">
11539
+ 1
11508
11540
  </xsl:variable>
11509
11541
 
11510
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
11511
11542
  <xsl:if test="number($scale) &lt; 100">
11512
-
11513
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
11514
-
11543
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
11515
11544
  </xsl:if>
11516
11545
  </xsl:otherwise>
11517
11546
  </xsl:choose>
@@ -11527,6 +11556,62 @@
11527
11556
  </xsl:choose>
11528
11557
  </xsl:template>
11529
11558
 
11559
+ <xsl:template name="setImageWidth">
11560
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
11561
+ <xsl:value-of select="@width"/>
11562
+ </xsl:if>
11563
+ </xsl:template>
11564
+ <xsl:template name="setImageHeight">
11565
+ <xsl:if test="@height != '' and @height != 'auto'">
11566
+ <xsl:value-of select="@height"/>
11567
+ </xsl:if>
11568
+ </xsl:template>
11569
+ <xsl:template name="setImageWidthHeight">
11570
+ <xsl:variable name="width">
11571
+ <xsl:call-template name="setImageWidth"/>
11572
+ </xsl:variable>
11573
+ <xsl:if test="$width != ''">
11574
+ <xsl:attribute name="width">
11575
+ <xsl:value-of select="$width"/>
11576
+ </xsl:attribute>
11577
+ </xsl:if>
11578
+ <xsl:variable name="height">
11579
+ <xsl:call-template name="setImageHeight"/>
11580
+ </xsl:variable>
11581
+ <xsl:if test="$height != ''">
11582
+ <xsl:attribute name="height">
11583
+ <xsl:value-of select="$height"/>
11584
+ </xsl:attribute>
11585
+ </xsl:if>
11586
+ </xsl:template>
11587
+
11588
+ <xsl:template name="getImageScale">
11589
+ <xsl:param name="indent"/>
11590
+ <xsl:variable name="indent_left">
11591
+ <xsl:choose>
11592
+ <xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
11593
+ <xsl:otherwise>0</xsl:otherwise>
11594
+ </xsl:choose>
11595
+ </xsl:variable>
11596
+ <xsl:variable name="img_src">
11597
+ <xsl:choose>
11598
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
11599
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
11600
+ </xsl:choose>
11601
+ </xsl:variable>
11602
+
11603
+ <xsl:variable name="image_width_effective">
11604
+
11605
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
11606
+
11607
+ </xsl:variable>
11608
+ <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
11609
+ <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
11610
+ <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
11611
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
11612
+ <xsl:value-of select="$scale"/>
11613
+ </xsl:template>
11614
+
11530
11615
  <xsl:template name="image_src">
11531
11616
  <xsl:choose>
11532
11617
  <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
@@ -14214,6 +14299,7 @@
14214
14299
  </xsl:template>
14215
14300
 
14216
14301
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
14302
+ <xsl:param name="indent">0</xsl:param>
14217
14303
  <xsl:choose>
14218
14304
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
14219
14305
  <fo:block-container role="SKIP">
@@ -14228,7 +14314,9 @@
14228
14314
 
14229
14315
  <fo:block-container margin-left="0mm" role="SKIP">
14230
14316
  <fo:block>
14231
- <xsl:apply-templates select="." mode="list"/>
14317
+ <xsl:apply-templates select="." mode="list">
14318
+ <xsl:with-param name="indent" select="$indent"/>
14319
+ </xsl:apply-templates>
14232
14320
  </fo:block>
14233
14321
  </fo:block-container>
14234
14322
  </fo:block-container>
@@ -14236,7 +14324,9 @@
14236
14324
  <xsl:otherwise>
14237
14325
 
14238
14326
  <fo:block role="SKIP">
14239
- <xsl:apply-templates select="." mode="list"/>
14327
+ <xsl:apply-templates select="." mode="list">
14328
+ <xsl:with-param name="indent" select="$indent"/>
14329
+ </xsl:apply-templates>
14240
14330
  </fo:block>
14241
14331
 
14242
14332
  </xsl:otherwise>
@@ -14321,6 +14411,13 @@
14321
14411
  </xsl:template>
14322
14412
 
14323
14413
  <xsl:template match="*[local-name()='li']">
14414
+ <xsl:param name="indent">0</xsl:param>
14415
+ <!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
14416
+ <fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
14417
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
14418
+ <fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
14419
+ </fo:list-item-body>
14420
+ </fo:list-item> -->
14324
14421
  <fo:list-item xsl:use-attribute-sets="list-item-style">
14325
14422
  <xsl:copy-of select="@id"/>
14326
14423
 
@@ -14345,7 +14442,9 @@
14345
14442
 
14346
14443
  <xsl:call-template name="refine_list-item-body-style"/>
14347
14444
 
14348
- <xsl:apply-templates/>
14445
+ <xsl:apply-templates>
14446
+ <xsl:with-param name="indent" select="$indent"/>
14447
+ </xsl:apply-templates>
14349
14448
 
14350
14449
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
14351
14450
 
@@ -11435,10 +11435,11 @@
11435
11435
  </xsl:template>
11436
11436
 
11437
11437
  <xsl:template match="*[local-name() = 'image']">
11438
+ <xsl:param name="indent">0</xsl:param>
11438
11439
  <xsl:variable name="isAdded" select="../@added"/>
11439
11440
  <xsl:variable name="isDeleted" select="../@deleted"/>
11440
11441
  <xsl:choose>
11441
- <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
11442
+ <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) -->
11442
11443
  <fo:inline padding-left="1mm" padding-right="1mm">
11443
11444
  <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
11444
11445
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -11447,7 +11448,43 @@
11447
11448
  <xsl:variable name="src">
11448
11449
  <xsl:call-template name="image_src"/>
11449
11450
  </xsl:variable>
11450
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
11451
+
11452
+ <xsl:variable name="scale">
11453
+ <xsl:call-template name="getImageScale">
11454
+ <xsl:with-param name="indent" select="$indent"/>
11455
+ </xsl:call-template>
11456
+ </xsl:variable>
11457
+
11458
+ <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
11459
+
11460
+ <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
11461
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
11462
+
11463
+ <xsl:variable name="width">
11464
+ <xsl:call-template name="setImageWidth"/>
11465
+ </xsl:variable>
11466
+ <xsl:if test="$width != ''">
11467
+ <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
11468
+ </xsl:if>
11469
+ <xsl:variable name="height">
11470
+ <xsl:call-template name="setImageHeight"/>
11471
+ </xsl:variable>
11472
+ <xsl:if test="$height != ''">
11473
+ <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
11474
+ </xsl:if>
11475
+
11476
+ <xsl:if test="$width = '' and $height = ''">
11477
+ <xsl:if test="number($scale) &lt; 100">
11478
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
11479
+ <!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
11480
+ <xsl:attribute name="content-height">100%</xsl:attribute>
11481
+ <xsl:attribute name="width">100%</xsl:attribute>
11482
+ <xsl:attribute name="scaling">uniform</xsl:attribute> -->
11483
+ </xsl:if>
11484
+ </xsl:if>
11485
+
11486
+ </fo:external-graphic>
11487
+
11451
11488
  </fo:inline>
11452
11489
  </xsl:when>
11453
11490
  <xsl:otherwise>
@@ -11468,25 +11505,23 @@
11468
11505
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
11469
11506
  <xsl:attribute name="scaling">uniform</xsl:attribute>
11470
11507
 
11471
- <xsl:apply-templates select="." mode="cross_image"/>
11508
+ <xsl:apply-templates select="." mode="cross_image"/>
11472
11509
 
11473
11510
  </fo:instream-foreign-object>
11474
11511
  </xsl:when>
11475
11512
  <xsl:otherwise>
11513
+ <!-- <fo:block>debug block image:
11514
+ <xsl:variable name="scale">
11515
+ <xsl:call-template name="getImageScale">
11516
+ <xsl:with-param name="indent" select="$indent"/>
11517
+ </xsl:call-template>
11518
+ </xsl:variable>
11519
+ <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
11520
+ </fo:block> -->
11476
11521
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
11477
11522
  <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'])">
11478
11523
 
11479
- <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
11480
- <xsl:attribute name="width">
11481
- <xsl:value-of select="@width"/>
11482
- </xsl:attribute>
11483
- </xsl:if>
11484
-
11485
- <xsl:if test="@height != '' and @height != 'auto'">
11486
- <xsl:attribute name="height">
11487
- <xsl:value-of select="@height"/>
11488
- </xsl:attribute>
11489
- </xsl:if>
11524
+ <xsl:call-template name="setImageWidthHeight"/>
11490
11525
 
11491
11526
  <xsl:choose>
11492
11527
  <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
@@ -11494,24 +11529,18 @@
11494
11529
  </xsl:when>
11495
11530
  <xsl:otherwise>
11496
11531
 
11497
- <xsl:variable name="img_src">
11498
- <xsl:choose>
11499
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
11500
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
11501
- </xsl:choose>
11532
+ <xsl:variable name="scale">
11533
+ <xsl:call-template name="getImageScale">
11534
+ <xsl:with-param name="indent" select="$indent"/>
11535
+ </xsl:call-template>
11502
11536
  </xsl:variable>
11503
11537
 
11504
- <xsl:variable name="image_width_effective">
11505
-
11506
- <xsl:value-of select="$width_effective"/>
11507
-
11538
+ <xsl:variable name="scaleRatio">
11539
+ 1
11508
11540
  </xsl:variable>
11509
11541
 
11510
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
11511
11542
  <xsl:if test="number($scale) &lt; 100">
11512
-
11513
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
11514
-
11543
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
11515
11544
  </xsl:if>
11516
11545
  </xsl:otherwise>
11517
11546
  </xsl:choose>
@@ -11527,6 +11556,62 @@
11527
11556
  </xsl:choose>
11528
11557
  </xsl:template>
11529
11558
 
11559
+ <xsl:template name="setImageWidth">
11560
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
11561
+ <xsl:value-of select="@width"/>
11562
+ </xsl:if>
11563
+ </xsl:template>
11564
+ <xsl:template name="setImageHeight">
11565
+ <xsl:if test="@height != '' and @height != 'auto'">
11566
+ <xsl:value-of select="@height"/>
11567
+ </xsl:if>
11568
+ </xsl:template>
11569
+ <xsl:template name="setImageWidthHeight">
11570
+ <xsl:variable name="width">
11571
+ <xsl:call-template name="setImageWidth"/>
11572
+ </xsl:variable>
11573
+ <xsl:if test="$width != ''">
11574
+ <xsl:attribute name="width">
11575
+ <xsl:value-of select="$width"/>
11576
+ </xsl:attribute>
11577
+ </xsl:if>
11578
+ <xsl:variable name="height">
11579
+ <xsl:call-template name="setImageHeight"/>
11580
+ </xsl:variable>
11581
+ <xsl:if test="$height != ''">
11582
+ <xsl:attribute name="height">
11583
+ <xsl:value-of select="$height"/>
11584
+ </xsl:attribute>
11585
+ </xsl:if>
11586
+ </xsl:template>
11587
+
11588
+ <xsl:template name="getImageScale">
11589
+ <xsl:param name="indent"/>
11590
+ <xsl:variable name="indent_left">
11591
+ <xsl:choose>
11592
+ <xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
11593
+ <xsl:otherwise>0</xsl:otherwise>
11594
+ </xsl:choose>
11595
+ </xsl:variable>
11596
+ <xsl:variable name="img_src">
11597
+ <xsl:choose>
11598
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
11599
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
11600
+ </xsl:choose>
11601
+ </xsl:variable>
11602
+
11603
+ <xsl:variable name="image_width_effective">
11604
+
11605
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
11606
+
11607
+ </xsl:variable>
11608
+ <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
11609
+ <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
11610
+ <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
11611
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
11612
+ <xsl:value-of select="$scale"/>
11613
+ </xsl:template>
11614
+
11530
11615
  <xsl:template name="image_src">
11531
11616
  <xsl:choose>
11532
11617
  <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
@@ -14214,6 +14299,7 @@
14214
14299
  </xsl:template>
14215
14300
 
14216
14301
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
14302
+ <xsl:param name="indent">0</xsl:param>
14217
14303
  <xsl:choose>
14218
14304
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
14219
14305
  <fo:block-container role="SKIP">
@@ -14228,7 +14314,9 @@
14228
14314
 
14229
14315
  <fo:block-container margin-left="0mm" role="SKIP">
14230
14316
  <fo:block>
14231
- <xsl:apply-templates select="." mode="list"/>
14317
+ <xsl:apply-templates select="." mode="list">
14318
+ <xsl:with-param name="indent" select="$indent"/>
14319
+ </xsl:apply-templates>
14232
14320
  </fo:block>
14233
14321
  </fo:block-container>
14234
14322
  </fo:block-container>
@@ -14236,7 +14324,9 @@
14236
14324
  <xsl:otherwise>
14237
14325
 
14238
14326
  <fo:block role="SKIP">
14239
- <xsl:apply-templates select="." mode="list"/>
14327
+ <xsl:apply-templates select="." mode="list">
14328
+ <xsl:with-param name="indent" select="$indent"/>
14329
+ </xsl:apply-templates>
14240
14330
  </fo:block>
14241
14331
 
14242
14332
  </xsl:otherwise>
@@ -14321,6 +14411,13 @@
14321
14411
  </xsl:template>
14322
14412
 
14323
14413
  <xsl:template match="*[local-name()='li']">
14414
+ <xsl:param name="indent">0</xsl:param>
14415
+ <!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
14416
+ <fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
14417
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
14418
+ <fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
14419
+ </fo:list-item-body>
14420
+ </fo:list-item> -->
14324
14421
  <fo:list-item xsl:use-attribute-sets="list-item-style">
14325
14422
  <xsl:copy-of select="@id"/>
14326
14423
 
@@ -14345,7 +14442,9 @@
14345
14442
 
14346
14443
  <xsl:call-template name="refine_list-item-body-style"/>
14347
14444
 
14348
- <xsl:apply-templates/>
14445
+ <xsl:apply-templates>
14446
+ <xsl:with-param name="indent" select="$indent"/>
14447
+ </xsl:apply-templates>
14349
14448
 
14350
14449
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
14351
14450
 
@@ -95,7 +95,7 @@
95
95
  <text/>
96
96
  </element>
97
97
  </define>
98
- <define name="LocalizedString1">
98
+ <define name="LocalizedStringAttrs">
99
99
  <optional>
100
100
  <!-- multiple languages and scripts possible: comma delimit them if so -->
101
101
  <attribute name="language"/>
@@ -106,6 +106,10 @@
106
106
  <optional>
107
107
  <attribute name="script"/>
108
108
  </optional>
109
+ </define>
110
+ <define name="LocalizedString1">
111
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
112
+ <ref name="LocalizedStringAttrs"/>
109
113
  <text/>
110
114
  </define>
111
115
  <define name="LocalizedString">
@@ -142,16 +146,8 @@
142
146
  <ref name="LocalizedStringOrXsAny"/>
143
147
  </define>
144
148
  <define name="LocalizedStringOrXsAny1">
145
- <optional>
146
- <!-- multiple languages and scripts possible: comma delimit them if so -->
147
- <attribute name="language"/>
148
- </optional>
149
- <optional>
150
- <attribute name="locale"/>
151
- </optional>
152
- <optional>
153
- <attribute name="script"/>
154
- </optional>
149
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
150
+ <ref name="LocalizedStringAttrs"/>
155
151
  <oneOrMore>
156
152
  <choice>
157
153
  <text/>
@@ -208,6 +204,7 @@
208
204
  </define>
209
205
  <define name="roledescription">
210
206
  <element name="description">
207
+ <ref name="LocalizedStringAttrs"/>
211
208
  <oneOrMore>
212
209
  <ref name="TextElement"/>
213
210
  </oneOrMore>
@@ -335,6 +332,7 @@
335
332
  </define>
336
333
  <define name="affiliationdescription">
337
334
  <element name="description">
335
+ <ref name="LocalizedStringAttrs"/>
338
336
  <oneOrMore>
339
337
  <ref name="TextElement"/>
340
338
  </oneOrMore>
@@ -948,6 +946,7 @@
948
946
  <optional>
949
947
  <attribute name="type"/>
950
948
  </optional>
949
+ <ref name="LocalizedStringAttrs"/>
951
950
  <zeroOrMore>
952
951
  <ref name="TextElement"/>
953
952
  </zeroOrMore>
@@ -1041,15 +1040,7 @@
1041
1040
  <data type="boolean"/>
1042
1041
  </attribute>
1043
1042
  </optional>
1044
- <optional>
1045
- <attribute name="language"/>
1046
- </optional>
1047
- <optional>
1048
- <attribute name="locale"/>
1049
- </optional>
1050
- <optional>
1051
- <attribute name="script"/>
1052
- </optional>
1043
+ <ref name="LocalizedStringAttrs"/>
1053
1044
  <oneOrMore>
1054
1045
  <ref name="TextElement"/>
1055
1046
  </oneOrMore>
@@ -1277,6 +1268,7 @@
1277
1268
  <optional>
1278
1269
  <attribute name="type"/>
1279
1270
  </optional>
1271
+ <ref name="LocalizedStringAttrs"/>
1280
1272
  <oneOrMore>
1281
1273
  <ref name="TextElement"/>
1282
1274
  </oneOrMore>
@@ -1284,9 +1276,15 @@
1284
1276
  </define>
1285
1277
  <define name="bibabstract">
1286
1278
  <element name="abstract">
1287
- <oneOrMore>
1288
- <ref name="TextElement"/>
1289
- </oneOrMore>
1279
+ <ref name="LocalizedStringAttrs"/>
1280
+ <choice>
1281
+ <oneOrMore>
1282
+ <ref name="BasicBlock"/>
1283
+ </oneOrMore>
1284
+ <oneOrMore>
1285
+ <ref name="TextElement"/>
1286
+ </oneOrMore>
1287
+ </choice>
1290
1288
  </element>
1291
1289
  </define>
1292
1290
  <define name="copyright">
@@ -1391,6 +1389,7 @@
1391
1389
  </attribute>
1392
1390
  <optional>
1393
1391
  <element name="description">
1392
+ <ref name="LocalizedStringAttrs"/>
1394
1393
  <oneOrMore>
1395
1394
  <ref name="TextElement"/>
1396
1395
  </oneOrMore>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.3.0 -->
20
+ <!-- VERSION v1.3.1 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -1346,38 +1346,41 @@
1346
1346
  </oneOrMore>
1347
1347
  </element>
1348
1348
  </define>
1349
+ <define name="Section-Attributes">
1350
+ <optional>
1351
+ <attribute name="id">
1352
+ <data type="ID"/>
1353
+ </attribute>
1354
+ </optional>
1355
+ <optional>
1356
+ <attribute name="language"/>
1357
+ </optional>
1358
+ <optional>
1359
+ <attribute name="script"/>
1360
+ </optional>
1361
+ <optional>
1362
+ <attribute name="inline-header">
1363
+ <data type="boolean"/>
1364
+ </attribute>
1365
+ </optional>
1366
+ <optional>
1367
+ <attribute name="number"/>
1368
+ </optional>
1369
+ <optional>
1370
+ <attribute name="branch-number"/>
1371
+ </optional>
1372
+ <optional>
1373
+ <attribute name="obligation">
1374
+ <choice>
1375
+ <value>normative</value>
1376
+ <value>informative</value>
1377
+ </choice>
1378
+ </attribute>
1379
+ </optional>
1380
+ </define>
1349
1381
  <define name="reference-clause">
1350
1382
  <element name="clause">
1351
- <optional>
1352
- <attribute name="id">
1353
- <data type="ID"/>
1354
- </attribute>
1355
- </optional>
1356
- <optional>
1357
- <attribute name="language"/>
1358
- </optional>
1359
- <optional>
1360
- <attribute name="script"/>
1361
- </optional>
1362
- <optional>
1363
- <attribute name="inline-header">
1364
- <data type="boolean"/>
1365
- </attribute>
1366
- </optional>
1367
- <optional>
1368
- <attribute name="number"/>
1369
- </optional>
1370
- <optional>
1371
- <attribute name="branch-number"/>
1372
- </optional>
1373
- <optional>
1374
- <attribute name="obligation">
1375
- <choice>
1376
- <value>normative</value>
1377
- <value>informative</value>
1378
- </choice>
1379
- </attribute>
1380
- </optional>
1383
+ <ref name="Section-Attributes"/>
1381
1384
  <optional>
1382
1385
  <ref name="section-title"/>
1383
1386
  </optional>
@@ -1566,36 +1569,7 @@
1566
1569
  </element>
1567
1570
  </define>
1568
1571
  <define name="Content-Section">
1569
- <optional>
1570
- <attribute name="id">
1571
- <data type="ID"/>
1572
- </attribute>
1573
- </optional>
1574
- <optional>
1575
- <attribute name="language"/>
1576
- </optional>
1577
- <optional>
1578
- <attribute name="script"/>
1579
- </optional>
1580
- <optional>
1581
- <attribute name="inline-header">
1582
- <data type="boolean"/>
1583
- </attribute>
1584
- </optional>
1585
- <optional>
1586
- <attribute name="obligation">
1587
- <choice>
1588
- <value>normative</value>
1589
- <value>informative</value>
1590
- </choice>
1591
- </attribute>
1592
- </optional>
1593
- <optional>
1594
- <attribute name="number"/>
1595
- </optional>
1596
- <optional>
1597
- <attribute name="branch-number"/>
1598
- </optional>
1572
+ <ref name="Section-Attributes"/>
1599
1573
  <optional>
1600
1574
  <attribute name="type"/>
1601
1575
  </optional>
@@ -1617,39 +1591,10 @@
1617
1591
  </element>
1618
1592
  </define>
1619
1593
  <define name="Clause-Section">
1620
- <optional>
1621
- <attribute name="id">
1622
- <data type="ID"/>
1623
- </attribute>
1624
- </optional>
1625
- <optional>
1626
- <attribute name="language"/>
1627
- </optional>
1628
- <optional>
1629
- <attribute name="script"/>
1630
- </optional>
1631
- <optional>
1632
- <attribute name="inline-header">
1633
- <data type="boolean"/>
1634
- </attribute>
1635
- </optional>
1636
- <optional>
1637
- <attribute name="obligation">
1638
- <choice>
1639
- <value>normative</value>
1640
- <value>informative</value>
1641
- </choice>
1642
- </attribute>
1643
- </optional>
1594
+ <ref name="Section-Attributes"/>
1644
1595
  <optional>
1645
1596
  <attribute name="type"/>
1646
1597
  </optional>
1647
- <optional>
1648
- <attribute name="number"/>
1649
- </optional>
1650
- <optional>
1651
- <attribute name="branch-number"/>
1652
- </optional>
1653
1598
  <optional>
1654
1599
  <ref name="section-title"/>
1655
1600
  </optional>
@@ -1730,34 +1675,10 @@
1730
1675
  </define>
1731
1676
  <define name="terms">
1732
1677
  <element name="terms">
1733
- <optional>
1734
- <attribute name="id">
1735
- <data type="ID"/>
1736
- </attribute>
1737
- </optional>
1738
- <optional>
1739
- <attribute name="language"/>
1740
- </optional>
1741
- <optional>
1742
- <attribute name="script"/>
1743
- </optional>
1678
+ <ref name="Section-Attributes"/>
1744
1679
  <optional>
1745
1680
  <attribute name="type"/>
1746
1681
  </optional>
1747
- <optional>
1748
- <attribute name="number"/>
1749
- </optional>
1750
- <optional>
1751
- <attribute name="branch-number"/>
1752
- </optional>
1753
- <optional>
1754
- <attribute name="obligation">
1755
- <choice>
1756
- <value>normative</value>
1757
- <value>informative</value>
1758
- </choice>
1759
- </attribute>
1760
- </optional>
1761
1682
  <optional>
1762
1683
  <ref name="section-title"/>
1763
1684
  </optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "2.7.6".freeze
3
+ VERSION = "2.7.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.6
4
+ version: 2.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-08 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc