metanorma-cc 2.2.13 → 2.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: be02166f761818223e01176f6722d2104e3c839dbcb40cda104ee117fbf98942
4
- data.tar.gz: 60e0f9d9f3330f86a04b11552b817f9c9b457d0dba3cd12cd209ddfae6b10338
3
+ metadata.gz: 5f8ad26a5deaf46f319994968f9150f06b15a6d6fc03d847b10e5e376fffcb47
4
+ data.tar.gz: 8d32091a45db359d3bcfff5ff3b59a84fa37ce317ab35b61f6d9caf8d556c024
5
5
  SHA512:
6
- metadata.gz: 588407c54d6785cdf22f4b824c50d8fbcf0c5ccb1a13144bcce2f8d018dbae191a72868fae8ea4d4c3f41d8945443debfdda92d110a42423ed6b03d95d8e70c5
7
- data.tar.gz: 5264ee9f84a1c8cb07d7e1fdc0b28d2e8f3254693017f4cfc6abf75d6a64e92b3d9c3194768367d41b9f5e2b04104b055b1b8ce00988fcfb5a0272e847b722a1
6
+ metadata.gz: 8dd4a4c9fe1ebf0058c7ce921f4052a82b9dde91d62f605ecae66b6d7202a1356f056e5e8dd73aa4cb046937676e856a8d848d170ca3d62c03808df8354178ea
7
+ data.tar.gz: 2028f123827546b2e5ec2090896253fe716df15888f93e33d16d2a6913b24f6d718b955b57208103bef083c88c1a7204a3310f03739307fe0a39a1ddabf7a228
@@ -234,9 +234,9 @@
234
234
  </fo:static-content>
235
235
  <xsl:call-template name="insertHeaderFooter"/>
236
236
  <fo:flow flow-name="xsl-region-body">
237
- <fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
237
+ <!-- <fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
238
238
  <xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:title[@language = 'en']"/>
239
- </fo:block>
239
+ </fo:block> -->
240
240
  <fo:block>
241
241
  <xsl:call-template name="processMainSectionsDefault"/>
242
242
  </fo:block>
@@ -417,6 +417,12 @@
417
417
  <!-- ============================= -->
418
418
  <!-- ============================= -->
419
419
 
420
+ <xsl:template match="csd:sections/csd:p[@class = 'zzSTDTitle1']" priority="4">
421
+ <fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
422
+ <xsl:apply-templates/>
423
+ </fo:block>
424
+ </xsl:template>
425
+
420
426
  <xsl:template match="csd:title" name="title">
421
427
 
422
428
  <xsl:variable name="level">
@@ -4439,6 +4445,9 @@
4439
4445
  <!-- END Definition List -->
4440
4446
  <!-- ===================== -->
4441
4447
 
4448
+ <!-- default: ignore title in sections/p -->
4449
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
4450
+
4442
4451
  <!-- ========================= -->
4443
4452
  <!-- Rich text formatting -->
4444
4453
  <!-- ========================= -->
@@ -6520,25 +6529,45 @@
6520
6529
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
6521
6530
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
6522
6531
 
6523
- <xsl:variable name="img_src">
6524
- <xsl:choose>
6525
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
6526
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
6527
- </xsl:choose>
6528
- </xsl:variable>
6532
+ <xsl:if test="@width != '' and @width != 'auto'">
6533
+ <xsl:attribute name="width">
6534
+ <xsl:value-of select="@width"/>
6535
+ </xsl:attribute>
6536
+ </xsl:if>
6537
+
6538
+ <xsl:if test="@height != '' and @height != 'auto'">
6539
+ <xsl:attribute name="height">
6540
+ <xsl:value-of select="@height"/>
6541
+ </xsl:attribute>
6542
+ </xsl:if>
6529
6543
 
6530
- <xsl:variable name="image_width_effective">
6544
+ <xsl:choose>
6545
+ <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
6546
+ <xsl:attribute name="scaling">non-uniform</xsl:attribute>
6547
+ </xsl:when>
6548
+ <xsl:otherwise>
6531
6549
 
6532
- <xsl:value-of select="$width_effective"/>
6550
+ <xsl:variable name="img_src">
6551
+ <xsl:choose>
6552
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
6553
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
6554
+ </xsl:choose>
6555
+ </xsl:variable>
6533
6556
 
6534
- </xsl:variable>
6557
+ <xsl:variable name="image_width_effective">
6558
+
6559
+ <xsl:value-of select="$width_effective"/>
6535
6560
 
6536
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6537
- <xsl:if test="number($scale) &lt; 100">
6561
+ </xsl:variable>
6538
6562
 
6539
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6563
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6564
+ <xsl:if test="number($scale) &lt; 100">
6540
6565
 
6541
- </xsl:if>
6566
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6567
+
6568
+ </xsl:if>
6569
+ </xsl:otherwise>
6570
+ </xsl:choose>
6542
6571
 
6543
6572
  </xsl:if>
6544
6573
 
@@ -10201,7 +10230,7 @@
10201
10230
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
10202
10231
  <xsl:apply-templates mode="update_xml_step1"/>
10203
10232
  </xsl:template>
10204
- <xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
10233
+ <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">
10205
10234
  <xsl:copy>
10206
10235
  <xsl:copy-of select="@*"/>
10207
10236
  <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 CC
3
- VERSION = "2.2.13".freeze
3
+ VERSION = "2.3.0".freeze
4
4
  end
5
5
  end
data/metanorma-cc.gemspec CHANGED
@@ -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-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.13
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-24 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