metanorma-ribose 2.7.9 → 2.8.0

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: d7905a07814702213dd4ba17720dd1b43326c98d59f621e70fa5c2606d189ddd
4
- data.tar.gz: 93580473607817bea2d37253ea5dc1da52cb6b692167d2a8a499d13ae1c2f198
3
+ metadata.gz: b99fb4ebc43521b4eb7840a22c856307b48f6a7a95363779bb1f2a01f0da053d
4
+ data.tar.gz: 992a6e689b5997b04284ca030ac754e3cfd3b2ea3f966e46047cc9029d61cf04
5
5
  SHA512:
6
- metadata.gz: ff6f0b1e75d0a7864b1770305dfad316a105e1c38b0ed29b7c49c171b4f75d9bc91f182a151f69363938001e9f1be32790ca1101561fc5291dac2bc0ef06c2aa
7
- data.tar.gz: 3bd6f619078bd0df33c2d5b4fd8b8fe2b3fec7c87e46492b029d2b17b29797bdb37355f8e4b8158a798ca6b7ab53e4af89802d6a61648738273b609b119afa61
6
+ metadata.gz: 13913d8b99c512232bd50275d222eba6043000d8844e9e304997c54ddba2fa309e38ce8a19796cc4c42cbfe418f598e86f9543d1b1aa1c712cc7b52dfb8fbf1e
7
+ data.tar.gz: e9510124eb02b62fdba5ab55e208f6bc55f12e3394b503c4526b33808fd26d4051177c68bc36f3a988b24379e0a863c3c016792c73a99f2703f24de0033c5e49
@@ -1016,7 +1016,7 @@ ol ul > li:first-child {
1016
1016
  3.5 Bibliograhy
1017
1017
  */
1018
1018
  p.Biblio,
1019
- p.NormRef {
1019
+ p.NormRef, div.Biblio, div.NormRef {
1020
1020
  margin-top: 1em;
1021
1021
  margin-left: 2em;
1022
1022
  }
@@ -1146,6 +1146,10 @@ table th, table td {
1146
1146
  table td.header {
1147
1147
  font-weight: 400;
1148
1148
  }
1149
+ table table.plain, table table.plain th, table table.plain td {
1150
+ border: none !important;
1151
+ font-size: 0.95em;
1152
+ }
1149
1153
 
1150
1154
  p.TableTitle {
1151
1155
  text-align: center;
@@ -348,7 +348,7 @@ ol ul > li:first-child {
348
348
  */
349
349
 
350
350
  p.Biblio,
351
- p.NormRef {
351
+ p.NormRef, div.Biblio, div.NormRef {
352
352
  margin-top: 1em;
353
353
  margin-left: 2em;
354
354
  }
@@ -742,6 +742,11 @@ table.MsoISOTable td, table.MsoISOTableBig td {
742
742
  padding: 0cm 2.85pt 0cm 2.85pt;
743
743
  }
744
744
 
745
+ table.MsoNormalTable th, table.MsoNormalTable td {
746
+ border: none;
747
+ mso-border-alt: none;
748
+ }
749
+
745
750
  table.MsoISOTable p, table.MsoISOTableBig p {
746
751
  font-size: {{normalfontsize}};
747
752
  }
@@ -664,6 +664,10 @@ table.MsoISOTable td, table.MsoISOTableBig td
664
664
  {border:solid windowtext 1pt;
665
665
  mso-border-alt:solid windowtext 1pt;
666
666
  padding:0cm 2.85pt 0cm 2.85pt;}
667
+ table.MsoNormalTable th, table.MsoNormalTable td {
668
+ border: none;
669
+ mso-border-alt: none;
670
+ }
667
671
  table.MsoISOTable p, table.MsoISOTableBig p
668
672
  {font-size:$normalfontsize; }
669
673
  table.MsoTableGrid
@@ -420,7 +420,7 @@
420
420
  <xsl:template name="cover-page">
421
421
  <!-- Cover Page -->
422
422
  <xsl:choose>
423
- <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
423
+ <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:coverpage-image/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
424
424
  <xsl:call-template name="insertCoverPageFullImage"/>
425
425
  </xsl:when>
426
426
  <xsl:otherwise>
@@ -990,7 +990,8 @@
990
990
  </xsl:choose>
991
991
  </xsl:attribute>
992
992
  <fo:block padding-top="1mm" padding-bottom="0.5mm">
993
- <fo:inline font-size="11pt" font-weight="300">
993
+ <fo:inline xsl:use-attribute-sets="term-kind-style">
994
+ <xsl:call-template name="refine_term-kind-style"/>
994
995
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($term_kind))"/>
995
996
  </fo:inline>
996
997
  </fo:block>
@@ -1216,14 +1217,7 @@
1216
1217
  <xsl:text> </xsl:text>
1217
1218
  <xsl:call-template name="capitalizeWords">
1218
1219
  <xsl:with-param name="str">
1219
- <xsl:choose>
1220
- <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias">
1221
- <xsl:value-of select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias"/>
1222
- </xsl:when>
1223
- <xsl:otherwise>
1224
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
1225
- </xsl:otherwise>
1226
- </xsl:choose>
1220
+ <xsl:call-template name="getDoctype"/>
1227
1221
  </xsl:with-param>
1228
1222
  </xsl:call-template>
1229
1223
  </xsl:variable>
@@ -1350,12 +1344,13 @@
1350
1344
  <xsl:variable name="root_element">metanorma</xsl:variable>
1351
1345
 
1352
1346
  <!---examples: 2013, 2024 -->
1353
- <xsl:variable name="document_scheme" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'document-scheme']/mn:value)"/>
1347
+ <xsl:variable name="document_scheme" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:document-scheme)"/>
1354
1348
 
1355
1349
  <!-- external parameters -->
1356
1350
  <xsl:param name="svg_images"/> <!-- svg images array -->
1357
1351
  <xsl:variable name="images" select="document($svg_images)"/>
1358
1352
  <xsl:param name="basepath"/> <!-- base path for images -->
1353
+ <xsl:param name="mn2pdfpath"/> <!-- mn2pdf working directory -->
1359
1354
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
1360
1355
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
1361
1356
  <xsl:param name="output_path"/> <!-- output PDF file name -->
@@ -1478,8 +1473,6 @@
1478
1473
  </title-part>
1479
1474
  <title-part lang="fr">
1480
1475
  </title-part>
1481
- <title-part lang="ru">
1482
- </title-part>
1483
1476
  <title-part lang="zh">第 # 部分:</title-part>
1484
1477
  </xsl:variable>
1485
1478
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
@@ -1521,31 +1514,6 @@
1521
1514
  <xsl:copy-of select="//mn:metanorma/mn:localized-strings"/>
1522
1515
  </xsl:variable>
1523
1516
 
1524
- <xsl:template name="getTitle">
1525
- <xsl:param name="name"/>
1526
- <xsl:param name="lang"/>
1527
- <xsl:variable name="lang_">
1528
- <xsl:choose>
1529
- <xsl:when test="$lang != ''">
1530
- <xsl:value-of select="$lang"/>
1531
- </xsl:when>
1532
- <xsl:otherwise>
1533
- <xsl:call-template name="getLang"/>
1534
- </xsl:otherwise>
1535
- </xsl:choose>
1536
- </xsl:variable>
1537
- <xsl:variable name="language" select="normalize-space($lang_)"/>
1538
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1539
- <xsl:choose>
1540
- <xsl:when test="normalize-space($title_) != ''">
1541
- <xsl:value-of select="$title_"/>
1542
- </xsl:when>
1543
- <xsl:otherwise>
1544
- <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1545
- </xsl:otherwise>
1546
- </xsl:choose>
1547
- </xsl:template>
1548
-
1549
1517
  <!-- Characters -->
1550
1518
  <xsl:variable name="linebreak">&#8232;</xsl:variable>
1551
1519
  <xsl:variable name="tab_zh"> </xsl:variable>
@@ -1638,6 +1606,22 @@
1638
1606
  </xsl:choose>
1639
1607
  </xsl:variable>
1640
1608
 
1609
+ <xsl:attribute-set name="page-sequence-preface">
1610
+ <xsl:attribute name="format">i</xsl:attribute>
1611
+ </xsl:attribute-set>
1612
+
1613
+ <xsl:template name="refine_page-sequence-preface">
1614
+ <xsl:param name="layoutVersion"/>
1615
+ </xsl:template>
1616
+
1617
+ <xsl:attribute-set name="page-sequence-main">
1618
+
1619
+ </xsl:attribute-set>
1620
+
1621
+ <xsl:template name="refine_page-sequence-main">
1622
+ <xsl:param name="layoutVersion"/>
1623
+ </xsl:template>
1624
+
1641
1625
  <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>
1642
1626
  <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>
1643
1627
  <xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable>
@@ -1654,8 +1638,22 @@
1654
1638
  <xsl:param name="root-style"/>
1655
1639
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
1656
1640
 
1641
+ <xsl:variable name="additional_fonts___">
1642
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:fonts | //mn:metanorma[1]/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'fonts']/mn:value | //mn:metanorma[1]/mn:presentation-metadata[mn:name = 'fonts']/mn:value">
1643
+ <font><xsl:value-of select="."/></font>
1644
+ </xsl:for-each>
1645
+ </xsl:variable>
1646
+ <xsl:variable name="additional_fonts__">
1647
+ <!-- unique fonts -->
1648
+ <xsl:for-each select="xalan:nodeset($additional_fonts___)//font">
1649
+ <xsl:choose>
1650
+ <xsl:when test="preceding-sibling::font[text() = current()/text()]"><!-- skip --></xsl:when>
1651
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
1652
+ </xsl:choose>
1653
+ </xsl:for-each>
1654
+ </xsl:variable>
1657
1655
  <xsl:variable name="additional_fonts_">
1658
- <xsl:for-each select="//mn:metanorma[1]/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'fonts']/mn:value | //mn:metanorma[1]/mn:presentation-metadata[mn:name = 'fonts']/mn:value">
1656
+ <xsl:for-each select="xalan:nodeset($additional_fonts__)//font">
1659
1657
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
1660
1658
  </xsl:for-each>
1661
1659
  </xsl:variable>
@@ -3325,9 +3323,129 @@
3325
3323
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
3326
3324
 
3327
3325
  <xsl:template match="*[local-name() = 'property']" mode="css">
3328
- <xsl:attribute name="{@name}">
3329
- <xsl:value-of select="@value"/>
3330
- </xsl:attribute>
3326
+ <!-- don't delete leading and trailing spaces -->
3327
+ <!-- the list from https://www.data2type.de/en/xml-xslt-xslfo/xsl-fo/xsl-fo-introduction/blocks -->
3328
+ <xsl:variable name="allowed_attributes_">
3329
+ <xsl:text>
3330
+ background-attachment
3331
+ background-color
3332
+ background-image
3333
+ background-position-horizontal
3334
+ background-position-vertical
3335
+ background-repeat
3336
+ border
3337
+ border-after-color
3338
+ border-after-style
3339
+ border-after-width
3340
+ border-before-color
3341
+ border-before-style
3342
+ border-before-width
3343
+ border-bottom-color
3344
+ border-bottom-style
3345
+ border-bottom-width
3346
+ border-color
3347
+ border-end-color
3348
+ border-end-style
3349
+ border-end-width
3350
+ border-left-color
3351
+ border-left-style
3352
+ border-left-width
3353
+ border-right-color
3354
+ border-right-style
3355
+ border-right-width
3356
+ border-start-color
3357
+ border-start-style
3358
+ border-start-width
3359
+ border-style
3360
+ border-top-color
3361
+ border-top-style
3362
+ border-top-width
3363
+ border-width
3364
+ break-after
3365
+ break-before
3366
+ color
3367
+ country
3368
+ end-indent
3369
+ font-family
3370
+ font-model
3371
+ font-selection-strategy
3372
+ font-size
3373
+ font-size-adjust
3374
+ font-stretch
3375
+ font-style
3376
+ font-variant
3377
+ font-weight
3378
+ hyphenate
3379
+ hyphenation-character
3380
+ hyphenation-keep
3381
+ hyphenation-ladder-count
3382
+ hyphenation-push-character-count
3383
+ hyphenation-remain-character-count
3384
+ id
3385
+ intrusion-displace
3386
+ keep-together
3387
+ keep-with-next
3388
+ keep-with-previous
3389
+ language
3390
+ last-line-end-indent
3391
+ line-height
3392
+ line-height-shift-adjustment
3393
+ line-stacking-strategy
3394
+ linefeed-treatment
3395
+ margin
3396
+ margin-bottom
3397
+ margin-left
3398
+ margin-right
3399
+ margin-top
3400
+ orphans
3401
+ padding
3402
+ padding-after
3403
+ padding-before
3404
+ padding-bottom
3405
+ padding-end
3406
+ padding-left
3407
+ padding-right
3408
+ pause-after
3409
+ padding-start
3410
+ padding-top
3411
+ reference-orientation
3412
+ relative-position
3413
+ richness
3414
+ role
3415
+ script
3416
+ source-document
3417
+ space-after
3418
+ space-before
3419
+ span
3420
+ start-indent
3421
+ text-align
3422
+ text-align-last
3423
+ text-altitude
3424
+ text-depth
3425
+ text-indent
3426
+ visibility
3427
+ white-space-collapse
3428
+ white-space-treatment
3429
+ widows
3430
+ wrap-option
3431
+ </xsl:text>
3432
+ </xsl:variable>
3433
+ <xsl:variable name="allowed_attributes" select="concat(' ', normalize-space($allowed_attributes_), ' ')"/>
3434
+ <xsl:choose>
3435
+ <xsl:when test="contains($allowed_attributes, concat(' ', @name, ' '))">
3436
+ <xsl:attribute name="{@name}">
3437
+ <xsl:value-of select="@value"/>
3438
+ </xsl:attribute>
3439
+ </xsl:when>
3440
+ <xsl:when test="@name = 'border-radius'">
3441
+ <xsl:attribute name="fox:border-radius">
3442
+ <xsl:value-of select="@value"/>
3443
+ </xsl:attribute>
3444
+ </xsl:when>
3445
+ <xsl:otherwise>
3446
+ <!-- skip -->
3447
+ </xsl:otherwise>
3448
+ </xsl:choose>
3331
3449
  </xsl:template>
3332
3450
 
3333
3451
  <xsl:template name="get_sourcecode_attributes">
@@ -3369,11 +3487,12 @@
3369
3487
 
3370
3488
  <xsl:choose>
3371
3489
  <xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
3372
- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
3373
- <xsl:attribute name="{local-name()}">
3490
+ <!-- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
3491
+ <xsl:attribute name="{name()}">
3374
3492
  <xsl:value-of select="."/>
3375
3493
  </xsl:attribute>
3376
- </xsl:for-each>
3494
+ </xsl:for-each> -->
3495
+ <xsl:copy-of select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*"/>
3377
3496
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3378
3497
  </xsl:when>
3379
3498
 
@@ -3391,11 +3510,12 @@
3391
3510
 
3392
3511
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3393
3512
 
3394
- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
3395
- <xsl:attribute name="{local-name()}">
3513
+ <!-- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
3514
+ <xsl:attribute name="{name()}">
3396
3515
  <xsl:value-of select="."/>
3397
3516
  </xsl:attribute>
3398
- </xsl:for-each>
3517
+ </xsl:for-each> -->
3518
+ <xsl:copy-of select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*"/>
3399
3519
 
3400
3520
  <xsl:call-template name="refine_sourcecode-style"/>
3401
3521
 
@@ -3405,10 +3525,10 @@
3405
3525
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3406
3526
  </xsl:if>
3407
3527
 
3408
- <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
3528
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl or self::mn:key)]"/>
3409
3529
  </fo:block>
3410
3530
 
3411
- <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
3531
+ <xsl:apply-templates select="mn:dl | mn:key"/> <!-- Key table -->
3412
3532
 
3413
3533
  <!-- <xsl:choose>
3414
3534
  <xsl:when test="$namespace = 'rsd'"></xsl:when>
@@ -3506,7 +3626,7 @@
3506
3626
  </xsl:for-each>
3507
3627
  </xsl:variable>
3508
3628
  <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
3509
- <xsl:attribute name="{local-name()}">
3629
+ <xsl:attribute name="{name()}">
3510
3630
  <xsl:value-of select="."/>
3511
3631
  </xsl:attribute>
3512
3632
  </xsl:for-each>
@@ -4683,6 +4803,14 @@
4683
4803
  <xsl:template name="refine_term-style">
4684
4804
  </xsl:template>
4685
4805
 
4806
+ <xsl:attribute-set name="term-kind-style">
4807
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
4808
+ <xsl:attribute name="font-weight">300</xsl:attribute>
4809
+ </xsl:attribute-set>
4810
+
4811
+ <xsl:template name="refine_term-kind-style">
4812
+ </xsl:template>
4813
+
4686
4814
  <xsl:attribute-set name="term-number-style">
4687
4815
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4688
4816
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -5709,7 +5837,7 @@
5709
5837
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5710
5838
  </xsl:when>
5711
5839
  <xsl:otherwise>
5712
- <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5840
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:key) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5713
5841
  </xsl:otherwise>
5714
5842
  </xsl:choose>
5715
5843
 
@@ -6282,7 +6410,7 @@
6282
6410
  <xsl:param name="colwidths"/>
6283
6411
  <xsl:param name="colgroup"/>
6284
6412
 
6285
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
6413
+ <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
6286
6414
 
6287
6415
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6288
6416
  </xsl:variable>
@@ -6365,7 +6493,7 @@
6365
6493
 
6366
6494
  <!-- fn will be processed inside 'note' processing -->
6367
6495
  <xsl:apply-templates select="../mn:p"/>
6368
- <xsl:apply-templates select="../mn:dl"/>
6496
+ <xsl:apply-templates select="../mn:dl | ../mn:key"/>
6369
6497
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6370
6498
  <xsl:apply-templates select="../mn:example"/>
6371
6499
  <xsl:apply-templates select="../mn:fmt-source"/>
@@ -7680,7 +7808,7 @@
7680
7808
  </xsl:attribute-set>
7681
7809
 
7682
7810
  <xsl:template name="refine_dl-block-style">
7683
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
7811
+ <xsl:if test="(@key = 'true' or ancestor::mn:key) and ancestor::mn:figure">
7684
7812
  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
7685
7813
  </xsl:if>
7686
7814
  </xsl:template>
@@ -7791,15 +7919,15 @@
7791
7919
  <fo:block-container margin-left="0mm" role="SKIP">
7792
7920
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
7793
7921
 
7794
- <xsl:variable name="parent" select="local-name(..)"/>
7922
+ <xsl:variable name="parent" select="local-name(../..)"/>
7795
7923
 
7796
7924
  <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
7797
7925
  </xsl:variable>
7798
7926
 
7799
- <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(mn:dt) = 1)"/>
7927
+ <xsl:variable name="onlyOneFormulaKeyItem" select="normalize-space($parent = 'formula' and count(mn:dt) = 1)"/>
7800
7928
 
7801
7929
  <xsl:choose>
7802
- <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
7930
+ <xsl:when test="$onlyOneFormulaKeyItem = 'true'"> <!-- only one component -->
7803
7931
  <fo:block margin-bottom="12pt" text-align="left">
7804
7932
  <!-- <xsl:variable name="title-where">
7805
7933
  <xsl:call-template name="getLocalizedString">
@@ -7807,7 +7935,7 @@
7807
7935
  </xsl:call-template>
7808
7936
  </xsl:variable>
7809
7937
  <xsl:value-of select="$title-where"/> -->
7810
- <xsl:apply-templates select="preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
7938
+ <xsl:apply-templates select="ancestor::mn:key/preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
7811
7939
  <xsl:text> </xsl:text>
7812
7940
  <xsl:apply-templates select="mn:dt/*"/>
7813
7941
  <xsl:if test="mn:dd/node()[normalize-space() != ''][1][self::text()]">
@@ -7828,15 +7956,16 @@
7828
7956
  </xsl:variable>
7829
7957
  <xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'bsi' or $namespace = 'itu'">:</xsl:if> -->
7830
7958
  <!-- preceding 'p' with word 'where' -->
7831
- <xsl:apply-templates select="preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
7959
+ <!-- <xsl:apply-templates select="preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/> -->
7960
+ <xsl:apply-templates select="ancestor::mn:key/preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
7832
7961
  </fo:block>
7833
7962
  </xsl:when> <!-- END: a few components -->
7834
7963
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
7835
7964
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
7836
- <xsl:if test="not(preceding-sibling::*[1][self::mn:p and @keep-with-next])"> <!-- for old Presentation XML -->
7965
+ <xsl:if test="not(preceding-sibling::*[1][self::mn:p and @keep-with-next]) and 1 = 2"> <!-- for old Presentation XML -->
7837
7966
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
7838
7967
 
7839
- <xsl:call-template name="refine_figure_key_style"/>
7968
+ <xsl:call-template name="refine_figure-key-name-style"/>
7840
7969
 
7841
7970
  <xsl:variable name="title-key">
7842
7971
  <xsl:call-template name="getLocalizedString">
@@ -7850,7 +7979,7 @@
7850
7979
  </xsl:choose>
7851
7980
 
7852
7981
  <!-- a few components -->
7853
- <xsl:if test="$onlyOneComponent = 'false'">
7982
+ <xsl:if test="$onlyOneFormulaKeyItem = 'false'">
7854
7983
  <fo:block role="SKIP">
7855
7984
 
7856
7985
  <xsl:call-template name="refine_multicomponent_style"/>
@@ -7863,7 +7992,7 @@
7863
7992
 
7864
7993
  <xsl:call-template name="refine_multicomponent_block_style"/>
7865
7994
 
7866
- <xsl:apply-templates select="mn:fmt-name">
7995
+ <xsl:apply-templates select="mn:fmt-name | parent::mn:key[parent::mn:table]/mn:name">
7867
7996
  <xsl:with-param name="process">true</xsl:with-param>
7868
7997
  </xsl:apply-templates>
7869
7998
 
@@ -8038,11 +8167,11 @@
8038
8167
  </xsl:template> <!-- refine_dl_formula_where_style -->
8039
8168
 
8040
8169
  <xsl:template name="refine_multicomponent_style">
8041
- <xsl:variable name="parent" select="local-name(..)"/>
8170
+ <xsl:variable name="parent" select="local-name(../..)"/>
8042
8171
  </xsl:template> <!-- refine_multicomponent_style -->
8043
8172
 
8044
8173
  <xsl:template name="refine_multicomponent_block_style">
8045
- <xsl:variable name="parent" select="local-name(..)"/>
8174
+ <xsl:variable name="parent" select="local-name(../..)"/>
8046
8175
  </xsl:template> <!-- refine_multicomponent_block_style -->
8047
8176
 
8048
8177
  <!-- dl/name -->
@@ -9079,6 +9208,20 @@
9079
9208
  </xsl:if>
9080
9209
  </xsl:template>
9081
9210
 
9211
+ <xsl:attribute-set name="figure-key-name-style">
9212
+ <xsl:attribute name="text-align">left</xsl:attribute>
9213
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
9214
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9215
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
9216
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
9217
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
9218
+ <xsl:attribute name="color">black</xsl:attribute>
9219
+ </xsl:attribute-set> <!-- figure-key-name-style -->
9220
+
9221
+ <xsl:template name="refine_figure-key-name-style">
9222
+
9223
+ </xsl:template> <!-- refine_figure-key-name-style -->
9224
+
9082
9225
  <!-- ============================ -->
9083
9226
  <!-- figure's footnotes rendering -->
9084
9227
  <!-- ============================ -->
@@ -9241,7 +9384,7 @@
9241
9384
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
9242
9385
  <!-- figure's footnote label -->
9243
9386
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
9244
- <xsl:template match="mn:figure/mn:dl[@key = 'true']/mn:dt/ mn:p[count(node()[normalize-space() != '']) = 1]/mn:sup" priority="3">
9387
+ <xsl:template match="mn:figure/mn:dl[@key = 'true']/mn:dt/ mn:p[count(node()[normalize-space() != '']) = 1]/mn:sup | mn:figure/mn:key/mn:dl/mn:dt/ mn:p[count(node()[normalize-space() != '']) = 1]/mn:sup" priority="3">
9245
9388
  <xsl:variable name="key_iso">
9246
9389
  </xsl:variable>
9247
9390
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -9259,18 +9402,13 @@
9259
9402
  <!-- ============================ -->
9260
9403
 
9261
9404
  <!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
9262
- <xsl:template match="mn:figure/mn:p[@keep-with-next = 'true' and mn:strong]" priority="3">
9263
- <fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
9264
- <xsl:call-template name="refine_figure_key_style"/>
9405
+ <xsl:template match="mn:figure/mn:p[@keep-with-next = 'true' and mn:strong] | mn:figure/mn:key/mn:name" priority="3">
9406
+ <fo:block xsl:use-attribute-sets="figure-key-name-style">
9407
+ <xsl:call-template name="refine_figure-key-name-style"/>
9265
9408
  <xsl:apply-templates/>
9266
9409
  </fo:block>
9267
9410
  </xsl:template>
9268
9411
 
9269
- <xsl:template name="refine_figure_key_style">
9270
- <xsl:attribute name="font-weight">normal</xsl:attribute>
9271
- <xsl:attribute name="color">black</xsl:attribute>
9272
- </xsl:template> <!-- refine_figure_key_style -->
9273
-
9274
9412
  <!-- ====== -->
9275
9413
  <!-- figure -->
9276
9414
  <!-- image -->
@@ -9583,9 +9721,15 @@
9583
9721
  <xsl:otherwise>
9584
9722
  <xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
9585
9723
  <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
9724
+ <xsl:variable name="src_with_mn2pdfpath" select="concat($mn2pdfpath, @src)"/>
9725
+ <xsl:variable name="file_exists_in_mn2pdf_path" select="normalize-space(java:exists(java:java.io.File.new($src_with_mn2pdfpath)))"/>
9586
9726
  <xsl:choose>
9587
9727
  <xsl:when test="$file_exists = 'true'">
9588
- <xsl:value-of select="$src_with_basepath"/>
9728
+ <xsl:value-of select="java:org.metanorma.fop.Util.getURIFromPath($src_with_basepath)"/>
9729
+ </xsl:when>
9730
+ <xsl:when test="$file_exists_in_mn2pdf_path = 'true'">
9731
+ <!-- <xsl:value-of select="$src_with_mn2pdfpath"/> -->
9732
+ <xsl:value-of select="java:org.metanorma.fop.Util.getURIFromPath($src_with_mn2pdfpath)"/>
9589
9733
  </xsl:when>
9590
9734
  <xsl:otherwise>
9591
9735
  <xsl:value-of select="@src"/>
@@ -9699,7 +9843,12 @@
9699
9843
  <!-- =================== -->
9700
9844
  <!-- SVG images processing -->
9701
9845
  <!-- =================== -->
9702
- <xsl:variable name="figure_name_height">14</xsl:variable>
9846
+ <xsl:variable name="figure_name_height_">
9847
+ <!-- see figure-style padding-top=7.5mm, padding-bottom=7.5mm, margin-bottom=3mm, i.e. 14 + 15 + 3 (+ 4 for figure name margin) -->
9848
+ 36
9849
+
9850
+ </xsl:variable>
9851
+ <xsl:variable name="figure_name_height" select="number(normalize-space($figure_name_height_))"/>
9703
9852
  <xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><!-- paper width minus margins -->
9704
9853
  <xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><!-- paper height minus margins and title height -->
9705
9854
  <xsl:variable name="image_dpi" select="96"/>
@@ -9899,6 +10048,17 @@
9899
10048
  </xsl:if>
9900
10049
 
9901
10050
  <xsl:copy-of select="$svg_content"/>
10051
+
10052
+ <!-- <debug>
10053
+ <svg_width><xsl:value-of select="$svg_width"/></svg_width>
10054
+ <width_effective_px><xsl:value-of select="$width_effective_px"/></width_effective_px>
10055
+ <scale_x><xsl:value-of select="$scale_x"/></scale_x>
10056
+ <svg_height><xsl:value-of select="$svg_height"/></svg_height>
10057
+ <height_effective_px><xsl:value-of select="$height_effective_px"/></height_effective_px>
10058
+ <isPrecedingTitle><xsl:value-of select="$isPrecedingTitle"/></isPrecedingTitle>
10059
+ <scale_y><xsl:value-of select="$scale_y"/></scale_y>
10060
+ </debug> -->
10061
+
9902
10062
  </fo:instream-foreign-object>
9903
10063
  <!-- </fo:block> -->
9904
10064
  </xsl:copy>
@@ -10032,10 +10192,12 @@
10032
10192
  </xsl:for-each>
10033
10193
  </xsl:template>
10034
10194
 
10035
- <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
10036
- <xsl:variable name="svg_content" select="document(@src)"/>
10195
+ <!-- <p id="."><image id="" src="..." mimetype="image/svg+xml" height="auto" width="auto"/></p> -->
10196
+ <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]] | *[not(self::mn:figure)]/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))] and count(node()) = 0]" priority="2">
10197
+ <xsl:variable name="src"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
10198
+ <xsl:variable name="svg_content" select="document($src)"/>
10037
10199
  <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10038
- <xsl:for-each select="xalan:nodeset($svg_content)/node()">
10200
+ <xsl:for-each select="xalan:nodeset($svg_content)/*"> <!-- node() -->
10039
10201
  <xsl:call-template name="image_svg">
10040
10202
  <xsl:with-param name="name" select="$name"/>
10041
10203
  </xsl:call-template>
@@ -10309,7 +10471,7 @@
10309
10471
  <!-- ====== -->
10310
10472
 
10311
10473
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
10312
- <xsl:template match="mn:formula/*[self::mn:p and @keep-with-next = 'true' and following-sibling::*[1][self::mn:dl]]"/>
10474
+ <xsl:template match="mn:formula/*[self::mn:p and @keep-with-next = 'true' and following-sibling::*[1][self::mn:dl or self::mn:key]]"/>
10313
10475
 
10314
10476
  <!-- ======================================= -->
10315
10477
  <!-- math -->
@@ -11050,6 +11212,12 @@
11050
11212
  <!-- END Lists processing -->
11051
11213
  <!-- ===================================== -->
11052
11214
 
11215
+ <xsl:attribute-set name="footnote-separator-block-style">
11216
+ </xsl:attribute-set>
11217
+
11218
+ <xsl:template name="refine_footnote-separator-block-style">
11219
+ </xsl:template>
11220
+
11053
11221
  <xsl:attribute-set name="footnote-separator-leader-style">
11054
11222
  </xsl:attribute-set>
11055
11223
 
@@ -11589,6 +11757,8 @@
11589
11757
 
11590
11758
  <xsl:call-template name="processBibitem"/>
11591
11759
  </fo:block>
11760
+ <!-- for tags structure, see https://github.com/metanorma/metanorma-standoc/issues/1140#issuecomment-3831538094 -->
11761
+ <xsl:call-template name="processFormattedrefNotes"/>
11592
11762
 
11593
11763
  </xsl:template> <!-- bibitem -->
11594
11764
 
@@ -11629,7 +11799,7 @@
11629
11799
  </xsl:apply-templates>
11630
11800
  <xsl:apply-templates select="mn:formattedref"/>
11631
11801
  </fo:block>
11632
- <xsl:call-template name="processBibitemFollowingNotes"/>
11802
+ <xsl:call-template name="processFormattedrefNotes"/>
11633
11803
  </fo:list-item-body>
11634
11804
  </fo:list-item>
11635
11805
  </fo:list-block>
@@ -11664,7 +11834,7 @@
11664
11834
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11665
11835
  </xsl:call-template>
11666
11836
  </fo:block>
11667
- <xsl:call-template name="processBibitemFollowingNotes"/>
11837
+ <xsl:call-template name="processFormattedrefNotes"/>
11668
11838
  </fo:list-item-body>
11669
11839
  </fo:list-item>
11670
11840
  </xsl:otherwise>
@@ -11685,10 +11855,23 @@
11685
11855
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11686
11856
  </xsl:apply-templates>
11687
11857
  <xsl:apply-templates select="mn:formattedref"/>
11688
- <xsl:call-template name="processBibitemFollowingNotes"/>
11858
+ <!-- no processing for https://github.com/metanorma/metanorma-standoc/issues/1140#issuecomment-3831538094 -->
11859
+ <!-- <xsl:if test="ancestor::mn:references[@normative = 'true']">
11860
+ <xsl:call-template name="processBibitemFollowingNotes"/>
11861
+ </xsl:if> -->
11862
+
11689
11863
  <!-- end bibitem processing -->
11690
11864
  </xsl:template> <!-- processBibitem (bibitem) -->
11691
11865
 
11866
+ <!-- note at the end of formattedref, will be processed in processFormattedrefNotes -->
11867
+ <xsl:template match="mn:formattedref/mn:note[not(following-sibling::node()[normalize-space() != '' and not(self::mn:note)])]"/>
11868
+
11869
+ <xsl:template name="processFormattedrefNotes">
11870
+ <xsl:for-each select="mn:formattedref/mn:note[not(following-sibling::node()[normalize-space() != '' and not(self::mn:note)])]">
11871
+ <xsl:call-template name="note"/>
11872
+ </xsl:for-each>
11873
+ </xsl:template>
11874
+
11692
11875
  <xsl:template name="processBibitemFollowingNotes">
11693
11876
  <!-- current context is bibitem element -->
11694
11877
  <xsl:variable name="bibitem_id" select="@id"/>
@@ -13077,8 +13260,8 @@
13077
13260
 
13078
13261
  <xsl:variable name="toc_level">
13079
13262
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
13080
- <xsl:variable name="pdftoclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata[mn:name/text() = 'PDF TOC Heading Levels']/mn:value)"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
13081
- <xsl:variable name="toclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata[mn:name/text() = 'TOC Heading Levels']/mn:value)"/> <!-- Number of table of contents levels to render -->
13263
+ <xsl:variable name="pdftoclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata/mn:pdf-toc-heading-levels)"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
13264
+ <xsl:variable name="toclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata/mn:toc-heading-levels)"/> <!-- Number of table of contents levels to render -->
13082
13265
  <xsl:choose>
13083
13266
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
13084
13267
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -13640,6 +13823,35 @@
13640
13823
  <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
13641
13824
  </xsl:template> <!-- refine_title-style -->
13642
13825
 
13826
+ <xsl:attribute-set name="key-style">
13827
+
13828
+ </xsl:attribute-set>
13829
+
13830
+ <xsl:template name="refine_key-style">
13831
+
13832
+ </xsl:template>
13833
+
13834
+ <xsl:attribute-set name="key-name-style" use-attribute-sets="dl-name-style">
13835
+
13836
+ </xsl:attribute-set>
13837
+
13838
+ <xsl:template name="refine_key-name-style">
13839
+ </xsl:template>
13840
+
13841
+ <xsl:template match="mn:key">
13842
+ <xsl:apply-templates/>
13843
+ </xsl:template>
13844
+
13845
+ <xsl:template match="mn:key/mn:name">
13846
+ <xsl:param name="process">false</xsl:param>
13847
+ <xsl:if test="$process = 'true'">
13848
+ <fo:block xsl:use-attribute-sets="key-name-style">
13849
+ <xsl:call-template name="refine_key-name-style"/>
13850
+ <xsl:apply-templates/>
13851
+ </fo:block>
13852
+ </xsl:if>
13853
+ </xsl:template>
13854
+
13643
13855
  <xsl:template name="processPrefaceSectionsDefault">
13644
13856
  <xsl:param name="num"/>
13645
13857
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
@@ -14818,6 +15030,23 @@
14818
15030
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//mn:p[1]/@id"/>
14819
15031
  </xsl:template>
14820
15032
 
15033
+ <xsl:template name="getDoctype">
15034
+ <xsl:variable name="doctype_alias" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias)"/>
15035
+ <xsl:value-of select="$doctype_alias"/>
15036
+ <xsl:if test="$doctype_alias = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/></xsl:if>
15037
+ </xsl:template>
15038
+
15039
+ <xsl:template name="getDoctypeTitle">
15040
+ <xsl:variable name="doctype_i18n" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:doctype[@language = $lang])"/>
15041
+ <xsl:value-of select="$doctype_i18n"/>
15042
+ <xsl:if test="$doctype_i18n = ''">
15043
+ <xsl:variable name="doctype"><xsl:call-template name="getDoctype"/></xsl:variable>
15044
+ <xsl:call-template name="capitalizeWords">
15045
+ <xsl:with-param name="str" select="$doctype"/>
15046
+ </xsl:call-template>
15047
+ </xsl:if>
15048
+ </xsl:template>
15049
+
14821
15050
  <xsl:template name="setId">
14822
15051
  <xsl:param name="prefix"/>
14823
15052
  <xsl:attribute name="id">
@@ -14847,7 +15076,7 @@
14847
15076
  <xsl:template name="setNamedDestination">
14848
15077
  <xsl:if test="$isGenerateTableIF = 'false'">
14849
15078
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14850
- <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
15079
+ <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
14851
15080
  <fox:destination internal-destination="{@id}"/>
14852
15081
  </xsl:if>
14853
15082
  <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
@@ -15067,7 +15296,7 @@
15067
15296
  <!-- background image -->
15068
15297
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
15069
15298
  <fo:block>
15070
- <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
15299
+ <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image[$num]">
15071
15300
 
15072
15301
  <xsl:call-template name="insertPageImage"/>
15073
15302
 
@@ -15079,7 +15308,7 @@
15079
15308
  <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
15080
15309
  <xsl:template name="insertCoverPageFullImage">
15081
15310
  <xsl:param name="name">coverpage-image</xsl:param>
15082
- <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
15311
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
15083
15312
  <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
15084
15313
  <fo:flow flow-name="xsl-region-body">
15085
15314
  <xsl:call-template name="insertBackgroundPageImage">
@@ -15632,4 +15861,11 @@
15632
15861
  <!-- END: mode="set_table_role_skip" -->
15633
15862
  <!-- ============================================= -->
15634
15863
 
15864
+ <xsl:variable name="svg_empty">
15865
+ <!-- empty -->
15866
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
15867
+ <rect x="0" y="0" width="2" height="2" style="fill:#fff;fill-opacity:0;stroke:none"/>
15868
+ </svg>
15869
+ </xsl:variable>
15870
+
15635
15871
  </xsl:stylesheet>
@@ -167,12 +167,6 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
167
167
  </define>
168
168
  <define name="DlAttributes">
169
169
  <ref name="BlockAttributes"/>
170
- <optional>
171
- <attribute name="key">
172
- <a:documentation>This definition list is the key of a figure or formula</a:documentation>
173
- <data type="boolean"/>
174
- </attribute>
175
- </optional>
176
170
  </define>
177
171
  <define name="DlBody">
178
172
  <optional>
@@ -311,7 +305,7 @@ and is intended to be referenced by a callout within the source code</a:document
311
305
  </ref>
312
306
  </optional>
313
307
  <choice>
314
- <a:documentation>Content of the figure </a:documentation>
308
+ <a:documentation>Content of the figure</a:documentation>
315
309
  <ref name="image">
316
310
  <a:documentation>by default the content of a figure is a media file</a:documentation>
317
311
  </ref>
@@ -340,8 +334,8 @@ and is intended to be referenced by a callout within the source code</a:document
340
334
  </ref>
341
335
  </zeroOrMore>
342
336
  <optional>
343
- <ref name="dl">
344
- <a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
337
+ <ref name="key">
338
+ <a:documentation>An key defining any symbols used in the figure</a:documentation>
345
339
  </ref>
346
340
  </optional>
347
341
  <zeroOrMore>
@@ -365,7 +359,7 @@ and is intended to be referenced by a callout within the source code</a:document
365
359
  </ref>
366
360
  </optional>
367
361
  <choice>
368
- <a:documentation>Content of the figure </a:documentation>
362
+ <a:documentation>Content of the figure</a:documentation>
369
363
  <ref name="image-no-id">
370
364
  <a:documentation>by default the content of a figure is a media file</a:documentation>
371
365
  </ref>
@@ -429,7 +423,7 @@ in order to be applicable in this standardisation document</a:documentation>
429
423
  </element>
430
424
  </define>
431
425
  <define name="sourcecodebody">
432
- <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
426
+ <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
433
427
  (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
434
428
  <element name="body">
435
429
  <oneOrMore>
@@ -549,7 +543,7 @@ normative or informative references, some split references into sections organiz
549
543
  <choice>
550
544
  <a:documentation>Table cell contains a block</a:documentation>
551
545
  <ref name="paragraph-with-footnote"/>
552
- <ref name="dl"/>
546
+ <ref name="key"/>
553
547
  <ref name="ul"/>
554
548
  <ref name="ol"/>
555
549
  <ref name="figure"/>
@@ -632,8 +626,40 @@ This is done if the footnote reference is already presented in some other form,
632
626
  <a:documentation>The number of the footnote, used to identify it visually</a:documentation>
633
627
  </attribute>
634
628
  </define>
629
+ <define name="FormulaBody">
630
+ <ref name="stem">
631
+ <a:documentation>The content of the formula, as a mathematical expression</a:documentation>
632
+ </ref>
633
+ <optional>
634
+ <ref name="key">
635
+ <a:documentation>A key defining any symbols used in the formula</a:documentation>
636
+ </ref>
637
+ </optional>
638
+ <zeroOrMore>
639
+ <ref name="note">
640
+ <a:documentation>Notes whose scope is the current block</a:documentation>
641
+ </ref>
642
+ </zeroOrMore>
643
+ </define>
635
644
  </include>
636
645
  <!-- end overrides -->
646
+ <define name="key">
647
+ <a:documentation>Key to a table, figure, or formula</a:documentation>
648
+ <element name="key">
649
+ <optional>
650
+ <ref name="tname">
651
+ <a:documentation>optional title of key</a:documentation>
652
+ </ref>
653
+ </optional>
654
+ <oneOrMore>
655
+ <choice>
656
+ <a:documentation>Definition list and/or paragraph content</a:documentation>
657
+ <ref name="dl"/>
658
+ <ref name="paragraph"/>
659
+ </choice>
660
+ </oneOrMore>
661
+ </element>
662
+ </define>
637
663
  <define name="TdAttributes" combine="interleave">
638
664
  <ref name="RequiredId"/>
639
665
  <optional>
@@ -1042,7 +1068,7 @@ parargaph sources are currently only rendered in metanorma-plateau</a:documentat
1042
1068
  </optional>
1043
1069
  <optional>
1044
1070
  <attribute name="custom-charset">
1045
- <a:documentation>Character set that the contained text belongs to;
1071
+ <a:documentation>Character set that the contained text belongs to;
1046
1072
  is used in particular to capture mutually agreed definitions of codepoints in Unicode Private Use Area</a:documentation>
1047
1073
  </attribute>
1048
1074
  </optional>
@@ -1623,7 +1649,7 @@ numbers</a:documentation>
1623
1649
  <define name="definitions">
1624
1650
  <a:documentation>One or more definition lists, used to define symbols and abbreviations used in the remainder of the document.
1625
1651
  These can also be used as glossaries, with simple definitions, in contrast to the more elaborate definitions given in
1626
- terms sections </a:documentation>
1652
+ terms sections</a:documentation>
1627
1653
  <element name="definitions">
1628
1654
  <ref name="OptionalId"/>
1629
1655
  <ref name="LocalizedStringAttributes"/>
@@ -1864,7 +1890,7 @@ used in document amendments</a:documentation>
1864
1890
  </zeroOrMore>
1865
1891
  <zeroOrMore>
1866
1892
  <ref name="related">
1867
- <a:documentation>Zero or more names which are related to the term being defined. </a:documentation>
1893
+ <a:documentation>Zero or more names which are related to the term being defined.</a:documentation>
1868
1894
  </ref>
1869
1895
  </zeroOrMore>
1870
1896
  <optional>
@@ -2025,7 +2051,7 @@ used in document amendments</a:documentation>
2025
2051
  <element name="letter-symbol">
2026
2052
  <optional>
2027
2053
  <attribute name="isInternational">
2028
- <a:documentation>Whether the designation is the same across languages, or language-specific </a:documentation>
2054
+ <a:documentation>Whether the designation is the same across languages, or language-specific</a:documentation>
2029
2055
  <data type="boolean"/>
2030
2056
  </attribute>
2031
2057
  </optional>
@@ -2632,6 +2658,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
2632
2658
  <a:documentation>Connective linking this location to its predecessor. _from/to_ are presumed to nest more closely than _and_ or _or_</a:documentation>
2633
2659
  <ref name="XrefConnectiveType"/>
2634
2660
  </attribute>
2661
+ <optional>
2662
+ <attribute name="custom-connective">
2663
+ <a:documentation>Custom wording for connnective linking this location to its predecessor, custom wording. If provided, is treated as equivalent semantically to connective value</a:documentation>
2664
+ </attribute>
2665
+ </optional>
2635
2666
  </element>
2636
2667
  </define>
2637
2668
  <define name="XrefStyleType">
@@ -2658,6 +2689,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
2658
2689
  <ref name="XrefConnectiveType"/>
2659
2690
  </attribute>
2660
2691
  </optional>
2692
+ <optional>
2693
+ <attribute name="custom-connective">
2694
+ <a:documentation>Custom wording for connnective linking this location to its predecessor, custom wording. If provided, is treated as equivalent semantically to connective value</a:documentation>
2695
+ </attribute>
2696
+ </optional>
2661
2697
  <ref name="erefType"/>
2662
2698
  </define>
2663
2699
  <define name="erefstack">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.7.9".freeze
3
+ VERSION = "2.8.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.9
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-12-01 00:00:00.000000000 Z
11
+ date: 2026-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic