metanorma-iec 2.8.1 → 2.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6defcf38222ffe2ca5af4f9369778ff3e879196a8bbde0c348d0c45f8a522d3
4
- data.tar.gz: f1ee1d7a0938499d67c20dedc74a3a88e6ee7064afc5ab186885784ce037417a
3
+ metadata.gz: e2a3beafed0d59c715ad2d3ee28cff96847e66ea5a81474aba330bd5433206e8
4
+ data.tar.gz: 448025bfed257cd06e848fdb3f4d2e54d9c81e8a279c1cf87c85d189981c4d7f
5
5
  SHA512:
6
- metadata.gz: 0dd0dc87b5fcd7caba2e46bbe57a66b8a1e126d78d7f2a5ef44f466afa70630aacc0495d2478f9a052117cb4452d2171f9b73ee4615c5013284dd86d4cfa918c
7
- data.tar.gz: 4a821ea60263a1f5a76be53b4732693e2e1e048ae7e927461691a7b077d7dbf32fdb3255bc28185ba579b7325657bd3533e286023ee54bc25b6e030bbec10d72
6
+ metadata.gz: e0404119c4072ec1a139ce6d12cf72ff5e1dfad066d6ce2e8ea473374a53287b4d80a92a909ea4c7084301136f5e60d26a25f84bd4c19b88adb5500bc7eace3a
7
+ data.tar.gz: 672b5b1c9534b42889ec232e1a350f6369af3879ced8e513f6fa1127970cfca7311d3c2dc88bcd48d67c7b046926ea0c8939335938b3dfa0b67cf8497447dbbb
@@ -319,6 +319,11 @@ svg {
319
319
  display: block; /* ← removes unwanted inline spacing */
320
320
  }
321
321
 
322
+ /* style dfn by override in flavor */
323
+ dfn {
324
+ font-style: inherit;
325
+ }
326
+
322
327
  #standard-band {
323
328
  background-color: #0AC442;
324
329
  }
@@ -1334,7 +1334,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1334
1334
  </xsl:call-template>
1335
1335
  <xsl:text> </xsl:text>
1336
1336
  <fo:inline keep-together.within-line="always" role="SKIP">
1337
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
1337
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
1338
1338
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
1339
1339
  </fo:inline>
1340
1340
  </fo:basic-link>
@@ -1370,7 +1370,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1370
1370
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{$alt_text}"> <!-- {local-name()} {@id} -->
1371
1371
  <xsl:apply-templates select="." mode="contents"/>
1372
1372
  <fo:inline keep-together.within-line="always" role="SKIP">
1373
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
1373
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
1374
1374
  <fo:wrapper role="artifact">
1375
1375
  <fo:page-number-citation ref-id="{@id}"/>
1376
1376
  </fo:wrapper>
@@ -1436,19 +1436,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1436
1436
 
1437
1437
  <xsl:for-each select=".//mn:page_sequence[parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
1438
1438
 
1439
- <fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
1440
-
1441
- <xsl:attribute name="master-reference">
1442
- <xsl:text>document</xsl:text>
1443
- <xsl:call-template name="getPageSequenceOrientation"/>
1444
- </xsl:attribute>
1445
-
1446
- <xsl:if test="position() = 1 and $num = '1'">
1447
- <xsl:attribute name="initial-page-number">2</xsl:attribute>
1448
- </xsl:if>
1449
- <xsl:if test="$isIEV = 'true'">
1450
- <xsl:attribute name="format">I</xsl:attribute>
1451
- </xsl:if>
1439
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
1440
+ <xsl:call-template name="refine_page-sequence-preface">
1441
+ <xsl:with-param name="num" select="$num"/>
1442
+ </xsl:call-template>
1452
1443
 
1453
1444
  <xsl:call-template name="insertHeaderFooter"/>
1454
1445
 
@@ -1469,16 +1460,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1469
1460
 
1470
1461
  <xsl:for-each select=".//mn:page_sequence[not(parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
1471
1462
 
1472
- <fo:page-sequence master-reference="document" force-page-count="no-force">
1473
-
1474
- <xsl:attribute name="master-reference">
1475
- <xsl:text>document</xsl:text>
1476
- <xsl:call-template name="getPageSequenceOrientation"/>
1477
- </xsl:attribute>
1478
-
1479
- <xsl:if test="position() = 1 and $isIEV = 'true'">
1480
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
1481
- </xsl:if>
1463
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
1464
+ <xsl:call-template name="refine_page-sequence-main"/>
1482
1465
 
1483
1466
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
1484
1467
 
@@ -1601,7 +1584,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1601
1584
  </xsl:variable>
1602
1585
 
1603
1586
  <xsl:variable name="variant_title">
1604
- <xsl:copy-of select="mn:variant-title/node()"/>
1587
+ <xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
1605
1588
  </xsl:variable>
1606
1589
 
1607
1590
  <mnx:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
@@ -1859,7 +1842,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1859
1842
 
1860
1843
  <xsl:template match="mn:indexsect"/>
1861
1844
  <xsl:template match="mn:indexsect" mode="index">
1862
- <fo:page-sequence master-reference="document" force-page-count="no-force">
1845
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
1846
+ <xsl:call-template name="refine_page-sequence-main"/>
1847
+
1863
1848
  <xsl:call-template name="insertHeaderFooter"/>
1864
1849
  <fo:flow flow-name="xsl-region-body">
1865
1850
  <fo:block id="{@id}" span="all">
@@ -2455,20 +2440,43 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
2455
2440
  </xsl:variable>
2456
2441
 
2457
2442
  <xsl:attribute-set name="page-sequence-preface">
2458
- <xsl:attribute name="format">i</xsl:attribute>
2459
- </xsl:attribute-set>
2443
+ <xsl:attribute name="format">1</xsl:attribute>
2444
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
2445
+ <xsl:attribute name="master-reference">document</xsl:attribute>
2446
+ </xsl:attribute-set> <!-- page-sequence-preface -->
2460
2447
 
2461
2448
  <xsl:template name="refine_page-sequence-preface">
2462
2449
  <xsl:param name="layoutVersion"/>
2463
- </xsl:template>
2450
+ <xsl:param name="doctype"/>
2451
+ <xsl:param name="num"/>
2452
+ <xsl:param name="skip_force_page_count">false</xsl:param>
2453
+ <xsl:attribute name="master-reference">
2454
+ <xsl:text>document</xsl:text>
2455
+ <xsl:call-template name="getPageSequenceOrientation"/>
2456
+ </xsl:attribute>
2457
+ <xsl:if test="position() = 1 and $num = '1'">
2458
+ <xsl:attribute name="initial-page-number">2</xsl:attribute>
2459
+ </xsl:if>
2460
+ <xsl:if test="$isIEV = 'true'">
2461
+ <xsl:attribute name="format">I</xsl:attribute>
2462
+ </xsl:if>
2463
+ </xsl:template> <!-- refine_page-sequence-preface -->
2464
2464
 
2465
2465
  <xsl:attribute-set name="page-sequence-main">
2466
-
2467
- </xsl:attribute-set>
2466
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
2467
+ </xsl:attribute-set> <!-- page-sequence-main -->
2468
2468
 
2469
2469
  <xsl:template name="refine_page-sequence-main">
2470
2470
  <xsl:param name="layoutVersion"/>
2471
- </xsl:template>
2471
+ <xsl:param name="doctype"/>
2472
+ <xsl:attribute name="master-reference">
2473
+ <xsl:text>document</xsl:text>
2474
+ <xsl:call-template name="getPageSequenceOrientation"/>
2475
+ </xsl:attribute>
2476
+ <xsl:if test="position() = 1 and $isIEV = 'true' and not(self::mn:indexsect)">
2477
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
2478
+ </xsl:if>
2479
+ </xsl:template> <!-- refine_page-sequence-main -->
2472
2480
 
2473
2481
  <xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
2474
2482
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
@@ -2772,7 +2780,24 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
2772
2780
  <xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
2773
2781
 
2774
2782
  <!-- remove image/emf -->
2775
- <xsl:template match="mn:image/mn:emf" mode="update_xml_step1"/>
2783
+ <xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
2784
+
2785
+ <!-- https://github.com/metanorma/metanorma/issues/540 -->
2786
+ <xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
2787
+ <xsl:copy>
2788
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2789
+ <xsl:choose>
2790
+ <xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
2791
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
2792
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
2793
+ </xsl:when>
2794
+ <xsl:otherwise>
2795
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
2796
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
2797
+ </xsl:otherwise>
2798
+ </xsl:choose>
2799
+ </xsl:copy>
2800
+ </xsl:template>
2776
2801
 
2777
2802
  <!-- remove preprocess-xslt -->
2778
2803
  <xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
@@ -3000,6 +3025,15 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
3000
3025
  </xsl:choose>
3001
3026
  </xsl:template>
3002
3027
 
3028
+ <!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
3029
+ <xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
3030
+ <xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
3031
+ </xsl:template>
3032
+
3033
+ <xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
3034
+ <xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
3035
+ </xsl:template>
3036
+
3003
3037
  <!-- li/fmt-name -->
3004
3038
  <xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
3005
3039
  <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
@@ -6285,6 +6319,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6285
6319
  </xsl:if>
6286
6320
 
6287
6321
  <xsl:call-template name="setBordersTableArray"/>
6322
+
6323
+ <xsl:call-template name="setNoBordersForTableList"/>
6288
6324
  </xsl:template> <!-- refine_table-style -->
6289
6325
 
6290
6326
  <xsl:attribute-set name="table-number-style">
@@ -6327,6 +6363,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6327
6363
  <xsl:template name="refine_table-header-row-style">
6328
6364
 
6329
6365
  <xsl:call-template name="setBordersTableArray"/>
6366
+
6367
+ <xsl:call-template name="setNoBordersForTableList"/>
6330
6368
  </xsl:template> <!-- refine_table-header-row-style -->
6331
6369
 
6332
6370
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
@@ -6335,6 +6373,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6335
6373
  </xsl:attribute-set>
6336
6374
 
6337
6375
  <xsl:template name="refine_table-footer-row-style">
6376
+
6377
+ <xsl:call-template name="setNoBordersForTableList"/>
6338
6378
  </xsl:template> <!-- refine_table-footer-row-style -->
6339
6379
 
6340
6380
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -6344,6 +6384,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6344
6384
  <xsl:template name="refine_table-body-row-style">
6345
6385
 
6346
6386
  <xsl:call-template name="setBordersTableArray"/>
6387
+
6388
+ <xsl:call-template name="setNoBordersForTableList"/>
6347
6389
  </xsl:template> <!-- refine_table-body-row-style -->
6348
6390
 
6349
6391
  <xsl:attribute-set name="table-header-cell-style">
@@ -6369,6 +6411,16 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6369
6411
  </xsl:if>
6370
6412
 
6371
6413
  <xsl:call-template name="setTableCellAttributes"/>
6414
+
6415
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
6416
+ <xsl:attribute name="display-align">before</xsl:attribute>
6417
+ <xsl:attribute name="text-align">left</xsl:attribute>
6418
+ <xsl:if test="following-sibling::*">
6419
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
6420
+ </xsl:if>
6421
+ <xsl:call-template name="setNoBordersForTableList"/>
6422
+ </xsl:if>
6423
+
6372
6424
  </xsl:template> <!-- refine_table-header-cell-style -->
6373
6425
 
6374
6426
  <xsl:attribute-set name="table-cell-style">
@@ -6390,6 +6442,15 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6390
6442
 
6391
6443
  <xsl:call-template name="setBordersTableArray"/>
6392
6444
 
6445
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
6446
+ <xsl:attribute name="display-align">before</xsl:attribute>
6447
+ <xsl:attribute name="text-align">left</xsl:attribute>
6448
+ <xsl:if test="following-sibling::*">
6449
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
6450
+ </xsl:if>
6451
+ <xsl:call-template name="setNoBordersForTableList"/>
6452
+ </xsl:if>
6453
+
6393
6454
  </xsl:template> <!-- refine_table-cell-style -->
6394
6455
 
6395
6456
  <xsl:attribute-set name="table-footer-cell-style">
@@ -6401,6 +6462,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6401
6462
  </xsl:attribute-set> <!-- table-footer-cell-style -->
6402
6463
 
6403
6464
  <xsl:template name="refine_table-footer-cell-style">
6465
+
6466
+ <xsl:call-template name="setNoBordersForTableList"/>
6404
6467
  </xsl:template> <!-- refine_table-footer-cell-style -->
6405
6468
 
6406
6469
  <xsl:attribute-set name="table-note-style">
@@ -6446,6 +6509,16 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6446
6509
  <xsl:template name="refine_table-fn-body-style">
6447
6510
  </xsl:template>
6448
6511
 
6512
+ <xsl:template name="setNoBordersForTableList">
6513
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
6514
+ <xsl:attribute name="border">none</xsl:attribute>
6515
+ <xsl:attribute name="border-top">none</xsl:attribute>
6516
+ <xsl:attribute name="border-bottom">none</xsl:attribute>
6517
+ <xsl:attribute name="border-left">none</xsl:attribute>
6518
+ <xsl:attribute name="border-right">none</xsl:attribute>
6519
+ </xsl:if>
6520
+ </xsl:template>
6521
+
6449
6522
  <!-- ========================== -->
6450
6523
  <!-- END Table styles -->
6451
6524
  <!-- ========================== -->
@@ -12073,6 +12146,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
12073
12146
  </fo:list-item>
12074
12147
  </xsl:template>
12075
12148
 
12149
+ <xsl:template match="mn:fmt-ol | mn:fmt-ul">
12150
+ <xsl:apply-templates/>
12151
+ </xsl:template>
12152
+
12076
12153
  <!-- ===================================== -->
12077
12154
  <!-- END Lists processing -->
12078
12155
  <!-- ===================================== -->
@@ -13374,6 +13451,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
13374
13451
  </xsl:attribute-set>
13375
13452
 
13376
13453
  <xsl:template name="refine_toc-style">
13454
+ <xsl:copy-of select="@id"/>
13377
13455
  </xsl:template>
13378
13456
 
13379
13457
  <xsl:attribute-set name="toc-title-style">
@@ -13477,13 +13555,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
13477
13555
 
13478
13556
  <xsl:template name="processPrefaceSectionsDefault_Contents">
13479
13557
  <xsl:variable name="nodes_preface_">
13480
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
13558
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
13481
13559
  <node id="{@id}"/>
13482
13560
  </xsl:for-each>
13483
13561
  </xsl:variable>
13484
13562
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
13485
13563
 
13486
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
13564
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
13487
13565
  <xsl:sort select="@displayorder" data-type="number"/>
13488
13566
 
13489
13567
  <!-- process Section's title -->
@@ -13496,6 +13574,23 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
13496
13574
  </xsl:for-each>
13497
13575
  </xsl:template>
13498
13576
 
13577
+ <xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
13578
+ <xsl:variable name="title">
13579
+ <xsl:call-template name="getName"/>
13580
+ </xsl:variable>
13581
+ <xsl:variable name="root">
13582
+ <xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
13583
+ <xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
13584
+ </xsl:variable>
13585
+ <mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
13586
+ <mnx:title>
13587
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
13588
+ <xsl:with-param name="element" select="$root"/>
13589
+ </xsl:apply-templates>
13590
+ </mnx:title>
13591
+ </mnx:item>
13592
+ </xsl:template>
13593
+
13499
13594
  <xsl:template name="processMainSectionsDefault_Contents">
13500
13595
 
13501
13596
  <xsl:variable name="nodes_sections_">
@@ -15319,16 +15414,17 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
15319
15414
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
15320
15415
  <xsl:template name="insert_basic_link">
15321
15416
  <xsl:param name="element"/>
15417
+ <xsl:param name="wrapper">true</xsl:param>
15322
15418
  <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
15323
15419
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
15324
15420
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
15325
15421
  <xsl:choose>
15326
- <xsl:when test="$internal-destination = 'true'">
15422
+ <xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
15327
15423
  <fo:wrapper role="Reference">
15328
15424
  <xsl:copy-of select="$element_node"/>
15329
15425
  </fo:wrapper>
15330
15426
  </xsl:when>
15331
- <xsl:when test="$external-destination = 'true'">
15427
+ <xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
15332
15428
  <xsl:copy-of select="$element_node"/>
15333
15429
  </xsl:when>
15334
15430
  <xsl:otherwise>
@@ -1939,10 +1939,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
1939
1939
  <value>hasAnnotation</value>
1940
1940
  <value>draftOf</value>
1941
1941
  <value>hasDraft</value>
1942
- <value>preliminaryDraftOf</value>
1943
- <value>hasPreliminaryDraft</value>
1944
- <value>revisionDraftOf</value>
1945
- <value>hasRevisionDraft</value>
1942
+ <value>predecessorDraftOf</value>
1943
+ <value>hasPredecessorDraft</value>
1944
+ <value>successorDraftOf</value>
1945
+ <value>hasSuccessorDraft</value>
1946
1946
  <value>editionOf</value>
1947
1947
  <value>hasEdition</value>
1948
1948
  <value>updates</value>
@@ -641,8 +641,85 @@ This is done if the footnote reference is already presented in some other form,
641
641
  </ref>
642
642
  </zeroOrMore>
643
643
  </define>
644
+ <define name="altsource">
645
+ <a:documentation>Alternative file to use as media</a:documentation>
646
+ <element name="altsource">
647
+ <ref name="MediaAttributes"/>
648
+ <optional>
649
+ <attribute name="tag">
650
+ <a:documentation>Comma-delimited tag to indicate when the alternate file is to be used,
651
+ at minimum allows contain `html`, `doc`, `pdf` as the main target formats of Metanorma,
652
+ and `default` for the fallback. The presence of an altsource tagged `default` is required</a:documentation>
653
+ </attribute>
654
+ </optional>
655
+ <optional>
656
+ <attribute name="media">
657
+ <a:documentation>CSS media query to indicate when the alternate file is to be used</a:documentation>
658
+ </attribute>
659
+ </optional>
660
+ </element>
661
+ </define>
662
+ <define name="image">
663
+ <a:documentation>Container for image content</a:documentation>
664
+ <choice>
665
+ <element name="image">
666
+ <ref name="RequiredId"/>
667
+ <ref name="ImageAttributes">
668
+ <a:documentation>When specified along with altsource, ImageAttributes give the default image to be rendered</a:documentation>
669
+ </ref>
670
+ <ref name="ImageBody"/>
671
+ </element>
672
+ <element name="svg">
673
+ <a:documentation>Add svg mark up to image</a:documentation>
674
+ <oneOrMore>
675
+ <choice>
676
+ <text/>
677
+ <ref name="AnyElement"/>
678
+ </choice>
679
+ </oneOrMore>
680
+ </element>
681
+ </choice>
682
+ </define>
683
+ <define name="ImageAttributes">
684
+ <optional>
685
+ <ref name="MediaAttributes">
686
+ <a:documentation>If the image contains altsource, the media attributes are given on each of the altsource elements instead of the root node</a:documentation>
687
+ </ref>
688
+ </optional>
689
+ <ref name="MediaAccessibilityAttributes"/>
690
+ <optional>
691
+ <attribute name="width">
692
+ <a:documentation>Height of image</a:documentation>
693
+ <ref name="ImageSize"/>
694
+ </attribute>
695
+ </optional>
696
+ <optional>
697
+ <attribute name="height">
698
+ <a:documentation>Width of image</a:documentation>
699
+ <ref name="ImageSize"/>
700
+ </attribute>
701
+ </optional>
702
+ </define>
644
703
  </include>
645
704
  <!-- end overrides -->
705
+ <define name="ImageBody">
706
+ <optional>
707
+ <element name="svg">
708
+ <a:documentation>image can contain SVG XML, which is used to access its identifiers within the Metanorma XML</a:documentation>
709
+ <oneOrMore>
710
+ <choice>
711
+ <text/>
712
+ <ref name="AnyElement"/>
713
+ </choice>
714
+ </oneOrMore>
715
+ </element>
716
+ </optional>
717
+ <zeroOrMore>
718
+ <ref name="altsource">
719
+ <a:documentation>Alternative files to use as media</a:documentation>
720
+ </ref>
721
+ </zeroOrMore>
722
+ </define>
646
723
  <define name="key">
647
724
  <a:documentation>Key to a table, figure, or formula</a:documentation>
648
725
  <element name="key">
@@ -930,34 +1007,6 @@ titlecase, or lowercase</a:documentation>
930
1007
  <ref name="ReducedBibliographicItem"/>
931
1008
  </element>
932
1009
  </define>
933
- <define name="image" combine="choice">
934
- <choice>
935
- <element name="image">
936
- <ref name="RequiredId"/>
937
- <ref name="ImageAttributes"/>
938
- <optional>
939
- <element name="svg">
940
- <a:documentation>Allow svg in image/svg, for consistency</a:documentation>
941
- <oneOrMore>
942
- <choice>
943
- <text/>
944
- <ref name="AnyElement"/>
945
- </choice>
946
- </oneOrMore>
947
- </element>
948
- </optional>
949
- </element>
950
- <element name="svg">
951
- <a:documentation>Add svg mark up to image</a:documentation>
952
- <oneOrMore>
953
- <choice>
954
- <text/>
955
- <ref name="AnyElement"/>
956
- </choice>
957
- </oneOrMore>
958
- </element>
959
- </choice>
960
- </define>
961
1010
  <define name="ParagraphFnBody" combine="interleave">
962
1011
  <ref name="BlockSource">
963
1012
  <a:documentation>Bibliographic source for the information in the paragraph
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.8.1".freeze
3
+ VERSION = "2.8.3".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-02 00:00:00.000000000 Z
11
+ date: 2026-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso