metanorma-iho 0.6.11 → 0.6.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e2932efe2b0d9d4c74dfade0995762321612169b447a63d3ec43755eacfc7d9
4
- data.tar.gz: 5249aba965293f609dc36ea1312d8db2681dbeb8aadd49521276d8cf1c28aed4
3
+ metadata.gz: 769a2b34f9a1bff86b6249fc1b32a9f47c54c3ce6098ed0eb2d0cdf8c4d8f5ee
4
+ data.tar.gz: 7523b2410d9fc205d2747980d02ba388f547f9f2d17ca9ca9043fc671c9c3b24
5
5
  SHA512:
6
- metadata.gz: 074e5f18de9479bf5ecbf62fc91ed37abb702a9edb4f7c2a85e5378fca0374bf55e7d19c82508cfc3cbcd256603e6e6e7b35354ddeb97c963017fb91a724b3df
7
- data.tar.gz: 10e1e5c1127b604a105e2afd81a84ac6009176fc6f1b39abd9ae470fdeb2f4e76f23599949010c9558f7b44d22076df271d09dfa5bf7aba976d35d00799965e4
6
+ metadata.gz: 2c1c9fe715119c315a023160e57c74466fff4a5903b1d544ee53ee5a778cf914c409d054569f69635196d6719c2d504a5f47825e1ef285a9113a89c10bda98af
7
+ data.tar.gz: 6b2e599718ff877827a0e564d353c92a56e7e6df441ea8b7f54afd28f5cf518a64396a75b3964e232497dca51c5619bd766057bc95378a5c419fafc2cabb8f9d
@@ -1170,6 +1170,15 @@
1170
1170
 
1171
1171
  </xsl:attribute-set>
1172
1172
 
1173
+ <xsl:attribute-set name="pre-style">
1174
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1175
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1176
+
1177
+ <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1178
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1179
+
1180
+ </xsl:attribute-set>
1181
+
1173
1182
  <xsl:attribute-set name="permission-style">
1174
1183
 
1175
1184
  </xsl:attribute-set>
@@ -1281,6 +1290,11 @@
1281
1290
  </xsl:variable>
1282
1291
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1283
1292
 
1293
+ <xsl:variable name="table-cell-border_">
1294
+
1295
+ </xsl:variable>
1296
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1297
+
1284
1298
  <xsl:attribute-set name="table-container-style">
1285
1299
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1286
1300
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1292,8 +1306,6 @@
1292
1306
  <xsl:attribute-set name="table-style">
1293
1307
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1294
1308
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
1295
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1296
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1297
1309
 
1298
1310
  </xsl:attribute-set><!-- table-style -->
1299
1311
 
@@ -2405,6 +2417,12 @@
2405
2417
  <xsl:variable name="table_attributes">
2406
2418
 
2407
2419
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
2420
+
2421
+ <xsl:if test="$margin-side != 0">
2422
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2423
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2424
+ </xsl:if>
2425
+
2408
2426
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2409
2427
 
2410
2428
  </xsl:element>
@@ -3161,6 +3179,10 @@
3161
3179
  <xsl:template match="*[local-name()='tr']">
3162
3180
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3163
3181
 
3182
+ <xsl:if test="*[local-name() = 'th']">
3183
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3184
+ </xsl:if>
3185
+
3164
3186
  <xsl:call-template name="setTableRowAttributes"/>
3165
3187
  <xsl:apply-templates/>
3166
3188
  </fo:table-row>
@@ -5128,6 +5150,9 @@
5128
5150
  <xsl:value-of select="substring($str, 2)"/>
5129
5151
  </xsl:template>
5130
5152
 
5153
+ <!-- ======================================= -->
5154
+ <!-- math -->
5155
+ <!-- ======================================= -->
5131
5156
  <xsl:template match="mathml:math">
5132
5157
  <xsl:variable name="isAdded" select="@added"/>
5133
5158
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -5178,14 +5203,57 @@
5178
5203
  <xsl:value-of select="$comment_text"/>
5179
5204
  </xsl:template>
5180
5205
 
5206
+ <xsl:template match="*[local-name() = 'asciimath']">
5207
+ <xsl:param name="process" select="'false'"/>
5208
+ <xsl:if test="$process = 'true'">
5209
+ <xsl:apply-templates/>
5210
+ </xsl:if>
5211
+ </xsl:template>
5212
+
5213
+ <xsl:template match="*[local-name() = 'latexmath']"/>
5214
+
5215
+ <xsl:template name="getMathml_asciimath_text">
5216
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
5217
+ <xsl:variable name="latexmath">
5218
+
5219
+ </xsl:variable>
5220
+ <xsl:variable name="asciimath_text_following">
5221
+ <xsl:choose>
5222
+ <xsl:when test="normalize-space($latexmath) != ''">
5223
+ <xsl:value-of select="$latexmath"/>
5224
+ </xsl:when>
5225
+ <xsl:when test="normalize-space($asciimath) != ''">
5226
+ <xsl:value-of select="$asciimath"/>
5227
+ </xsl:when>
5228
+ <xsl:otherwise>
5229
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
5230
+ </xsl:otherwise>
5231
+ </xsl:choose>
5232
+ </xsl:variable>
5233
+ <xsl:variable name="asciimath_text_">
5234
+ <xsl:choose>
5235
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
5236
+ <xsl:value-of select="$asciimath_text_following"/>
5237
+ </xsl:when>
5238
+ <xsl:otherwise>
5239
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
5240
+ </xsl:otherwise>
5241
+ </xsl:choose>
5242
+ </xsl:variable>
5243
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
5244
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
5245
+ <xsl:value-of select="$asciimath_text"/>
5246
+ </xsl:template>
5247
+
5181
5248
  <xsl:template name="mathml_instream_object">
5182
- <xsl:param name="comment_text"/>
5249
+ <xsl:param name="asciimath_text"/>
5183
5250
  <xsl:param name="mathml_content"/>
5184
5251
 
5185
- <xsl:variable name="comment_text_">
5252
+ <xsl:variable name="asciimath_text_">
5186
5253
  <xsl:choose>
5187
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
5188
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
5254
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
5255
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
5256
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
5189
5257
  </xsl:choose>
5190
5258
  </xsl:variable>
5191
5259
 
@@ -5202,10 +5270,10 @@
5202
5270
  </xsl:attribute>
5203
5271
 
5204
5272
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
5205
- <xsl:if test="normalize-space($comment_text_) != ''">
5273
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
5206
5274
  <!-- put Mathin Alternate Text -->
5207
5275
  <xsl:attribute name="fox:alt-text">
5208
- <xsl:value-of select="$comment_text_"/>
5276
+ <xsl:value-of select="$asciimath_text_"/>
5209
5277
  </xsl:attribute>
5210
5278
  </xsl:if>
5211
5279
  <!-- </xsl:if> -->
@@ -5278,6 +5346,29 @@
5278
5346
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5279
5347
  </xsl:template>
5280
5348
 
5349
+ <!-- Examples:
5350
+ <stem type="AsciiMath">x = 1</stem>
5351
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
5352
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
5353
+ -->
5354
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
5355
+ <fo:inline xsl:use-attribute-sets="mathml-style">
5356
+
5357
+ <xsl:choose>
5358
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
5359
+ <xsl:otherwise>
5360
+ <xsl:apply-templates>
5361
+ <xsl:with-param name="process">true</xsl:with-param>
5362
+ </xsl:apply-templates>
5363
+ </xsl:otherwise>
5364
+ </xsl:choose>
5365
+
5366
+ </fo:inline>
5367
+ </xsl:template>
5368
+ <!-- ======================================= -->
5369
+ <!-- END: math -->
5370
+ <!-- ======================================= -->
5371
+
5281
5372
  <xsl:template match="*[local-name()='localityStack']"/>
5282
5373
 
5283
5374
  <xsl:template match="*[local-name()='link']" name="link">
@@ -6618,9 +6709,9 @@
6618
6709
  <xsl:apply-templates mode="contents_item"/>
6619
6710
  </xsl:template>
6620
6711
 
6621
- <!-- ====== -->
6622
- <!-- sourcecode -->
6623
- <!-- ====== -->
6712
+ <!-- =============== -->
6713
+ <!-- sourcecode -->
6714
+ <!-- =============== -->
6624
6715
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
6625
6716
 
6626
6717
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -6918,8 +7009,22 @@
6918
7009
  </fo:block>
6919
7010
  </xsl:if>
6920
7011
  </xsl:template>
6921
- <!-- ====== -->
6922
- <!-- ====== -->
7012
+ <!-- =============== -->
7013
+ <!-- END sourcecode -->
7014
+ <!-- =============== -->
7015
+
7016
+ <!-- =============== -->
7017
+ <!-- pre -->
7018
+ <!-- =============== -->
7019
+ <xsl:template match="*[local-name()='pre']" name="pre">
7020
+ <fo:block xsl:use-attribute-sets="pre-style">
7021
+ <xsl:copy-of select="@id"/>
7022
+ <xsl:apply-templates/>
7023
+ </fo:block>
7024
+ </xsl:template>
7025
+ <!-- =============== -->
7026
+ <!-- pre -->
7027
+ <!-- =============== -->
6923
7028
 
6924
7029
  <!-- ========== -->
6925
7030
  <!-- permission -->
@@ -9431,13 +9536,14 @@
9431
9536
  </xsl:template>
9432
9537
 
9433
9538
  <xsl:template name="setId">
9539
+ <xsl:param name="prefix"/>
9434
9540
  <xsl:attribute name="id">
9435
9541
  <xsl:choose>
9436
9542
  <xsl:when test="@id">
9437
- <xsl:value-of select="@id"/>
9543
+ <xsl:value-of select="concat($prefix, @id)"/>
9438
9544
  </xsl:when>
9439
9545
  <xsl:otherwise>
9440
- <xsl:value-of select="generate-id()"/>
9546
+ <xsl:value-of select="concat($prefix, generate-id())"/>
9441
9547
  </xsl:otherwise>
9442
9548
  </xsl:choose>
9443
9549
  </xsl:attribute>
@@ -1170,6 +1170,15 @@
1170
1170
 
1171
1171
  </xsl:attribute-set>
1172
1172
 
1173
+ <xsl:attribute-set name="pre-style">
1174
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1175
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1176
+
1177
+ <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1178
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1179
+
1180
+ </xsl:attribute-set>
1181
+
1173
1182
  <xsl:attribute-set name="permission-style">
1174
1183
 
1175
1184
  </xsl:attribute-set>
@@ -1281,6 +1290,11 @@
1281
1290
  </xsl:variable>
1282
1291
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1283
1292
 
1293
+ <xsl:variable name="table-cell-border_">
1294
+
1295
+ </xsl:variable>
1296
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1297
+
1284
1298
  <xsl:attribute-set name="table-container-style">
1285
1299
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1286
1300
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1292,8 +1306,6 @@
1292
1306
  <xsl:attribute-set name="table-style">
1293
1307
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1294
1308
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
1295
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1296
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1297
1309
 
1298
1310
  </xsl:attribute-set><!-- table-style -->
1299
1311
 
@@ -2405,6 +2417,12 @@
2405
2417
  <xsl:variable name="table_attributes">
2406
2418
 
2407
2419
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
2420
+
2421
+ <xsl:if test="$margin-side != 0">
2422
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2423
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2424
+ </xsl:if>
2425
+
2408
2426
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2409
2427
 
2410
2428
  </xsl:element>
@@ -3161,6 +3179,10 @@
3161
3179
  <xsl:template match="*[local-name()='tr']">
3162
3180
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3163
3181
 
3182
+ <xsl:if test="*[local-name() = 'th']">
3183
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3184
+ </xsl:if>
3185
+
3164
3186
  <xsl:call-template name="setTableRowAttributes"/>
3165
3187
  <xsl:apply-templates/>
3166
3188
  </fo:table-row>
@@ -5128,6 +5150,9 @@
5128
5150
  <xsl:value-of select="substring($str, 2)"/>
5129
5151
  </xsl:template>
5130
5152
 
5153
+ <!-- ======================================= -->
5154
+ <!-- math -->
5155
+ <!-- ======================================= -->
5131
5156
  <xsl:template match="mathml:math">
5132
5157
  <xsl:variable name="isAdded" select="@added"/>
5133
5158
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -5178,14 +5203,57 @@
5178
5203
  <xsl:value-of select="$comment_text"/>
5179
5204
  </xsl:template>
5180
5205
 
5206
+ <xsl:template match="*[local-name() = 'asciimath']">
5207
+ <xsl:param name="process" select="'false'"/>
5208
+ <xsl:if test="$process = 'true'">
5209
+ <xsl:apply-templates/>
5210
+ </xsl:if>
5211
+ </xsl:template>
5212
+
5213
+ <xsl:template match="*[local-name() = 'latexmath']"/>
5214
+
5215
+ <xsl:template name="getMathml_asciimath_text">
5216
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
5217
+ <xsl:variable name="latexmath">
5218
+
5219
+ </xsl:variable>
5220
+ <xsl:variable name="asciimath_text_following">
5221
+ <xsl:choose>
5222
+ <xsl:when test="normalize-space($latexmath) != ''">
5223
+ <xsl:value-of select="$latexmath"/>
5224
+ </xsl:when>
5225
+ <xsl:when test="normalize-space($asciimath) != ''">
5226
+ <xsl:value-of select="$asciimath"/>
5227
+ </xsl:when>
5228
+ <xsl:otherwise>
5229
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
5230
+ </xsl:otherwise>
5231
+ </xsl:choose>
5232
+ </xsl:variable>
5233
+ <xsl:variable name="asciimath_text_">
5234
+ <xsl:choose>
5235
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
5236
+ <xsl:value-of select="$asciimath_text_following"/>
5237
+ </xsl:when>
5238
+ <xsl:otherwise>
5239
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
5240
+ </xsl:otherwise>
5241
+ </xsl:choose>
5242
+ </xsl:variable>
5243
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
5244
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
5245
+ <xsl:value-of select="$asciimath_text"/>
5246
+ </xsl:template>
5247
+
5181
5248
  <xsl:template name="mathml_instream_object">
5182
- <xsl:param name="comment_text"/>
5249
+ <xsl:param name="asciimath_text"/>
5183
5250
  <xsl:param name="mathml_content"/>
5184
5251
 
5185
- <xsl:variable name="comment_text_">
5252
+ <xsl:variable name="asciimath_text_">
5186
5253
  <xsl:choose>
5187
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
5188
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
5254
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
5255
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
5256
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
5189
5257
  </xsl:choose>
5190
5258
  </xsl:variable>
5191
5259
 
@@ -5202,10 +5270,10 @@
5202
5270
  </xsl:attribute>
5203
5271
 
5204
5272
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
5205
- <xsl:if test="normalize-space($comment_text_) != ''">
5273
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
5206
5274
  <!-- put Mathin Alternate Text -->
5207
5275
  <xsl:attribute name="fox:alt-text">
5208
- <xsl:value-of select="$comment_text_"/>
5276
+ <xsl:value-of select="$asciimath_text_"/>
5209
5277
  </xsl:attribute>
5210
5278
  </xsl:if>
5211
5279
  <!-- </xsl:if> -->
@@ -5278,6 +5346,29 @@
5278
5346
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5279
5347
  </xsl:template>
5280
5348
 
5349
+ <!-- Examples:
5350
+ <stem type="AsciiMath">x = 1</stem>
5351
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
5352
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
5353
+ -->
5354
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
5355
+ <fo:inline xsl:use-attribute-sets="mathml-style">
5356
+
5357
+ <xsl:choose>
5358
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
5359
+ <xsl:otherwise>
5360
+ <xsl:apply-templates>
5361
+ <xsl:with-param name="process">true</xsl:with-param>
5362
+ </xsl:apply-templates>
5363
+ </xsl:otherwise>
5364
+ </xsl:choose>
5365
+
5366
+ </fo:inline>
5367
+ </xsl:template>
5368
+ <!-- ======================================= -->
5369
+ <!-- END: math -->
5370
+ <!-- ======================================= -->
5371
+
5281
5372
  <xsl:template match="*[local-name()='localityStack']"/>
5282
5373
 
5283
5374
  <xsl:template match="*[local-name()='link']" name="link">
@@ -6618,9 +6709,9 @@
6618
6709
  <xsl:apply-templates mode="contents_item"/>
6619
6710
  </xsl:template>
6620
6711
 
6621
- <!-- ====== -->
6622
- <!-- sourcecode -->
6623
- <!-- ====== -->
6712
+ <!-- =============== -->
6713
+ <!-- sourcecode -->
6714
+ <!-- =============== -->
6624
6715
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
6625
6716
 
6626
6717
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -6918,8 +7009,22 @@
6918
7009
  </fo:block>
6919
7010
  </xsl:if>
6920
7011
  </xsl:template>
6921
- <!-- ====== -->
6922
- <!-- ====== -->
7012
+ <!-- =============== -->
7013
+ <!-- END sourcecode -->
7014
+ <!-- =============== -->
7015
+
7016
+ <!-- =============== -->
7017
+ <!-- pre -->
7018
+ <!-- =============== -->
7019
+ <xsl:template match="*[local-name()='pre']" name="pre">
7020
+ <fo:block xsl:use-attribute-sets="pre-style">
7021
+ <xsl:copy-of select="@id"/>
7022
+ <xsl:apply-templates/>
7023
+ </fo:block>
7024
+ </xsl:template>
7025
+ <!-- =============== -->
7026
+ <!-- pre -->
7027
+ <!-- =============== -->
6923
7028
 
6924
7029
  <!-- ========== -->
6925
7030
  <!-- permission -->
@@ -9431,13 +9536,14 @@
9431
9536
  </xsl:template>
9432
9537
 
9433
9538
  <xsl:template name="setId">
9539
+ <xsl:param name="prefix"/>
9434
9540
  <xsl:attribute name="id">
9435
9541
  <xsl:choose>
9436
9542
  <xsl:when test="@id">
9437
- <xsl:value-of select="@id"/>
9543
+ <xsl:value-of select="concat($prefix, @id)"/>
9438
9544
  </xsl:when>
9439
9545
  <xsl:otherwise>
9440
- <xsl:value-of select="generate-id()"/>
9546
+ <xsl:value-of select="concat($prefix, generate-id())"/>
9441
9547
  </xsl:otherwise>
9442
9548
  </xsl:choose>
9443
9549
  </xsl:attribute>
@@ -188,6 +188,11 @@
188
188
  <value>adapter</value>
189
189
  <value>translator</value>
190
190
  <value>distributor</value>
191
+ <value>realizer</value>
192
+ <value>owner</value>
193
+ <value>authorizer</value>
194
+ <value>enabler</value>
195
+ <value>subject</value>
191
196
  </choice>
192
197
  </attribute>
193
198
  <zeroOrMore>
@@ -177,11 +177,7 @@
177
177
  </optional>
178
178
  <optional>
179
179
  <attribute name="style">
180
- <choice>
181
- <value>basic</value>
182
- <value>full</value>
183
- <value>short</value>
184
- </choice>
180
+ <ref name="XrefStyleType"/>
185
181
  </attribute>
186
182
  </optional>
187
183
  <ref name="XrefBody"/>
@@ -1031,6 +1027,7 @@
1031
1027
  <ref name="stem"/>
1032
1028
  <ref name="index"/>
1033
1029
  <ref name="eref"/>
1030
+ <ref name="erefstack"/>
1034
1031
  <ref name="xref"/>
1035
1032
  <ref name="hyperlink"/>
1036
1033
  </choice>
@@ -1045,6 +1042,7 @@
1045
1042
  <ref name="stem"/>
1046
1043
  <ref name="index"/>
1047
1044
  <ref name="eref"/>
1045
+ <ref name="erefstack"/>
1048
1046
  <ref name="xref"/>
1049
1047
  <ref name="hyperlink"/>
1050
1048
  </choice>
@@ -1058,6 +1056,7 @@
1058
1056
  <ref name="PureTextElement"/>
1059
1057
  <ref name="index"/>
1060
1058
  <ref name="eref"/>
1059
+ <ref name="erefstack"/>
1061
1060
  <ref name="xref"/>
1062
1061
  <ref name="hyperlink"/>
1063
1062
  </choice>
@@ -1195,6 +1194,7 @@
1195
1194
  <ref name="add"/>
1196
1195
  <ref name="del"/>
1197
1196
  <ref name="span"/>
1197
+ <ref name="erefstack"/>
1198
1198
  </choice>
1199
1199
  </define>
1200
1200
  <define name="add">
@@ -1202,6 +1202,7 @@
1202
1202
  <choice>
1203
1203
  <ref name="PureTextElement"/>
1204
1204
  <ref name="eref"/>
1205
+ <ref name="erefstack"/>
1205
1206
  <ref name="stem"/>
1206
1207
  <ref name="keyword"/>
1207
1208
  <ref name="xref"/>
@@ -1214,6 +1215,7 @@
1214
1215
  <choice>
1215
1216
  <ref name="PureTextElement"/>
1216
1217
  <ref name="eref"/>
1218
+ <ref name="erefstack"/>
1217
1219
  <ref name="stem"/>
1218
1220
  <ref name="keyword"/>
1219
1221
  <ref name="xref"/>
@@ -1278,6 +1280,7 @@
1278
1280
  </optional>
1279
1281
  <choice>
1280
1282
  <ref name="eref"/>
1283
+ <ref name="erefstack"/>
1281
1284
  <ref name="xref"/>
1282
1285
  <ref name="termref"/>
1283
1286
  </choice>
@@ -1970,6 +1973,7 @@
1970
1973
  </element>
1971
1974
  <choice>
1972
1975
  <ref name="eref"/>
1976
+ <ref name="erefstack"/>
1973
1977
  <ref name="xref"/>
1974
1978
  <ref name="termref"/>
1975
1979
  </choice>
@@ -2525,6 +2529,7 @@
2525
2529
  <ref name="xref"/>
2526
2530
  <ref name="hyperlink"/>
2527
2531
  <ref name="eref"/>
2532
+ <ref name="erefstack"/>
2528
2533
  </choice>
2529
2534
  <oneOrMore>
2530
2535
  <element name="coords">
@@ -2572,6 +2577,7 @@
2572
2577
  <ref name="xref"/>
2573
2578
  <ref name="hyperlink"/>
2574
2579
  <ref name="eref"/>
2580
+ <ref name="erefstack"/>
2575
2581
  </choice>
2576
2582
  </element>
2577
2583
  </zeroOrMore>
@@ -2620,6 +2626,15 @@
2620
2626
  <ref name="PureTextElement"/>
2621
2627
  </oneOrMore>
2622
2628
  </define>
2629
+ <define name="XrefConnectiveType">
2630
+ <choice>
2631
+ <value>and</value>
2632
+ <value>or</value>
2633
+ <value>from</value>
2634
+ <value>to</value>
2635
+ <value/>
2636
+ </choice>
2637
+ </define>
2623
2638
  <define name="XrefTarget">
2624
2639
  <element name="location">
2625
2640
  <attribute name="target">
@@ -2628,16 +2643,35 @@
2628
2643
  </data>
2629
2644
  </attribute>
2630
2645
  <attribute name="connective">
2631
- <choice>
2632
- <value>and</value>
2633
- <value>or</value>
2634
- <value>from</value>
2635
- <value>to</value>
2636
- <value/>
2637
- </choice>
2646
+ <ref name="XrefConnectiveType"/>
2638
2647
  </attribute>
2639
2648
  </element>
2640
2649
  </define>
2650
+ <define name="XrefStyleType">
2651
+ <choice>
2652
+ <value>basic</value>
2653
+ <value>full</value>
2654
+ <value>short</value>
2655
+ <value>id</value>
2656
+ </choice>
2657
+ </define>
2658
+ <define name="erefTypeWithConnective">
2659
+ <optional>
2660
+ <attribute name="connective">
2661
+ <ref name="XrefConnectiveType"/>
2662
+ </attribute>
2663
+ </optional>
2664
+ <ref name="erefType"/>
2665
+ </define>
2666
+ <define name="erefstack">
2667
+ <element name="erefstack">
2668
+ <oneOrMore>
2669
+ <element name="eref">
2670
+ <ref name="erefTypeWithConnective"/>
2671
+ </element>
2672
+ </oneOrMore>
2673
+ </element>
2674
+ </define>
2641
2675
  <start>
2642
2676
  <ref name="standard-document"/>
2643
2677
  </start>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.6.11".freeze
3
+ VERSION = "0.6.12".freeze
4
4
  end
5
5
  end
@@ -19,12 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.license = "BSD-2-Clause"
20
20
 
21
21
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
22
- f.match(%r{^(test|spec|features)/})
22
+ f.match(%r{^(test|spec|features|bin|.github)/}) \
23
+ || f.match(%r{Rakefile|bin/rspec})
23
24
  end
24
25
  spec.bindir = "exe"
25
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
27
  spec.require_paths = ["lib"]
27
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
28
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
28
29
 
29
30
  spec.add_dependency "metanorma-generic", "~> 2.2.2"
30
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.11
4
+ version: 0.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-24 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -174,9 +174,6 @@ executables: []
174
174
  extensions: []
175
175
  extra_rdoc_files: []
176
176
  files:
177
- - ".github/workflows/automerge.yml"
178
- - ".github/workflows/rake.yml"
179
- - ".github/workflows/release.yml"
180
177
  - ".gitignore"
181
178
  - ".hound.yml"
182
179
  - ".rubocop.yml"
@@ -184,10 +181,6 @@ files:
184
181
  - Gemfile
185
182
  - LICENSE
186
183
  - README.adoc
187
- - Rakefile
188
- - bin/console
189
- - bin/rspec
190
- - bin/setup
191
184
  - lib/isodoc/iho/base_convert.rb
192
185
  - lib/isodoc/iho/html/header.html
193
186
  - lib/isodoc/iho/html/html_iho_intro.html
@@ -247,14 +240,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
240
  requirements:
248
241
  - - ">="
249
242
  - !ruby/object:Gem::Version
250
- version: 2.5.0
243
+ version: 2.7.0
251
244
  required_rubygems_version: !ruby/object:Gem::Requirement
252
245
  requirements:
253
246
  - - ">="
254
247
  - !ruby/object:Gem::Version
255
248
  version: '0'
256
249
  requirements: []
257
- rubygems_version: 3.1.6
250
+ rubygems_version: 3.3.7
258
251
  signing_key:
259
252
  specification_version: 4
260
253
  summary: metanorma-iho lets you write IHO in AsciiDoc.
@@ -1,31 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- # source: https://github.com/marketplace/actions/merge-pull-requests#usage
4
- name: automerge
5
- on:
6
- pull_request:
7
- types:
8
- - labeled
9
- - unlabeled
10
- - synchronize
11
- - opened
12
- - edited
13
- - ready_for_review
14
- - reopened
15
- - unlocked
16
- pull_request_review:
17
- types:
18
- - submitted
19
- check_suite:
20
- types:
21
- - completed
22
- status: {}
23
- jobs:
24
- automerge:
25
- runs-on: ubuntu-latest
26
- steps:
27
- - id: automerge
28
- name: automerge
29
- uses: "pascalgn/automerge-action@v0.15.3"
30
- env:
31
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- rake:
13
- uses: metanorma/ci/.github/workflows/generic-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -1,24 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: release
4
-
5
- on:
6
- workflow_dispatch:
7
- inputs:
8
- next_version:
9
- description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
- required: true
12
- default: 'skip'
13
- push:
14
- tags: [ v* ]
15
-
16
- jobs:
17
- release:
18
- uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
- with:
20
- next_version: ${{ github.event.inputs.next_version }}
21
- secrets:
22
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
23
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24
-
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require 'isodoc/gem_tasks'
4
-
5
- IsoDoc::GemTasks.install
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "metanorma/iho"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/rspec DELETED
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
11
- "../../Gemfile", Pathname.new(__FILE__).realpath
12
- )
13
-
14
- require "rubygems"
15
- require "bundler/setup"
16
-
17
- load Gem.bin_path("rspec-core", "rspec")
18
-
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here