metanorma-m3aawg 2.1.9 → 2.1.10

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: cc9281e2f8c3af7ccb5e07f8c71de9a2cf39f08dc252ec72e52400677bb90c94
4
+ data.tar.gz: ef50d0fc782ce16d3030bc07af30708ac9ea55585e731d319d7fd552385d31e2
5
5
  SHA512:
6
- metadata.gz: 2ce181dddebcd450322f87b3d45f6677ca0e1eba51c61421a8a4ce84d452b85cf5870a20d1789152fa208aa8f0a0ce01b6ffdb53d0d11ad451b624da32d06cd4
7
- data.tar.gz: 86cbb014f8661cf8caa1a1ec008bdcc6ddf3fcabb00a4f210730ebdc0766bdce0c49f0ef27d627f5f6051489f76e8f51e5915b9ed0129ed29e1a7fbcaefbfeb7
6
+ metadata.gz: 7e4890c117d9232388551e99e7306314140faf4437514e0aafa1ccfe60fe2ea7b7099aacab53132b9579592e5f620d25619fca2d990d2ef355b56af71eb4e39d
7
+ data.tar.gz: fc32e445697e8432e0ca7e18f0c16db8fa4b7d5676dd9222adbf19ed598271a5ae91d109205271c0e7a3216a7d0446a577df7108ee5f51ef7fb1b51e2ebd32fd
@@ -7378,7 +7378,7 @@
7378
7378
  <!-- ====== -->
7379
7379
  <!-- eref -->
7380
7380
  <!-- ====== -->
7381
- <xsl:template match="*[local-name() = 'eref']">
7381
+ <xsl:template match="*[local-name() = 'eref']" name="eref">
7382
7382
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7383
7383
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
7384
7384
  <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
@@ -7883,21 +7883,29 @@
7883
7883
  </xsl:variable>
7884
7884
 
7885
7885
  <xsl:template match="@*|node()" mode="index_add_id">
7886
+ <xsl:param name="docid"/>
7886
7887
  <xsl:copy>
7887
- <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
7888
+ <xsl:apply-templates select="@*|node()" mode="index_add_id">
7889
+ <xsl:with-param name="docid" select="$docid"/>
7890
+ </xsl:apply-templates>
7888
7891
  </xsl:copy>
7889
7892
  </xsl:template>
7890
7893
 
7891
7894
  <xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
7895
+ <xsl:param name="docid"/>
7892
7896
  <xsl:variable name="id">
7893
- <xsl:call-template name="generateIndexXrefId"/>
7897
+ <xsl:call-template name="generateIndexXrefId">
7898
+ <xsl:with-param name="docid" select="$docid"/>
7899
+ </xsl:call-template>
7894
7900
  </xsl:variable>
7895
7901
  <xsl:copy> <!-- add id to xref -->
7896
7902
  <xsl:apply-templates select="@*" mode="index_add_id"/>
7897
7903
  <xsl:attribute name="id">
7898
7904
  <xsl:value-of select="$id"/>
7899
7905
  </xsl:attribute>
7900
- <xsl:apply-templates mode="index_add_id"/>
7906
+ <xsl:apply-templates mode="index_add_id">
7907
+ <xsl:with-param name="docid" select="$docid"/>
7908
+ </xsl:apply-templates>
7901
7909
  </xsl:copy>
7902
7910
  <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
7903
7911
  <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
@@ -7909,7 +7917,9 @@
7909
7917
  <xsl:attribute name="id">
7910
7918
  <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
7911
7919
  </xsl:attribute>
7912
- <xsl:apply-templates mode="index_add_id"/>
7920
+ <xsl:apply-templates mode="index_add_id">
7921
+ <xsl:with-param name="docid" select="$docid"/>
7922
+ </xsl:apply-templates>
7913
7923
  </xsl:copy>
7914
7924
  </xsl:if>
7915
7925
  </xsl:template>
@@ -7946,12 +7956,33 @@
7946
7956
  </xsl:when>
7947
7957
  <xsl:when test="self::* and local-name(.) = 'xref'">
7948
7958
  <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
7959
 
7960
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
7953
7961
  <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]"/>
7962
+
7963
+ <xsl:variable name="pages_">
7964
+ <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
7965
+ <xsl:choose>
7966
+ <xsl:when test="@id = $id">
7967
+ <page><xsl:value-of select="."/></page>
7968
+ </xsl:when>
7969
+ <xsl:when test="@id = $id_next">
7970
+ <page_next><xsl:value-of select="."/></page_next>
7971
+ </xsl:when>
7972
+ <xsl:when test="@id = $id_prev">
7973
+ <page_prev><xsl:value-of select="."/></page_prev>
7974
+ </xsl:when>
7975
+ </xsl:choose>
7976
+ </xsl:for-each>
7977
+ </xsl:variable>
7978
+ <xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
7979
+
7980
+ <!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
7981
+ <xsl:variable name="page" select="$pages/page"/>
7982
+ <!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
7983
+ <xsl:variable name="page_next" select="$pages/page_next"/>
7984
+ <!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
7985
+ <xsl:variable name="page_prev" select="$pages/page_prev"/>
7955
7986
 
7956
7987
  <xsl:choose>
7957
7988
  <!-- 2nd pass -->
@@ -8011,16 +8042,20 @@
8011
8042
  </xsl:template>
8012
8043
 
8013
8044
  <xsl:template name="generateIndexXrefId">
8045
+ <xsl:param name="docid"/>
8046
+
8014
8047
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
8015
8048
 
8016
- <xsl:variable name="docid">
8017
- <xsl:call-template name="getDocumentId"/>
8049
+ <xsl:variable name="docid_curr">
8050
+ <xsl:value-of select="$docid"/>
8051
+ <xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
8018
8052
  </xsl:variable>
8053
+
8019
8054
  <xsl:variable name="item_number">
8020
8055
  <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
8021
8056
  </xsl:variable>
8022
8057
  <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, '_', -->
8058
+ <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
8024
8059
  </xsl:template>
8025
8060
 
8026
8061
  <xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
@@ -7378,7 +7378,7 @@
7378
7378
  <!-- ====== -->
7379
7379
  <!-- eref -->
7380
7380
  <!-- ====== -->
7381
- <xsl:template match="*[local-name() = 'eref']">
7381
+ <xsl:template match="*[local-name() = 'eref']" name="eref">
7382
7382
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7383
7383
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
7384
7384
  <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
@@ -7883,21 +7883,29 @@
7883
7883
  </xsl:variable>
7884
7884
 
7885
7885
  <xsl:template match="@*|node()" mode="index_add_id">
7886
+ <xsl:param name="docid"/>
7886
7887
  <xsl:copy>
7887
- <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
7888
+ <xsl:apply-templates select="@*|node()" mode="index_add_id">
7889
+ <xsl:with-param name="docid" select="$docid"/>
7890
+ </xsl:apply-templates>
7888
7891
  </xsl:copy>
7889
7892
  </xsl:template>
7890
7893
 
7891
7894
  <xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
7895
+ <xsl:param name="docid"/>
7892
7896
  <xsl:variable name="id">
7893
- <xsl:call-template name="generateIndexXrefId"/>
7897
+ <xsl:call-template name="generateIndexXrefId">
7898
+ <xsl:with-param name="docid" select="$docid"/>
7899
+ </xsl:call-template>
7894
7900
  </xsl:variable>
7895
7901
  <xsl:copy> <!-- add id to xref -->
7896
7902
  <xsl:apply-templates select="@*" mode="index_add_id"/>
7897
7903
  <xsl:attribute name="id">
7898
7904
  <xsl:value-of select="$id"/>
7899
7905
  </xsl:attribute>
7900
- <xsl:apply-templates mode="index_add_id"/>
7906
+ <xsl:apply-templates mode="index_add_id">
7907
+ <xsl:with-param name="docid" select="$docid"/>
7908
+ </xsl:apply-templates>
7901
7909
  </xsl:copy>
7902
7910
  <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
7903
7911
  <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
@@ -7909,7 +7917,9 @@
7909
7917
  <xsl:attribute name="id">
7910
7918
  <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
7911
7919
  </xsl:attribute>
7912
- <xsl:apply-templates mode="index_add_id"/>
7920
+ <xsl:apply-templates mode="index_add_id">
7921
+ <xsl:with-param name="docid" select="$docid"/>
7922
+ </xsl:apply-templates>
7913
7923
  </xsl:copy>
7914
7924
  </xsl:if>
7915
7925
  </xsl:template>
@@ -7946,12 +7956,33 @@
7946
7956
  </xsl:when>
7947
7957
  <xsl:when test="self::* and local-name(.) = 'xref'">
7948
7958
  <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
7959
 
7960
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
7953
7961
  <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]"/>
7962
+
7963
+ <xsl:variable name="pages_">
7964
+ <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
7965
+ <xsl:choose>
7966
+ <xsl:when test="@id = $id">
7967
+ <page><xsl:value-of select="."/></page>
7968
+ </xsl:when>
7969
+ <xsl:when test="@id = $id_next">
7970
+ <page_next><xsl:value-of select="."/></page_next>
7971
+ </xsl:when>
7972
+ <xsl:when test="@id = $id_prev">
7973
+ <page_prev><xsl:value-of select="."/></page_prev>
7974
+ </xsl:when>
7975
+ </xsl:choose>
7976
+ </xsl:for-each>
7977
+ </xsl:variable>
7978
+ <xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
7979
+
7980
+ <!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
7981
+ <xsl:variable name="page" select="$pages/page"/>
7982
+ <!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
7983
+ <xsl:variable name="page_next" select="$pages/page_next"/>
7984
+ <!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
7985
+ <xsl:variable name="page_prev" select="$pages/page_prev"/>
7955
7986
 
7956
7987
  <xsl:choose>
7957
7988
  <!-- 2nd pass -->
@@ -8011,16 +8042,20 @@
8011
8042
  </xsl:template>
8012
8043
 
8013
8044
  <xsl:template name="generateIndexXrefId">
8045
+ <xsl:param name="docid"/>
8046
+
8014
8047
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
8015
8048
 
8016
- <xsl:variable name="docid">
8017
- <xsl:call-template name="getDocumentId"/>
8049
+ <xsl:variable name="docid_curr">
8050
+ <xsl:value-of select="$docid"/>
8051
+ <xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
8018
8052
  </xsl:variable>
8053
+
8019
8054
  <xsl:variable name="item_number">
8020
8055
  <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
8021
8056
  </xsl:variable>
8022
8057
  <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, '_', -->
8058
+ <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
8024
8059
  </xsl:template>
8025
8060
 
8026
8061
  <xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
@@ -205,6 +205,15 @@
205
205
  <data type="boolean"/>
206
206
  </attribute>
207
207
  </optional>
208
+ <optional>
209
+ <attribute name="style">
210
+ <choice>
211
+ <value>basic</value>
212
+ <value>full</value>
213
+ <value>short</value>
214
+ </choice>
215
+ </attribute>
216
+ </optional>
208
217
  <ref name="XrefBody"/>
209
218
  </element>
210
219
  </define>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "2.1.9".freeze
3
+ VERSION = "2.1.10".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.10
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-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities