metanorma-ieee 0.1.1 → 0.1.2

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: 05e99861807be4a3295ae7642f381419eef870dee2dd2b1f8df22391342acb45
4
- data.tar.gz: d79bf191d766d6a705d612b806e81ddc800d09efe985191258f09b588a916f85
3
+ metadata.gz: 6d42117ebe0d96ef2b4b95c6be7a53e117cac1f94dc9824b827d8e304a4b5856
4
+ data.tar.gz: e4d5bf0dfa00ed20d6a0c93c22acff54481b4571ee805de9e03b2101dbfdbea5
5
5
  SHA512:
6
- metadata.gz: be97ca0b1c97744f41e69719dc70e430fb67092b6bbc184d7d59292a49b153acbb772db3d35e22b0e359d092fb6c42ff0385aca16ad4ada89966d753113219e0
7
- data.tar.gz: 6480760c5aab6e43318585c05bfed56ae85e568ac84a50267518e8a40f05a34f9998cddb2cbc8d52dfccfd698d08df835ddfb372870de0d737763f7fd23e2457
6
+ metadata.gz: 4e061d1fb9f157edd9ba4b333300710a666764b0f140609dcb7782c0227336a3669bb15e446393c1d4647fa3dbb1111bad040e6bc962abea6c1792af8c15f687
7
+ data.tar.gz: a4c5b133214d7cf12a0cb5035596a5c2ab56e9267ef06084204d59f2a4c55a41ce0dd3b65070795625fe503fba4406bbb151e90bccc0c30275f7b709482aebe2
@@ -16,7 +16,7 @@ doctype_abbrev:
16
16
  standard: Std.
17
17
  recommended-practice: Rec. Prac.
18
18
  guide: Gde.
19
- term_def_boilerplate: "<p>For the purposes of this document, the following terms and definitions apply. The <em>IEEE Standards Dictionary Online</em> should be consulted for terms not defined in this clause.<fn><p><em>IEEE Standards Dictionary Online</em> is available at: <link target='http://dictionary.ieee.org'/>. An IEEE Account is required for access to the dictionary, and one can be created at no charge on the dictionary sign-in page.</p></fn></p>"
19
+ term_def_boilerplate: "<p>For the purposes of this document, the following terms and definitions apply. The <em>IEEE Standards Dictionary Online</em> should be consulted for terms not defined in this clause.<fn reference='_boilerplate_term1'><p><em>IEEE Standards Dictionary Online</em> is available at: <link target='http://dictionary.ieee.org'/>. An IEEE Account is required for access to the dictionary, and one can be created at no charge on the dictionary sign-in page.</p></fn></p>"
20
20
  norm_with_refs_pref: The following referenced documents are indispensable for the application of this document (i.e., they must be understood and used, so each referenced document is cited in text and its relationship to this document is explained). For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments or corrigenda) applies.
21
21
  biblio_pref: Bibliographical references are resources that provide additional or helpful material but do not need to be understood or used to implement this standard. Reference to these resources is made for informational use only.
22
22
  note_inform_fn: Notes to text, tables, and figures are for information only and do not contain requirements needed to implement the standard.
@@ -4139,6 +4139,16 @@
4139
4139
 
4140
4140
  </xsl:attribute-set>
4141
4141
 
4142
+ <xsl:attribute-set name="pre-style">
4143
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4144
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4145
+
4146
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
4147
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
4148
+ <xsl:attribute name="font-size">95%</xsl:attribute>
4149
+
4150
+ </xsl:attribute-set>
4151
+
4142
4152
  <xsl:attribute-set name="permission-style">
4143
4153
 
4144
4154
  </xsl:attribute-set>
@@ -4246,9 +4256,15 @@
4246
4256
  <xsl:variable name="table-border_">
4247
4257
 
4248
4258
  1pt solid black
4259
+
4249
4260
  </xsl:variable>
4250
4261
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
4251
4262
 
4263
+ <xsl:variable name="table-cell-border_">
4264
+
4265
+ </xsl:variable>
4266
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
4267
+
4252
4268
  <xsl:attribute-set name="table-container-style">
4253
4269
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
4254
4270
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -4262,8 +4278,6 @@
4262
4278
  <xsl:attribute-set name="table-style">
4263
4279
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
4264
4280
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
4265
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4266
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4267
4281
 
4268
4282
  <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
4269
4283
 
@@ -5390,6 +5404,12 @@
5390
5404
  <xsl:variable name="table_attributes">
5391
5405
 
5392
5406
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
5407
+
5408
+ <xsl:if test="$margin-side != 0">
5409
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5410
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5411
+ </xsl:if>
5412
+
5393
5413
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
5394
5414
 
5395
5415
  <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
@@ -6194,6 +6214,10 @@
6194
6214
  <xsl:template match="*[local-name()='tr']">
6195
6215
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
6196
6216
 
6217
+ <xsl:if test="*[local-name() = 'th']">
6218
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
6219
+ </xsl:if>
6220
+
6197
6221
  <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
6198
6222
  <xsl:attribute name="min-height">0mm</xsl:attribute>
6199
6223
  </xsl:if>
@@ -8176,6 +8200,9 @@
8176
8200
  <xsl:value-of select="substring($str, 2)"/>
8177
8201
  </xsl:template>
8178
8202
 
8203
+ <!-- ======================================= -->
8204
+ <!-- math -->
8205
+ <!-- ======================================= -->
8179
8206
  <xsl:template match="mathml:math">
8180
8207
  <xsl:variable name="isAdded" select="@added"/>
8181
8208
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -8226,14 +8253,59 @@
8226
8253
  <xsl:value-of select="$comment_text"/>
8227
8254
  </xsl:template>
8228
8255
 
8256
+ <xsl:template match="*[local-name() = 'asciimath']">
8257
+ <xsl:param name="process" select="'false'"/>
8258
+ <xsl:if test="$process = 'true'">
8259
+ <xsl:apply-templates/>
8260
+ </xsl:if>
8261
+ </xsl:template>
8262
+
8263
+ <xsl:template match="*[local-name() = 'latexmath']"/>
8264
+
8265
+ <xsl:template name="getMathml_asciimath_text">
8266
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
8267
+ <xsl:variable name="latexmath">
8268
+
8269
+ <xsl:value-of select="../*[local-name() = 'latexmath']"/>
8270
+
8271
+ </xsl:variable>
8272
+ <xsl:variable name="asciimath_text_following">
8273
+ <xsl:choose>
8274
+ <xsl:when test="normalize-space($latexmath) != ''">
8275
+ <xsl:value-of select="$latexmath"/>
8276
+ </xsl:when>
8277
+ <xsl:when test="normalize-space($asciimath) != ''">
8278
+ <xsl:value-of select="$asciimath"/>
8279
+ </xsl:when>
8280
+ <xsl:otherwise>
8281
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
8282
+ </xsl:otherwise>
8283
+ </xsl:choose>
8284
+ </xsl:variable>
8285
+ <xsl:variable name="asciimath_text_">
8286
+ <xsl:choose>
8287
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
8288
+ <xsl:value-of select="$asciimath_text_following"/>
8289
+ </xsl:when>
8290
+ <xsl:otherwise>
8291
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
8292
+ </xsl:otherwise>
8293
+ </xsl:choose>
8294
+ </xsl:variable>
8295
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
8296
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
8297
+ <xsl:value-of select="$asciimath_text"/>
8298
+ </xsl:template>
8299
+
8229
8300
  <xsl:template name="mathml_instream_object">
8230
- <xsl:param name="comment_text"/>
8301
+ <xsl:param name="asciimath_text"/>
8231
8302
  <xsl:param name="mathml_content"/>
8232
8303
 
8233
- <xsl:variable name="comment_text_">
8304
+ <xsl:variable name="asciimath_text_">
8234
8305
  <xsl:choose>
8235
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
8236
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
8306
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
8307
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
8308
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
8237
8309
  </xsl:choose>
8238
8310
  </xsl:variable>
8239
8311
 
@@ -8250,10 +8322,10 @@
8250
8322
  </xsl:attribute>
8251
8323
 
8252
8324
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
8253
- <xsl:if test="normalize-space($comment_text_) != ''">
8325
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
8254
8326
  <!-- put Mathin Alternate Text -->
8255
8327
  <xsl:attribute name="fox:alt-text">
8256
- <xsl:value-of select="$comment_text_"/>
8328
+ <xsl:value-of select="$asciimath_text_"/>
8257
8329
  </xsl:attribute>
8258
8330
  </xsl:if>
8259
8331
  <!-- </xsl:if> -->
@@ -8326,6 +8398,29 @@
8326
8398
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
8327
8399
  </xsl:template>
8328
8400
 
8401
+ <!-- Examples:
8402
+ <stem type="AsciiMath">x = 1</stem>
8403
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
8404
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
8405
+ -->
8406
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
8407
+ <fo:inline xsl:use-attribute-sets="mathml-style">
8408
+
8409
+ <xsl:choose>
8410
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
8411
+ <xsl:otherwise>
8412
+ <xsl:apply-templates>
8413
+ <xsl:with-param name="process">true</xsl:with-param>
8414
+ </xsl:apply-templates>
8415
+ </xsl:otherwise>
8416
+ </xsl:choose>
8417
+
8418
+ </fo:inline>
8419
+ </xsl:template>
8420
+ <!-- ======================================= -->
8421
+ <!-- END: math -->
8422
+ <!-- ======================================= -->
8423
+
8329
8424
  <xsl:template match="*[local-name()='localityStack']"/>
8330
8425
 
8331
8426
  <xsl:template match="*[local-name()='link']" name="link">
@@ -9685,9 +9780,9 @@
9685
9780
  <xsl:apply-templates mode="contents_item"/>
9686
9781
  </xsl:template>
9687
9782
 
9688
- <!-- ====== -->
9689
- <!-- sourcecode -->
9690
- <!-- ====== -->
9783
+ <!-- =============== -->
9784
+ <!-- sourcecode -->
9785
+ <!-- =============== -->
9691
9786
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
9692
9787
 
9693
9788
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -9984,8 +10079,22 @@
9984
10079
  </fo:block>
9985
10080
  </xsl:if>
9986
10081
  </xsl:template>
9987
- <!-- ====== -->
9988
- <!-- ====== -->
10082
+ <!-- =============== -->
10083
+ <!-- END sourcecode -->
10084
+ <!-- =============== -->
10085
+
10086
+ <!-- =============== -->
10087
+ <!-- pre -->
10088
+ <!-- =============== -->
10089
+ <xsl:template match="*[local-name()='pre']" name="pre">
10090
+ <fo:block xsl:use-attribute-sets="pre-style">
10091
+ <xsl:copy-of select="@id"/>
10092
+ <xsl:apply-templates/>
10093
+ </fo:block>
10094
+ </xsl:template>
10095
+ <!-- =============== -->
10096
+ <!-- pre -->
10097
+ <!-- =============== -->
9989
10098
 
9990
10099
  <!-- ========== -->
9991
10100
  <!-- permission -->
@@ -11495,7 +11604,7 @@
11495
11604
  <xsl:apply-templates select="*[local-name() = 'note']"/>
11496
11605
 
11497
11606
  <xsl:if test="normalize-space($docidentifier) != '' and *[local-name() = 'formattedref']">
11498
-
11607
+ <xsl:text>,</xsl:text>
11499
11608
  <xsl:text> </xsl:text>
11500
11609
  </xsl:if>
11501
11610
 
@@ -12694,13 +12803,14 @@
12694
12803
  </xsl:template>
12695
12804
 
12696
12805
  <xsl:template name="setId">
12806
+ <xsl:param name="prefix"/>
12697
12807
  <xsl:attribute name="id">
12698
12808
  <xsl:choose>
12699
12809
  <xsl:when test="@id">
12700
- <xsl:value-of select="@id"/>
12810
+ <xsl:value-of select="concat($prefix, @id)"/>
12701
12811
  </xsl:when>
12702
12812
  <xsl:otherwise>
12703
- <xsl:value-of select="generate-id()"/>
12813
+ <xsl:value-of select="concat($prefix, generate-id())"/>
12704
12814
  </xsl:otherwise>
12705
12815
  </xsl:choose>
12706
12816
  </xsl:attribute>
@@ -4139,6 +4139,16 @@
4139
4139
 
4140
4140
  </xsl:attribute-set>
4141
4141
 
4142
+ <xsl:attribute-set name="pre-style">
4143
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4144
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4145
+
4146
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
4147
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
4148
+ <xsl:attribute name="font-size">95%</xsl:attribute>
4149
+
4150
+ </xsl:attribute-set>
4151
+
4142
4152
  <xsl:attribute-set name="permission-style">
4143
4153
 
4144
4154
  </xsl:attribute-set>
@@ -4246,9 +4256,15 @@
4246
4256
  <xsl:variable name="table-border_">
4247
4257
 
4248
4258
  1pt solid black
4259
+
4249
4260
  </xsl:variable>
4250
4261
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
4251
4262
 
4263
+ <xsl:variable name="table-cell-border_">
4264
+
4265
+ </xsl:variable>
4266
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
4267
+
4252
4268
  <xsl:attribute-set name="table-container-style">
4253
4269
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
4254
4270
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -4262,8 +4278,6 @@
4262
4278
  <xsl:attribute-set name="table-style">
4263
4279
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
4264
4280
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
4265
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4266
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4267
4281
 
4268
4282
  <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
4269
4283
 
@@ -5390,6 +5404,12 @@
5390
5404
  <xsl:variable name="table_attributes">
5391
5405
 
5392
5406
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
5407
+
5408
+ <xsl:if test="$margin-side != 0">
5409
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5410
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5411
+ </xsl:if>
5412
+
5393
5413
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
5394
5414
 
5395
5415
  <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
@@ -6194,6 +6214,10 @@
6194
6214
  <xsl:template match="*[local-name()='tr']">
6195
6215
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
6196
6216
 
6217
+ <xsl:if test="*[local-name() = 'th']">
6218
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
6219
+ </xsl:if>
6220
+
6197
6221
  <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
6198
6222
  <xsl:attribute name="min-height">0mm</xsl:attribute>
6199
6223
  </xsl:if>
@@ -8176,6 +8200,9 @@
8176
8200
  <xsl:value-of select="substring($str, 2)"/>
8177
8201
  </xsl:template>
8178
8202
 
8203
+ <!-- ======================================= -->
8204
+ <!-- math -->
8205
+ <!-- ======================================= -->
8179
8206
  <xsl:template match="mathml:math">
8180
8207
  <xsl:variable name="isAdded" select="@added"/>
8181
8208
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -8226,14 +8253,59 @@
8226
8253
  <xsl:value-of select="$comment_text"/>
8227
8254
  </xsl:template>
8228
8255
 
8256
+ <xsl:template match="*[local-name() = 'asciimath']">
8257
+ <xsl:param name="process" select="'false'"/>
8258
+ <xsl:if test="$process = 'true'">
8259
+ <xsl:apply-templates/>
8260
+ </xsl:if>
8261
+ </xsl:template>
8262
+
8263
+ <xsl:template match="*[local-name() = 'latexmath']"/>
8264
+
8265
+ <xsl:template name="getMathml_asciimath_text">
8266
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
8267
+ <xsl:variable name="latexmath">
8268
+
8269
+ <xsl:value-of select="../*[local-name() = 'latexmath']"/>
8270
+
8271
+ </xsl:variable>
8272
+ <xsl:variable name="asciimath_text_following">
8273
+ <xsl:choose>
8274
+ <xsl:when test="normalize-space($latexmath) != ''">
8275
+ <xsl:value-of select="$latexmath"/>
8276
+ </xsl:when>
8277
+ <xsl:when test="normalize-space($asciimath) != ''">
8278
+ <xsl:value-of select="$asciimath"/>
8279
+ </xsl:when>
8280
+ <xsl:otherwise>
8281
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
8282
+ </xsl:otherwise>
8283
+ </xsl:choose>
8284
+ </xsl:variable>
8285
+ <xsl:variable name="asciimath_text_">
8286
+ <xsl:choose>
8287
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
8288
+ <xsl:value-of select="$asciimath_text_following"/>
8289
+ </xsl:when>
8290
+ <xsl:otherwise>
8291
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
8292
+ </xsl:otherwise>
8293
+ </xsl:choose>
8294
+ </xsl:variable>
8295
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
8296
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
8297
+ <xsl:value-of select="$asciimath_text"/>
8298
+ </xsl:template>
8299
+
8229
8300
  <xsl:template name="mathml_instream_object">
8230
- <xsl:param name="comment_text"/>
8301
+ <xsl:param name="asciimath_text"/>
8231
8302
  <xsl:param name="mathml_content"/>
8232
8303
 
8233
- <xsl:variable name="comment_text_">
8304
+ <xsl:variable name="asciimath_text_">
8234
8305
  <xsl:choose>
8235
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
8236
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
8306
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
8307
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
8308
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
8237
8309
  </xsl:choose>
8238
8310
  </xsl:variable>
8239
8311
 
@@ -8250,10 +8322,10 @@
8250
8322
  </xsl:attribute>
8251
8323
 
8252
8324
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
8253
- <xsl:if test="normalize-space($comment_text_) != ''">
8325
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
8254
8326
  <!-- put Mathin Alternate Text -->
8255
8327
  <xsl:attribute name="fox:alt-text">
8256
- <xsl:value-of select="$comment_text_"/>
8328
+ <xsl:value-of select="$asciimath_text_"/>
8257
8329
  </xsl:attribute>
8258
8330
  </xsl:if>
8259
8331
  <!-- </xsl:if> -->
@@ -8326,6 +8398,29 @@
8326
8398
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
8327
8399
  </xsl:template>
8328
8400
 
8401
+ <!-- Examples:
8402
+ <stem type="AsciiMath">x = 1</stem>
8403
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
8404
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
8405
+ -->
8406
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
8407
+ <fo:inline xsl:use-attribute-sets="mathml-style">
8408
+
8409
+ <xsl:choose>
8410
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
8411
+ <xsl:otherwise>
8412
+ <xsl:apply-templates>
8413
+ <xsl:with-param name="process">true</xsl:with-param>
8414
+ </xsl:apply-templates>
8415
+ </xsl:otherwise>
8416
+ </xsl:choose>
8417
+
8418
+ </fo:inline>
8419
+ </xsl:template>
8420
+ <!-- ======================================= -->
8421
+ <!-- END: math -->
8422
+ <!-- ======================================= -->
8423
+
8329
8424
  <xsl:template match="*[local-name()='localityStack']"/>
8330
8425
 
8331
8426
  <xsl:template match="*[local-name()='link']" name="link">
@@ -9685,9 +9780,9 @@
9685
9780
  <xsl:apply-templates mode="contents_item"/>
9686
9781
  </xsl:template>
9687
9782
 
9688
- <!-- ====== -->
9689
- <!-- sourcecode -->
9690
- <!-- ====== -->
9783
+ <!-- =============== -->
9784
+ <!-- sourcecode -->
9785
+ <!-- =============== -->
9691
9786
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
9692
9787
 
9693
9788
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -9984,8 +10079,22 @@
9984
10079
  </fo:block>
9985
10080
  </xsl:if>
9986
10081
  </xsl:template>
9987
- <!-- ====== -->
9988
- <!-- ====== -->
10082
+ <!-- =============== -->
10083
+ <!-- END sourcecode -->
10084
+ <!-- =============== -->
10085
+
10086
+ <!-- =============== -->
10087
+ <!-- pre -->
10088
+ <!-- =============== -->
10089
+ <xsl:template match="*[local-name()='pre']" name="pre">
10090
+ <fo:block xsl:use-attribute-sets="pre-style">
10091
+ <xsl:copy-of select="@id"/>
10092
+ <xsl:apply-templates/>
10093
+ </fo:block>
10094
+ </xsl:template>
10095
+ <!-- =============== -->
10096
+ <!-- pre -->
10097
+ <!-- =============== -->
9989
10098
 
9990
10099
  <!-- ========== -->
9991
10100
  <!-- permission -->
@@ -11495,7 +11604,7 @@
11495
11604
  <xsl:apply-templates select="*[local-name() = 'note']"/>
11496
11605
 
11497
11606
  <xsl:if test="normalize-space($docidentifier) != '' and *[local-name() = 'formattedref']">
11498
-
11607
+ <xsl:text>,</xsl:text>
11499
11608
  <xsl:text> </xsl:text>
11500
11609
  </xsl:if>
11501
11610
 
@@ -12694,13 +12803,14 @@
12694
12803
  </xsl:template>
12695
12804
 
12696
12805
  <xsl:template name="setId">
12806
+ <xsl:param name="prefix"/>
12697
12807
  <xsl:attribute name="id">
12698
12808
  <xsl:choose>
12699
12809
  <xsl:when test="@id">
12700
- <xsl:value-of select="@id"/>
12810
+ <xsl:value-of select="concat($prefix, @id)"/>
12701
12811
  </xsl:when>
12702
12812
  <xsl:otherwise>
12703
- <xsl:value-of select="generate-id()"/>
12813
+ <xsl:value-of select="concat($prefix, generate-id())"/>
12704
12814
  </xsl:otherwise>
12705
12815
  </xsl:choose>
12706
12816
  </xsl:attribute>
@@ -42,7 +42,7 @@ module IsoDoc
42
42
 
43
43
  p = v.xpath(ns("./p"))
44
44
  v.children =
45
- "<p>#{p.map(&:children).map(&:to_xml).join("\n")}</p>"\
45
+ "<p>#{p.map(&:children).map(&:to_xml).join("\n")}</p>" \
46
46
  "#{v.xpath(ns('./termsource')).to_xml}"
47
47
  end
48
48
  super
@@ -71,17 +71,21 @@ module IsoDoc
71
71
  end
72
72
 
73
73
  def sort_terms_key(term)
74
- d = term.at(ns("./preferred/expression/name | "\
75
- "./preferred/letter-symbol/name | "\
76
- "./preferred/graphical-symbol/figure/name | "\
77
- "./preferred/graphical-symbol/figure/@id | "\
74
+ d = term.at(ns("./preferred/expression/name | " \
75
+ "./preferred/letter-symbol/name | " \
76
+ "./preferred/graphical-symbol/figure/name | " \
77
+ "./preferred/graphical-symbol/figure/@id | " \
78
78
  "./preferred"))
79
79
  f = term.at(ns("./field-of-application")) || term.at(ns("./domain"))
80
80
  HTMLEntities.new.decode("#{sort_terms_key1(d)} :: #{sort_terms_key1(f)}")
81
81
  end
82
82
 
83
83
  def sort_terms_key1(elem)
84
- elem&.text&.strip&.downcase || "zzzz"
84
+ return "zzzz" if elem.nil?
85
+
86
+ dup = elem.dup
87
+ dup.xpath(ns(".//asciimath | .//latexmath")).each(&:remove)
88
+ dup.text&.strip&.downcase || "zzzz"
85
89
  end
86
90
 
87
91
  def term_related_reorder(coll)
@@ -173,7 +177,7 @@ module IsoDoc
173
177
  def collapse_term_related(rels)
174
178
  ret = rels.map do |r|
175
179
  p = r.at(ns("./preferred"))
176
- "<em>#{@i18n.relatedterms[r['type']]}:</em> "\
180
+ "<em>#{@i18n.relatedterms[r['type']]}:</em> " \
177
181
  "#{p&.children&.to_xml || '**RELATED TERM NOT FOUND**'}"
178
182
  end.join(". ")
179
183
  ret += "." unless ret.empty?
@@ -229,7 +233,7 @@ module IsoDoc
229
233
  def merge_second_preferred(term)
230
234
  pref =
231
235
  term.at(ns("./preferred[not(abbreviation-type)]/expression/name"))
232
- x = term.xpath(ns("./preferred[expression/name][abbreviation-type] | "\
236
+ x = term.xpath(ns("./preferred[expression/name][abbreviation-type] | " \
233
237
  "./admitted[expression/name][abbreviation-type]"))
234
238
  (pref && !x.empty?) or return
235
239
  tail = x.map do |p|
@@ -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>
@@ -115,10 +115,10 @@
115
115
  an IEEE standard is welcome to join the relevant IEEE working group. You can
116
116
  indicate interest in a working group using the Interests tab in the Manage
117
117
  Profile &#x26; Interests area of the <link target="https://development.standards.ieee.org/myproject-web/public/view.html#landing">IEEE
118
- SA myProject system</link>.<fn><p>Available at: <link target="https://development.standards.ieee.org/myproject-web/public/view.html#landing"/>.</p></fn>
118
+ SA myProject system</link>.<fn reference="_boilerplate_1"><p>Available at: <link target="https://development.standards.ieee.org/myproject-web/public/view.html#landing"/>.</p></fn>
119
119
  An IEEE Account is needed to access the application.</p>
120
120
 
121
- <p>Comments on standards should be submitted using the <link target="https://standards.ieee.org/content/ieee-standards/en/about/contact/index.html">Contact Us</link> form.<fn><p>Available at: <link target="https://standards.ieee.org/content/ieee-standards/en/about/contact/index.html"/>.</p></fn></p>
121
+ <p>Comments on standards should be submitted using the <link target="https://standards.ieee.org/content/ieee-standards/en/about/contact/index.html">Contact Us</link> form.<fn reference="_boilerplate_2"><p>Available at: <link target="https://standards.ieee.org/content/ieee-standards/en/about/contact/index.html"/>.</p></fn></p>
122
122
  </clause>
123
123
 
124
124
  <clause><title>Laws and regulations</title>
@@ -187,7 +187,7 @@
187
187
  order to determine whether a given document is the current edition and whether
188
188
  it has been amended through the issuance of amendments, corrigenda, or errata,
189
189
  visit <link target="https://ieeexplore.ieee.org/browse/standards/collection/ieee/">IEEE
190
- Xplore</link> or <link target="https://standards.ieee.org/content/ieee-standards/en/about/contact/index.html">contact IEEE</link>.<fn><p>Available at <link target="https://ieeexplore.ieee.org/browse/standards/collection/ieee"/>.</p></fn>
190
+ Xplore</link> or <link target="https://standards.ieee.org/content/ieee-standards/en/about/contact/index.html">contact IEEE</link>.<fn reference="_boilerplate_3"><p>Available at <link target="https://ieeexplore.ieee.org/browse/standards/collection/ieee"/>.</p></fn>
191
191
  For more information about the IEEE SA or IEEE’s standards development process,
192
192
  visit the IEEE SA Website.</p>
193
193
  </clause>
@@ -195,12 +195,12 @@
195
195
  <clause>
196
196
  <title>Errata</title>
197
197
 
198
- <p>Errata, if any, for all IEEE standards can be accessed on the <link target="https://standards.ieee.org/standard/index.html">IEEE SA Website</link>.<fn><p>Available at: <link target="https://standards.ieee.org/standard/index.html"/>.</p></fn> Search for standard number and year of approval to access the web page of the published standard. Errata links are located under the Additional Resources Details section. Errata are also available in <link target="https://ieeexplore.ieee.org/browse/standards/collection/ieee/">IEEE Xplore</link>. Users are encouraged to periodically check for errata.</p>
198
+ <p>Errata, if any, for all IEEE standards can be accessed on the <link target="https://standards.ieee.org/standard/index.html">IEEE SA Website</link>.<fn reference="_boilerplate_4"><p>Available at: <link target="https://standards.ieee.org/standard/index.html"/>.</p></fn> Search for standard number and year of approval to access the web page of the published standard. Errata links are located under the Additional Resources Details section. Errata are also available in <link target="https://ieeexplore.ieee.org/browse/standards/collection/ieee/">IEEE Xplore</link>. Users are encouraged to periodically check for errata.</p>
199
199
  </clause>
200
200
 
201
201
  <clause><title>Patents</title>
202
202
 
203
- <p>IEEE Standards are developed in compliance with the <link target="https://standards.ieee.org/about/sasb/patcom/materials.html">IEEE SA Patent Policy</link>.<fn><p>Available at: <link target="https://standards.ieee.org/about/sasb/patcom/materials.html"/>.</p></fn></p>
203
+ <p>IEEE Standards are developed in compliance with the <link target="https://standards.ieee.org/about/sasb/patcom/materials.html">IEEE SA Patent Policy</link>.<fn reference="_boilerplate_5"><p>Available at: <link target="https://standards.ieee.org/about/sasb/patcom/materials.html"/>.</p></fn></p>
204
204
  <p>Attention is called to
205
205
  the possibility that implementation of this standard may require use of subject
206
206
  matter covered by patent rights. By publication of this standard, no position
@@ -247,17 +247,17 @@
247
247
  <p>At the time this draft {{ doctype }} was completed, the {{ working_group }} Working Group had the following membership:</p>
248
248
  <membership>
249
249
  <ul>
250
- <li><dl><dt>name</dt><dd>&#x3c;Chair Name&#x3e;</dd><dt>role</dt><dd>Chair</dd></dl></li>
251
- <li><dl><dt>name</dt><dd>&#x3c;Vice-chair Name&#x3e;</dd><dt>role</dt><dd>Vice Chair</dd></dl></li>
252
- <li><dl><dt>name</dt><dd>Participant1</dd><dt>role</dt><dd>Member</dd></dl></li>
253
- <li><dl><dt>name</dt><dd>Participant2</dd><dt>role</dt><dd>Member</dd></dl></li>
254
- <li><dl><dt>name</dt><dd>Participant3</dd><dt>role</dt><dd>Member</dd></dl></li>
255
- <li><dl><dt>name</dt><dd>Participant4</dd><dt>role</dt><dd>Member</dd></dl></li>
256
- <li><dl><dt>name</dt><dd>Participant5</dd><dt>role</dt><dd>Member</dd></dl></li>
257
- <li><dl><dt>name</dt><dd>Participant6</dd><dt>role</dt><dd>Member</dd></dl></li>
258
- <li><dl><dt>name</dt><dd>Participant7</dd><dt>role</dt><dd>Member</dd></dl></li>
259
- <li><dl><dt>name</dt><dd>Participant8</dd><dt>role</dt><dd>Member</dd></dl></li>
260
- <li><dl><dt>name</dt><dd>Participant9</dd><dt>role</dt><dd>Member</dd></dl></li>
250
+ <li><dl><dt>name</dt><dd><p>&#x3c;Chair Name&#x3e;</p></dd><dt>role</dt><dd><p>Chair</p></dd></dl></li>
251
+ <li><dl><dt>name</dt><dd><p>&#x3c;Vice-chair Name&#x3e;</p></dd><dt>role</dt><dd><p>Vice Chair</p></dd></dl></li>
252
+ <li><dl><dt>name</dt><dd><p>Participant1</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
253
+ <li><dl><dt>name</dt><dd><p>Participant2</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
254
+ <li><dl><dt>name</dt><dd><p>Participant3</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
255
+ <li><dl><dt>name</dt><dd><p>Participant4</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
256
+ <li><dl><dt>name</dt><dd><p>Participant5</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
257
+ <li><dl><dt>name</dt><dd><p>Participant6</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
258
+ <li><dl><dt>name</dt><dd><p>Participant7</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
259
+ <li><dl><dt>name</dt><dd><p>Participant8</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
260
+ <li><dl><dt>name</dt><dd><p>Participant9</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
261
261
  </ul>
262
262
  </membership>
263
263
  </clause>
@@ -265,15 +265,15 @@
265
265
  <p>The following members of the {{ balloting_group_type }} {{ balloting_group }} Standards Association balloting group voted on this {{ doctype }}. Balloters may have voted for approval, disapproval, or abstention.</p>
266
266
  <membership>
267
267
  <ul>
268
- <li><dl><dt>name</dt><dd>Balloter1</dd><dt>role</dt><dd>Member</dd></dl></li>
269
- <li><dl><dt>name</dt><dd>Balloter2</dd><dt>role</dt><dd>Member</dd></dl></li>
270
- <li><dl><dt>name</dt><dd>Balloter3</dd><dt>role</dt><dd>Member</dd></dl></li>
271
- <li><dl><dt>name</dt><dd>Balloter4</dd><dt>role</dt><dd>Member</dd></dl></li>
272
- <li><dl><dt>name</dt><dd>Balloter5</dd><dt>role</dt><dd>Member</dd></dl></li>
273
- <li><dl><dt>name</dt><dd>Balloter6</dd><dt>role</dt><dd>Member</dd></dl></li>
274
- <li><dl><dt>name</dt><dd>Balloter7</dd><dt>role</dt><dd>Member</dd></dl></li>
275
- <li><dl><dt>name</dt><dd>Balloter8</dd><dt>role</dt><dd>Member</dd></dl></li>
276
- <li><dl><dt>name</dt><dd>Balloter9</dd><dt>role</dt><dd>Member</dd></dl></li>
268
+ <li><dl><dt>name</dt><dd><p>Balloter1</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
269
+ <li><dl><dt>name</dt><dd><p>Balloter2</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
270
+ <li><dl><dt>name</dt><dd><p>Balloter3</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
271
+ <li><dl><dt>name</dt><dd><p>Balloter4</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
272
+ <li><dl><dt>name</dt><dd><p>Balloter5</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
273
+ <li><dl><dt>name</dt><dd><p>Balloter6</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
274
+ <li><dl><dt>name</dt><dd><p>Balloter7</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
275
+ <li><dl><dt>name</dt><dd><p>Balloter8</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
276
+ <li><dl><dt>name</dt><dd><p>Balloter9</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
277
277
  </ul>
278
278
  </membership>
279
279
  </clause>
@@ -281,19 +281,19 @@
281
281
  <p>When the IEEE SA Standards Board approved this {{ doctype }} on {{ issueddate }}, it had the following membership:</p>
282
282
  <membership>
283
283
  <ul>
284
- <li><dl><dt>name</dt><dd>&#x3c;Name&#x3e;</dd><dt>role</dt><dd>Chair</dd></dl></li>
285
- <li><dl><dt>name</dt><dd>&#x3c;Name&#x3e;</dd><dt>role</dt><dd>Vice Chair</dd></dl></li>
286
- <li><dl><dt>name</dt><dd>&#x3c;Name&#x3e;</dd><dt>role</dt><dd>Past Chair</dd></dl></li>
287
- <li><dl><dt>name</dt><dd>&#x3c;Name&#x3e;</dd><dt>role</dt><dd>Secretary</dd></dl></li>
288
- <li><dl><dt>name</dt><dd>SBMember1</dd><dt>role</dt><dd>Member</dd></dl></li>
289
- <li><dl><dt>name</dt><dd>SBMember2</dd><dt>role</dt><dd>Member</dd></dl></li>
290
- <li><dl><dt>name</dt><dd>SBMember3</dd><dt>role</dt><dd>Member</dd></dl></li>
291
- <li><dl><dt>name</dt><dd>SBMember4</dd><dt>role</dt><dd>Member</dd></dl></li>
292
- <li><dl><dt>name</dt><dd>SBMember5</dd><dt>role</dt><dd>Member</dd></dl></li>
293
- <li><dl><dt>name</dt><dd>SBMember6</dd><dt>role</dt><dd>Member</dd></dl></li>
294
- <li><dl><dt>name</dt><dd>SBMember7</dd><dt>role</dt><dd>Member</dd></dl></li>
295
- <li><dl><dt>name</dt><dd>SBMember8</dd><dt>role</dt><dd>Member</dd></dl></li>
296
- <li><dl><dt>name</dt><dd>SBMember9</dd><dt>role</dt><dd>Member</dd></dl></li>
284
+ <li><dl><dt>name</dt><dd><p>&#x3c;Name&#x3e;</p></dd><dt>role</dt><dd><p>Chair</p></dd></dl></li>
285
+ <li><dl><dt>name</dt><dd><p>&#x3c;Name&#x3e;</p></dd><dt>role</dt><dd><p>Vice Chair</p></dd></dl></li>
286
+ <li><dl><dt>name</dt><dd><p>&#x3c;Name&#x3e;</p></dd><dt>role</dt><dd><p>Past Chair</p></dd></dl></li>
287
+ <li><dl><dt>name</dt><dd><p>&#x3c;Name&#x3e;</p></dd><dt>role</dt><dd><p>Secretary</p></dd></dl></li>
288
+ <li><dl><dt>name</dt><dd><p>SBMember1</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
289
+ <li><dl><dt>name</dt><dd><p>SBMember2</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
290
+ <li><dl><dt>name</dt><dd><p>SBMember3</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
291
+ <li><dl><dt>name</dt><dd><p>SBMember4</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
292
+ <li><dl><dt>name</dt><dd><p>SBMember5</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
293
+ <li><dl><dt>name</dt><dd><p>SBMember6</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
294
+ <li><dl><dt>name</dt><dd><p>SBMember7</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
295
+ <li><dl><dt>name</dt><dd><p>SBMember8</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
296
+ <li><dl><dt>name</dt><dd><p>SBMember9</p></dd><dt>role</dt><dd><p>Member</p></dd></dl></li>
297
297
  </ul>
298
298
  </membership>
299
299
  <p type="emeritus_sign">*Member Emeritus</p>
@@ -337,7 +337,7 @@
337
337
  {% else %}
338
338
  <clause id="boilerplate_word_usage">
339
339
  <title>Word usage</title>
340
- <p>The word <em>shall</em> indicates mandatory requirements strictly to be followed in order to conform to the standard and from which no deviation is permitted (<em>shall</em> equals <em>is required to</em>).<fn><p>The use of the word <em>must</em> is deprecated and cannot be used when stating mandatory requirements; <em>must</em> is used only to describe unavoidable situations.</p></fn><fn><p>The use of <em>will</em> is deprecated and cannot be used when stating mandatory requirements; <em>will</em> is only used in statements of fact.</p></fn></p>
340
+ <p>The word <em>shall</em> indicates mandatory requirements strictly to be followed in order to conform to the standard and from which no deviation is permitted (<em>shall</em> equals <em>is required to</em>).<fn reference="_boilerplate_6"><p>The use of the word <em>must</em> is deprecated and cannot be used when stating mandatory requirements; <em>must</em> is used only to describe unavoidable situations.</p></fn><fn reference="_boilerplate_7"><p>The use of <em>will</em> is deprecated and cannot be used when stating mandatory requirements; <em>will</em> is only used in statements of fact.</p></fn></p>
341
341
  <p>The word <em>should</em> indicates that among several possibilities one is recommended as particularly suitable, without mentioning or excluding others; or that a certain course of action is preferred but not necessarily required (<em>should</em> equals <em>is recommended that</em>).</p>
342
342
  <p>The word <em>may</em> is used to indicate a course of action permissible within the limits of the standard (<em>may</em> equals <em>is permitted to</em>).</p>
343
343
  <p>The word <em>can</em> is used for statements of possibility and capability, whether material, physical, or causal (<em>can</em> equals <em>is able to</em>).</p>
@@ -89,7 +89,8 @@ module Metanorma
89
89
  "//annex//note[not(@type = 'boilerplate')]") or
90
90
  return
91
91
  ins = n.at("./p[last()]")
92
- ins << "<fn><p>#{@i18n.note_inform_fn}</p></fn>"
92
+ ins << "<fn reference='_boilerplate_cleanup1'>" \
93
+ "<p>#{@i18n.note_inform_fn}</p></fn>"
93
94
  end
94
95
 
95
96
  def table_footnote_renumber1(fnote, idx, seen)
@@ -169,6 +170,7 @@ module Metanorma
169
170
  ul.xpath("./li").each { |li| populate_participants2(li) }
170
171
  ul.xpath(".//p[normalize-space() = '']").each(&:remove)
171
172
  end
173
+ clause.at("./title")&.remove
172
174
  clause.children.to_xml
173
175
  end
174
176
 
@@ -183,14 +185,16 @@ module Metanorma
183
185
  end
184
186
 
185
187
  def populate_participants2(list)
186
- if dl = list.at("./dl")
188
+ curr = list
189
+ p = curr.at("./p") and curr = p
190
+ if dl = curr.at("./dl")
187
191
  ret = extract_participants(dl)
188
192
  dl.children = ret.keys.map do |k|
189
- "<dt>#{k}</dt><dd>#{ret[k]}</dd>"
193
+ "<dt>#{k}</dt><dd><p>#{ret[k]}</p></dd>"
190
194
  end.join
191
195
  else
192
- list.children = "<dl><dt>name</dt><dd>#{list.children.to_xml}</dd>" \
193
- "<dt>role</dt><dd>member</dd></dl>"
196
+ list.children = "<dl><dt>name</dt><dd><p>#{curr.children.to_xml}" \
197
+ "</p></dd><dt>role</dt><dd><p>member</p></dd></dl>"
194
198
  end
195
199
  end
196
200
 
@@ -10,6 +10,22 @@
10
10
  <start>
11
11
  <ref name="ieee-standard"/>
12
12
  </start>
13
+ <define name="sections">
14
+ <element name="sections">
15
+ <optional>
16
+ <ref name="note"/>
17
+ </optional>
18
+ <oneOrMore>
19
+ <choice>
20
+ <ref name="clause"/>
21
+ <ref name="terms"/>
22
+ <ref name="term-clause"/>
23
+ <ref name="definitions"/>
24
+ <ref name="floating-title"/>
25
+ </choice>
26
+ </oneOrMore>
27
+ </element>
28
+ </define>
13
29
  </include>
14
30
  <define name="ieee-standard">
15
31
  <element name="ieee-standard">
@@ -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 IEEE
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "0.1.2".freeze
4
4
  end
5
5
  end
@@ -7,9 +7,9 @@ extenttemplate:
7
7
  template:
8
8
  # skip authoritative_identifier, it is inserted in front of formattedref within metanorma
9
9
  standard: "{{ title }}."
10
- techreport: standard
11
10
  article: "{{creatornames}}, “{{title}},” <em>{{ series }}</em>, {{ extent }}, {{ date }}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
12
11
  book: "{{creatornames}}, <em>{{title}}</em>, {{ edition }}, {{place}}: {{publisher}}, {{date}}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
12
+ techreport: book
13
13
  booklet: book
14
14
  manual: book
15
15
  proceedings: book
@@ -17,12 +17,13 @@ Gem::Specification.new do |spec|
17
17
  spec.license = "BSD-2-Clause"
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(test|spec|features)/})
20
+ f.match(%r{^(test|spec|features|bin|.github)/}) \
21
+ || f.match(%r{Rakefile|bin/rspec})
21
22
  end
22
23
  spec.bindir = "exe"
23
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
25
  spec.require_paths = ["lib"]
25
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
26
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
26
27
 
27
28
  spec.add_dependency "metanorma-standoc", "~> 2.2.4"
28
29
  spec.add_dependency "mnconvert", "~> 1.20"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-standoc
@@ -215,19 +215,12 @@ executables: []
215
215
  extensions: []
216
216
  extra_rdoc_files: []
217
217
  files:
218
- - ".github/workflows/automerge.yml"
219
- - ".github/workflows/rake.yml"
220
- - ".github/workflows/release.yml"
221
218
  - ".hound.yml"
222
219
  - ".rubocop.yml"
223
220
  - CODE_OF_CONDUCT.md
224
221
  - Gemfile
225
222
  - LICENSE
226
223
  - README.adoc
227
- - Rakefile
228
- - bin/console
229
- - bin/rspec
230
- - bin/setup
231
224
  - lib/html2doc/ieee.rb
232
225
  - lib/html2doc/ieee/lists.rb
233
226
  - lib/html2doc/ieee/notes.rb
@@ -299,14 +292,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
292
  requirements:
300
293
  - - ">="
301
294
  - !ruby/object:Gem::Version
302
- version: 2.5.0
295
+ version: 2.7.0
303
296
  required_rubygems_version: !ruby/object:Gem::Requirement
304
297
  requirements:
305
298
  - - ">="
306
299
  - !ruby/object:Gem::Version
307
300
  version: '0'
308
301
  requirements: []
309
- rubygems_version: 3.1.6
302
+ rubygems_version: 3.3.7
310
303
  signing_key:
311
304
  specification_version: 4
312
305
  summary: Metanorma for the IEEE
@@ -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
- notify:
13
- uses: metanorma/ci/.github/workflows/mn-processor-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/itu"
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,17 +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")
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