metanorma-csa 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 +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +83 -59
- data/lib/isodoc/csa/html/htmlstyle.css +9 -5
- data/lib/isodoc/csa/html/htmlstyle.scss +2 -2
- data/lib/isodoc/csa/presentation_xml_convert.rb +2 -0
- data/lib/metanorma/csa/isodoc.rng +26 -4
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a95131585815c4041d9a14690cc356195aec696663d927aa5d6827b8f7048747
|
4
|
+
data.tar.gz: 3a38de13f0891eb9f1450e6b0abe4bb25265d1d6f84affdb5ae964e3db725c6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cde280515b36664b0295bcdd154ecb916d44714675c22661944c168544b8b18d2b7bd4ceecc53884b36ae45664bdc01c227a0559d5bda48b0a169f586170fd2
|
7
|
+
data.tar.gz: 890f922da43d944129032766bb411efcf5dc858fa2f2635f5775f0aff8682c490ca15a9b0a9092a43594b7a5ef94328bf7f3a2f740afc6882dc32499f7236175
|
@@ -317,12 +317,9 @@
|
|
317
317
|
</xsl:template>
|
318
318
|
|
319
319
|
<xsl:template match="csa:preface/csa:clause[@type = 'toc']/csa:title" priority="3">
|
320
|
-
<
|
321
|
-
<xsl:
|
322
|
-
|
323
|
-
</xsl:call-template>
|
324
|
-
</xsl:variable>
|
325
|
-
<fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
320
|
+
<fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1">
|
321
|
+
<xsl:apply-templates/>
|
322
|
+
</fo:block>
|
326
323
|
</xsl:template>
|
327
324
|
|
328
325
|
<xsl:template match="node()">
|
@@ -719,21 +716,32 @@
|
|
719
716
|
<xsl:variable name="titles_">
|
720
717
|
|
721
718
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
722
|
-
<title-toc lang="en">
|
723
|
-
|
719
|
+
<!-- <title-toc lang="en">
|
720
|
+
<xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
|
721
|
+
<xsl:text>Contents</xsl:text>
|
722
|
+
</xsl:if>
|
723
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
|
724
724
|
<xsl:text>Table of Contents</xsl:text>
|
725
|
-
|
726
|
-
|
727
|
-
|
725
|
+
</xsl:if>
|
726
|
+
<xsl:if test="$namespace = 'gb'">
|
727
|
+
<xsl:text>Table of contents</xsl:text>
|
728
|
+
</xsl:if>
|
729
|
+
</title-toc> -->
|
730
|
+
<title-toc lang="en">Table of contents</title-toc>
|
731
|
+
<!-- <title-toc lang="fr">
|
728
732
|
<xsl:text>Sommaire</xsl:text>
|
729
|
-
</title-toc>
|
730
|
-
<title-toc lang="zh">
|
731
|
-
|
733
|
+
</title-toc> -->
|
734
|
+
<!-- <title-toc lang="zh">
|
735
|
+
<xsl:choose>
|
736
|
+
<xsl:when test="$namespace = 'gb'">
|
737
|
+
<xsl:text>目次</xsl:text>
|
738
|
+
</xsl:when>
|
739
|
+
<xsl:otherwise>
|
732
740
|
<xsl:text>Contents</xsl:text>
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
<title-
|
741
|
+
</xsl:otherwise>
|
742
|
+
</xsl:choose>
|
743
|
+
</title-toc> -->
|
744
|
+
<title-toc lang="zh">目次</title-toc>
|
737
745
|
|
738
746
|
<title-part lang="en">
|
739
747
|
|
@@ -749,20 +757,6 @@
|
|
749
757
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
750
758
|
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
751
759
|
|
752
|
-
<title-list-tables lang="en">List of Tables</title-list-tables>
|
753
|
-
|
754
|
-
<title-list-figures lang="en">List of Figures</title-list-figures>
|
755
|
-
|
756
|
-
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
757
|
-
|
758
|
-
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
759
|
-
|
760
|
-
<title-summary lang="en">Summary</title-summary>
|
761
|
-
|
762
|
-
<title-continued lang="ru">(продолжение)</title-continued>
|
763
|
-
<title-continued lang="en">(continued)</title-continued>
|
764
|
-
<title-continued lang="fr">(continué)</title-continued>
|
765
|
-
|
766
760
|
</xsl:variable>
|
767
761
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
768
762
|
|
@@ -770,8 +764,8 @@
|
|
770
764
|
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
771
765
|
<xsl:value-of select="$toc_table_title"/>
|
772
766
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
773
|
-
<xsl:call-template name="
|
774
|
-
<xsl:with-param name="
|
767
|
+
<xsl:call-template name="getLocalizedString">
|
768
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
775
769
|
</xsl:call-template>
|
776
770
|
</xsl:if>
|
777
771
|
</xsl:variable>
|
@@ -780,8 +774,8 @@
|
|
780
774
|
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
781
775
|
<xsl:value-of select="$toc_figure_title"/>
|
782
776
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
783
|
-
<xsl:call-template name="
|
784
|
-
<xsl:with-param name="
|
777
|
+
<xsl:call-template name="getLocalizedString">
|
778
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
785
779
|
</xsl:call-template>
|
786
780
|
</xsl:if>
|
787
781
|
</xsl:variable>
|
@@ -790,8 +784,8 @@
|
|
790
784
|
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
791
785
|
<xsl:value-of select="$toc_requirement_title"/>
|
792
786
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
793
|
-
<xsl:call-template name="
|
794
|
-
<xsl:with-param name="
|
787
|
+
<xsl:call-template name="getLocalizedString">
|
788
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
795
789
|
</xsl:call-template>
|
796
790
|
</xsl:if>
|
797
791
|
</xsl:variable>
|
@@ -4465,6 +4459,9 @@
|
|
4465
4459
|
<!-- END Definition List -->
|
4466
4460
|
<!-- ===================== -->
|
4467
4461
|
|
4462
|
+
<!-- default: ignore title in sections/p -->
|
4463
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
4464
|
+
|
4468
4465
|
<!-- ========================= -->
|
4469
4466
|
<!-- Rich text formatting -->
|
4470
4467
|
<!-- ========================= -->
|
@@ -4542,7 +4539,7 @@
|
|
4542
4539
|
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
4543
4540
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
4544
4541
|
<xsl:choose>
|
4545
|
-
<xsl:when test="java:replaceAll(java:java.lang.String.new(.),
|
4542
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
4546
4543
|
<!-- url -->
|
4547
4544
|
<xsl:call-template name="add-zero-spaces-link-java"/>
|
4548
4545
|
</xsl:when>
|
@@ -5004,10 +5001,13 @@
|
|
5004
5001
|
</xsl:choose>
|
5005
5002
|
</xsl:variable>
|
5006
5003
|
|
5004
|
+
<!-- replace sequence #x200B to one ​ -->
|
5005
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '')"/>
|
5006
|
+
|
5007
5007
|
<!-- replace sequence #x200B and space TO space -->
|
5008
|
-
<xsl:variable name="
|
5008
|
+
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
|
5009
5009
|
|
5010
|
-
<xsl:value-of select="$
|
5010
|
+
<xsl:value-of select="$text11"/>
|
5011
5011
|
</xsl:template>
|
5012
5012
|
|
5013
5013
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -5017,8 +5017,12 @@
|
|
5017
5017
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
5018
5018
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
|
5019
5019
|
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1')"/>
|
5020
|
+
|
5021
|
+
<!-- replace sequence #x200B to one ​ -->
|
5022
|
+
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '')"/>
|
5023
|
+
|
5020
5024
|
<!-- remove zero-width space at the end -->
|
5021
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
5025
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '$', '')"/>
|
5022
5026
|
</xsl:template>
|
5023
5027
|
|
5024
5028
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -6285,7 +6289,7 @@
|
|
6285
6289
|
|
6286
6290
|
<xsl:call-template name="refine_note_block_style"/>
|
6287
6291
|
|
6288
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
6292
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
6289
6293
|
|
6290
6294
|
<xsl:call-template name="refine_note-name-style"/>
|
6291
6295
|
|
@@ -6322,12 +6326,12 @@
|
|
6322
6326
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
6323
6327
|
<xsl:choose>
|
6324
6328
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
6325
|
-
<fo:inline xsl:use-attribute-sets="note-p-style">
|
6329
|
+
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
6326
6330
|
<xsl:apply-templates/>
|
6327
6331
|
</fo:inline>
|
6328
6332
|
</xsl:when>
|
6329
6333
|
<xsl:otherwise>
|
6330
|
-
<fo:block xsl:use-attribute-sets="note-p-style">
|
6334
|
+
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
6331
6335
|
<xsl:apply-templates/>
|
6332
6336
|
</fo:block>
|
6333
6337
|
</xsl:otherwise>
|
@@ -6542,25 +6546,45 @@
|
|
6542
6546
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6543
6547
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6544
6548
|
|
6545
|
-
<xsl:
|
6546
|
-
<xsl:
|
6547
|
-
<xsl:
|
6548
|
-
|
6549
|
-
|
6550
|
-
|
6549
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
6550
|
+
<xsl:attribute name="width">
|
6551
|
+
<xsl:value-of select="@width"/>
|
6552
|
+
</xsl:attribute>
|
6553
|
+
</xsl:if>
|
6554
|
+
|
6555
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
6556
|
+
<xsl:attribute name="height">
|
6557
|
+
<xsl:value-of select="@height"/>
|
6558
|
+
</xsl:attribute>
|
6559
|
+
</xsl:if>
|
6551
6560
|
|
6552
|
-
<xsl:
|
6561
|
+
<xsl:choose>
|
6562
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
6563
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
6564
|
+
</xsl:when>
|
6565
|
+
<xsl:otherwise>
|
6553
6566
|
|
6554
|
-
|
6567
|
+
<xsl:variable name="img_src">
|
6568
|
+
<xsl:choose>
|
6569
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
6570
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
6571
|
+
</xsl:choose>
|
6572
|
+
</xsl:variable>
|
6555
6573
|
|
6556
|
-
|
6574
|
+
<xsl:variable name="image_width_effective">
|
6575
|
+
|
6576
|
+
<xsl:value-of select="$width_effective"/>
|
6557
6577
|
|
6558
|
-
|
6559
|
-
<xsl:if test="number($scale) < 100">
|
6578
|
+
</xsl:variable>
|
6560
6579
|
|
6561
|
-
|
6580
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
6581
|
+
<xsl:if test="number($scale) < 100">
|
6562
6582
|
|
6563
|
-
|
6583
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
6584
|
+
|
6585
|
+
</xsl:if>
|
6586
|
+
</xsl:otherwise>
|
6587
|
+
</xsl:choose>
|
6564
6588
|
|
6565
6589
|
</xsl:if>
|
6566
6590
|
|
@@ -10192,7 +10216,7 @@
|
|
10192
10216
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
10193
10217
|
<xsl:apply-templates mode="update_xml_step1"/>
|
10194
10218
|
</xsl:template>
|
10195
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10219
|
+
<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">
|
10196
10220
|
<xsl:copy>
|
10197
10221
|
<xsl:copy-of select="@*"/>
|
10198
10222
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -97,7 +97,7 @@ h1, h2, h3, h4, h5, h6 {
|
|
97
97
|
|
98
98
|
blockquote, q {
|
99
99
|
quotes: none; }
|
100
|
-
blockquote
|
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
|
123
|
+
a.FootnoteRef + a.FootnoteRef::before {
|
124
124
|
content: ", ";
|
125
125
|
vertical-align: super; }
|
126
126
|
|
127
|
-
a.TableFootnoteRef + a.TableFootnoteRef
|
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
|
|
@@ -582,7 +586,7 @@ h3, .h3 {
|
|
582
586
|
font-size: 1.5em; }
|
583
587
|
|
584
588
|
/*
|
585
|
-
span[id^="toc"]
|
589
|
+
span[id^="toc"]::after {
|
586
590
|
float: left;
|
587
591
|
padding-right: 4px;
|
588
592
|
margin-left: -20px;
|
@@ -1108,7 +1112,7 @@ To top button
|
|
1108
1112
|
color: #4D7EA5;
|
1109
1113
|
box-shadow: none; }
|
1110
1114
|
|
1111
|
-
nav h1:hover a
|
1115
|
+
nav h1:hover a::after {
|
1112
1116
|
display: none; }
|
1113
1117
|
|
1114
1118
|
.document-stage-band p {
|
@@ -220,7 +220,7 @@ h3,.h3 {
|
|
220
220
|
font-size: 1.5em;
|
221
221
|
}
|
222
222
|
/*
|
223
|
-
span[id^="toc"]
|
223
|
+
span[id^="toc"]::after {
|
224
224
|
float: left;
|
225
225
|
padding-right: 4px;
|
226
226
|
margin-left: -20px;
|
@@ -755,7 +755,7 @@ To top button
|
|
755
755
|
}
|
756
756
|
}
|
757
757
|
|
758
|
-
nav h1:hover a
|
758
|
+
nav h1:hover a::after {
|
759
759
|
display: none;
|
760
760
|
}
|
761
761
|
|
@@ -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.
|
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
|
-
<
|
196
|
-
<
|
197
|
-
|
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>
|
data/metanorma-csa.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.
|
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-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
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-
|
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.
|
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.
|
26
|
+
version: 2.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|