metanorma-ribose 2.2.12 → 2.3.0

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: 2597a251bd77d5c5d9bca4f9901956a69bd0e4a04a99c81da66d587fbbb153dd
4
- data.tar.gz: ec498d468745f70797c3b3460bfff9d155fa58061e49d41b6323ce09727a9bec
3
+ metadata.gz: 46ea5eea884d1f312eb1d61021968e5f52c9dfa73e2abce1bb18c08851484436
4
+ data.tar.gz: c9b45439c5ab9fd0afe4cf7ad68585a7a6f05630841055f349c4a3e87d75a26d
5
5
  SHA512:
6
- metadata.gz: 5caa1261ccd6b4f0ca92013e60fe2bd0a8f7413cc187ffac8b1a1adbd000ad5c0f44736557cba729845dff04abb3f71480b6e5d370f5f7860fd9450439b00044
7
- data.tar.gz: 219923a62718f199b9cd5d95548c1ac78dc8fba367f3871b4c5f63657d9245fe92e1cd6a7791c3d846e3d63ac3b6525cf294ee77a0ecf03dcecfe18bbd2e9cbc
6
+ metadata.gz: 79d78a621f1a379df14692eaa491726c4ed4750d794fcb379c711b198c40599dab55a26e32e8cb545013211ab96fd796bc790fb2346dfddb42ff2a99519e3bac
7
+ data.tar.gz: 54b348ae16bff0db1922456350040d073689be99619c4927bc364dd36918ec4a0e27b12f7215e4ac7abcbd885a0ee45f357bbb45df16cdec41248fcabad2a175
@@ -97,7 +97,7 @@ h1, h2, h3, h4, h5, h6 {
97
97
 
98
98
  blockquote, q {
99
99
  quotes: none; }
100
- blockquote:before, blockquote:after, q:before, q:after {
100
+ blockquote::before, blockquote::after, q::before, q::after {
101
101
  content: '';
102
102
  content: none; }
103
103
 
@@ -120,14 +120,18 @@ b, strong {
120
120
  div.document-stage-band, div.document-type-band {
121
121
  background-color: #333333; }
122
122
 
123
- a.FootnoteRef + a.FootnoteRef:before {
123
+ a.FootnoteRef + a.FootnoteRef::before {
124
124
  content: ", ";
125
125
  vertical-align: super; }
126
126
 
127
- a.TableFootnoteRef + a.TableFootnoteRef:before {
127
+ a.TableFootnoteRef + a.TableFootnoteRef::before {
128
128
  content: ", ";
129
129
  vertical-align: super; }
130
130
 
131
+ a.TableFootnoteRef, span.TableFootnoteRef,
132
+ a.FootnoteRef, span.FootnoteRef {
133
+ vertical-align: super; }
134
+
131
135
  .addition {
132
136
  color: blue; }
133
137
 
@@ -677,7 +681,7 @@ ol {
677
681
  ul li {
678
682
  list-style: none; }
679
683
 
680
- ul > li:before {
684
+ ul > li::before {
681
685
  content: "\2014";
682
686
  display: inline-block;
683
687
  width: 1em;
@@ -701,7 +705,7 @@ ol ul > li:first-child {
701
705
  #toc-list li {
702
706
  list-style-type: none; }
703
707
 
704
- #toc li:before {
708
+ #toc li::before {
705
709
  content: " ";
706
710
  display: none; }
707
711
 
@@ -296,7 +296,7 @@ ul li {
296
296
  list-style: none;
297
297
  }
298
298
 
299
- ul>li:before {
299
+ ul>li::before {
300
300
  content: "\2014";
301
301
  display: inline-block;
302
302
  width: 1em;
@@ -326,7 +326,7 @@ ol ul > li:first-child {
326
326
  list-style-type: none;
327
327
  }
328
328
 
329
- #toc li:before {
329
+ #toc li::before {
330
330
  content: " ";
331
331
  display: none;
332
332
  }
@@ -13,16 +13,6 @@ module IsoDoc
13
13
  Metanorma::Ribose.configuration
14
14
  end
15
15
 
16
- def make_body3(body, docxml)
17
- body.div class: "main-section" do |div3|
18
- boilerplate docxml, div3
19
- front docxml, div3
20
- middle docxml, div3
21
- footnotes div3
22
- comments div3
23
- end
24
- end
25
-
26
16
  include BaseConvert
27
17
  include Init
28
18
  end
@@ -10,6 +10,8 @@ module IsoDoc
10
10
  prefix_name(elem, "<br/><br/>", lbl, "title")
11
11
  end
12
12
 
13
+ def middle_title(docxml); end
14
+
13
15
  def termsource1(elem)
14
16
  mod = elem.at(ns("./modification")) and
15
17
  termsource_modification(mod)
@@ -1349,19 +1349,32 @@
1349
1349
  <xsl:variable name="titles_">
1350
1350
 
1351
1351
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
1352
- <title-toc lang="en">
1353
-
1354
- </title-toc>
1355
- <title-toc lang="fr">
1352
+ <!-- <title-toc lang="en">
1353
+ <xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
1354
+ <xsl:text>Contents</xsl:text>
1355
+ </xsl:if>
1356
+ <xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
1357
+ <xsl:text>Table of Contents</xsl:text>
1358
+ </xsl:if>
1359
+ <xsl:if test="$namespace = 'gb'">
1360
+ <xsl:text>Table of contents</xsl:text>
1361
+ </xsl:if>
1362
+ </title-toc> -->
1363
+ <title-toc lang="en">Table of contents</title-toc>
1364
+ <!-- <title-toc lang="fr">
1356
1365
  <xsl:text>Sommaire</xsl:text>
1357
- </title-toc>
1358
- <title-toc lang="zh">
1359
-
1366
+ </title-toc> -->
1367
+ <!-- <title-toc lang="zh">
1368
+ <xsl:choose>
1369
+ <xsl:when test="$namespace = 'gb'">
1370
+ <xsl:text>目次</xsl:text>
1371
+ </xsl:when>
1372
+ <xsl:otherwise>
1360
1373
  <xsl:text>Contents</xsl:text>
1361
-
1362
- </title-toc>
1363
-
1364
- <title-descriptors lang="en">Descriptors</title-descriptors>
1374
+ </xsl:otherwise>
1375
+ </xsl:choose>
1376
+ </title-toc> -->
1377
+ <title-toc lang="zh">目次</title-toc>
1365
1378
 
1366
1379
  <title-part lang="en">
1367
1380
 
@@ -1377,20 +1390,6 @@
1377
1390
  <title-subpart lang="en">Sub-part #</title-subpart>
1378
1391
  <title-subpart lang="fr">Partie de sub #</title-subpart>
1379
1392
 
1380
- <title-list-tables lang="en">List of Tables</title-list-tables>
1381
-
1382
- <title-list-figures lang="en">List of Figures</title-list-figures>
1383
-
1384
- <title-table-figures lang="en">Table of Figures</title-table-figures>
1385
-
1386
- <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1387
-
1388
- <title-summary lang="en">Summary</title-summary>
1389
-
1390
- <title-continued lang="ru">(продолжение)</title-continued>
1391
- <title-continued lang="en">(continued)</title-continued>
1392
- <title-continued lang="fr">(continué)</title-continued>
1393
-
1394
1393
  </xsl:variable>
1395
1394
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
1396
1395
 
@@ -1398,8 +1397,8 @@
1398
1397
  <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
1399
1398
  <xsl:value-of select="$toc_table_title"/>
1400
1399
  <xsl:if test="normalize-space($toc_table_title) = ''">
1401
- <xsl:call-template name="getTitle">
1402
- <xsl:with-param name="name" select="'title-list-tables'"/>
1400
+ <xsl:call-template name="getLocalizedString">
1401
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
1403
1402
  </xsl:call-template>
1404
1403
  </xsl:if>
1405
1404
  </xsl:variable>
@@ -1408,8 +1407,8 @@
1408
1407
  <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
1409
1408
  <xsl:value-of select="$toc_figure_title"/>
1410
1409
  <xsl:if test="normalize-space($toc_figure_title) = ''">
1411
- <xsl:call-template name="getTitle">
1412
- <xsl:with-param name="name" select="'title-list-figures'"/>
1410
+ <xsl:call-template name="getLocalizedString">
1411
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
1413
1412
  </xsl:call-template>
1414
1413
  </xsl:if>
1415
1414
  </xsl:variable>
@@ -1418,8 +1417,8 @@
1418
1417
  <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
1419
1418
  <xsl:value-of select="$toc_requirement_title"/>
1420
1419
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
1421
- <xsl:call-template name="getTitle">
1422
- <xsl:with-param name="name" select="'title-list-recommendations'"/>
1420
+ <xsl:call-template name="getLocalizedString">
1421
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
1423
1422
  </xsl:call-template>
1424
1423
  </xsl:if>
1425
1424
  </xsl:variable>
@@ -5211,6 +5210,9 @@
5211
5210
  <!-- END Definition List -->
5212
5211
  <!-- ===================== -->
5213
5212
 
5213
+ <!-- default: ignore title in sections/p -->
5214
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
5215
+
5214
5216
  <!-- ========================= -->
5215
5217
  <!-- Rich text formatting -->
5216
5218
  <!-- ========================= -->
@@ -5296,7 +5298,7 @@
5296
5298
  <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5297
5299
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5298
5300
  <xsl:choose>
5299
- <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5301
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
5300
5302
  <!-- url -->
5301
5303
  <xsl:call-template name="add-zero-spaces-link-java"/>
5302
5304
  </xsl:when>
@@ -5758,10 +5760,13 @@
5758
5760
  </xsl:choose>
5759
5761
  </xsl:variable>
5760
5762
 
5763
+ <!-- replace sequence #x200B to one &#x200B -->
5764
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '​')"/>
5765
+
5761
5766
  <!-- replace sequence #x200B and space TO space -->
5762
- <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
5767
+ <xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
5763
5768
 
5764
- <xsl:value-of select="$text10"/>
5769
+ <xsl:value-of select="$text11"/>
5765
5770
  </xsl:template>
5766
5771
 
5767
5772
  <xsl:template name="add-zero-spaces-link-java">
@@ -5771,8 +5776,12 @@
5771
5776
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5772
5777
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
5773
5778
  <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
5779
+
5780
+ <!-- replace sequence #x200B to one &#x200B -->
5781
+ <xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '​')"/>
5782
+
5774
5783
  <!-- remove zero-width space at the end -->
5775
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
5784
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '​$', '')"/>
5776
5785
  </xsl:template>
5777
5786
 
5778
5787
  <!-- add zero space after dash character (for table's entries) -->
@@ -7035,7 +7044,7 @@
7035
7044
 
7036
7045
  <xsl:call-template name="refine_note_block_style"/>
7037
7046
 
7038
- <fo:inline xsl:use-attribute-sets="note-name-style">
7047
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7039
7048
 
7040
7049
  <xsl:call-template name="refine_note-name-style"/>
7041
7050
 
@@ -7072,12 +7081,12 @@
7072
7081
  <xsl:variable name="num"><xsl:number/></xsl:variable>
7073
7082
  <xsl:choose>
7074
7083
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
7075
- <fo:inline xsl:use-attribute-sets="note-p-style">
7084
+ <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
7076
7085
  <xsl:apply-templates/>
7077
7086
  </fo:inline>
7078
7087
  </xsl:when>
7079
7088
  <xsl:otherwise>
7080
- <fo:block xsl:use-attribute-sets="note-p-style">
7089
+ <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
7081
7090
  <xsl:apply-templates/>
7082
7091
  </fo:block>
7083
7092
  </xsl:otherwise>
@@ -7297,25 +7306,45 @@
7297
7306
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7298
7307
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7299
7308
 
7300
- <xsl:variable name="img_src">
7301
- <xsl:choose>
7302
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
7303
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7304
- </xsl:choose>
7305
- </xsl:variable>
7309
+ <xsl:if test="@width != '' and @width != 'auto'">
7310
+ <xsl:attribute name="width">
7311
+ <xsl:value-of select="@width"/>
7312
+ </xsl:attribute>
7313
+ </xsl:if>
7306
7314
 
7307
- <xsl:variable name="image_width_effective">
7315
+ <xsl:if test="@height != '' and @height != 'auto'">
7316
+ <xsl:attribute name="height">
7317
+ <xsl:value-of select="@height"/>
7318
+ </xsl:attribute>
7319
+ </xsl:if>
7308
7320
 
7309
- <xsl:value-of select="$width_effective"/>
7321
+ <xsl:choose>
7322
+ <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
7323
+ <xsl:attribute name="scaling">non-uniform</xsl:attribute>
7324
+ </xsl:when>
7325
+ <xsl:otherwise>
7310
7326
 
7311
- </xsl:variable>
7327
+ <xsl:variable name="img_src">
7328
+ <xsl:choose>
7329
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
7330
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7331
+ </xsl:choose>
7332
+ </xsl:variable>
7312
7333
 
7313
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7314
- <xsl:if test="number($scale) &lt; 100">
7334
+ <xsl:variable name="image_width_effective">
7315
7335
 
7316
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
7336
+ <xsl:value-of select="$width_effective"/>
7317
7337
 
7318
- </xsl:if>
7338
+ </xsl:variable>
7339
+
7340
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7341
+ <xsl:if test="number($scale) &lt; 100">
7342
+
7343
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
7344
+
7345
+ </xsl:if>
7346
+ </xsl:otherwise>
7347
+ </xsl:choose>
7319
7348
 
7320
7349
  </xsl:if>
7321
7350
 
@@ -10969,7 +10998,7 @@
10969
10998
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
10970
10999
  <xsl:apply-templates mode="update_xml_step1"/>
10971
11000
  </xsl:template>
10972
- <xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
11001
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
10973
11002
  <xsl:copy>
10974
11003
  <xsl:copy-of select="@*"/>
10975
11004
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.2 -->
20
+ <!-- VERSION v1.2.3 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -192,9 +192,11 @@
192
192
  </attribute>
193
193
  </optional>
194
194
  <attribute name="citeas"/>
195
- <attribute name="type">
196
- <ref name="ReferenceFormat"/>
197
- </attribute>
195
+ <optional>
196
+ <attribute name="type">
197
+ <ref name="ReferenceFormat"/>
198
+ </attribute>
199
+ </optional>
198
200
  <optional>
199
201
  <attribute name="alt"/>
200
202
  </optional>
@@ -836,6 +838,26 @@
836
838
  <ref name="paragraph"/>
837
839
  </element>
838
840
  </define>
841
+ <define name="stem">
842
+ <element name="stem">
843
+ <attribute name="type">
844
+ <choice>
845
+ <value>MathML</value>
846
+ <value>AsciiMath</value>
847
+ <value>LatexMath</value>
848
+ </choice>
849
+ </attribute>
850
+ <attribute name="block">
851
+ <data type="boolean"/>
852
+ </attribute>
853
+ <oneOrMore>
854
+ <choice>
855
+ <text/>
856
+ <ref name="AnyElement"/>
857
+ </choice>
858
+ </oneOrMore>
859
+ </element>
860
+ </define>
839
861
  <define name="em">
840
862
  <element name="em">
841
863
  <zeroOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.2.12".freeze
3
+ VERSION = "2.3.0".freeze
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 2.4.1"
32
+ spec.add_dependency "metanorma-generic", "~> 2.5.0"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.12
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-07 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.4.1
19
+ version: 2.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.4.1
26
+ version: 2.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement