metanorma-plateau 1.0.0 → 1.0.1

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: 02d666678c9f651d1696a362d4c6a41709a43ddbc4243eb73580ba67796b7a47
4
- data.tar.gz: dd681233368b7f8df4de6aac70e0d3464203804586180cacf401b9ed3011ecf8
3
+ metadata.gz: 1268e01df68c0fb0e3183fe765d12baf42671e556aa706f05994cd88588ea20b
4
+ data.tar.gz: 4c5d698b9b0920e8d531f4096b42688e29a1c787b85e72c5125616bf9b5ac489
5
5
  SHA512:
6
- metadata.gz: e8e0d87da128bccd413119a4dfe1215377556b7ef0d2c28261c27d8941fa8538a37a9912cdc5c50e4a0e421dc488df871adffe96c19ecafd6aa2a568db62d3c6
7
- data.tar.gz: a47e04aae0765542025d953c11b74403c0dcf6a033c7136d1dad0bd3060b3b06a2da15bdf1a5eb7e3de117e19fa15f0a047147334c469c0fb0a474623e645a0b
6
+ metadata.gz: c041ac3a8da56eb013fca3cbaee812419c05a5a764c0b7bf4f68c00b3430b52cc5c035b41a507810975d336cc779b25ba5186d9cbdded21d1d67f7f5ae9ef525
7
+ data.tar.gz: c9ea20b4a996ff0d067450b88aa0e53e7942e6b0e33c07487807dd4a1847b2cf54cdc860b64ab17aa1522080f3c1421f9c1d1f8045fe73573f5b6b1adec101d9
@@ -2853,11 +2853,6 @@
2853
2853
 
2854
2854
  <xsl:template name="refine_table-fmt-fn-label-style">
2855
2855
 
2856
- <xsl:attribute name="font-size">60%</xsl:attribute>
2857
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2858
- <xsl:attribute name="padding-right">2mm</xsl:attribute>
2859
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2860
-
2861
2856
  </xsl:template>
2862
2857
 
2863
2858
  <xsl:attribute-set name="fn-container-body-style">
@@ -5054,14 +5049,11 @@
5054
5049
 
5055
5050
  <!-- except gb and bsi -->
5056
5051
 
5057
- <!-- https://github.com/metanorma/metanorma-plateau/issues/171 : the order is: definition list, text paragraphs, EXAMPLEs, NOTEs, footnotes, then source at the end -->
5058
- <xsl:apply-templates select="../*[local-name()='dl']"/>
5059
5052
  <xsl:apply-templates select="../*[local-name()='p']"/>
5060
- <xsl:apply-templates select="../*[local-name()='example']"/>
5053
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
5061
5054
  <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
5062
- <!-- <xsl:copy-of select="$table_fn_block"/> -->
5055
+ <xsl:apply-templates select="../*[local-name()='example']"/>
5063
5056
  <xsl:apply-templates select="../*[local-name()='source']"/>
5064
- <!-- renders in tfoot -->
5065
5057
 
5066
5058
  <xsl:variable name="isDisplayRowSeparator">
5067
5059
 
@@ -5247,6 +5239,8 @@
5247
5239
 
5248
5240
  <xsl:template name="setTableRowAttributes">
5249
5241
 
5242
+ <xsl:call-template name="setColors"/>
5243
+
5250
5244
  </xsl:template> <!-- setTableRowAttributes -->
5251
5245
  <!-- ===================== -->
5252
5246
  <!-- END Table's row processing -->
@@ -5298,6 +5292,7 @@
5298
5292
  </xsl:attribute>
5299
5293
  </xsl:if>
5300
5294
  <xsl:call-template name="display-align"/>
5295
+ <xsl:call-template name="setColors"/>
5301
5296
  </xsl:template>
5302
5297
 
5303
5298
  <xsl:template name="display-align">
@@ -5313,6 +5308,29 @@
5313
5308
  </xsl:if>
5314
5309
  </xsl:template>
5315
5310
 
5311
+ <xsl:template name="setColors">
5312
+ <xsl:variable name="styles__">
5313
+ <xsl:call-template name="split">
5314
+ <xsl:with-param name="pText" select="concat(@style,';')"/>
5315
+ <xsl:with-param name="sep" select="';'"/>
5316
+ </xsl:call-template>
5317
+ </xsl:variable>
5318
+ <xsl:variable name="quot">"</xsl:variable>
5319
+ <xsl:variable name="styles_">
5320
+ <xsl:for-each select="xalan:nodeset($styles__)/item">
5321
+ <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5322
+ <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5323
+ <xsl:if test="$key = 'color' or $key = 'background-color'">
5324
+ <style name="{$key}"><xsl:value-of select="$value"/></style>
5325
+ </xsl:if>
5326
+ </xsl:for-each>
5327
+ </xsl:variable>
5328
+ <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
5329
+ <xsl:for-each select="$styles/style">
5330
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5331
+ </xsl:for-each>
5332
+ </xsl:template>
5333
+
5316
5334
  <!-- cell in table body, footer -->
5317
5335
  <xsl:template match="*[local-name()='td']" name="td">
5318
5336
  <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
@@ -5324,12 +5342,12 @@
5324
5342
 
5325
5343
  <xsl:call-template name="refine_table-cell-style"/>
5326
5344
 
5345
+ <xsl:call-template name="setTableCellAttributes"/>
5346
+
5327
5347
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
5328
5348
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
5329
5349
  </xsl:if>
5330
5350
 
5331
- <xsl:call-template name="setTableCellAttributes"/>
5332
-
5333
5351
  <xsl:if test="$isGenerateTableIF = 'true'">
5334
5352
  <xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
5335
5353
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -7160,7 +7178,7 @@
7160
7178
  <xsl:choose>
7161
7179
  <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
7162
7180
  <xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
7163
- <fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
7181
+ <fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
7164
7182
  </xsl:when>
7165
7183
  <xsl:otherwise>
7166
7184
  <xsl:apply-templates/>
@@ -7168,7 +7186,7 @@
7168
7186
  </xsl:choose>
7169
7187
  </xsl:template>
7170
7188
  <xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
7171
- <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
7189
+ <fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:value-of select="."/></fo:inline>
7172
7190
  </xsl:template>
7173
7191
 
7174
7192
  <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
@@ -8208,24 +8226,26 @@
8208
8226
  <xsl:apply-templates select="." mode="mathml"/>
8209
8227
  </xsl:variable>
8210
8228
 
8211
- <fo:instream-foreign-object fox:alt-text="Math">
8229
+ <fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
8212
8230
 
8213
8231
  <xsl:call-template name="refine_mathml_insteam_object_style"/>
8214
8232
 
8215
- <!-- put MathML in Actual Text -->
8216
- <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
8217
- <xsl:attribute name="fox:actual-text">
8218
- <xsl:value-of select="$mathml_content"/>
8219
- </xsl:attribute>
8220
-
8221
- <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
8222
- <xsl:if test="normalize-space($asciimath_text_) != ''">
8223
- <!-- put Mathin Alternate Text -->
8224
- <xsl:attribute name="fox:alt-text">
8225
- <xsl:value-of select="$asciimath_text_"/>
8233
+ <xsl:if test="$isGenerateTableIF = 'false'">
8234
+ <!-- put MathML in Actual Text -->
8235
+ <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
8236
+ <xsl:attribute name="fox:actual-text">
8237
+ <xsl:value-of select="$mathml_content"/>
8226
8238
  </xsl:attribute>
8239
+
8240
+ <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
8241
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
8242
+ <!-- put Mathin Alternate Text -->
8243
+ <xsl:attribute name="fox:alt-text">
8244
+ <xsl:value-of select="$asciimath_text_"/>
8245
+ </xsl:attribute>
8246
+ </xsl:if>
8247
+ <!-- </xsl:if> -->
8227
8248
  </xsl:if>
8228
- <!-- </xsl:if> -->
8229
8249
 
8230
8250
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
8231
8251
 
@@ -9985,6 +10005,8 @@
9985
10005
  <xsl:template match="*[local-name() = 'origin']" mode="contents"/>
9986
10006
  <xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
9987
10007
 
10008
+ <xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="contents" priority="3"/>
10009
+
9988
10010
  <xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
9989
10011
  <xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
9990
10012
  <xsl:apply-templates mode="bookmarks"/>
@@ -10006,6 +10028,8 @@
10006
10028
  <xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
10007
10029
  <xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
10008
10030
 
10031
+ <xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="bookmarks" priority="3"/>
10032
+
10009
10033
  <!-- Bookmarks -->
10010
10034
  <xsl:template name="addBookmarks">
10011
10035
  <xsl:param name="contents"/>
@@ -11874,21 +11898,32 @@
11874
11898
  <!-- ========== -->
11875
11899
 
11876
11900
  <xsl:variable name="reviews_">
11877
- <xsl:for-each select="//*[local-name() = 'review'][@from]">
11901
+ <xsl:for-each select="//*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])][@from]">
11878
11902
  <xsl:copy>
11879
11903
  <xsl:copy-of select="@from"/>
11880
11904
  <xsl:copy-of select="@id"/>
11881
11905
  </xsl:copy>
11882
11906
  </xsl:for-each>
11907
+ <xsl:for-each select="//*[local-name() = 'fmt-review-start'][@source]">
11908
+ <xsl:copy>
11909
+ <xsl:copy-of select="@source"/>
11910
+ <xsl:copy-of select="@id"/>
11911
+ </xsl:copy>
11912
+ </xsl:for-each>
11883
11913
  </xsl:variable>
11884
11914
  <xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
11885
11915
 
11886
11916
  <xsl:template name="addReviewHelper">
11887
- <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11888
- <xsl:variable name="curr_id" select="@id"/>
11889
- <xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
11890
- <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11891
- <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11917
+ <xsl:if test="$isGenerateTableIF = 'false'">
11918
+ <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11919
+ <xsl:variable name="curr_id" select="@id"/>
11920
+ <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
11921
+ <xsl:for-each select="$reviews//*[local-name() = 'review'][@from = $curr_id]"> <!-- $reviews//*[local-name() = 'fmt-review-start'][@source = $curr_id] -->
11922
+ <xsl:variable name="review_id" select="normalize-space(@id)"/>
11923
+ <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11924
+ <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11925
+ </xsl:if>
11926
+ </xsl:for-each>
11892
11927
  </xsl:if>
11893
11928
  <!-- <fo:block>
11894
11929
  <curr_id><xsl:value-of select="$curr_id"/></curr_id>
@@ -12025,14 +12060,61 @@
12025
12060
 
12026
12061
  </xsl:template>
12027
12062
 
12028
- <xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12063
+ <!-- document text (not figures, or tables) footnotes -->
12064
+ <xsl:variable name="reviews_container_">
12065
+ <xsl:for-each select="//*[local-name() = 'review-container']/*[local-name() = 'fmt-review-body']">
12066
+ <xsl:variable name="update_xml_step1">
12067
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
12068
+ </xsl:variable>
12069
+ <xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
12070
+ </xsl:for-each>
12071
+ </xsl:variable>
12072
+ <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
12073
+
12074
+ <xsl:template match="*[local-name() = 'review-container']"/>
12075
+
12076
+ <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
12077
+ <xsl:template match="*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12078
+ <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
12079
+ <xsl:if test="$isGenerateTableIF = 'false'">
12080
+ <xsl:choose>
12081
+ <!-- if there isn't the attribute '@from', then -->
12082
+ <xsl:when test="$id_from = ''">
12083
+ <fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12084
+ </xsl:when>
12085
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
12086
+ <xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
12087
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12088
+ </xsl:when>
12089
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
12090
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12091
+ </xsl:when>
12092
+ </xsl:choose>
12093
+ </xsl:if>
12094
+ </xsl:template>
12095
+
12096
+ <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
12097
+ <xsl:template match="*[local-name() = 'fmt-review-start']" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12029
12098
  <!-- comment 2019-11-29 -->
12030
12099
  <!-- <fo:block font-weight="bold">Review:</fo:block>
12031
12100
  <xsl:apply-templates /> -->
12032
12101
 
12033
- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
12102
+ <xsl:variable name="id_from" select="normalize-space(current()/@source)"/>
12034
12103
 
12035
- <xsl:if test="1 = 1">
12104
+ <xsl:variable name="source" select="normalize-space(@source)"/>
12105
+
12106
+ <xsl:if test="$isGenerateTableIF = 'false'">
12107
+ <!-- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/> -->
12108
+
12109
+ <!-- <xsl:if test="@source = @end"> -->
12110
+ <!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
12111
+ following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
12112
+ <!-- <fo:block id="{$source}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$source}" fox:alt-text="Annot___{$source}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> -->
12113
+ <fo:block id="{@id}" font-size="1pt" role="SKIP" keep-with-next="always" line-height="0.1"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12114
+ <!-- </xsl:if> -->
12115
+ </xsl:if>
12116
+
12117
+ <xsl:if test="1 = 2">
12036
12118
  <xsl:choose>
12037
12119
  <!-- if there isn't the attribute '@from', then -->
12038
12120
  <xsl:when test="$id_from = ''">
@@ -12040,10 +12122,10 @@
12040
12122
  </xsl:when>
12041
12123
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
12042
12124
  <xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
12043
- <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12125
+ <fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12044
12126
  </xsl:when>
12045
12127
  <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
12046
- <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12128
+ <fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
12047
12129
  </xsl:when>
12048
12130
  </xsl:choose>
12049
12131
  </xsl:if>
@@ -12079,40 +12161,35 @@
12079
12161
  <!-- ===================================== -->
12080
12162
  <xsl:variable name="ul_labels_">
12081
12163
 
12082
- <xsl:choose>
12083
- <xsl:when test="$doctype = 'technical-report'">
12084
- <label level="1" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
12085
- <label level="2">→</label> <!-- will be replaced in the template 'li' -->
12086
- <label level="3">☆</label> <!-- will be replaced in the template 'li' -->
12087
- </xsl:when>
12088
- <xsl:otherwise>
12089
- <label level="1" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
12090
- <label level="2">-</label> <!-- full-width hyphen minus -->
12091
- <label level="3" font-size="130%" line-height="1.2">・</label>
12092
- </xsl:otherwise>
12093
- </xsl:choose>
12164
+ <label level="1">-</label> <!-- full-width hyphen minus -->
12165
+ <label level="2" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
12094
12166
 
12095
12167
  </xsl:variable>
12096
12168
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
12097
12169
 
12098
12170
  <xsl:template name="setULLabel">
12099
12171
  <xsl:variable name="list_level__">
12100
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
12172
+ <xsl:value-of select="count(ancestor::*[local-name() = 'ul'])"/>
12101
12173
  </xsl:variable>
12102
12174
  <xsl:variable name="list_level_" select="number($list_level__)"/>
12103
12175
  <xsl:variable name="list_level">
12104
12176
  <xsl:choose>
12105
12177
  <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
12106
- <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
12178
+ <xsl:when test="$ul_labels/label[@level = 3]"><xsl:value-of select="$list_level_ mod 3"/></xsl:when>
12179
+ <xsl:when test="$list_level_ mod 2 = 0">2</xsl:when>
12180
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 2"/></xsl:otherwise>
12107
12181
  </xsl:choose>
12108
12182
  </xsl:variable>
12109
12183
  <xsl:choose>
12110
12184
  <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
12111
12185
  <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
12112
12186
  </xsl:when>
12113
- <xsl:when test="$list_level mod 3 = 0">
12187
+ <xsl:when test="$list_level mod 3 = 0 and $ul_labels/label[@level = 3]">
12114
12188
  <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
12115
12189
  </xsl:when>
12190
+ <xsl:when test="$list_level mod 3 = 0">
12191
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
12192
+ </xsl:when>
12116
12193
  <xsl:when test="$list_level mod 2 = 0">
12117
12194
  <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
12118
12195
  </xsl:when>
@@ -12664,10 +12741,22 @@
12664
12741
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/>
12665
12742
 
12666
12743
  <xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
12667
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12668
- <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
12669
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12670
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12744
+ <xsl:variable name="bookmark_id" select="@id"/>
12745
+ <xsl:choose>
12746
+ <!-- Example:
12747
+ <fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
12748
+ <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
12749
+ <fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
12750
+ <xsl:when test="1 = 2 and preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]">
12751
+ <!-- skip here, see the template 'fmt-review-start' -->
12752
+ </xsl:when>
12753
+ <xsl:otherwise>
12754
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12755
+ <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
12756
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12757
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12758
+ </xsl:otherwise>
12759
+ </xsl:choose>
12671
12760
  </xsl:template>
12672
12761
  <!-- =================== -->
12673
12762
  <!-- End of Index processing -->
@@ -14014,6 +14103,9 @@
14014
14103
  <xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
14015
14104
  <xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
14016
14105
 
14106
+ <xsl:template match="*[local-name() = 'review-container']" mode="update_xml_step1"/>
14107
+ <xsl:template match="*[local-name() = 'review-container']" mode="update_xml_pres"/>
14108
+
14017
14109
  <!-- END: update new Presentation XML -->
14018
14110
 
14019
14111
  <!-- =========================================================================== -->
@@ -382,33 +382,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
382
382
  <a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
383
383
  <element name="review">
384
384
  <ref name="RequiredId"/>
385
- <attribute name="reviewer">
386
- <a:documentation>The party who has offered the comment</a:documentation>
387
- </attribute>
388
- <optional>
389
- <attribute name="type">
390
- <a:documentation>The type of reviewer comment</a:documentation>
391
- </attribute>
392
- </optional>
393
- <optional>
394
- <attribute name="date">
395
- <a:documentation>The date when the comment was made</a:documentation>
396
- <data type="dateTime"/>
397
- </attribute>
398
- </optional>
399
- <optional>
400
- <attribute name="from">
401
- <a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
402
- If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
403
- <data type="IDREF"/>
404
- </attribute>
405
- </optional>
406
- <optional>
407
- <attribute name="to">
408
- <a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
409
- <data type="IDREF"/>
410
- </attribute>
411
- </optional>
385
+ <ref name="ReviewAttributes"/>
412
386
  <oneOrMore>
413
387
  <ref name="paragraph">
414
388
  <a:documentation>Reviewer comments content</a:documentation>
@@ -416,6 +390,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
416
390
  </oneOrMore>
417
391
  </element>
418
392
  </define>
393
+ <define name="ReviewAttributes">
394
+ <attribute name="reviewer">
395
+ <a:documentation>The party who has offered the comment</a:documentation>
396
+ </attribute>
397
+ <optional>
398
+ <attribute name="type">
399
+ <a:documentation>The type of reviewer comment</a:documentation>
400
+ </attribute>
401
+ </optional>
402
+ <optional>
403
+ <attribute name="date">
404
+ <a:documentation>The date when the comment was made</a:documentation>
405
+ <data type="dateTime"/>
406
+ </attribute>
407
+ </optional>
408
+ <optional>
409
+ <attribute name="from">
410
+ <a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
411
+ If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
412
+ <data type="IDREF"/>
413
+ </attribute>
414
+ </optional>
415
+ <optional>
416
+ <attribute name="to">
417
+ <a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
418
+ <data type="IDREF"/>
419
+ </attribute>
420
+ </optional>
421
+ </define>
419
422
  <define name="NumberingAttributes">
420
423
  <optional>
421
424
  <attribute name="unnumbered">
@@ -857,6 +860,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
857
860
  <define name="tr">
858
861
  <a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
859
862
  <element name="tr">
863
+ <ref name="TrAttributes"/>
860
864
  <oneOrMore>
861
865
  <choice>
862
866
  <ref name="td">
@@ -869,6 +873,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
869
873
  </oneOrMore>
870
874
  </element>
871
875
  </define>
876
+ <define name="TrAttributes">
877
+ <empty/>
878
+ </define>
872
879
  <define name="tr-no-id">
873
880
  <a:documentation>Sequence of cells to be displayed as a row in a table: optional ID attributes recursively (for use in Relaton, metadata)</a:documentation>
874
881
  <element name="tr">
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v2.0.0 -->
20
+ <!-- VERSION v2.0.2 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -423,6 +423,21 @@ normative or informative references, some split references into sections organiz
423
423
  </oneOrMore>
424
424
  </choice>
425
425
  </define>
426
+ <define name="TdAttributes" combine="interleave">
427
+ <attribute name="style">
428
+ <a:documentation>CSS style: only background-color supported</a:documentation>
429
+ </attribute>
430
+ </define>
431
+ <define name="ThAttributes" combine="interleave">
432
+ <attribute name="style">
433
+ <a:documentation>CSS style: only background-color supported</a:documentation>
434
+ </attribute>
435
+ </define>
436
+ <define name="TrAttributes">
437
+ <attribute name="style">
438
+ <a:documentation>CSS style: only background-color supported</a:documentation>
439
+ </attribute>
440
+ </define>
426
441
  <define name="table-note">
427
442
  <element name="note">
428
443
  <ref name="OptionalId"/>
@@ -1272,6 +1287,11 @@ numbers</a:documentation>
1272
1287
  <a:documentation>Colophon or postface material</a:documentation>
1273
1288
  </ref>
1274
1289
  </optional>
1290
+ <optional>
1291
+ <ref name="review-container">
1292
+ <a:documentation>Annotations to the document</a:documentation>
1293
+ </ref>
1294
+ </optional>
1275
1295
  </element>
1276
1296
  </define>
1277
1297
  <define name="misccontainer">
@@ -1282,6 +1302,13 @@ numbers</a:documentation>
1282
1302
  </oneOrMore>
1283
1303
  </element>
1284
1304
  </define>
1305
+ <define name="review-container">
1306
+ <element name="review-container">
1307
+ <oneOrMore>
1308
+ <ref name="review"/>
1309
+ </oneOrMore>
1310
+ </element>
1311
+ </define>
1285
1312
  <define name="preface">
1286
1313
  <element name="preface">
1287
1314
  <oneOrMore>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0">
2
+ <grammar ns='https://www.metanorma.org/ns/standoc' xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
3
3
  <!--
4
4
  VERSION v1.2.1
5
5
  default namespace = "https://www.metanorma.com/ns/jis"
@@ -57,6 +57,49 @@
57
57
  <ref name="source"/>
58
58
  </zeroOrMore>
59
59
  </define>
60
+ <define name="TableBody">
61
+ <optional>
62
+ <ref name="colgroup">
63
+ <a:documentation>The widths of the columns in the table</a:documentation>
64
+ </ref>
65
+ </optional>
66
+ <optional>
67
+ <ref name="tname">
68
+ <a:documentation>Caption for the table</a:documentation>
69
+ </ref>
70
+ </optional>
71
+ <optional>
72
+ <ref name="thead">
73
+ <a:documentation>Table rows constituting the table header</a:documentation>
74
+ </ref>
75
+ </optional>
76
+ <ref name="tbody">
77
+ <a:documentation>Table rows constituting the table body</a:documentation>
78
+ </ref>
79
+ <optional>
80
+ <ref name="tfoot">
81
+ <a:documentation>Table rows constituting the table footer</a:documentation>
82
+ </ref>
83
+ </optional>
84
+ <optional>
85
+ <ref name="dl">
86
+ <a:documentation>Definitions list defining any symbols used in the table</a:documentation>
87
+ </ref>
88
+ </optional>
89
+ <zeroOrMore>
90
+ <ref name="table-note">
91
+ <a:documentation>Notes specific to this block</a:documentation>
92
+ </ref>
93
+ </zeroOrMore>
94
+ <zeroOrMore>
95
+ <ref name="example">
96
+ <a:documentation>Examples specific to this block</a:documentation>
97
+ </ref>
98
+ </zeroOrMore>
99
+ <ref name="TermSource">
100
+ <a:documentation>A source for the table</a:documentation>
101
+ </ref>
102
+ </define>
60
103
  <!--
61
104
  We display the Normative References between scope and terms; but to keep the
62
105
  grammar simple, we keep the references together
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Plateau
3
- VERSION = "1.0.0".freeze
3
+ VERSION = "1.0.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plateau
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-17 00:00:00.000000000 Z
11
+ date: 2025-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-jis