metanorma-iho 1.3.6 → 1.3.8

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: eaa4ffd846496315d4a7327ac310bbabef36a1a6fbeec2664bdcc7ee97db3c33
4
- data.tar.gz: ebf1a1c807f151f763dd9926d52476335b0c54770d3023de8a495f55cd76068c
3
+ metadata.gz: 5efd7832e7a0e02ae37acbf566d454432d3051ee15f177cf4cd172dac455e699
4
+ data.tar.gz: 6ca97b5aa179d0113672032931aeeaa7387dd90599d64f73a07f79701a7a65de
5
5
  SHA512:
6
- metadata.gz: 7e649be816e1d3151097bca1a4351257eb03f2f40eea9d7eb69e9cd9a2a4b8376364a2c2bb2c418517ebf2a8cf7e37e096712b86df49e0375c1b87b26ed19f42
7
- data.tar.gz: 70b20e74cb6547d05b1cd2f92321710df3a33eb15b535b44bcd99c5665d15ba657a52157523256c00dc4e92e72c2e77a54c32e40a07dabd3c2f8dc7ca2358500
6
+ metadata.gz: 374c6f56a7a143032febf72897cb56ddc7d72feaf5d803e9a0cbacba84a75d192d8491485e26e7c5c61c731ec2dbcd8b2870277f6aca2bed117ab514fbea0e10
7
+ data.tar.gz: ddfde998b4c68c56460bc282abb8f6b2f39a6d59af15f8a2076ef1c4bd9ebfc9356873c60bea37f89371ccb9410634026abab190ab3aeb9b177b4f0537ccd50a
@@ -589,7 +589,9 @@ main {
589
589
  background-color: #05164D;
590
590
  color: white !important;
591
591
  cursor: pointer;
592
- z-index: 100;
592
+ left: 0;
593
+ top: 0;
594
+ z-index: 103;
593
595
  }
594
596
  #toggle span {
595
597
  text-align: center;
@@ -908,6 +910,10 @@ h3, .h3 {
908
910
  font-weight: 100;
909
911
  }
910
912
 
913
+ span.TermNum {
914
+ font-weight: bold;
915
+ }
916
+
911
917
  h2.TermNum {
912
918
  margin-bottom: 0;
913
919
  }
@@ -256,6 +256,10 @@ h3, .h3 {
256
256
  font-weight: 100;
257
257
  }
258
258
 
259
+ span.TermNum {
260
+ font-weight: bold;
261
+ }
262
+
259
263
  h2.TermNum {
260
264
  margin-bottom: 0;
261
265
  }
@@ -778,6 +778,16 @@
778
778
  </xsl:if>
779
779
  <xsl:call-template name="insertListOf_Item"/>
780
780
  </xsl:for-each>
781
+
782
+ <!-- List of Examples -->
783
+ <xsl:for-each select="$contents//mnx:examples/mnx:example">
784
+ <xsl:if test="position() = 1">
785
+ <xsl:call-template name="insertListOf_Title">
786
+ <xsl:with-param name="title" select="$title-list-examples"/>
787
+ </xsl:call-template>
788
+ </xsl:if>
789
+ <xsl:call-template name="insertListOf_Item"/>
790
+ </xsl:for-each>
781
791
  </fo:block>
782
792
  </xsl:if>
783
793
  </fo:block>
@@ -785,6 +795,7 @@
785
795
 
786
796
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
787
797
  <fo:block xsl:use-attribute-sets="toc-title-style">
798
+ <xsl:call-template name="refine_toc-title-style"/>
788
799
  <fo:block-container width="18.3mm" border-bottom="1.25pt solid black" role="SKIP">
789
800
  <fo:block line-height="75%">
790
801
  <!-- <xsl:call-template name="getLocalizedString">
@@ -1385,6 +1396,16 @@
1385
1396
  </xsl:if>
1386
1397
  </xsl:variable>
1387
1398
 
1399
+ <xsl:variable name="title-list-examples">
1400
+ <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
1401
+ <xsl:value-of select="$toc_example_title"/>
1402
+ <xsl:if test="normalize-space($toc_example_title) = ''">
1403
+ <xsl:call-template name="getLocalizedString">
1404
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
1405
+ </xsl:call-template>
1406
+ </xsl:if>
1407
+ </xsl:variable>
1408
+
1388
1409
  <xsl:variable name="title-list-recommendations">
1389
1410
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
1390
1411
  <xsl:value-of select="$toc_requirement_title"/>
@@ -2267,6 +2288,14 @@
2267
2288
 
2268
2289
  <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2269
2290
 
2291
+ <xsl:template match="mn:pagebreak" mode="update_xml_step1">
2292
+ <xsl:copy>
2293
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2294
+ <xsl:attribute name="from_source_xml">true</xsl:attribute>
2295
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
2296
+ </xsl:copy>
2297
+ </xsl:template>
2298
+
2270
2299
  <!-- END: update new Presentation XML -->
2271
2300
 
2272
2301
  <!-- =========================================================================== -->
@@ -2304,6 +2333,7 @@
2304
2333
  <xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
2305
2334
  <xsl:if test="following-sibling::*">false</xsl:if>
2306
2335
  </xsl:for-each>
2336
+ <xsl:if test="@from_source_xml = 'true'">false</xsl:if>
2307
2337
  </xsl:variable>
2308
2338
 
2309
2339
  <xsl:if test="contains($isLast, 'false')">
@@ -3202,6 +3232,7 @@
3202
3232
  </xsl:attribute-set> <!-- sourcecode-style -->
3203
3233
 
3204
3234
  <xsl:template name="refine_sourcecode-style">
3235
+ <xsl:call-template name="setKeepAttributes"/>
3205
3236
  </xsl:template> <!-- refine_sourcecode-style -->
3206
3237
 
3207
3238
  <xsl:attribute-set name="sourcecode-number-style">
@@ -3940,10 +3971,38 @@
3940
3971
  <xsl:template name="refine_strike-style">
3941
3972
  </xsl:template>
3942
3973
 
3974
+ <xsl:attribute-set name="hr-block-style">
3975
+ <xsl:attribute name="font-size">1pt</xsl:attribute>
3976
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3977
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3978
+ <xsl:attribute name="padding-top">-2pt</xsl:attribute>
3979
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
3980
+ </xsl:attribute-set>
3981
+
3982
+ <xsl:template name="refine_hr-block-style">
3983
+ </xsl:template>
3984
+
3985
+ <xsl:attribute-set name="hr-style">
3986
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
3987
+ <xsl:attribute name="leader-length">100%</xsl:attribute>
3988
+ </xsl:attribute-set>
3989
+
3990
+ <xsl:template name="refine_hr-style">
3991
+ </xsl:template>
3992
+
3943
3993
  <xsl:template match="mn:br">
3944
3994
  <xsl:value-of select="$linebreak"/>
3945
3995
  </xsl:template>
3946
3996
 
3997
+ <xsl:template match="mn:hr">
3998
+ <fo:block xsl:use-attribute-sets="hr-block-style">
3999
+ <xsl:call-template name="refine_hr-block-style"/>
4000
+ <fo:leader xsl:use-attribute-sets="hr-style">
4001
+ <xsl:call-template name="refine_hr-style"/>
4002
+ </fo:leader>
4003
+ </fo:block>
4004
+ </xsl:template>
4005
+
3947
4006
  <xsl:template match="mn:em">
3948
4007
  <fo:inline xsl:use-attribute-sets="em-style">
3949
4008
  <xsl:call-template name="refine_em_style"/>
@@ -5181,6 +5240,7 @@
5181
5240
  text line 1
5182
5241
  text line 2
5183
5242
  -->
5243
+ <xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
5184
5244
  <xsl:template match="mn:example" name="example">
5185
5245
  <xsl:call-template name="setNamedDestination"/>
5186
5246
  <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
@@ -5190,7 +5250,8 @@
5190
5250
  <xsl:call-template name="refine_example-style"/>
5191
5251
 
5192
5252
  <xsl:variable name="fo_element">
5193
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
5253
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
5254
+ <xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>inline
5194
5255
  </xsl:variable>
5195
5256
 
5196
5257
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -12543,7 +12604,7 @@
12543
12604
  <xsl:template name="refine_toc-pagenumber-style">
12544
12605
  </xsl:template>
12545
12606
 
12546
- <!-- List of Figures, Tables -->
12607
+ <!-- List of Figures, Tables, Examples -->
12547
12608
  <xsl:attribute-set name="toc-listof-title-style">
12548
12609
  <xsl:attribute name="role">TOCI</xsl:attribute>
12549
12610
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -12648,6 +12709,9 @@
12648
12709
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
12649
12710
  <xsl:call-template name="processFigures_Contents"/>
12650
12711
  </xsl:if>
12712
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
12713
+ <xsl:call-template name="processExamples_Contents"/>
12714
+ </xsl:if>
12651
12715
  </xsl:template>
12652
12716
 
12653
12717
  <xsl:template name="processTables_Contents">
@@ -12694,7 +12758,29 @@
12694
12758
  </mnx:figures>
12695
12759
  </xsl:template>
12696
12760
 
12697
- <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">
12761
+ <xsl:template name="processExamples_Contents">
12762
+ <mnx:examples>
12763
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
12764
+ <xsl:choose>
12765
+ <xsl:when test="mn:fmt-name">
12766
+ <xsl:variable name="fmt_name">
12767
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
12768
+ </xsl:variable>
12769
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
12770
+ <xsl:copy-of select="$fmt_name"/>
12771
+ </mnx:example>
12772
+ </xsl:when>
12773
+ <xsl:otherwise>
12774
+ <mnx:example id="{@id}" alt-text="{mn:name}">
12775
+ <xsl:copy-of select="mn:name"/>
12776
+ </mnx:example>
12777
+ </xsl:otherwise>
12778
+ </xsl:choose>
12779
+ </xsl:for-each>
12780
+ </mnx:examples>
12781
+ </xsl:template>
12782
+
12783
+ <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">
12698
12784
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12699
12785
  <xsl:apply-templates mode="contents"/>
12700
12786
  <xsl:text> </xsl:text>
@@ -12703,40 +12789,40 @@
12703
12789
 
12704
12790
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12705
12791
 
12706
- <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">
12792
+ <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">
12707
12793
  <xsl:apply-templates mode="contents"/>
12708
12794
  <xsl:text> </xsl:text>
12709
12795
  </xsl:template>
12710
12796
 
12711
- <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">
12797
+ <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">
12712
12798
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12713
12799
  <xsl:apply-templates mode="bookmarks"/>
12714
12800
  <xsl:text> </xsl:text>
12715
12801
  </xsl:if>
12716
12802
  </xsl:template>
12717
12803
 
12718
- <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">
12804
+ <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">
12719
12805
  <xsl:apply-templates mode="bookmarks"/>
12720
12806
  <xsl:text> </xsl:text>
12721
12807
  </xsl:template>
12722
12808
 
12723
- <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">
12809
+ <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">
12724
12810
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12725
12811
  <xsl:value-of select="."/>
12726
12812
  </xsl:if>
12727
12813
  </xsl:template>
12728
12814
 
12729
- <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">
12815
+ <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">
12730
12816
  <xsl:value-of select="."/>
12731
12817
  </xsl:template>
12732
12818
 
12733
- <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">
12819
+ <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">
12734
12820
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12735
12821
  <xsl:value-of select="."/>
12736
12822
  </xsl:if>
12737
12823
  </xsl:template>
12738
12824
 
12739
- <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">
12825
+ <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">
12740
12826
  <xsl:value-of select="."/>
12741
12827
  </xsl:template>
12742
12828
 
@@ -12969,6 +13055,11 @@
12969
13055
  <xsl:with-param name="lang" select="@lang"/>
12970
13056
  </xsl:call-template>
12971
13057
 
13058
+ <xsl:call-template name="insertExampleBookmarks">
13059
+ <xsl:with-param name="contents" select="mnx:contents"/>
13060
+ <xsl:with-param name="lang" select="@lang"/>
13061
+ </xsl:call-template>
13062
+
12972
13063
  </fo:bookmark>
12973
13064
 
12974
13065
  </xsl:for-each>
@@ -12987,6 +13078,11 @@
12987
13078
  <xsl:with-param name="lang" select="@lang"/>
12988
13079
  </xsl:call-template>
12989
13080
 
13081
+ <xsl:call-template name="insertExampleBookmarks">
13082
+ <xsl:with-param name="contents" select="mnx:contents"/>
13083
+ <xsl:with-param name="lang" select="@lang"/>
13084
+ </xsl:call-template>
13085
+
12990
13086
  </xsl:for-each>
12991
13087
  </xsl:otherwise>
12992
13088
  </xsl:choose>
@@ -13003,6 +13099,11 @@
13003
13099
  <xsl:with-param name="lang" select="@lang"/>
13004
13100
  </xsl:call-template>
13005
13101
 
13102
+ <xsl:call-template name="insertExampleBookmarks">
13103
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13104
+ <xsl:with-param name="lang" select="@lang"/>
13105
+ </xsl:call-template>
13106
+
13006
13107
  </xsl:otherwise>
13007
13108
  </xsl:choose>
13008
13109
 
@@ -13083,6 +13184,46 @@
13083
13184
  </fo:bookmark>
13084
13185
  </xsl:if>
13085
13186
  </xsl:template> <!-- insertTableBookmarks -->
13187
+
13188
+ <xsl:template name="insertExampleBookmarks">
13189
+ <xsl:param name="contents"/>
13190
+ <xsl:param name="lang"/>
13191
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13192
+ <xsl:if test="$contents_nodes/mnx:example">
13193
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
13194
+ <fo:bookmark-title>
13195
+ <xsl:choose>
13196
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
13197
+ <xsl:otherwise>Examples</xsl:otherwise>
13198
+ </xsl:choose>
13199
+ </fo:bookmark-title>
13200
+ <xsl:for-each select="$contents_nodes/mnx:example">
13201
+ <fo:bookmark internal-destination="{@id}">
13202
+ <fo:bookmark-title>
13203
+ <xsl:value-of select="normalize-space(mnx:title)"/>
13204
+ </fo:bookmark-title>
13205
+ </fo:bookmark>
13206
+ </xsl:for-each>
13207
+ </fo:bookmark>
13208
+ </xsl:if>
13209
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
13210
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13211
+
13212
+ <xsl:variable name="bookmark-title">
13213
+ <xsl:value-of select="$title-list-examples"/>
13214
+ </xsl:variable>
13215
+
13216
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
13217
+
13218
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
13219
+ <fo:bookmark internal-destination="{@id}">
13220
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
13221
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
13222
+ </fo:bookmark>
13223
+ </xsl:for-each>
13224
+ </fo:bookmark>
13225
+ </xsl:if>
13226
+ </xsl:template> <!-- insertExampleBookmarks -->
13086
13227
  <!-- End Bookmarks -->
13087
13228
 
13088
13229
  <!-- ============================ -->
@@ -778,6 +778,16 @@
778
778
  </xsl:if>
779
779
  <xsl:call-template name="insertListOf_Item"/>
780
780
  </xsl:for-each>
781
+
782
+ <!-- List of Examples -->
783
+ <xsl:for-each select="$contents//mnx:examples/mnx:example">
784
+ <xsl:if test="position() = 1">
785
+ <xsl:call-template name="insertListOf_Title">
786
+ <xsl:with-param name="title" select="$title-list-examples"/>
787
+ </xsl:call-template>
788
+ </xsl:if>
789
+ <xsl:call-template name="insertListOf_Item"/>
790
+ </xsl:for-each>
781
791
  </fo:block>
782
792
  </xsl:if>
783
793
  </fo:block>
@@ -785,6 +795,7 @@
785
795
 
786
796
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
787
797
  <fo:block xsl:use-attribute-sets="toc-title-style">
798
+ <xsl:call-template name="refine_toc-title-style"/>
788
799
  <fo:block-container width="18.3mm" border-bottom="1.25pt solid black" role="SKIP">
789
800
  <fo:block line-height="75%">
790
801
  <!-- <xsl:call-template name="getLocalizedString">
@@ -1385,6 +1396,16 @@
1385
1396
  </xsl:if>
1386
1397
  </xsl:variable>
1387
1398
 
1399
+ <xsl:variable name="title-list-examples">
1400
+ <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
1401
+ <xsl:value-of select="$toc_example_title"/>
1402
+ <xsl:if test="normalize-space($toc_example_title) = ''">
1403
+ <xsl:call-template name="getLocalizedString">
1404
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
1405
+ </xsl:call-template>
1406
+ </xsl:if>
1407
+ </xsl:variable>
1408
+
1388
1409
  <xsl:variable name="title-list-recommendations">
1389
1410
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
1390
1411
  <xsl:value-of select="$toc_requirement_title"/>
@@ -2267,6 +2288,14 @@
2267
2288
 
2268
2289
  <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2269
2290
 
2291
+ <xsl:template match="mn:pagebreak" mode="update_xml_step1">
2292
+ <xsl:copy>
2293
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2294
+ <xsl:attribute name="from_source_xml">true</xsl:attribute>
2295
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
2296
+ </xsl:copy>
2297
+ </xsl:template>
2298
+
2270
2299
  <!-- END: update new Presentation XML -->
2271
2300
 
2272
2301
  <!-- =========================================================================== -->
@@ -2304,6 +2333,7 @@
2304
2333
  <xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
2305
2334
  <xsl:if test="following-sibling::*">false</xsl:if>
2306
2335
  </xsl:for-each>
2336
+ <xsl:if test="@from_source_xml = 'true'">false</xsl:if>
2307
2337
  </xsl:variable>
2308
2338
 
2309
2339
  <xsl:if test="contains($isLast, 'false')">
@@ -3202,6 +3232,7 @@
3202
3232
  </xsl:attribute-set> <!-- sourcecode-style -->
3203
3233
 
3204
3234
  <xsl:template name="refine_sourcecode-style">
3235
+ <xsl:call-template name="setKeepAttributes"/>
3205
3236
  </xsl:template> <!-- refine_sourcecode-style -->
3206
3237
 
3207
3238
  <xsl:attribute-set name="sourcecode-number-style">
@@ -3940,10 +3971,38 @@
3940
3971
  <xsl:template name="refine_strike-style">
3941
3972
  </xsl:template>
3942
3973
 
3974
+ <xsl:attribute-set name="hr-block-style">
3975
+ <xsl:attribute name="font-size">1pt</xsl:attribute>
3976
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3977
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3978
+ <xsl:attribute name="padding-top">-2pt</xsl:attribute>
3979
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
3980
+ </xsl:attribute-set>
3981
+
3982
+ <xsl:template name="refine_hr-block-style">
3983
+ </xsl:template>
3984
+
3985
+ <xsl:attribute-set name="hr-style">
3986
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
3987
+ <xsl:attribute name="leader-length">100%</xsl:attribute>
3988
+ </xsl:attribute-set>
3989
+
3990
+ <xsl:template name="refine_hr-style">
3991
+ </xsl:template>
3992
+
3943
3993
  <xsl:template match="mn:br">
3944
3994
  <xsl:value-of select="$linebreak"/>
3945
3995
  </xsl:template>
3946
3996
 
3997
+ <xsl:template match="mn:hr">
3998
+ <fo:block xsl:use-attribute-sets="hr-block-style">
3999
+ <xsl:call-template name="refine_hr-block-style"/>
4000
+ <fo:leader xsl:use-attribute-sets="hr-style">
4001
+ <xsl:call-template name="refine_hr-style"/>
4002
+ </fo:leader>
4003
+ </fo:block>
4004
+ </xsl:template>
4005
+
3947
4006
  <xsl:template match="mn:em">
3948
4007
  <fo:inline xsl:use-attribute-sets="em-style">
3949
4008
  <xsl:call-template name="refine_em_style"/>
@@ -5181,6 +5240,7 @@
5181
5240
  text line 1
5182
5241
  text line 2
5183
5242
  -->
5243
+ <xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
5184
5244
  <xsl:template match="mn:example" name="example">
5185
5245
  <xsl:call-template name="setNamedDestination"/>
5186
5246
  <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
@@ -5190,7 +5250,8 @@
5190
5250
  <xsl:call-template name="refine_example-style"/>
5191
5251
 
5192
5252
  <xsl:variable name="fo_element">
5193
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
5253
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
5254
+ <xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>inline
5194
5255
  </xsl:variable>
5195
5256
 
5196
5257
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -12543,7 +12604,7 @@
12543
12604
  <xsl:template name="refine_toc-pagenumber-style">
12544
12605
  </xsl:template>
12545
12606
 
12546
- <!-- List of Figures, Tables -->
12607
+ <!-- List of Figures, Tables, Examples -->
12547
12608
  <xsl:attribute-set name="toc-listof-title-style">
12548
12609
  <xsl:attribute name="role">TOCI</xsl:attribute>
12549
12610
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -12648,6 +12709,9 @@
12648
12709
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
12649
12710
  <xsl:call-template name="processFigures_Contents"/>
12650
12711
  </xsl:if>
12712
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
12713
+ <xsl:call-template name="processExamples_Contents"/>
12714
+ </xsl:if>
12651
12715
  </xsl:template>
12652
12716
 
12653
12717
  <xsl:template name="processTables_Contents">
@@ -12694,7 +12758,29 @@
12694
12758
  </mnx:figures>
12695
12759
  </xsl:template>
12696
12760
 
12697
- <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">
12761
+ <xsl:template name="processExamples_Contents">
12762
+ <mnx:examples>
12763
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
12764
+ <xsl:choose>
12765
+ <xsl:when test="mn:fmt-name">
12766
+ <xsl:variable name="fmt_name">
12767
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
12768
+ </xsl:variable>
12769
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
12770
+ <xsl:copy-of select="$fmt_name"/>
12771
+ </mnx:example>
12772
+ </xsl:when>
12773
+ <xsl:otherwise>
12774
+ <mnx:example id="{@id}" alt-text="{mn:name}">
12775
+ <xsl:copy-of select="mn:name"/>
12776
+ </mnx:example>
12777
+ </xsl:otherwise>
12778
+ </xsl:choose>
12779
+ </xsl:for-each>
12780
+ </mnx:examples>
12781
+ </xsl:template>
12782
+
12783
+ <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">
12698
12784
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12699
12785
  <xsl:apply-templates mode="contents"/>
12700
12786
  <xsl:text> </xsl:text>
@@ -12703,40 +12789,40 @@
12703
12789
 
12704
12790
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12705
12791
 
12706
- <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">
12792
+ <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">
12707
12793
  <xsl:apply-templates mode="contents"/>
12708
12794
  <xsl:text> </xsl:text>
12709
12795
  </xsl:template>
12710
12796
 
12711
- <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">
12797
+ <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">
12712
12798
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12713
12799
  <xsl:apply-templates mode="bookmarks"/>
12714
12800
  <xsl:text> </xsl:text>
12715
12801
  </xsl:if>
12716
12802
  </xsl:template>
12717
12803
 
12718
- <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">
12804
+ <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">
12719
12805
  <xsl:apply-templates mode="bookmarks"/>
12720
12806
  <xsl:text> </xsl:text>
12721
12807
  </xsl:template>
12722
12808
 
12723
- <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">
12809
+ <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">
12724
12810
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12725
12811
  <xsl:value-of select="."/>
12726
12812
  </xsl:if>
12727
12813
  </xsl:template>
12728
12814
 
12729
- <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">
12815
+ <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">
12730
12816
  <xsl:value-of select="."/>
12731
12817
  </xsl:template>
12732
12818
 
12733
- <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">
12819
+ <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">
12734
12820
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12735
12821
  <xsl:value-of select="."/>
12736
12822
  </xsl:if>
12737
12823
  </xsl:template>
12738
12824
 
12739
- <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">
12825
+ <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">
12740
12826
  <xsl:value-of select="."/>
12741
12827
  </xsl:template>
12742
12828
 
@@ -12969,6 +13055,11 @@
12969
13055
  <xsl:with-param name="lang" select="@lang"/>
12970
13056
  </xsl:call-template>
12971
13057
 
13058
+ <xsl:call-template name="insertExampleBookmarks">
13059
+ <xsl:with-param name="contents" select="mnx:contents"/>
13060
+ <xsl:with-param name="lang" select="@lang"/>
13061
+ </xsl:call-template>
13062
+
12972
13063
  </fo:bookmark>
12973
13064
 
12974
13065
  </xsl:for-each>
@@ -12987,6 +13078,11 @@
12987
13078
  <xsl:with-param name="lang" select="@lang"/>
12988
13079
  </xsl:call-template>
12989
13080
 
13081
+ <xsl:call-template name="insertExampleBookmarks">
13082
+ <xsl:with-param name="contents" select="mnx:contents"/>
13083
+ <xsl:with-param name="lang" select="@lang"/>
13084
+ </xsl:call-template>
13085
+
12990
13086
  </xsl:for-each>
12991
13087
  </xsl:otherwise>
12992
13088
  </xsl:choose>
@@ -13003,6 +13099,11 @@
13003
13099
  <xsl:with-param name="lang" select="@lang"/>
13004
13100
  </xsl:call-template>
13005
13101
 
13102
+ <xsl:call-template name="insertExampleBookmarks">
13103
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13104
+ <xsl:with-param name="lang" select="@lang"/>
13105
+ </xsl:call-template>
13106
+
13006
13107
  </xsl:otherwise>
13007
13108
  </xsl:choose>
13008
13109
 
@@ -13083,6 +13184,46 @@
13083
13184
  </fo:bookmark>
13084
13185
  </xsl:if>
13085
13186
  </xsl:template> <!-- insertTableBookmarks -->
13187
+
13188
+ <xsl:template name="insertExampleBookmarks">
13189
+ <xsl:param name="contents"/>
13190
+ <xsl:param name="lang"/>
13191
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13192
+ <xsl:if test="$contents_nodes/mnx:example">
13193
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
13194
+ <fo:bookmark-title>
13195
+ <xsl:choose>
13196
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
13197
+ <xsl:otherwise>Examples</xsl:otherwise>
13198
+ </xsl:choose>
13199
+ </fo:bookmark-title>
13200
+ <xsl:for-each select="$contents_nodes/mnx:example">
13201
+ <fo:bookmark internal-destination="{@id}">
13202
+ <fo:bookmark-title>
13203
+ <xsl:value-of select="normalize-space(mnx:title)"/>
13204
+ </fo:bookmark-title>
13205
+ </fo:bookmark>
13206
+ </xsl:for-each>
13207
+ </fo:bookmark>
13208
+ </xsl:if>
13209
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
13210
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13211
+
13212
+ <xsl:variable name="bookmark-title">
13213
+ <xsl:value-of select="$title-list-examples"/>
13214
+ </xsl:variable>
13215
+
13216
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
13217
+
13218
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
13219
+ <fo:bookmark internal-destination="{@id}">
13220
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
13221
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
13222
+ </fo:bookmark>
13223
+ </xsl:for-each>
13224
+ </fo:bookmark>
13225
+ </xsl:if>
13226
+ </xsl:template> <!-- insertExampleBookmarks -->
13086
13227
  <!-- End Bookmarks -->
13087
13228
 
13088
13229
  <!-- ============================ -->
@@ -34,32 +34,32 @@ module IsoDoc
34
34
  def annex_names_recurse(clause, num)
35
35
  if @klass.single_term_clause?(clause)
36
36
  annex_names1(clause.at(ns("./references | ./terms | ./definitions")),
37
- nil, num.to_s, 1)
37
+ nil, num.to_s, 1)
38
38
  else
39
- i = Counter.new
40
- clause.xpath(ns("./clause | ./references | ./terms | ./definitions"))
41
- .each do |c|
42
- i.increment(c)
43
- annex_names1(c, semx(clause, num), i.print, 2)
44
- end
39
+ i = Counter.new
40
+ clause.xpath(ns("./clause | ./references | ./terms | ./definitions"))
41
+ .each do |c|
42
+ i.increment(c)
43
+ annex_names1(c, semx(clause, num), i.print, 2)
44
+ end
45
45
  end
46
46
  end
47
47
 
48
48
  # avoid ambiguity of Table 1-1 being in Appendix 1 or Clause 1
49
49
  def annex_asset_names(clause, num, lbl)
50
- #@annex_prefix = lbl
51
- #require "debug"; binding.b
52
- #hierarchical_asset_names(clause, num)
50
+ # @annex_prefix = lbl
51
+ # require "debug"; binding.b
52
+ # hierarchical_asset_names(clause, num)
53
53
  n = num
54
54
  clause["obligation"] == "informative" and n = labelled_autonum(lbl, num)
55
55
  hierarchical_asset_names(clause, n)
56
- #@annex_prefix = nil
56
+ # @annex_prefix = nil
57
57
  end
58
58
 
59
- #def anchor_struct_value(lbl, elem)
60
- #@annex_prefix and lbl = l10n("<span class='fmt-element-name'>#{@annex_prefix}</span> #{lbl}")
61
- #super
62
- #end
59
+ # def anchor_struct_value(lbl, elem)
60
+ # @annex_prefix and lbl = l10n("<span class='fmt-element-name'>#{@annex_prefix}</span> #{lbl}")
61
+ # super
62
+ # end
63
63
 
64
64
  def clause_order_main(docxml)
65
65
  if docxml.at(ns("//bibliography//references[@normative = 'true']")) ||
@@ -68,15 +68,15 @@ module IsoDoc
68
68
  { path: "//sections/clause[@type = 'scope']" },
69
69
  { path: "#{@klass.norm_ref_xpath} | //sections/references" },
70
70
  { path: "//sections/terms | //sections/definitions | " \
71
- "//sections/clause[not(@type = 'scope')]", multi: true },
71
+ "//sections/clause[not(@type = 'scope')]", multi: true },
72
72
  ]
73
73
  else
74
74
  [
75
75
  { path: "//sections/terms | //sections/definitions | " \
76
- "//sections/references | " \
77
- "//bibliography/references[@normative = 'true'] | " \
78
- "//bibliography/clause[.//references[@normative = 'true']] | " \
79
- "//sections/clause", multi: true },
76
+ "//sections/references | " \
77
+ "//bibliography/references[@normative = 'true'] | " \
78
+ "//bibliography/clause[.//references[@normative = 'true']] | " \
79
+ "//sections/clause", multi: true },
80
80
  ]
81
81
  end
82
82
  end
@@ -116,7 +116,8 @@ module IsoDoc
116
116
  clause.xpath(ns("./appendix")).each do |c|
117
117
  i.increment(c)
118
118
  @anchors[c["id"]] =
119
- anchor_struct(i.print, c, @labels["appendix"], "clause", { container: true })
119
+ anchor_struct(i.print, c, @labels["appendix"], "clause",
120
+ { container: true })
120
121
  @anchors[c["id"]][:level] = 2
121
122
  @anchors[c["id"]][:container] = clause["id"]
122
123
  end
@@ -126,7 +127,7 @@ module IsoDoc
126
127
  lbl = clause_number_semx(parentnum, clause, num)
127
128
  @anchors[clause["id"]] =
128
129
  { label: lbl, level: level,
129
- xref: labelled_autonum(@labels['subclause'], lbl),
130
+ xref: labelled_autonum(@labels["subclause"], lbl),
130
131
  type: "clause", elem: @labels["subclause"] }
131
132
  i = Counter.new(0)
132
133
  clause.xpath(ns(SUBCLAUSES)).each do |c|
@@ -187,6 +187,15 @@ Applicable to modify and delete</a:documentation>
187
187
  <a:documentation>Optional caption of this block</a:documentation>
188
188
  </attribute>
189
189
  </optional>
190
+ <optional>
191
+ <attribute name="position">
192
+ <a:documentation>For an "add" change, whether the change is added before or after the location</a:documentation>
193
+ <choice>
194
+ <value>before</value>
195
+ <value>after</value>
196
+ </choice>
197
+ </attribute>
198
+ </optional>
190
199
  <optional>
191
200
  <element name="location">
192
201
  <a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
@@ -1142,11 +1142,11 @@ NOTE: This should preferably be encoded as a URI or short identifier, rather th
1142
1142
  <a:documentation>Information about how long the current description of the bibliographic item is valid for</a:documentation>
1143
1143
  </ref>
1144
1144
  </optional>
1145
- <optional>
1145
+ <zeroOrMore>
1146
1146
  <ref name="depiction">
1147
1147
  <a:documentation>Depiction of the bibliographic item, typically an image</a:documentation>
1148
1148
  </ref>
1149
- </optional>
1149
+ </zeroOrMore>
1150
1150
  </define>
1151
1151
  <define name="ReducedBibliographicItem">
1152
1152
  <a:documentation>Reduced description of a bibliographic resource, without mandatory title and docidentifier, used for document relations
@@ -2015,15 +2015,11 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2015
2015
  <a:documentation>A version of the bibliographic item (within an edition). Can be used for drafts</a:documentation>
2016
2016
  <element name="version">
2017
2017
  <optional>
2018
- <ref name="revision-date">
2019
- <a:documentation>The date at which the current version of the bibliographic item was produced</a:documentation>
2020
- </ref>
2021
- </optional>
2022
- <optional>
2023
- <ref name="draft">
2024
- <a:documentation>The identifier for the current draft of the bibliographic item</a:documentation>
2025
- </ref>
2018
+ <attribute name="type">
2019
+ <a:documentation>Versioning scheme, in case of multiple versioning schemes</a:documentation>
2020
+ </attribute>
2026
2021
  </optional>
2022
+ <text/>
2027
2023
  </element>
2028
2024
  </define>
2029
2025
  <define name="vedition">
@@ -2063,13 +2059,13 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2063
2059
  <ref name="LocalizedString"/>
2064
2060
  </element>
2065
2061
  </optional>
2066
- <oneOrMore>
2062
+ <zeroOrMore>
2067
2063
  <element name="taxon">
2068
2064
  <a:documentation>The keywords as a hierarchical taxonomy. For example, the sequence of `taxon` elements
2069
2065
  `pump`, `centrifugal pump`, `line shaft pump` represents a taxonomic classification</a:documentation>
2070
2066
  <ref name="LocalizedString"/>
2071
2067
  </element>
2072
- </oneOrMore>
2068
+ </zeroOrMore>
2073
2069
  <zeroOrMore>
2074
2070
  <ref name="vocabid">
2075
2071
  <a:documentation>Identifiers for the keyword as a controlled vocabulary</a:documentation>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- VERSION v2.1.5 -->
3
+ <!-- VERSION v2.1.6 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -164,6 +164,9 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
164
164
  </choice>
165
165
  </attribute>
166
166
  </optional>
167
+ <optional>
168
+ <ref name="DisplayDirective"/>
169
+ </optional>
167
170
  </define>
168
171
  <define name="DlAttributes">
169
172
  <ref name="BlockAttributes"/>
@@ -210,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
210
213
  <define name="ExampleAttributes">
211
214
  <ref name="NumberingAttributes"/>
212
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>
213
222
  </define>
214
223
  <define name="ExampleBody">
215
224
  <optional>
@@ -814,6 +823,9 @@ titlecase, or lowercase</a:documentation>
814
823
  </define>
815
824
  <define name="UlAttributes" combine="interleave">
816
825
  <ref name="BlockAttributes"/>
826
+ <optional>
827
+ <ref name="DisplayDirective"/>
828
+ </optional>
817
829
  </define>
818
830
  <define name="TableAttributes" combine="interleave">
819
831
  <optional>
@@ -1968,7 +1980,7 @@ used in document amendments</a:documentation>
1968
1980
  <a:documentation>Zero or more examples of how the term is to be used</a:documentation>
1969
1981
  </ref>
1970
1982
  </zeroOrMore>
1971
- <ref name="TermSource">
1983
+ <ref name="TermSources">
1972
1984
  <a:documentation>Bibliographic references for the managed term</a:documentation>
1973
1985
  </ref>
1974
1986
  </element>
@@ -2077,7 +2089,7 @@ used in document amendments</a:documentation>
2077
2089
  <a:documentation>Information about how the designation is to be used</a:documentation>
2078
2090
  </ref>
2079
2091
  </optional>
2080
- <ref name="TermSource">
2092
+ <ref name="TermSources">
2081
2093
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2082
2094
  </ref>
2083
2095
  </define>
@@ -2348,7 +2360,7 @@ used in document amendments</a:documentation>
2348
2360
  <ref name="formula"/>
2349
2361
  </choice>
2350
2362
  </oneOrMore>
2351
- <ref name="TermSource">
2363
+ <ref name="TermSources">
2352
2364
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2353
2365
  </ref>
2354
2366
  </element>
@@ -2365,7 +2377,7 @@ used in document amendments</a:documentation>
2365
2377
  <ref name="formula"/>
2366
2378
  </choice>
2367
2379
  </oneOrMore>
2368
- <ref name="TermSource">
2380
+ <ref name="TermSources">
2369
2381
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2370
2382
  </ref>
2371
2383
  </element>
@@ -2788,6 +2800,26 @@ to span across both columns</a:documentation>
2788
2800
  </attribute>
2789
2801
  </optional>
2790
2802
  </define>
2803
+ <define name="DisplayDirective">
2804
+ <a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
2805
+ <optional>
2806
+ <attribute name="display">
2807
+ <a:documentation>Display style for block.
2808
+ If the block is `ol` or `ul` and dispay is `table`,
2809
+ the list is to be rendered as a table, with a column for each nested level, and a row for each terminal sublist</a:documentation>
2810
+ </attribute>
2811
+ </optional>
2812
+ <optional>
2813
+ <attribute name="display-directives">
2814
+ <a:documentation>display-directives is a key-value set of attributes, guiding how the rendering of the block should happen.
2815
+ The key-value set is comma-delimited, and encoded as `key1='value1',key2='value'`,
2816
+ as with stem//mn/@data-metanorma-numberformat
2817
+ * If the block is `ol` or `ul` and dispay is `table`, display-directives can have the value `colgroup='col1,col2,...coln'`,
2818
+ where each col value is a percentage width of the column in the output table (with no % suffix).
2819
+ e.g. `colgroup='50,33.3,16.7'` </a:documentation>
2820
+ </attribute>
2821
+ </optional>
2822
+ </define>
2791
2823
  <define name="ReferencesAttributes">
2792
2824
  <optional>
2793
2825
  <attribute name="obligation">
@@ -2800,7 +2832,7 @@ Normative References contents contain normative references, but as a clause in t
2800
2832
  <data type="boolean"/>
2801
2833
  </attribute>
2802
2834
  </define>
2803
- <define name="TermSource">
2835
+ <define name="TermSources">
2804
2836
  <zeroOrMore>
2805
2837
  <ref name="termsource"/>
2806
2838
  </zeroOrMore>
@@ -47,7 +47,15 @@ the tag name of the top level containers</a:documentation>
47
47
  </optional>
48
48
  <optional>
49
49
  <attribute name="model">
50
- <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec</a:documentation>
50
+ <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec.
51
+ Current legal values: ogc, default</a:documentation>
52
+ </attribute>
53
+ </optional>
54
+ <optional>
55
+ <attribute name="render">
56
+ <a:documentation>Rendering of requirements realised by this requirement. Current legal values:
57
+ default:: default, inline
58
+ ogc:: default</a:documentation>
51
59
  </attribute>
52
60
  </optional>
53
61
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iho
3
- VERSION = "1.3.6".freeze
3
+ VERSION = "1.3.8".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-05-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: metanorma-generic
@@ -268,7 +267,6 @@ homepage: https://github.com/metanorma/metanorma-iho
268
267
  licenses:
269
268
  - BSD-2-Clause
270
269
  metadata: {}
271
- post_install_message:
272
270
  rdoc_options: []
273
271
  require_paths:
274
272
  - lib
@@ -283,8 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
281
  - !ruby/object:Gem::Version
284
282
  version: '0'
285
283
  requirements: []
286
- rubygems_version: 3.5.22
287
- signing_key:
284
+ rubygems_version: 4.0.10
288
285
  specification_version: 4
289
286
  summary: metanorma-iho lets you write IHO in AsciiDoc.
290
287
  test_files: []