metanorma-jis 1.1.2 → 1.1.4

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: 3d4abe2a46fa57c119268f9707c768d0560e06c7cac92f237a1155d3d52c3898
4
- data.tar.gz: 780247bf2e7a9e5c8d03891cdc137e4d2f868d08e2c8dfc1bcf4afe80f29a7c1
3
+ metadata.gz: b87cd55f0519a978c4ae4be412172919a6e7eae9acfeb1d690dfc7a500af99e2
4
+ data.tar.gz: 863e8655d1d0f61baa970b21f218f755a5e8ff6d61e34c8855faf63d7c8ec9b7
5
5
  SHA512:
6
- metadata.gz: e1f27e99ecbcfbb7ab26bae1e9f5f7b9b05c359d5c668d3f7ca339a67f2d2cea0971791a00233867cc5ead1d21891edcc2e06ae2d5074b6286d60f0066f0b038
7
- data.tar.gz: cf7d226b4314530f668d69a828a8fa0da4e6fde4663bc4e17d0891bc844f6fab637bf9d008b16f82030eadc891da6da5b82bf1c6c7fa0edb59147bfe96f5d8a8
6
+ metadata.gz: 77f3f33959afc2eb072cfa70ea734cb6b9529c194a898fdcf5f65358d9cf7a98048f69f95d96f48dd282f3272e218e8fff974da50803c67d9ce3140a57ea9e35
7
+ data.tar.gz: d9600c009eccb9731c8ea7312adb5bf5010a55ba65e90abdcd223ba697ff48daf3f4b752d5ac922915496fe8a18c7ea0f4448be5699660446b1e1b4c57cb8a15
data/.rubocop.yml CHANGED
@@ -3,8 +3,20 @@
3
3
  inherit_from:
4
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
5
 
6
+ # Rubocop plugins enabled centrally so every metanorma-org gem picks them up
7
+ # on cimas sync — best practice belongs at the shared-template layer, not
8
+ # per-repo. Per ronaldtse feedback on metanorma/ci#332.
9
+ plugins:
10
+ - rubocop-rspec
11
+ - rubocop-performance
12
+ - rubocop-rake
13
+
6
14
  # local repo-specific modifications
7
15
  # ...
8
16
 
9
17
  AllCops:
10
- TargetRubyVersion: 3.4
18
+ # 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
19
+ # Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
20
+ # this commit — 3.4 was above the org's stated minimum and would have
21
+ # applied Rubocop rules that fail-close on gems still targeting 3.3.
22
+ TargetRubyVersion: 3.3
@@ -1024,7 +1024,7 @@
1024
1024
  <xsl:call-template name="refine_toc-style"/>
1025
1025
 
1026
1026
  <xsl:if test="$updated_contents_xml/mnx:doc[@num = $num]//mnx:item[@display = 'true']">
1027
- <xsl:for-each select="$updated_contents_xml/mnx:doc[@num = $num]//mnx:item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table']">
1027
+ <xsl:for-each select="$updated_contents_xml/mnx:doc[@num = $num]//mnx:item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table' or @type = 'example']">
1028
1028
  <fo:block role="TOCI">
1029
1029
  <xsl:choose>
1030
1030
  <xsl:when test="@type = 'annex' or @type = 'bibliography'">
@@ -5664,6 +5664,16 @@
5664
5664
  </xsl:if>
5665
5665
  </xsl:variable>
5666
5666
 
5667
+ <xsl:variable name="title-list-examples">
5668
+ <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
5669
+ <xsl:value-of select="$toc_example_title"/>
5670
+ <xsl:if test="normalize-space($toc_example_title) = ''">
5671
+ <xsl:call-template name="getLocalizedString">
5672
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
5673
+ </xsl:call-template>
5674
+ </xsl:if>
5675
+ </xsl:variable>
5676
+
5667
5677
  <xsl:variable name="title-list-recommendations">
5668
5678
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
5669
5679
  <xsl:value-of select="$toc_requirement_title"/>
@@ -11188,6 +11198,12 @@
11188
11198
  <style name="{$key}-left"><xsl:value-of select="$value"/></style>
11189
11199
  <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
11190
11200
  </xsl:if>
11201
+ <xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
11202
+ <style name="keep-together.within-page">always</style>
11203
+ </xsl:if>
11204
+ <xsl:if test="$key = 'page-break-after' and $value = 'always'">
11205
+ <style name="break-after">page</style>
11206
+ </xsl:if>
11191
11207
  </xsl:for-each>
11192
11208
  </xsl:variable>
11193
11209
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -11231,6 +11247,11 @@
11231
11247
 
11232
11248
  <fo:block role="SKIP">
11233
11249
 
11250
+ <xsl:variable name="styles">
11251
+ <styles><xsl:call-template name="setTableStyles"/></styles>
11252
+ </xsl:variable>
11253
+ <xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
11254
+
11234
11255
  <xsl:if test="$isGenerateTableIF = 'true'">
11235
11256
  <fo:inline>
11236
11257
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -13426,21 +13447,38 @@
13426
13447
  <!-- ====== -->
13427
13448
  <!-- ====== -->
13428
13449
 
13429
- <xsl:attribute-set name="quote-style">
13450
+ <xsl:attribute-set name="quote-container-style">
13430
13451
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
13431
13452
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
13453
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13454
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13432
13455
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
13433
13456
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
13434
- </xsl:attribute-set> <!-- quote-style -->
13457
+ </xsl:attribute-set>
13435
13458
 
13436
- <xsl:template name="refine_quote-style">
13459
+ <xsl:template name="refine_quote-container-style">
13460
+ <xsl:if test="parent::mn:note">
13461
+ <xsl:if test="not(ancestor::mn:table)">
13462
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
13463
+ </xsl:if>
13464
+ </xsl:if>
13437
13465
  <xsl:if test="ancestor::mn:li">
13438
13466
  <xsl:attribute name="margin-left">7.5mm</xsl:attribute>
13439
13467
  </xsl:if>
13468
+ </xsl:template>
13469
+
13470
+ <xsl:attribute-set name="quote-style">
13471
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13472
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
13473
+
13474
+ </xsl:attribute-set> <!-- quote-style -->
13475
+
13476
+ <xsl:template name="refine_quote-style">
13440
13477
  </xsl:template> <!-- refine_quote-style -->
13441
13478
 
13442
13479
  <xsl:attribute-set name="quote-source-style">
13443
13480
  <xsl:attribute name="text-align">right</xsl:attribute>
13481
+ <xsl:attribute name="margin-right">-12mm</xsl:attribute>
13444
13482
  </xsl:attribute-set> <!-- quote-source-style -->
13445
13483
 
13446
13484
  <xsl:template name="refine_quote-source-style">
@@ -13463,12 +13501,9 @@
13463
13501
 
13464
13502
  <xsl:call-template name="setBlockSpanAll"/>
13465
13503
 
13466
- <xsl:if test="parent::mn:note">
13467
- <xsl:if test="not(ancestor::mn:table)">
13468
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
13469
- </xsl:if>
13470
- </xsl:if>
13471
- <fo:block-container margin-left="0mm" role="SKIP">
13504
+ <fo:block-container xsl:use-attribute-sets="quote-container-style">
13505
+ <xsl:call-template name="refine_quote-container-style"/>
13506
+
13472
13507
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
13473
13508
 
13474
13509
  <xsl:call-template name="refine_quote-style"/>
@@ -13480,14 +13515,16 @@
13480
13515
  </fo:block-container>
13481
13516
  </fo:block-container>
13482
13517
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
13483
- <fo:block xsl:use-attribute-sets="quote-source-style">
13484
- <xsl:call-template name="refine_quote-source-style"/>
13485
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
13486
- <xsl:apply-templates select="mn:author"/>
13487
- <xsl:apply-templates select="mn:fmt-source"/>
13488
- <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
13489
- <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
13490
- </fo:block>
13518
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13519
+ <fo:block xsl:use-attribute-sets="quote-source-style">
13520
+ <xsl:call-template name="refine_quote-source-style"/>
13521
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
13522
+ <xsl:apply-templates select="mn:author"/>
13523
+ <xsl:apply-templates select="mn:fmt-source"/>
13524
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
13525
+ <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
13526
+ </fo:block>
13527
+ </fo:block-container>
13491
13528
  </xsl:if>
13492
13529
  <!-- render footnotes after references -->
13493
13530
  <xsl:apply-templates select=".//mn:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
@@ -17197,7 +17234,7 @@
17197
17234
  <xsl:template name="refine_toc-pagenumber-style">
17198
17235
  </xsl:template>
17199
17236
 
17200
- <!-- List of Figures, Tables -->
17237
+ <!-- List of Figures, Tables, Examples -->
17201
17238
  <xsl:attribute-set name="toc-listof-title-style">
17202
17239
  </xsl:attribute-set>
17203
17240
 
@@ -17295,6 +17332,9 @@
17295
17332
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
17296
17333
  <xsl:call-template name="processFigures_Contents"/>
17297
17334
  </xsl:if>
17335
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
17336
+ <xsl:call-template name="processExamples_Contents"/>
17337
+ </xsl:if>
17298
17338
  </xsl:template>
17299
17339
 
17300
17340
  <xsl:template name="processTables_Contents">
@@ -17341,7 +17381,29 @@
17341
17381
  </mnx:figures>
17342
17382
  </xsl:template>
17343
17383
 
17344
- <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name" mode="contents">
17384
+ <xsl:template name="processExamples_Contents">
17385
+ <mnx:examples>
17386
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
17387
+ <xsl:choose>
17388
+ <xsl:when test="mn:fmt-name">
17389
+ <xsl:variable name="fmt_name">
17390
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
17391
+ </xsl:variable>
17392
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
17393
+ <xsl:copy-of select="$fmt_name"/>
17394
+ </mnx:example>
17395
+ </xsl:when>
17396
+ <xsl:otherwise>
17397
+ <mnx:example id="{@id}" alt-text="{mn:name}">
17398
+ <xsl:copy-of select="mn:name"/>
17399
+ </mnx:example>
17400
+ </xsl:otherwise>
17401
+ </xsl:choose>
17402
+ </xsl:for-each>
17403
+ </mnx:examples>
17404
+ </xsl:template>
17405
+
17406
+ <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name" mode="contents">
17345
17407
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
17346
17408
  <xsl:apply-templates mode="contents"/>
17347
17409
  <xsl:text> </xsl:text>
@@ -17350,40 +17412,40 @@
17350
17412
 
17351
17413
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
17352
17414
 
17353
- <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
17415
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
17354
17416
  <xsl:apply-templates mode="contents"/>
17355
17417
  <xsl:text> </xsl:text>
17356
17418
  </xsl:template>
17357
17419
 
17358
- <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
17420
+ <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
17359
17421
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
17360
17422
  <xsl:apply-templates mode="bookmarks"/>
17361
17423
  <xsl:text> </xsl:text>
17362
17424
  </xsl:if>
17363
17425
  </xsl:template>
17364
17426
 
17365
- <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
17427
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
17366
17428
  <xsl:apply-templates mode="bookmarks"/>
17367
17429
  <xsl:text> </xsl:text>
17368
17430
  </xsl:template>
17369
17431
 
17370
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
17432
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
17371
17433
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
17372
17434
  <xsl:value-of select="."/>
17373
17435
  </xsl:if>
17374
17436
  </xsl:template>
17375
17437
 
17376
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
17438
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
17377
17439
  <xsl:value-of select="."/>
17378
17440
  </xsl:template>
17379
17441
 
17380
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
17442
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
17381
17443
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
17382
17444
  <xsl:value-of select="."/>
17383
17445
  </xsl:if>
17384
17446
  </xsl:template>
17385
17447
 
17386
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
17448
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
17387
17449
  <xsl:value-of select="."/>
17388
17450
  </xsl:template>
17389
17451
 
@@ -17616,6 +17678,11 @@
17616
17678
  <xsl:with-param name="lang" select="@lang"/>
17617
17679
  </xsl:call-template>
17618
17680
 
17681
+ <xsl:call-template name="insertExampleBookmarks">
17682
+ <xsl:with-param name="contents" select="mnx:contents"/>
17683
+ <xsl:with-param name="lang" select="@lang"/>
17684
+ </xsl:call-template>
17685
+
17619
17686
  </fo:bookmark>
17620
17687
 
17621
17688
  </xsl:for-each>
@@ -17634,6 +17701,11 @@
17634
17701
  <xsl:with-param name="lang" select="@lang"/>
17635
17702
  </xsl:call-template>
17636
17703
 
17704
+ <xsl:call-template name="insertExampleBookmarks">
17705
+ <xsl:with-param name="contents" select="mnx:contents"/>
17706
+ <xsl:with-param name="lang" select="@lang"/>
17707
+ </xsl:call-template>
17708
+
17637
17709
  </xsl:for-each>
17638
17710
  </xsl:otherwise>
17639
17711
  </xsl:choose>
@@ -17650,6 +17722,11 @@
17650
17722
  <xsl:with-param name="lang" select="@lang"/>
17651
17723
  </xsl:call-template>
17652
17724
 
17725
+ <xsl:call-template name="insertExampleBookmarks">
17726
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
17727
+ <xsl:with-param name="lang" select="@lang"/>
17728
+ </xsl:call-template>
17729
+
17653
17730
  </xsl:otherwise>
17654
17731
  </xsl:choose>
17655
17732
 
@@ -17730,6 +17807,46 @@
17730
17807
  </fo:bookmark>
17731
17808
  </xsl:if>
17732
17809
  </xsl:template> <!-- insertTableBookmarks -->
17810
+
17811
+ <xsl:template name="insertExampleBookmarks">
17812
+ <xsl:param name="contents"/>
17813
+ <xsl:param name="lang"/>
17814
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
17815
+ <xsl:if test="$contents_nodes/mnx:example">
17816
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
17817
+ <fo:bookmark-title>
17818
+ <xsl:choose>
17819
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
17820
+ <xsl:otherwise>Examples</xsl:otherwise>
17821
+ </xsl:choose>
17822
+ </fo:bookmark-title>
17823
+ <xsl:for-each select="$contents_nodes/mnx:example">
17824
+ <fo:bookmark internal-destination="{@id}">
17825
+ <fo:bookmark-title>
17826
+ <xsl:value-of select="normalize-space(mnx:title)"/>
17827
+ </fo:bookmark-title>
17828
+ </fo:bookmark>
17829
+ </xsl:for-each>
17830
+ </fo:bookmark>
17831
+ </xsl:if>
17832
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
17833
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
17834
+
17835
+ <xsl:variable name="bookmark-title">
17836
+ <xsl:value-of select="$title-list-examples"/>
17837
+ </xsl:variable>
17838
+
17839
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
17840
+
17841
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
17842
+ <fo:bookmark internal-destination="{@id}">
17843
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
17844
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
17845
+ </fo:bookmark>
17846
+ </xsl:for-each>
17847
+ </fo:bookmark>
17848
+ </xsl:if>
17849
+ </xsl:template> <!-- insertExampleBookmarks -->
17733
17850
  <!-- End Bookmarks -->
17734
17851
 
17735
17852
  <!-- ============================ -->
@@ -18783,6 +18900,10 @@
18783
18900
  <fo:block break-after="page"/>
18784
18901
  </xsl:template>
18785
18902
 
18903
+ <xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
18904
+ <fo:block break-after="page"/>
18905
+ </xsl:template>
18906
+
18786
18907
  <xsl:variable name="font_main_root_style">
18787
18908
  <root-style xsl:use-attribute-sets="root-style">
18788
18909
  </root-style>
@@ -1902,15 +1902,40 @@ or as the string "auto"</a:documentation>
1902
1902
  <a:documentation>Mathematically formatted text</a:documentation>
1903
1903
  <element name="stem">
1904
1904
  <ref name="StemAttributes"/>
1905
- <oneOrMore>
1906
- <choice>
1905
+ <optional>
1906
+ <text>
1907
1907
  <a:documentation>The content of the mathematically formatted text</a:documentation>
1908
- <text/>
1909
- <ref name="AnyElement"/>
1910
- </choice>
1911
- </oneOrMore>
1908
+ </text>
1909
+ </optional>
1910
+ <optional>
1911
+ <ref name="mathml"/>
1912
+ </optional>
1913
+ <optional>
1914
+ <ref name="asciimath"/>
1915
+ </optional>
1916
+ <optional>
1917
+ <ref name="latexmath"/>
1918
+ </optional>
1912
1919
  </element>
1913
1920
  </define>
1921
+ <define name="latexmath">
1922
+ <a:documentation>Encoding of LatexMath</a:documentation>
1923
+ <element name="latexmath">
1924
+ <text/>
1925
+ </element>
1926
+ </define>
1927
+ <define name="asciimath">
1928
+ <a:documentation>Encoding of AsciiMath</a:documentation>
1929
+ <element name="asciimath">
1930
+ <text/>
1931
+ </element>
1932
+ </define>
1933
+ <define name="mathml">
1934
+ <a:documentation>Encoding of MathML: the official W3C MathML 3.0 grammar (namespace
1935
+ http://www.w3.org/1998/Math/MathML), via the metanorma wrapper in
1936
+ grammars/mathml/. See grammars/mathml/README.adoc and basicdoc-models#35.</a:documentation>
1937
+ <externalRef href="metanorma-mathml.rng"/>
1938
+ </define>
1914
1939
  <define name="StemAttributes">
1915
1940
  <attribute name="type">
1916
1941
  <a:documentation>The notation used to mathematically format the text</a:documentation>
@@ -213,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
213
213
  <define name="ExampleAttributes">
214
214
  <ref name="NumberingAttributes"/>
215
215
  <ref name="BlockAttributes"/>
216
+ <optional>
217
+ <attribute name="collapsible">
218
+ <a:documentation>Render the example as collapsible (HTML5 details/summary)</a:documentation>
219
+ <data type="boolean"/>
220
+ </attribute>
221
+ </optional>
216
222
  </define>
217
223
  <define name="ExampleBody">
218
224
  <optional>
@@ -846,7 +852,7 @@ titlecase, or lowercase</a:documentation>
846
852
  <a:documentation>Width of the figure block in rendering</a:documentation>
847
853
  </attribute>
848
854
  </optional>
849
- <ref name="BlockAttributes"/>
855
+ <ref name="BlockAttributesCore"/>
850
856
  </define>
851
857
  <define name="SourceAttributes" combine="interleave">
852
858
  <ref name="BlockAttributes"/>
@@ -1277,7 +1283,11 @@ That concept may be defined as a term within the current document, or it may be
1277
1283
  <a:documentation>Class of input form</a:documentation>
1278
1284
  </attribute>
1279
1285
  </optional>
1280
- <ref name="BlockAttributes"/>
1286
+ <ref name="BlockAttributesCore">
1287
+ <a:documentation>form declares its own class above, so it uses BlockAttributesCore to
1288
+ avoid duplicating the custom-class slot in BlockAttributes. Treated like
1289
+ figure. See metanorma/metanorma-standoc#1197</a:documentation>
1290
+ </ref>
1281
1291
  <zeroOrMore>
1282
1292
  <!-- Input form contents -->
1283
1293
  <choice>
@@ -2762,7 +2772,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
2762
2772
  </oneOrMore>
2763
2773
  </element>
2764
2774
  </define>
2765
- <define name="BlockAttributes">
2775
+ <define name="BlockAttributesCore">
2776
+ <a:documentation>Block attributes excluding the custom CSS class. Blocks that already carry
2777
+ their own `class` attribute (e.g. figure, via basicdoc FigureAttributes)
2778
+ include this directly, to avoid a duplicate-attribute collision with the
2779
+ `class` added in BlockAttributes. See metanorma/metanorma-standoc#1197</a:documentation>
2766
2780
  <optional>
2767
2781
  <attribute name="keep-with-next">
2768
2782
  <a:documentation>Keep this block on the same page as the following block in paged media</a:documentation>
@@ -2794,6 +2808,17 @@ to span across both columns</a:documentation>
2794
2808
  </attribute>
2795
2809
  </optional>
2796
2810
  </define>
2811
+ <define name="BlockAttributes">
2812
+ <a:documentation>Universal block attributes, including a custom CSS class (space-separated,
2813
+ appended additively to the block's built-in HTML class, HTML output only).
2814
+ See metanorma/metanorma-standoc#1197</a:documentation>
2815
+ <ref name="BlockAttributesCore"/>
2816
+ <optional>
2817
+ <attribute name="class">
2818
+ <a:documentation>Custom CSS class(es) for the block in HTML output</a:documentation>
2819
+ </attribute>
2820
+ </optional>
2821
+ </define>
2797
2822
  <define name="DisplayDirective">
2798
2823
  <a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
2799
2824
  <optional>