metanorma-ribose 2.3.2 → 2.3.3

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: c88ab9038d3a80cbf8c20d212e778bcb511f47645e2c9231c62edc96c37d0ca2
4
- data.tar.gz: 5b79a8ea5d3fdf73e54305653348d20aa3d014b4e9bf332e889921148cff232f
3
+ metadata.gz: e6fa4a32c36e04feb45de8dd1f06bc3172eebabd8163d65088248c5a965e44c7
4
+ data.tar.gz: 88014f2611df2512e013deeed489c62d0ed328b47d402dd3c6ad2739e37336a8
5
5
  SHA512:
6
- metadata.gz: 2b2b6cb53f348c088f7be8746350c9b2b4b88f928b105173361cb8a071efeef7375514185fbe5a6a0c4860c4cad1e1160194280d4780254838e3cbc271f83c71
7
- data.tar.gz: 010c5a028a6b98a53f69162129728dae29c33211d246ca5adbb125921f129f7f739fb6aaf4e199e54fe8337cb3ca83394a06d07859656b3f95a716921a1aa8ba
6
+ metadata.gz: d5f658cefa15ade0f66955b169e86625f54e3d4ea9aa7b94264f7e351cb22f3a8721d4b7c96b84d9f1fff024a1988d441f059c96465c23731aab9fc95aa7a08f
7
+ data.tar.gz: 69c9a23e26a37a3c9e9e2b399bc0483d05c512c55e69123d2f01af3c11193db0a7a56f72d356331cc5f009cc9c89f33f93f9e26cc90a1740658d5328e44aadd1
@@ -5557,8 +5557,17 @@
5557
5557
  <xsl:variable name="styles_">
5558
5558
  <xsl:for-each select="xalan:nodeset($styles__)/item">
5559
5559
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5560
- <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5561
- <xsl:if test="$key = 'font-family' or $key = 'color'">
5560
+ <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5561
+ <xsl:variable name="value">
5562
+ <xsl:choose>
5563
+ <!-- if font-size is digits only -->
5564
+ <xsl:when test="$key = 'font-size' and translate($value_, '0123456789', '') = ''"><xsl:value-of select="$value_"/>pt</xsl:when>
5565
+ <xsl:otherwise>
5566
+ <xsl:value-of select="$value_"/>
5567
+ </xsl:otherwise>
5568
+ </xsl:choose>
5569
+ </xsl:variable>
5570
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
5562
5571
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5563
5572
  </xsl:if>
5564
5573
  </xsl:for-each>
@@ -32,11 +32,10 @@ module IsoDoc
32
32
  @anchors[clause["id"]] =
33
33
  { label: num, level: level, xref: num }
34
34
  # subclauses are not prefixed with "Clause"
35
- i = Counter.new
35
+ i = Counter.new(0, prefix: "#{num}.")
36
36
  clause.xpath(ns("./clause | ./terms | ./term | ./definitions | " \
37
37
  "./references")).each do |c|
38
- i.increment(c)
39
- section_names1(c, "#{num}.#{i.print}", level + 1)
38
+ section_names1(c, i.increment(c).print, level + 1)
40
39
  end
41
40
  end
42
41
 
@@ -46,9 +45,9 @@ module IsoDoc
46
45
  clause.at(ns("./clause")) and
47
46
  @anchors[clause["id"]] = { label: "0", level: 1, type: "clause",
48
47
  xref: clause.at(ns("./title"))&.text }
49
- i = Counter.new
48
+ i = Counter.new(0, prefix: "0.")
50
49
  clause.xpath(ns("./clause")).each do |c|
51
- section_names1(c, "0.#{i.increment(c).print}", 2)
50
+ section_names1(c, i.increment(c).print, 2)
52
51
  end
53
52
  end
54
53
  end
@@ -346,6 +346,8 @@
346
346
  <ref name="keyword"/>
347
347
  <ref name="xref"/>
348
348
  <ref name="hyperlink"/>
349
+ <ref name="index"/>
350
+ <ref name="index-xref"/>
349
351
  </choice>
350
352
  </oneOrMore>
351
353
  </element>
@@ -623,6 +625,8 @@
623
625
  <ref name="eref"/>
624
626
  <ref name="xref"/>
625
627
  <ref name="hyperlink"/>
628
+ <ref name="index"/>
629
+ <ref name="index-xref"/>
626
630
  </choice>
627
631
  </zeroOrMore>
628
632
  </element>
@@ -636,6 +640,8 @@
636
640
  <ref name="eref"/>
637
641
  <ref name="xref"/>
638
642
  <ref name="hyperlink"/>
643
+ <ref name="index"/>
644
+ <ref name="index-xref"/>
639
645
  </choice>
640
646
  </zeroOrMore>
641
647
  </element>
@@ -648,6 +654,8 @@
648
654
  <ref name="eref"/>
649
655
  <ref name="xref"/>
650
656
  <ref name="hyperlink"/>
657
+ <ref name="index"/>
658
+ <ref name="index-xref"/>
651
659
  </choice>
652
660
  </zeroOrMore>
653
661
  </element>
@@ -655,7 +663,11 @@
655
663
  <define name="keyword">
656
664
  <element name="keyword">
657
665
  <zeroOrMore>
658
- <ref name="PureTextElement"/>
666
+ <choice>
667
+ <ref name="PureTextElement"/>
668
+ <ref name="index"/>
669
+ <ref name="index-xref"/>
670
+ </choice>
659
671
  </zeroOrMore>
660
672
  </element>
661
673
  </define>
@@ -676,7 +688,11 @@
676
688
  <define name="strike">
677
689
  <element name="strike">
678
690
  <zeroOrMore>
679
- <ref name="PureTextElement"/>
691
+ <choice>
692
+ <ref name="PureTextElement"/>
693
+ <ref name="index"/>
694
+ <ref name="index-xref"/>
695
+ </choice>
680
696
  </zeroOrMore>
681
697
  </element>
682
698
  </define>
@@ -898,44 +914,47 @@
898
914
  -->
899
915
  <define name="image">
900
916
  <element name="image">
901
- <attribute name="id">
902
- <data type="ID"/>
917
+ <ref name="Image"/>
918
+ </element>
919
+ </define>
920
+ <define name="Image">
921
+ <attribute name="id">
922
+ <data type="ID"/>
923
+ </attribute>
924
+ <attribute name="src">
925
+ <data type="anyURI"/>
926
+ </attribute>
927
+ <attribute name="mimetype"/>
928
+ <optional>
929
+ <attribute name="filename"/>
930
+ </optional>
931
+ <optional>
932
+ <attribute name="width">
933
+ <choice>
934
+ <data type="int"/>
935
+ <value>auto</value>
936
+ </choice>
903
937
  </attribute>
904
- <attribute name="src">
938
+ </optional>
939
+ <optional>
940
+ <attribute name="height">
941
+ <choice>
942
+ <data type="int"/>
943
+ <value>auto</value>
944
+ </choice>
945
+ </attribute>
946
+ </optional>
947
+ <optional>
948
+ <attribute name="alt"/>
949
+ </optional>
950
+ <optional>
951
+ <attribute name="title"/>
952
+ </optional>
953
+ <optional>
954
+ <attribute name="longdesc">
905
955
  <data type="anyURI"/>
906
956
  </attribute>
907
- <attribute name="mimetype"/>
908
- <optional>
909
- <attribute name="filename"/>
910
- </optional>
911
- <optional>
912
- <attribute name="width">
913
- <choice>
914
- <data type="int"/>
915
- <value>auto</value>
916
- </choice>
917
- </attribute>
918
- </optional>
919
- <optional>
920
- <attribute name="height">
921
- <choice>
922
- <data type="int"/>
923
- <value>auto</value>
924
- </choice>
925
- </attribute>
926
- </optional>
927
- <optional>
928
- <attribute name="alt"/>
929
- </optional>
930
- <optional>
931
- <attribute name="title"/>
932
- </optional>
933
- <optional>
934
- <attribute name="longdesc">
935
- <data type="anyURI"/>
936
- </attribute>
937
- </optional>
938
- </element>
957
+ </optional>
939
958
  </define>
940
959
  <define name="video">
941
960
  <element name="video">
@@ -942,6 +942,7 @@
942
942
  <value>obsoleted</value>
943
943
  <value>confirmed</value>
944
944
  <value>updated</value>
945
+ <value>corrected</value>
945
946
  <value>issued</value>
946
947
  <value>transmitted</value>
947
948
  <value>copied</value>
@@ -1283,7 +1284,7 @@
1283
1284
  <value>mergedInto</value>
1284
1285
  <value>splits</value>
1285
1286
  <value>splitInto</value>
1286
- <value>instance</value>
1287
+ <value>instanceOf</value>
1287
1288
  <value>hasInstance</value>
1288
1289
  <value>exemplarOf</value>
1289
1290
  <value>hasExemplar</value>
@@ -57,7 +57,8 @@ module Metanorma
57
57
 
58
58
  def presentation_xml_converter(node)
59
59
  IsoDoc::Ribose::PresentationXMLConvert
60
- .new(html_extract_attributes(node))
60
+ .new(html_extract_attributes(node)
61
+ .merge(output_formats: ::Metanorma::Ribose::Processor.new.output_formats))
61
62
  end
62
63
 
63
64
  def html_converter(node)
@@ -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.4 -->
20
+ <!-- VERSION v1.2.7 -->
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">
@@ -485,6 +485,8 @@
485
485
  <choice>
486
486
  <text/>
487
487
  <ref name="callout"/>
488
+ <ref name="xref"/>
489
+ <ref name="eref"/>
488
490
  </choice>
489
491
  </oneOrMore>
490
492
  <zeroOrMore>
@@ -865,6 +867,7 @@
865
867
  <ref name="PureTextElement"/>
866
868
  <ref name="stem"/>
867
869
  <ref name="index"/>
870
+ <ref name="index-xref"/>
868
871
  <ref name="eref"/>
869
872
  <ref name="erefstack"/>
870
873
  <ref name="xref"/>
@@ -880,6 +883,7 @@
880
883
  <ref name="PureTextElement"/>
881
884
  <ref name="stem"/>
882
885
  <ref name="index"/>
886
+ <ref name="index-xref"/>
883
887
  <ref name="eref"/>
884
888
  <ref name="erefstack"/>
885
889
  <ref name="xref"/>
@@ -894,6 +898,7 @@
894
898
  <choice>
895
899
  <ref name="PureTextElement"/>
896
900
  <ref name="index"/>
901
+ <ref name="index-xref"/>
897
902
  <ref name="eref"/>
898
903
  <ref name="erefstack"/>
899
904
  <ref name="xref"/>
@@ -908,6 +913,7 @@
908
913
  <choice>
909
914
  <ref name="PureTextElement"/>
910
915
  <ref name="index"/>
916
+ <ref name="index-xref"/>
911
917
  </choice>
912
918
  </zeroOrMore>
913
919
  </element>
@@ -918,6 +924,7 @@
918
924
  <choice>
919
925
  <ref name="PureTextElement"/>
920
926
  <ref name="index"/>
927
+ <ref name="index-xref"/>
921
928
  </choice>
922
929
  </zeroOrMore>
923
930
  </element>
@@ -928,6 +935,7 @@
928
935
  <choice>
929
936
  <ref name="PureTextElement"/>
930
937
  <ref name="index"/>
938
+ <ref name="index-xref"/>
931
939
  </choice>
932
940
  </zeroOrMore>
933
941
  </element>
@@ -938,6 +946,7 @@
938
946
  <choice>
939
947
  <ref name="PureTextElement"/>
940
948
  <ref name="index"/>
949
+ <ref name="index-xref"/>
941
950
  </choice>
942
951
  </zeroOrMore>
943
952
  </element>
@@ -1004,6 +1013,14 @@
1004
1013
  </oneOrMore>
1005
1014
  </element>
1006
1015
  </define>
1016
+ <define name="BasicBlock" combine="choice">
1017
+ <ref name="columnbreak"/>
1018
+ </define>
1019
+ <define name="columnbreak">
1020
+ <element name="columnbreak">
1021
+ <empty/>
1022
+ </element>
1023
+ </define>
1007
1024
  <define name="MultilingualRenderingType">
1008
1025
  <choice>
1009
1026
  <value>common</value>
@@ -1037,6 +1054,17 @@
1037
1054
  <ref name="date_inline"/>
1038
1055
  </choice>
1039
1056
  </define>
1057
+ <define name="PureTextElement" combine="choice">
1058
+ <ref name="passthrough_inline"/>
1059
+ </define>
1060
+ <define name="passthrough_inline">
1061
+ <element name="passthrough">
1062
+ <optional>
1063
+ <attribute name="formats"/>
1064
+ </optional>
1065
+ <text/>
1066
+ </element>
1067
+ </define>
1040
1068
  <define name="add">
1041
1069
  <element name="add">
1042
1070
  <choice>
@@ -1047,6 +1075,8 @@
1047
1075
  <ref name="keyword"/>
1048
1076
  <ref name="xref"/>
1049
1077
  <ref name="hyperlink"/>
1078
+ <ref name="index"/>
1079
+ <ref name="index-xref"/>
1050
1080
  </choice>
1051
1081
  </element>
1052
1082
  </define>
@@ -1060,6 +1090,8 @@
1060
1090
  <ref name="keyword"/>
1061
1091
  <ref name="xref"/>
1062
1092
  <ref name="hyperlink"/>
1093
+ <ref name="index"/>
1094
+ <ref name="index-xref"/>
1063
1095
  </choice>
1064
1096
  </element>
1065
1097
  </define>
@@ -1071,6 +1103,9 @@
1071
1103
  <optional>
1072
1104
  <attribute name="style"/>
1073
1105
  </optional>
1106
+ <optional>
1107
+ <attribute name="custom-charset"/>
1108
+ </optional>
1074
1109
  <oneOrMore>
1075
1110
  <ref name="TextElement"/>
1076
1111
  </oneOrMore>
@@ -1126,6 +1161,8 @@
1126
1161
  <choice>
1127
1162
  <ref name="PureTextElement"/>
1128
1163
  <ref name="stem"/>
1164
+ <ref name="index"/>
1165
+ <ref name="index-xref"/>
1129
1166
  </choice>
1130
1167
  </zeroOrMore>
1131
1168
  </element>
@@ -1136,6 +1173,8 @@
1136
1173
  <choice>
1137
1174
  <ref name="PureTextElement"/>
1138
1175
  <ref name="stem"/>
1176
+ <ref name="index"/>
1177
+ <ref name="index-xref"/>
1139
1178
  </choice>
1140
1179
  </zeroOrMore>
1141
1180
  </element>
@@ -29,6 +29,7 @@ module Metanorma
29
29
  end
30
30
 
31
31
  def output(isodoc_node, inname, outname, format, options = {})
32
+ options_preprocess(options)
32
33
  case format
33
34
  when :html
34
35
  IsoDoc::Ribose::HtmlConvert.new(options)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.3.2".freeze
3
+ VERSION = "2.3.3".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.5.2"
32
+ spec.add_dependency "metanorma-generic", "~> 2.5.3"
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.3.2
4
+ version: 2.3.3
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-09-11 00:00:00.000000000 Z
11
+ date: 2023-11-20 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.5.2
19
+ version: 2.5.3
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.5.2
26
+ version: 2.5.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement