metanorma-m3aawg 2.1.9 → 2.1.11

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: 3e6a8c255816fe32ee11b897d828b8ff054615270bf59444c1f4677d72e09cad
4
- data.tar.gz: a5abf0ed95b7a5689b1ed6ededcc36a5987ca8766b878474be47434866580ba8
3
+ metadata.gz: 623483216c999b2f050f12bbae3581ecae497f1c538d4900959d9a582e75c392
4
+ data.tar.gz: 915098a1b045abbceb8cd066b6bdde751cc0ba30fc6aa9956e8f4e03ed27eeb0
5
5
  SHA512:
6
- metadata.gz: 2ce181dddebcd450322f87b3d45f6677ca0e1eba51c61421a8a4ce84d452b85cf5870a20d1789152fa208aa8f0a0ce01b6ffdb53d0d11ad451b624da32d06cd4
7
- data.tar.gz: 86cbb014f8661cf8caa1a1ec008bdcc6ddf3fcabb00a4f210730ebdc0766bdce0c49f0ef27d627f5f6051489f76e8f51e5915b9ed0129ed29e1a7fbcaefbfeb7
6
+ metadata.gz: ce0b5f84b4d3e5b626f034d3f7e2723d1354de3146c261727b6d16569e0cb83c5eb22153f6f08eccadfdc1946e482397bd1fe02093328b3e5d540db3e6f98c5d
7
+ data.tar.gz: 7598e43f999b3f356150c6a19690fa21e1cd138d23c7f14265559f8c2305f0e3cef9d490f2f1080df90345c530cf2fa52b73ff8127f422ed7c393d52fd7bbbe2
@@ -0,0 +1,31 @@
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 }}"
@@ -408,7 +408,7 @@ div.figure {
408
408
  font-weight: 700;
409
409
  font-size: 1em;
410
410
  text-align: center; }
411
- div.figure > img {
411
+ div.figure > img, div.figure > svg {
412
412
  margin-left: auto;
413
413
  margin-right: auto;
414
414
  display: block;
@@ -4065,8 +4065,17 @@
4065
4065
  </fo:inline>
4066
4066
  </xsl:template> <!-- tt -->
4067
4067
 
4068
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
4068
4069
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
4069
- <xsl:call-template name="add_spaces_to_sourcecode"/>
4070
+ <xsl:choose>
4071
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
4072
+ <!-- url -->
4073
+ <xsl:call-template name="add-zero-spaces-link-java"/>
4074
+ </xsl:when>
4075
+ <xsl:otherwise>
4076
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
4077
+ </xsl:otherwise>
4078
+ </xsl:choose>
4070
4079
  </xsl:template>
4071
4080
 
4072
4081
  <xsl:template match="*[local-name()='underline']">
@@ -4422,8 +4431,11 @@
4422
4431
 
4423
4432
  <xsl:template name="add-zero-spaces-link-java">
4424
4433
  <xsl:param name="text" select="."/>
4434
+
4435
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
4436
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
4425
4437
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
4426
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
4438
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
4427
4439
  </xsl:template>
4428
4440
 
4429
4441
  <!-- add zero space after dash character (for table's entries) -->
@@ -7378,7 +7390,7 @@
7378
7390
  <!-- ====== -->
7379
7391
  <!-- eref -->
7380
7392
  <!-- ====== -->
7381
- <xsl:template match="*[local-name() = 'eref']">
7393
+ <xsl:template match="*[local-name() = 'eref']" name="eref">
7382
7394
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7383
7395
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
7384
7396
  <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
@@ -7883,21 +7895,29 @@
7883
7895
  </xsl:variable>
7884
7896
 
7885
7897
  <xsl:template match="@*|node()" mode="index_add_id">
7898
+ <xsl:param name="docid"/>
7886
7899
  <xsl:copy>
7887
- <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
7900
+ <xsl:apply-templates select="@*|node()" mode="index_add_id">
7901
+ <xsl:with-param name="docid" select="$docid"/>
7902
+ </xsl:apply-templates>
7888
7903
  </xsl:copy>
7889
7904
  </xsl:template>
7890
7905
 
7891
7906
  <xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
7907
+ <xsl:param name="docid"/>
7892
7908
  <xsl:variable name="id">
7893
- <xsl:call-template name="generateIndexXrefId"/>
7909
+ <xsl:call-template name="generateIndexXrefId">
7910
+ <xsl:with-param name="docid" select="$docid"/>
7911
+ </xsl:call-template>
7894
7912
  </xsl:variable>
7895
7913
  <xsl:copy> <!-- add id to xref -->
7896
7914
  <xsl:apply-templates select="@*" mode="index_add_id"/>
7897
7915
  <xsl:attribute name="id">
7898
7916
  <xsl:value-of select="$id"/>
7899
7917
  </xsl:attribute>
7900
- <xsl:apply-templates mode="index_add_id"/>
7918
+ <xsl:apply-templates mode="index_add_id">
7919
+ <xsl:with-param name="docid" select="$docid"/>
7920
+ </xsl:apply-templates>
7901
7921
  </xsl:copy>
7902
7922
  <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
7903
7923
  <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
@@ -7909,7 +7929,9 @@
7909
7929
  <xsl:attribute name="id">
7910
7930
  <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
7911
7931
  </xsl:attribute>
7912
- <xsl:apply-templates mode="index_add_id"/>
7932
+ <xsl:apply-templates mode="index_add_id">
7933
+ <xsl:with-param name="docid" select="$docid"/>
7934
+ </xsl:apply-templates>
7913
7935
  </xsl:copy>
7914
7936
  </xsl:if>
7915
7937
  </xsl:template>
@@ -7946,12 +7968,33 @@
7946
7968
  </xsl:when>
7947
7969
  <xsl:when test="self::* and local-name(.) = 'xref'">
7948
7970
  <xsl:variable name="id" select="@id"/>
7949
- <xsl:variable name="page" select="$index//item[@id = $id]"/>
7950
- <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
7951
- <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
7952
7971
 
7972
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
7953
7973
  <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
7954
- <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
7974
+
7975
+ <xsl:variable name="pages_">
7976
+ <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
7977
+ <xsl:choose>
7978
+ <xsl:when test="@id = $id">
7979
+ <page><xsl:value-of select="."/></page>
7980
+ </xsl:when>
7981
+ <xsl:when test="@id = $id_next">
7982
+ <page_next><xsl:value-of select="."/></page_next>
7983
+ </xsl:when>
7984
+ <xsl:when test="@id = $id_prev">
7985
+ <page_prev><xsl:value-of select="."/></page_prev>
7986
+ </xsl:when>
7987
+ </xsl:choose>
7988
+ </xsl:for-each>
7989
+ </xsl:variable>
7990
+ <xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
7991
+
7992
+ <!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
7993
+ <xsl:variable name="page" select="$pages/page"/>
7994
+ <!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
7995
+ <xsl:variable name="page_next" select="$pages/page_next"/>
7996
+ <!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
7997
+ <xsl:variable name="page_prev" select="$pages/page_prev"/>
7955
7998
 
7956
7999
  <xsl:choose>
7957
8000
  <!-- 2nd pass -->
@@ -8011,16 +8054,20 @@
8011
8054
  </xsl:template>
8012
8055
 
8013
8056
  <xsl:template name="generateIndexXrefId">
8057
+ <xsl:param name="docid"/>
8058
+
8014
8059
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
8015
8060
 
8016
- <xsl:variable name="docid">
8017
- <xsl:call-template name="getDocumentId"/>
8061
+ <xsl:variable name="docid_curr">
8062
+ <xsl:value-of select="$docid"/>
8063
+ <xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
8018
8064
  </xsl:variable>
8065
+
8019
8066
  <xsl:variable name="item_number">
8020
8067
  <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
8021
8068
  </xsl:variable>
8022
8069
  <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
8023
- <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
8070
+ <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
8024
8071
  </xsl:template>
8025
8072
 
8026
8073
  <xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
@@ -8816,7 +8863,7 @@
8816
8863
 
8817
8864
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
8818
8865
 
8819
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
8866
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
8820
8867
 
8821
8868
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
8822
8869
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -4065,8 +4065,17 @@
4065
4065
  </fo:inline>
4066
4066
  </xsl:template> <!-- tt -->
4067
4067
 
4068
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
4068
4069
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
4069
- <xsl:call-template name="add_spaces_to_sourcecode"/>
4070
+ <xsl:choose>
4071
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
4072
+ <!-- url -->
4073
+ <xsl:call-template name="add-zero-spaces-link-java"/>
4074
+ </xsl:when>
4075
+ <xsl:otherwise>
4076
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
4077
+ </xsl:otherwise>
4078
+ </xsl:choose>
4070
4079
  </xsl:template>
4071
4080
 
4072
4081
  <xsl:template match="*[local-name()='underline']">
@@ -4422,8 +4431,11 @@
4422
4431
 
4423
4432
  <xsl:template name="add-zero-spaces-link-java">
4424
4433
  <xsl:param name="text" select="."/>
4434
+
4435
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
4436
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
4425
4437
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
4426
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
4438
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
4427
4439
  </xsl:template>
4428
4440
 
4429
4441
  <!-- add zero space after dash character (for table's entries) -->
@@ -7378,7 +7390,7 @@
7378
7390
  <!-- ====== -->
7379
7391
  <!-- eref -->
7380
7392
  <!-- ====== -->
7381
- <xsl:template match="*[local-name() = 'eref']">
7393
+ <xsl:template match="*[local-name() = 'eref']" name="eref">
7382
7394
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7383
7395
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
7384
7396
  <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
@@ -7883,21 +7895,29 @@
7883
7895
  </xsl:variable>
7884
7896
 
7885
7897
  <xsl:template match="@*|node()" mode="index_add_id">
7898
+ <xsl:param name="docid"/>
7886
7899
  <xsl:copy>
7887
- <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
7900
+ <xsl:apply-templates select="@*|node()" mode="index_add_id">
7901
+ <xsl:with-param name="docid" select="$docid"/>
7902
+ </xsl:apply-templates>
7888
7903
  </xsl:copy>
7889
7904
  </xsl:template>
7890
7905
 
7891
7906
  <xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
7907
+ <xsl:param name="docid"/>
7892
7908
  <xsl:variable name="id">
7893
- <xsl:call-template name="generateIndexXrefId"/>
7909
+ <xsl:call-template name="generateIndexXrefId">
7910
+ <xsl:with-param name="docid" select="$docid"/>
7911
+ </xsl:call-template>
7894
7912
  </xsl:variable>
7895
7913
  <xsl:copy> <!-- add id to xref -->
7896
7914
  <xsl:apply-templates select="@*" mode="index_add_id"/>
7897
7915
  <xsl:attribute name="id">
7898
7916
  <xsl:value-of select="$id"/>
7899
7917
  </xsl:attribute>
7900
- <xsl:apply-templates mode="index_add_id"/>
7918
+ <xsl:apply-templates mode="index_add_id">
7919
+ <xsl:with-param name="docid" select="$docid"/>
7920
+ </xsl:apply-templates>
7901
7921
  </xsl:copy>
7902
7922
  <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
7903
7923
  <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
@@ -7909,7 +7929,9 @@
7909
7929
  <xsl:attribute name="id">
7910
7930
  <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
7911
7931
  </xsl:attribute>
7912
- <xsl:apply-templates mode="index_add_id"/>
7932
+ <xsl:apply-templates mode="index_add_id">
7933
+ <xsl:with-param name="docid" select="$docid"/>
7934
+ </xsl:apply-templates>
7913
7935
  </xsl:copy>
7914
7936
  </xsl:if>
7915
7937
  </xsl:template>
@@ -7946,12 +7968,33 @@
7946
7968
  </xsl:when>
7947
7969
  <xsl:when test="self::* and local-name(.) = 'xref'">
7948
7970
  <xsl:variable name="id" select="@id"/>
7949
- <xsl:variable name="page" select="$index//item[@id = $id]"/>
7950
- <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
7951
- <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
7952
7971
 
7972
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
7953
7973
  <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
7954
- <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
7974
+
7975
+ <xsl:variable name="pages_">
7976
+ <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
7977
+ <xsl:choose>
7978
+ <xsl:when test="@id = $id">
7979
+ <page><xsl:value-of select="."/></page>
7980
+ </xsl:when>
7981
+ <xsl:when test="@id = $id_next">
7982
+ <page_next><xsl:value-of select="."/></page_next>
7983
+ </xsl:when>
7984
+ <xsl:when test="@id = $id_prev">
7985
+ <page_prev><xsl:value-of select="."/></page_prev>
7986
+ </xsl:when>
7987
+ </xsl:choose>
7988
+ </xsl:for-each>
7989
+ </xsl:variable>
7990
+ <xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
7991
+
7992
+ <!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
7993
+ <xsl:variable name="page" select="$pages/page"/>
7994
+ <!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
7995
+ <xsl:variable name="page_next" select="$pages/page_next"/>
7996
+ <!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
7997
+ <xsl:variable name="page_prev" select="$pages/page_prev"/>
7955
7998
 
7956
7999
  <xsl:choose>
7957
8000
  <!-- 2nd pass -->
@@ -8011,16 +8054,20 @@
8011
8054
  </xsl:template>
8012
8055
 
8013
8056
  <xsl:template name="generateIndexXrefId">
8057
+ <xsl:param name="docid"/>
8058
+
8014
8059
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
8015
8060
 
8016
- <xsl:variable name="docid">
8017
- <xsl:call-template name="getDocumentId"/>
8061
+ <xsl:variable name="docid_curr">
8062
+ <xsl:value-of select="$docid"/>
8063
+ <xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
8018
8064
  </xsl:variable>
8065
+
8019
8066
  <xsl:variable name="item_number">
8020
8067
  <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
8021
8068
  </xsl:variable>
8022
8069
  <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
8023
- <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
8070
+ <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
8024
8071
  </xsl:template>
8025
8072
 
8026
8073
  <xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
@@ -8816,7 +8863,7 @@
8816
8863
 
8817
8864
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
8818
8865
 
8819
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
8866
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
8820
8867
 
8821
8868
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
8822
8869
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -1,10 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <include href="biblio.rng">
4
- <start>
5
- <ref name="document"/>
6
- </start>
7
- </include>
8
3
  <define name="document">
9
4
  <element name="document">
10
5
  <optional>
@@ -1125,26 +1120,4 @@
1125
1120
  </zeroOrMore>
1126
1121
  </element>
1127
1122
  </define>
1128
- <define name="ext">
1129
- <element name="ext">
1130
- <ref name="BibDataExtensionType"/>
1131
- </element>
1132
- </define>
1133
- <define name="BibDataExtensionType">
1134
- <ref name="doctype"/>
1135
- </define>
1136
- <define name="doctype">
1137
- <element name="doctype">
1138
- <ref name="DocumentType"/>
1139
- </element>
1140
- </define>
1141
- <define name="DocumentType">
1142
- <value>document</value>
1143
- </define>
1144
- <define name="BibData">
1145
- <ref name="BibliographicItem"/>
1146
- <optional>
1147
- <ref name="ext"/>
1148
- </optional>
1149
- </define>
1150
1123
  </grammar>
@@ -0,0 +1,164 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <!--
4
+ Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
5
+ of relaton
6
+
7
+ Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
8
+ (SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
9
+ -->
10
+ <include href="biblio.rng">
11
+ <define name="BibData">
12
+ <ref name="BibliographicItem"/>
13
+ <optional>
14
+ <ref name="ext"/>
15
+ </optional>
16
+ </define>
17
+ </include>
18
+ <define name="ext">
19
+ <element name="ext">
20
+ <ref name="BibDataExtensionType"/>
21
+ </element>
22
+ </define>
23
+ <define name="BibDataExtensionType">
24
+ <optional>
25
+ <attribute name="schema-version"/>
26
+ </optional>
27
+ <ref name="doctype"/>
28
+ <optional>
29
+ <ref name="docsubtype"/>
30
+ </optional>
31
+ <optional>
32
+ <ref name="editorialgroup"/>
33
+ </optional>
34
+ <zeroOrMore>
35
+ <ref name="ics"/>
36
+ </zeroOrMore>
37
+ <zeroOrMore>
38
+ <ref name="structuredidentifier"/>
39
+ </zeroOrMore>
40
+ </define>
41
+ <define name="doctype">
42
+ <element name="doctype">
43
+ <optional>
44
+ <attribute name="abbreviation"/>
45
+ </optional>
46
+ <ref name="DocumentType"/>
47
+ </element>
48
+ </define>
49
+ <define name="DocumentType">
50
+ <value>document</value>
51
+ </define>
52
+ <define name="docsubtype">
53
+ <element name="subdoctype">
54
+ <ref name="DocumentSubtype"/>
55
+ </element>
56
+ </define>
57
+ <define name="DocumentSubtype">
58
+ <text/>
59
+ </define>
60
+ <define name="editorialgroup">
61
+ <element name="editorialgroup">
62
+ <oneOrMore>
63
+ <ref name="technical-committee"/>
64
+ </oneOrMore>
65
+ </element>
66
+ </define>
67
+ <define name="technical-committee">
68
+ <element name="technical-committee">
69
+ <ref name="IsoWorkgroup"/>
70
+ </element>
71
+ </define>
72
+ <define name="IsoWorkgroup">
73
+ <optional>
74
+ <attribute name="number"/>
75
+ </optional>
76
+ <optional>
77
+ <attribute name="type"/>
78
+ </optional>
79
+ <optional>
80
+ <attribute name="identifier"/>
81
+ </optional>
82
+ <optional>
83
+ <attribute name="prefix"/>
84
+ </optional>
85
+ <text/>
86
+ </define>
87
+ <define name="ics">
88
+ <element name="ics">
89
+ <element name="code">
90
+ <text/>
91
+ </element>
92
+ <optional>
93
+ <element name="text">
94
+ <text/>
95
+ </element>
96
+ </optional>
97
+ </element>
98
+ </define>
99
+ <define name="structuredidentifier">
100
+ <element name="structuredidentifier">
101
+ <optional>
102
+ <attribute name="type"/>
103
+ </optional>
104
+ <oneOrMore>
105
+ <element name="agency">
106
+ <text/>
107
+ </element>
108
+ </oneOrMore>
109
+ <optional>
110
+ <element name="class">
111
+ <text/>
112
+ </element>
113
+ </optional>
114
+ <element name="docnumber">
115
+ <text/>
116
+ </element>
117
+ <optional>
118
+ <element name="partnumber">
119
+ <text/>
120
+ </element>
121
+ </optional>
122
+ <optional>
123
+ <element name="edition">
124
+ <text/>
125
+ </element>
126
+ </optional>
127
+ <optional>
128
+ <element name="version">
129
+ <text/>
130
+ </element>
131
+ </optional>
132
+ <optional>
133
+ <element name="supplementtype">
134
+ <text/>
135
+ </element>
136
+ </optional>
137
+ <optional>
138
+ <element name="supplementnumber">
139
+ <text/>
140
+ </element>
141
+ </optional>
142
+ <optional>
143
+ <element name="amendment">
144
+ <text/>
145
+ </element>
146
+ </optional>
147
+ <optional>
148
+ <element name="corrigendum">
149
+ <text/>
150
+ </element>
151
+ </optional>
152
+ <optional>
153
+ <element name="language">
154
+ <text/>
155
+ </element>
156
+ </optional>
157
+ <optional>
158
+ <element name="year">
159
+ <text/>
160
+ </element>
161
+ </optional>
162
+ </element>
163
+ </define>
164
+ </grammar>
@@ -33,9 +33,10 @@
33
33
  <param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
34
34
  </data>
35
35
  </define>
36
- <start>
37
- <ref name="bibitem"/>
38
- </start>
36
+ <!-- start = bibitem -->
37
+ <define name="BibData">
38
+ <ref name="BibliographicItem"/>
39
+ </define>
39
40
  <define name="status">
40
41
  <element name="status">
41
42
  <ref name="stage"/>
@@ -170,27 +171,25 @@
170
171
  </define>
171
172
  <define name="contributor">
172
173
  <element name="contributor">
173
- <zeroOrMore>
174
+ <oneOrMore>
174
175
  <ref name="role"/>
175
- </zeroOrMore>
176
+ </oneOrMore>
176
177
  <ref name="ContributorInfo"/>
177
178
  </element>
178
179
  </define>
179
180
  <define name="role">
180
181
  <element name="role">
181
- <optional>
182
- <attribute name="type">
183
- <choice>
184
- <value>author</value>
185
- <value>performer</value>
186
- <value>publisher</value>
187
- <value>editor</value>
188
- <value>adapter</value>
189
- <value>translator</value>
190
- <value>distributor</value>
191
- </choice>
192
- </attribute>
193
- </optional>
182
+ <attribute name="type">
183
+ <choice>
184
+ <value>author</value>
185
+ <value>performer</value>
186
+ <value>publisher</value>
187
+ <value>editor</value>
188
+ <value>adapter</value>
189
+ <value>translator</value>
190
+ <value>distributor</value>
191
+ </choice>
192
+ </attribute>
194
193
  <zeroOrMore>
195
194
  <ref name="roledescription"/>
196
195
  </zeroOrMore>
@@ -512,6 +511,17 @@
512
511
  </define>
513
512
  <define name="localityStack">
514
513
  <element name="localityStack">
514
+ <optional>
515
+ <attribute name="connective">
516
+ <choice>
517
+ <value>and</value>
518
+ <value>or</value>
519
+ <value>from</value>
520
+ <value>to</value>
521
+ <value/>
522
+ </choice>
523
+ </attribute>
524
+ </optional>
515
525
  <zeroOrMore>
516
526
  <ref name="locality"/>
517
527
  </zeroOrMore>
@@ -524,6 +534,17 @@
524
534
  </define>
525
535
  <define name="sourceLocalityStack">
526
536
  <element name="sourceLocalityStack">
537
+ <optional>
538
+ <attribute name="connective">
539
+ <choice>
540
+ <value>and</value>
541
+ <value>or</value>
542
+ <value>from</value>
543
+ <value>to</value>
544
+ <value/>
545
+ </choice>
546
+ </attribute>
547
+ </optional>
527
548
  <zeroOrMore>
528
549
  <ref name="sourceLocality"/>
529
550
  </zeroOrMore>
@@ -626,6 +647,9 @@
626
647
  <ref name="BibItemType"/>
627
648
  </attribute>
628
649
  </optional>
650
+ <optional>
651
+ <attribute name="schema-version"/>
652
+ </optional>
629
653
  <optional>
630
654
  <ref name="fetched"/>
631
655
  </optional>
@@ -720,6 +744,9 @@
720
744
  <ref name="BibItemType"/>
721
745
  </attribute>
722
746
  </optional>
747
+ <optional>
748
+ <attribute name="schema-version"/>
749
+ </optional>
723
750
  <optional>
724
751
  <ref name="fetched"/>
725
752
  </optional>
@@ -19,19 +19,7 @@
19
19
  -->
20
20
  <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">
21
21
  <include href="reqt.rng"/>
22
- <!-- include "biblio.rnc" { } -->
23
22
  <include href="basicdoc.rng">
24
- <start>
25
- <ref name="standard-document"/>
26
- </start>
27
- <define name="doctype">
28
- <element name="doctype">
29
- <optional>
30
- <attribute name="abbreviation"/>
31
- </optional>
32
- <ref name="DocumentType"/>
33
- </element>
34
- </define>
35
23
  <define name="admonition">
36
24
  <element name="admonition">
37
25
  <attribute name="type">
@@ -117,24 +105,6 @@
117
105
  </optional>
118
106
  </element>
119
107
  </define>
120
- <define name="bibitem">
121
- <element name="bibitem">
122
- <attribute name="id">
123
- <data type="ID"/>
124
- </attribute>
125
- <optional>
126
- <attribute name="hidden">
127
- <data type="boolean"/>
128
- </attribute>
129
- </optional>
130
- <optional>
131
- <attribute name="suppress_identifier">
132
- <data type="boolean"/>
133
- </attribute>
134
- </optional>
135
- <ref name="BibliographicItem"/>
136
- </element>
137
- </define>
138
108
  <define name="section-title">
139
109
  <element name="title">
140
110
  <zeroOrMore>
@@ -205,6 +175,15 @@
205
175
  <data type="boolean"/>
206
176
  </attribute>
207
177
  </optional>
178
+ <optional>
179
+ <attribute name="style">
180
+ <choice>
181
+ <value>basic</value>
182
+ <value>full</value>
183
+ <value>short</value>
184
+ </choice>
185
+ </attribute>
186
+ </optional>
208
187
  <ref name="XrefBody"/>
209
188
  </element>
210
189
  </define>
@@ -239,42 +218,6 @@
239
218
  <ref name="PureTextElement"/>
240
219
  </oneOrMore>
241
220
  </define>
242
- <define name="localityStack">
243
- <element name="localityStack">
244
- <optional>
245
- <attribute name="connective">
246
- <choice>
247
- <value>and</value>
248
- <value>or</value>
249
- <value>from</value>
250
- <value>to</value>
251
- <value/>
252
- </choice>
253
- </attribute>
254
- </optional>
255
- <zeroOrMore>
256
- <ref name="locality"/>
257
- </zeroOrMore>
258
- </element>
259
- </define>
260
- <define name="sourceLocalityStack">
261
- <element name="sourceLocalityStack">
262
- <optional>
263
- <attribute name="connective">
264
- <choice>
265
- <value>and</value>
266
- <value>or</value>
267
- <value>from</value>
268
- <value>to</value>
269
- <value/>
270
- </choice>
271
- </attribute>
272
- </optional>
273
- <zeroOrMore>
274
- <ref name="sourceLocality"/>
275
- </zeroOrMore>
276
- </element>
277
- </define>
278
221
  <define name="ul">
279
222
  <element name="ul">
280
223
  <attribute name="id">
@@ -818,21 +761,6 @@
818
761
  </zeroOrMore>
819
762
  </element>
820
763
  </define>
821
- <define name="BibDataExtensionType">
822
- <ref name="doctype"/>
823
- <optional>
824
- <ref name="docsubtype"/>
825
- </optional>
826
- <optional>
827
- <ref name="editorialgroup"/>
828
- </optional>
829
- <zeroOrMore>
830
- <ref name="ics"/>
831
- </zeroOrMore>
832
- <zeroOrMore>
833
- <ref name="structuredidentifier"/>
834
- </zeroOrMore>
835
- </define>
836
764
  <!-- TitleType = text -->
837
765
  <define name="sections">
838
766
  <element name="sections">
@@ -872,7 +800,7 @@
872
800
  <ref name="BasicBlock"/>
873
801
  </zeroOrMore>
874
802
  <zeroOrMore>
875
- <ref name="bibitem"/>
803
+ <ref name="doc_bibitem"/>
876
804
  <zeroOrMore>
877
805
  <ref name="note"/>
878
806
  </zeroOrMore>
@@ -1210,6 +1138,24 @@
1210
1138
  </define>
1211
1139
  </include>
1212
1140
  <!-- end overrides -->
1141
+ <define name="doc_bibitem">
1142
+ <element name="bibitem">
1143
+ <attribute name="id">
1144
+ <data type="ID"/>
1145
+ </attribute>
1146
+ <optional>
1147
+ <attribute name="hidden">
1148
+ <data type="boolean"/>
1149
+ </attribute>
1150
+ </optional>
1151
+ <optional>
1152
+ <attribute name="suppress_identifier">
1153
+ <data type="boolean"/>
1154
+ </attribute>
1155
+ </optional>
1156
+ <ref name="BibliographicItem"/>
1157
+ </element>
1158
+ </define>
1213
1159
  <define name="image" combine="choice">
1214
1160
  <element name="svg">
1215
1161
  <oneOrMore>
@@ -1228,14 +1174,6 @@
1228
1174
  <value>tag</value>
1229
1175
  </choice>
1230
1176
  </define>
1231
- <define name="docsubtype">
1232
- <element name="subdoctype">
1233
- <ref name="DocumentSubtype"/>
1234
- </element>
1235
- </define>
1236
- <define name="DocumentSubtype">
1237
- <text/>
1238
- </define>
1239
1177
  <define name="colgroup">
1240
1178
  <element name="colgroup">
1241
1179
  <oneOrMore>
@@ -1597,45 +1535,6 @@
1597
1535
  </choice>
1598
1536
  </element>
1599
1537
  </define>
1600
- <define name="editorialgroup">
1601
- <element name="editorialgroup">
1602
- <oneOrMore>
1603
- <ref name="technical-committee"/>
1604
- </oneOrMore>
1605
- </element>
1606
- </define>
1607
- <define name="technical-committee">
1608
- <element name="technical-committee">
1609
- <ref name="IsoWorkgroup"/>
1610
- </element>
1611
- </define>
1612
- <define name="IsoWorkgroup">
1613
- <optional>
1614
- <attribute name="number"/>
1615
- </optional>
1616
- <optional>
1617
- <attribute name="type"/>
1618
- </optional>
1619
- <optional>
1620
- <attribute name="identifier"/>
1621
- </optional>
1622
- <optional>
1623
- <attribute name="prefix"/>
1624
- </optional>
1625
- <text/>
1626
- </define>
1627
- <define name="ics">
1628
- <element name="ics">
1629
- <element name="code">
1630
- <text/>
1631
- </element>
1632
- <optional>
1633
- <element name="text">
1634
- <text/>
1635
- </element>
1636
- </optional>
1637
- </element>
1638
- </define>
1639
1538
  <define name="standard-document">
1640
1539
  <element name="standard-document">
1641
1540
  <attribute name="version"/>
@@ -2466,71 +2365,6 @@
2466
2365
  </optional>
2467
2366
  </element>
2468
2367
  </define>
2469
- <define name="structuredidentifier">
2470
- <element name="structuredidentifier">
2471
- <optional>
2472
- <attribute name="type"/>
2473
- </optional>
2474
- <oneOrMore>
2475
- <element name="agency">
2476
- <text/>
2477
- </element>
2478
- </oneOrMore>
2479
- <optional>
2480
- <element name="class">
2481
- <text/>
2482
- </element>
2483
- </optional>
2484
- <element name="docnumber">
2485
- <text/>
2486
- </element>
2487
- <optional>
2488
- <element name="partnumber">
2489
- <text/>
2490
- </element>
2491
- </optional>
2492
- <optional>
2493
- <element name="edition">
2494
- <text/>
2495
- </element>
2496
- </optional>
2497
- <optional>
2498
- <element name="version">
2499
- <text/>
2500
- </element>
2501
- </optional>
2502
- <optional>
2503
- <element name="supplementtype">
2504
- <text/>
2505
- </element>
2506
- </optional>
2507
- <optional>
2508
- <element name="supplementnumber">
2509
- <text/>
2510
- </element>
2511
- </optional>
2512
- <optional>
2513
- <element name="amendment">
2514
- <text/>
2515
- </element>
2516
- </optional>
2517
- <optional>
2518
- <element name="corrigendum">
2519
- <text/>
2520
- </element>
2521
- </optional>
2522
- <optional>
2523
- <element name="language">
2524
- <text/>
2525
- </element>
2526
- </optional>
2527
- <optional>
2528
- <element name="year">
2529
- <text/>
2530
- </element>
2531
- </optional>
2532
- </element>
2533
- </define>
2534
2368
  <define name="term-clause">
2535
2369
  <element name="clause">
2536
2370
  <optional>
@@ -2804,4 +2638,7 @@
2804
2638
  </attribute>
2805
2639
  </element>
2806
2640
  </define>
2641
+ <start>
2642
+ <ref name="standard-document"/>
2643
+ </start>
2807
2644
  </grammar>
@@ -5,6 +5,7 @@
5
5
  we cannot have a new default namespace: we will end up with a grammar with two different
6
6
  namespaces, one for isostandard and one for csand additions. And we do not want that.
7
7
  -->
8
+ <include href="relaton-m3aawg.rng"/>
8
9
  <include href="isodoc.rng">
9
10
  <start>
10
11
  <ref name="m3d-standard"/>
@@ -55,38 +56,7 @@
55
56
  </choice>
56
57
  </element>
57
58
  </define>
58
- <define name="DocumentType">
59
- <choice>
60
- <value>guidance</value>
61
- <value>proposal</value>
62
- <value>standard</value>
63
- <value>report</value>
64
- <value>whitepaper</value>
65
- <value>charter</value>
66
- <value>policy</value>
67
- <value>glossary</value>
68
- <value>case-study</value>
69
- </choice>
70
- </define>
71
- <define name="editorialgroup">
72
- <element name="editorialgroup">
73
- <oneOrMore>
74
- <ref name="committee"/>
75
- </oneOrMore>
76
- </element>
77
- </define>
78
59
  </include>
79
- <define name="committee">
80
- <element name="committee">
81
- <attribute name="type">
82
- <choice>
83
- <value>technical</value>
84
- <value>provisional</value>
85
- </choice>
86
- </attribute>
87
- <text/>
88
- </element>
89
- </define>
90
60
  <define name="m3d-standard">
91
61
  <element name="m3d-standard">
92
62
  <attribute name="version"/>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <include href="biblio-standoc.rng">
4
+ <define name="DocumentType">
5
+ <choice>
6
+ <value>guidance</value>
7
+ <value>proposal</value>
8
+ <value>standard</value>
9
+ <value>report</value>
10
+ <value>whitepaper</value>
11
+ <value>charter</value>
12
+ <value>policy</value>
13
+ <value>glossary</value>
14
+ <value>case-study</value>
15
+ </choice>
16
+ </define>
17
+ <define name="editorialgroup">
18
+ <element name="editorialgroup">
19
+ <oneOrMore>
20
+ <ref name="committee"/>
21
+ </oneOrMore>
22
+ </element>
23
+ </define>
24
+ </include>
25
+ <define name="committee">
26
+ <element name="committee">
27
+ <attribute name="type">
28
+ <choice>
29
+ <value>technical</value>
30
+ <value>provisional</value>
31
+ </choice>
32
+ </attribute>
33
+ <text/>
34
+ </element>
35
+ </define>
36
+ </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "2.1.9".freeze
3
+ VERSION = "2.1.11".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.9
4
+ version: 2.1.11
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-09-26 00:00:00.000000000 Z
11
+ date: 2022-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -204,6 +204,7 @@ executables: []
204
204
  extensions: []
205
205
  extra_rdoc_files: []
206
206
  files:
207
+ - ".github/workflows/automerge.yml"
207
208
  - ".github/workflows/rake.yml"
208
209
  - ".github/workflows/release.yml"
209
210
  - ".gitignore"
@@ -248,12 +249,14 @@ files:
248
249
  - lib/metanorma-m3aawg.rb
249
250
  - lib/metanorma/m3aawg.rb
250
251
  - lib/metanorma/m3aawg/basicdoc.rng
252
+ - lib/metanorma/m3aawg/biblio-standoc.rng
251
253
  - lib/metanorma/m3aawg/biblio.rng
252
254
  - lib/metanorma/m3aawg/boilerplate.xml
253
255
  - lib/metanorma/m3aawg/converter.rb
254
256
  - lib/metanorma/m3aawg/isodoc.rng
255
257
  - lib/metanorma/m3aawg/m3d.rng
256
258
  - lib/metanorma/m3aawg/processor.rb
259
+ - lib/metanorma/m3aawg/relaton-m3aawg.rng
257
260
  - lib/metanorma/m3aawg/reqt.rng
258
261
  - lib/metanorma/m3aawg/version.rb
259
262
  - metanorma-m3aawg.gemspec