metanorma-iho 0.2.16 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aa26cab644e3cdf8f7960f292704c062253f6862b3c17ae7c17910a962b2e9c
4
- data.tar.gz: 306e570887c0692b071ed5ff530bf24eac40e0cc5ad4680b07eae0629be8af37
3
+ metadata.gz: 81b584b6fa781275652a98ee3029be04d052719fc33eaa7462b51775ee6fc08d
4
+ data.tar.gz: ac2f2a77f10fd8b4ac1064805beaea4887647d3415ef4b9f88786a5e00fe4d7f
5
5
  SHA512:
6
- metadata.gz: 43944931301bafa87e3d6d19d8f3b47e05e698fc5b38a9b41ec4144397ce2a21e46a68d84596484c00b2e97433149be9fcd927b1271a5b3e43b9289fcdb212ee
7
- data.tar.gz: 17ac4721f78b07d726f7268435719667957e704a8f02486dd909709a6d119065fc879fb80cc538755b8587de3197c1e7851e0374a03a5970f3b074815d1cb63a
6
+ metadata.gz: fad6047649865379a781e21425b19a7751a286d31ea491196161d4d498cc1bc6c5b7eedd50e9c44fb73aae47cb5408a2120f76069c6ef35e3df64e0039efb14b
7
+ data.tar.gz: 485504744f7aff4dcb26ee6da3f95086b671c60e92c2ceac1cd878a6333be248e9168bfdb556c558583b002b04365178cdd67750bc1e0b49a33f5404786a9c57
@@ -86,6 +86,35 @@
86
86
  <text/>
87
87
  </element>
88
88
  </define>
89
+ <define name="erefType">
90
+ <optional>
91
+ <attribute name="normative">
92
+ <data type="boolean"/>
93
+ </attribute>
94
+ </optional>
95
+ <attribute name="citeas"/>
96
+ <attribute name="type">
97
+ <ref name="ReferenceFormat"/>
98
+ </attribute>
99
+ <optional>
100
+ <attribute name="alt"/>
101
+ </optional>
102
+ <optional>
103
+ <attribute name="case">
104
+ <choice>
105
+ <value>capital</value>
106
+ <value>lowercase</value>
107
+ </choice>
108
+ </attribute>
109
+ </optional>
110
+ <optional>
111
+ <attribute name="droploc">
112
+ <data type="boolean"/>
113
+ </attribute>
114
+ </optional>
115
+ <ref name="CitationType"/>
116
+ <text/>
117
+ </define>
89
118
  <define name="ul">
90
119
  <element name="ul">
91
120
  <attribute name="id">
@@ -775,6 +804,78 @@
775
804
  <ref name="paragraph"/>
776
805
  </element>
777
806
  </define>
807
+ <define name="em">
808
+ <element name="em">
809
+ <zeroOrMore>
810
+ <choice>
811
+ <ref name="PureTextElement"/>
812
+ <ref name="stem"/>
813
+ <ref name="index"/>
814
+ </choice>
815
+ </zeroOrMore>
816
+ </element>
817
+ </define>
818
+ <define name="strong">
819
+ <element name="strong">
820
+ <zeroOrMore>
821
+ <choice>
822
+ <ref name="PureTextElement"/>
823
+ <ref name="stem"/>
824
+ <ref name="index"/>
825
+ </choice>
826
+ </zeroOrMore>
827
+ </element>
828
+ </define>
829
+ <define name="tt">
830
+ <element name="tt">
831
+ <zeroOrMore>
832
+ <choice>
833
+ <ref name="PureTextElement"/>
834
+ <ref name="index"/>
835
+ </choice>
836
+ </zeroOrMore>
837
+ </element>
838
+ </define>
839
+ <define name="keyword">
840
+ <element name="keyword">
841
+ <zeroOrMore>
842
+ <choice>
843
+ <ref name="PureTextElement"/>
844
+ <ref name="index"/>
845
+ </choice>
846
+ </zeroOrMore>
847
+ </element>
848
+ </define>
849
+ <define name="strike">
850
+ <element name="strike">
851
+ <zeroOrMore>
852
+ <choice>
853
+ <ref name="PureTextElement"/>
854
+ <ref name="index"/>
855
+ </choice>
856
+ </zeroOrMore>
857
+ </element>
858
+ </define>
859
+ <define name="underline">
860
+ <element name="underline">
861
+ <zeroOrMore>
862
+ <choice>
863
+ <ref name="PureTextElement"/>
864
+ <ref name="index"/>
865
+ </choice>
866
+ </zeroOrMore>
867
+ </element>
868
+ </define>
869
+ <define name="smallcap">
870
+ <element name="smallcap">
871
+ <zeroOrMore>
872
+ <choice>
873
+ <ref name="PureTextElement"/>
874
+ <ref name="index"/>
875
+ </choice>
876
+ </zeroOrMore>
877
+ </element>
878
+ </define>
778
879
  </include>
779
880
  <!-- end overrides -->
780
881
  <define name="colgroup">
@@ -793,7 +894,35 @@
793
894
  <value>internal</value>
794
895
  </define>
795
896
  <define name="TextElement" combine="choice">
796
- <ref name="concept"/>
897
+ <choice>
898
+ <ref name="concept"/>
899
+ <ref name="add"/>
900
+ <ref name="del"/>
901
+ </choice>
902
+ </define>
903
+ <define name="add">
904
+ <element name="add">
905
+ <choice>
906
+ <ref name="PureTextElement"/>
907
+ <ref name="eref"/>
908
+ <ref name="stem"/>
909
+ <ref name="keyword"/>
910
+ <ref name="xref"/>
911
+ <ref name="hyperlink"/>
912
+ </choice>
913
+ </element>
914
+ </define>
915
+ <define name="del">
916
+ <element name="del">
917
+ <choice>
918
+ <ref name="PureTextElement"/>
919
+ <ref name="eref"/>
920
+ <ref name="stem"/>
921
+ <ref name="keyword"/>
922
+ <ref name="xref"/>
923
+ <ref name="hyperlink"/>
924
+ </choice>
925
+ </element>
797
926
  </define>
798
927
  <define name="concept">
799
928
  <element name="concept">
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
115
115
  content: ", ";
116
116
  vertical-align: super; }
117
117
 
118
+ .addition {
119
+ color: blue; }
120
+
121
+ .deletion {
122
+ color: red;
123
+ text-decoration: line-through; }
124
+
118
125
  #standard-band {
119
126
  background-color: #0AC442; }
120
127
 
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
 
10
11
 
@@ -1441,7 +1442,7 @@
1441
1442
 
1442
1443
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1443
1444
 
1444
-
1445
+
1445
1446
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1446
1447
 
1447
1448
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -1449,6 +1450,12 @@
1449
1450
 
1450
1451
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1451
1452
 
1453
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1454
+ <xsl:attribute name="color">red</xsl:attribute>
1455
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1456
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1457
+ <xsl:attribute name="color">red</xsl:attribute>
1458
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1452
1459
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1453
1460
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1454
1461
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2814,8 +2821,12 @@
2814
2821
  <fo:inline text-decoration="underline">
2815
2822
  <xsl:apply-templates/>
2816
2823
  </fo:inline>
2824
+ </xsl:template><xsl:template match="*[local-name()='add']">
2825
+ <fo:inline xsl:use-attribute-sets="add-style">
2826
+ <xsl:apply-templates/>
2827
+ </fo:inline>
2817
2828
  </xsl:template><xsl:template match="*[local-name()='del']">
2818
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2829
+ <fo:inline xsl:use-attribute-sets="del-style">
2819
2830
  <xsl:apply-templates/>
2820
2831
  </fo:inline>
2821
2832
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3431,22 +3442,37 @@
3431
3442
  <xsl:apply-templates/>
3432
3443
  </fo:block>
3433
3444
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3434
- <fo:block xsl:use-attribute-sets="image-style">
3435
-
3436
-
3437
- <xsl:variable name="src">
3438
- <xsl:choose>
3439
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3440
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3441
- </xsl:when>
3442
- <xsl:otherwise>
3443
- <xsl:value-of select="@src"/>
3444
- </xsl:otherwise>
3445
- </xsl:choose>
3446
- </xsl:variable>
3447
-
3448
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3449
- </fo:block>
3445
+ <xsl:choose>
3446
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3447
+ <fo:inline padding-left="1mm" padding-right="1mm">
3448
+ <xsl:variable name="src">
3449
+ <xsl:call-template name="image_src"/>
3450
+ </xsl:variable>
3451
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3452
+ </fo:inline>
3453
+ </xsl:when>
3454
+ <xsl:otherwise>
3455
+ <fo:block xsl:use-attribute-sets="image-style">
3456
+
3457
+ <xsl:variable name="src">
3458
+ <xsl:call-template name="image_src"/>
3459
+ </xsl:variable>
3460
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3461
+ </fo:block>
3462
+ </xsl:otherwise>
3463
+ </xsl:choose>
3464
+ </xsl:template><xsl:template name="image_src">
3465
+ <xsl:choose>
3466
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3467
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3468
+ </xsl:when>
3469
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3470
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3471
+ </xsl:when>
3472
+ <xsl:otherwise>
3473
+ <xsl:value-of select="@src"/>
3474
+ </xsl:otherwise>
3475
+ </xsl:choose>
3450
3476
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3451
3477
  <xsl:apply-templates mode="contents"/>
3452
3478
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
 
10
11
 
@@ -1441,7 +1442,7 @@
1441
1442
 
1442
1443
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1443
1444
 
1444
-
1445
+
1445
1446
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1446
1447
 
1447
1448
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -1449,6 +1450,12 @@
1449
1450
 
1450
1451
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1451
1452
 
1453
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1454
+ <xsl:attribute name="color">red</xsl:attribute>
1455
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1456
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1457
+ <xsl:attribute name="color">red</xsl:attribute>
1458
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1452
1459
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1453
1460
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1454
1461
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2814,8 +2821,12 @@
2814
2821
  <fo:inline text-decoration="underline">
2815
2822
  <xsl:apply-templates/>
2816
2823
  </fo:inline>
2824
+ </xsl:template><xsl:template match="*[local-name()='add']">
2825
+ <fo:inline xsl:use-attribute-sets="add-style">
2826
+ <xsl:apply-templates/>
2827
+ </fo:inline>
2817
2828
  </xsl:template><xsl:template match="*[local-name()='del']">
2818
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2829
+ <fo:inline xsl:use-attribute-sets="del-style">
2819
2830
  <xsl:apply-templates/>
2820
2831
  </fo:inline>
2821
2832
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3431,22 +3442,37 @@
3431
3442
  <xsl:apply-templates/>
3432
3443
  </fo:block>
3433
3444
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3434
- <fo:block xsl:use-attribute-sets="image-style">
3435
-
3436
-
3437
- <xsl:variable name="src">
3438
- <xsl:choose>
3439
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3440
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3441
- </xsl:when>
3442
- <xsl:otherwise>
3443
- <xsl:value-of select="@src"/>
3444
- </xsl:otherwise>
3445
- </xsl:choose>
3446
- </xsl:variable>
3447
-
3448
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3449
- </fo:block>
3445
+ <xsl:choose>
3446
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3447
+ <fo:inline padding-left="1mm" padding-right="1mm">
3448
+ <xsl:variable name="src">
3449
+ <xsl:call-template name="image_src"/>
3450
+ </xsl:variable>
3451
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3452
+ </fo:inline>
3453
+ </xsl:when>
3454
+ <xsl:otherwise>
3455
+ <fo:block xsl:use-attribute-sets="image-style">
3456
+
3457
+ <xsl:variable name="src">
3458
+ <xsl:call-template name="image_src"/>
3459
+ </xsl:variable>
3460
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3461
+ </fo:block>
3462
+ </xsl:otherwise>
3463
+ </xsl:choose>
3464
+ </xsl:template><xsl:template name="image_src">
3465
+ <xsl:choose>
3466
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3467
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3468
+ </xsl:when>
3469
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3470
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3471
+ </xsl:when>
3472
+ <xsl:otherwise>
3473
+ <xsl:value-of select="@src"/>
3474
+ </xsl:otherwise>
3475
+ </xsl:choose>
3450
3476
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3451
3477
  <xsl:apply-templates mode="contents"/>
3452
3478
  <xsl:text> </xsl:text>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.2.16"
3
+ VERSION = "0.3.0".freeze
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "metanorma/iho/version"
4
4
 
@@ -27,16 +27,16 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
28
28
 
29
29
  spec.add_dependency "htmlentities", "~> 4.3.4"
30
- spec.add_dependency 'metanorma-generic', '~> 1.9.0'
30
+ spec.add_dependency "metanorma-generic", "~> 1.10.0"
31
31
 
32
32
  spec.add_development_dependency "byebug", "~> 9.1"
33
- spec.add_development_dependency "sassc", "2.4.0"
34
33
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
35
34
  spec.add_development_dependency "guard", "~> 2.14"
36
35
  spec.add_development_dependency "guard-rspec", "~> 4.7"
37
36
  spec.add_development_dependency "rake", "~> 13.0"
38
37
  spec.add_development_dependency "rspec", "~> 3.6"
39
38
  spec.add_development_dependency "rubocop", "~> 1.5.2"
39
+ spec.add_development_dependency "sassc", "2.4.0"
40
40
  spec.add_development_dependency "simplecov", "~> 0.15"
41
41
  spec.add_development_dependency "timecop", "~> 0.9"
42
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.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: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.9.0
33
+ version: 1.10.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.9.0
40
+ version: 1.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: byebug
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '9.1'
55
- - !ruby/object:Gem::Dependency
56
- name: sassc
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 2.4.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '='
67
- - !ruby/object:Gem::Version
68
- version: 2.4.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: equivalent-xml
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +136,20 @@ dependencies:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
138
  version: 1.5.2
139
+ - !ruby/object:Gem::Dependency
140
+ name: sassc
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '='
144
+ - !ruby/object:Gem::Version
145
+ version: 2.4.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '='
151
+ - !ruby/object:Gem::Version
152
+ version: 2.4.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement