metanorma-csa 1.7.7 → 1.8.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: fb5ef6e84ef8c68dc962f3bd81883e18d934b9733735c6a7c9ba4e8a85ab0444
4
- data.tar.gz: 72e5712dd7d2fcd224651126609a9f61716ca5b0acdef1fdc9c57fe29de48d1d
3
+ metadata.gz: 75fa817659b82aa49121c571ee10bc8f6ab4355bfcf11b8eb7b46b0af244325f
4
+ data.tar.gz: 61beb5145d8d22388167fef4affe723f4830696aebfafc5ac6921422197428c5
5
5
  SHA512:
6
- metadata.gz: e92ca5dbb4aa9e4f61d8e00e7e43fa141d658d8696d904d5d2880b744fc53b4edc78287dd1cd08a4c5bcfca36e62d3bf57ab67c2c625445c212fac9dd2938285
7
- data.tar.gz: 780a7ee7af46bd4a78e61ee3a2c8ff525a6e0ebdf4c8604bd0118b82646acb38452dadbd7548701ea07d1e62735b3f59f439f3f6b2af780b228b57ef8ab7cd0b
6
+ metadata.gz: e5729981047494c14d9230ad4b799ce311b3cba25e7cbd927301922e01b87a19ac232b88592fb13736842cafb4efaa0e04b919c086cd11b3655323065715334c
7
+ data.tar.gz: 888b045de483fd115d700b82140259693c46a5bd325095ab07c2589e2fba053ee5b4e04dc8e594810e58294b8a57fa86a8aa32aaed2689843f70ffa67053ba8d
@@ -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">
@@ -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
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'279.4mm'"/>
@@ -1358,7 +1359,7 @@
1358
1359
 
1359
1360
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1360
1361
 
1361
-
1362
+
1362
1363
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1363
1364
 
1364
1365
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -1366,6 +1367,12 @@
1366
1367
  <xsl:attribute name="space-after">6pt</xsl:attribute>
1367
1368
 
1368
1369
 
1370
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1371
+ <xsl:attribute name="color">red</xsl:attribute>
1372
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1373
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1374
+ <xsl:attribute name="color">red</xsl:attribute>
1375
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1369
1376
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1370
1377
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1371
1378
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2706,8 +2713,12 @@
2706
2713
  <fo:inline text-decoration="underline">
2707
2714
  <xsl:apply-templates/>
2708
2715
  </fo:inline>
2716
+ </xsl:template><xsl:template match="*[local-name()='add']">
2717
+ <fo:inline xsl:use-attribute-sets="add-style">
2718
+ <xsl:apply-templates/>
2719
+ </fo:inline>
2709
2720
  </xsl:template><xsl:template match="*[local-name()='del']">
2710
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2721
+ <fo:inline xsl:use-attribute-sets="del-style">
2711
2722
  <xsl:apply-templates/>
2712
2723
  </fo:inline>
2713
2724
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3323,22 +3334,37 @@
3323
3334
  <xsl:apply-templates/>
3324
3335
  </fo:block>
3325
3336
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3326
- <fo:block xsl:use-attribute-sets="image-style">
3327
-
3328
-
3329
- <xsl:variable name="src">
3330
- <xsl:choose>
3331
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3332
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3333
- </xsl:when>
3334
- <xsl:otherwise>
3335
- <xsl:value-of select="@src"/>
3336
- </xsl:otherwise>
3337
- </xsl:choose>
3338
- </xsl:variable>
3339
-
3340
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3341
- </fo:block>
3337
+ <xsl:choose>
3338
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3339
+ <fo:inline padding-left="1mm" padding-right="1mm">
3340
+ <xsl:variable name="src">
3341
+ <xsl:call-template name="image_src"/>
3342
+ </xsl:variable>
3343
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3344
+ </fo:inline>
3345
+ </xsl:when>
3346
+ <xsl:otherwise>
3347
+ <fo:block xsl:use-attribute-sets="image-style">
3348
+
3349
+ <xsl:variable name="src">
3350
+ <xsl:call-template name="image_src"/>
3351
+ </xsl:variable>
3352
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3353
+ </fo:block>
3354
+ </xsl:otherwise>
3355
+ </xsl:choose>
3356
+ </xsl:template><xsl:template name="image_src">
3357
+ <xsl:choose>
3358
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3359
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3360
+ </xsl:when>
3361
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3362
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3363
+ </xsl:when>
3364
+ <xsl:otherwise>
3365
+ <xsl:value-of select="@src"/>
3366
+ </xsl:otherwise>
3367
+ </xsl:choose>
3342
3368
  </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">
3343
3369
  <xsl:apply-templates mode="contents"/>
3344
3370
  <xsl:text> </xsl:text>
@@ -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
 
@@ -1,7 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Metanorma
4
2
  module Csa
5
- VERSION = '1.7.7'
3
+ VERSION = "1.8.0".freeze
6
4
  end
7
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/csa/version"
4
4
 
@@ -28,16 +28,16 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
- spec.add_dependency "metanorma-generic", "~> 1.9.0"
31
+ spec.add_dependency "metanorma-generic", "~> 1.10.0"
32
32
 
33
33
  spec.add_development_dependency "byebug", "~> 9.1"
34
- spec.add_development_dependency "sassc", "2.4.0"
35
34
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
35
  spec.add_development_dependency "guard", "~> 2.14"
37
36
  spec.add_development_dependency "guard-rspec", "~> 4.7"
38
37
  spec.add_development_dependency "rake", "~> 13.0"
39
38
  spec.add_development_dependency "rspec", "~> 3.6"
40
39
  spec.add_development_dependency "rubocop", "~> 1.5.2"
40
+ spec.add_development_dependency "sassc", "2.4.0"
41
41
  spec.add_development_dependency "simplecov", "~> 0.15"
42
42
  spec.add_development_dependency "timecop", "~> 0.9"
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.7
4
+ version: 1.8.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: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.9.0
19
+ version: 1.10.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: 1.9.0
26
+ version: 1.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '9.1'
41
- - !ruby/object:Gem::Dependency
42
- name: sassc
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: 2.4.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: 2.4.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: equivalent-xml
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +122,20 @@ dependencies:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
124
  version: 1.5.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: sassc
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 2.4.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 2.4.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement