metanorma-ribose 2.4.0 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +103 -16
- data/lib/metanorma/ribose/basicdoc.rng +3 -0
- data/lib/metanorma/ribose/isodoc.rng +4 -1
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d825402f962fe09dcaf1ed2da73bea3ee01caa2f54f6d6018a8a803f26570b8
|
4
|
+
data.tar.gz: d2511c4b57dd5b2480cdaede2c2c5230b96800bdda243bace2af5ce5897c3ccb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ae9cecaeb3156b425a736a3d42f130530fc92bed574076ec7c249fae2777fc6528a8c4176066b0edc24922de238334db29ceed8b82655cff43f581f9a00465
|
7
|
+
data.tar.gz: 1dba76ff265355a56d478c78e67c13d41f97f7871852cbfe7426f21d8ba64a3db97f2d1d9efe64a5d07fc70dde90fb7c4eb1734748559e4e1015700d8cc1c94a
|
@@ -1753,6 +1753,10 @@
|
|
1753
1753
|
|
1754
1754
|
</xsl:attribute-set>
|
1755
1755
|
|
1756
|
+
<xsl:template name="refine_termexample-style">
|
1757
|
+
|
1758
|
+
</xsl:template>
|
1759
|
+
|
1756
1760
|
<xsl:attribute-set name="example-style">
|
1757
1761
|
|
1758
1762
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -2928,6 +2932,36 @@
|
|
2928
2932
|
</xsl:for-each>
|
2929
2933
|
</xsl:template>
|
2930
2934
|
|
2935
|
+
<xsl:template name="processMainSectionsDefault_flatxml">
|
2936
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2937
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2938
|
+
<xsl:variable name="flatxml">
|
2939
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2940
|
+
</xsl:variable>
|
2941
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2942
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2943
|
+
|
2944
|
+
</xsl:for-each>
|
2945
|
+
|
2946
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2947
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2948
|
+
<xsl:variable name="flatxml">
|
2949
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2950
|
+
</xsl:variable>
|
2951
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2952
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2953
|
+
</xsl:for-each>
|
2954
|
+
|
2955
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2956
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2957
|
+
<xsl:variable name="flatxml">
|
2958
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2959
|
+
</xsl:variable>
|
2960
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2961
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2962
|
+
</xsl:for-each>
|
2963
|
+
</xsl:template>
|
2964
|
+
|
2931
2965
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
2932
2966
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
2933
2967
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
@@ -3054,7 +3088,9 @@
|
|
3054
3088
|
</xsl:template> <!-- license-statement/p -->
|
3055
3089
|
|
3056
3090
|
<xsl:template match="*[local-name()='legal-statement']">
|
3091
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
3057
3092
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
3093
|
+
|
3058
3094
|
<xsl:apply-templates/>
|
3059
3095
|
</fo:block>
|
3060
3096
|
</xsl:template> <!-- legal-statement -->
|
@@ -5007,13 +5043,13 @@
|
|
5007
5043
|
<tr>
|
5008
5044
|
<td>
|
5009
5045
|
<xsl:attribute name="id">
|
5010
|
-
<xsl:value-of select="concat($id,'
|
5046
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
|
5011
5047
|
</xsl:attribute>
|
5012
5048
|
<xsl:apply-templates/>
|
5013
5049
|
</td>
|
5014
5050
|
<td>
|
5015
5051
|
<xsl:attribute name="id">
|
5016
|
-
<xsl:value-of select="concat($id,'
|
5052
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
|
5017
5053
|
</xsl:attribute>
|
5018
5054
|
|
5019
5055
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
@@ -5332,13 +5368,14 @@
|
|
5332
5368
|
<!-- ================= -->
|
5333
5369
|
<!-- Added,deleted text -->
|
5334
5370
|
<!-- ================= -->
|
5335
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
5371
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
5336
5372
|
<xsl:param name="skip">true</xsl:param>
|
5337
5373
|
<xsl:param name="block">false</xsl:param>
|
5338
5374
|
<xsl:param name="type"/>
|
5339
5375
|
<xsl:param name="text-align"/>
|
5340
5376
|
<xsl:choose>
|
5341
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
5377
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
5378
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
5342
5379
|
<xsl:choose>
|
5343
5380
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
5344
5381
|
<xsl:otherwise>
|
@@ -5346,12 +5383,32 @@
|
|
5346
5383
|
<xsl:call-template name="insertTag">
|
5347
5384
|
<xsl:with-param name="type">
|
5348
5385
|
<xsl:choose>
|
5386
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
5387
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
5349
5388
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
5350
5389
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
5351
5390
|
</xsl:choose>
|
5352
5391
|
</xsl:with-param>
|
5353
|
-
<xsl:with-param name="kind"
|
5354
|
-
|
5392
|
+
<xsl:with-param name="kind">
|
5393
|
+
<xsl:choose>
|
5394
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
5395
|
+
<xsl:value-of select="text()"/>
|
5396
|
+
</xsl:when>
|
5397
|
+
<xsl:otherwise>
|
5398
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
5399
|
+
</xsl:otherwise>
|
5400
|
+
</xsl:choose>
|
5401
|
+
</xsl:with-param>
|
5402
|
+
<xsl:with-param name="value">
|
5403
|
+
<xsl:choose>
|
5404
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
5405
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
5406
|
+
</xsl:when>
|
5407
|
+
<xsl:otherwise>
|
5408
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
5409
|
+
</xsl:otherwise>
|
5410
|
+
</xsl:choose>
|
5411
|
+
</xsl:with-param>
|
5355
5412
|
</xsl:call-template>
|
5356
5413
|
</xsl:variable>
|
5357
5414
|
<xsl:choose>
|
@@ -5611,6 +5668,10 @@
|
|
5611
5668
|
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5612
5669
|
</xsl:template>
|
5613
5670
|
|
5671
|
+
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
5672
|
+
<xsl:value-of select="."/>
|
5673
|
+
</xsl:template>
|
5674
|
+
|
5614
5675
|
<!-- ========================= -->
|
5615
5676
|
<!-- END Rich text formatting -->
|
5616
5677
|
<!-- ========================= -->
|
@@ -6241,7 +6302,7 @@
|
|
6241
6302
|
</xsl:choose>
|
6242
6303
|
</xsl:variable>
|
6243
6304
|
<xsl:attribute name="id">
|
6244
|
-
<xsl:value-of select="concat($id,'
|
6305
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
|
6245
6306
|
</xsl:attribute>
|
6246
6307
|
|
6247
6308
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -6249,7 +6310,7 @@
|
|
6249
6310
|
<xsl:copy-of select="@*"/>
|
6250
6311
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
6251
6312
|
<xsl:attribute name="id">
|
6252
|
-
<xsl:value-of select="concat($id,'
|
6313
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
6253
6314
|
</xsl:attribute>
|
6254
6315
|
|
6255
6316
|
<!-- <xsl:copy-of select="node()" /> -->
|
@@ -6313,7 +6374,7 @@
|
|
6313
6374
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
6314
6375
|
<xsl:copy>
|
6315
6376
|
<xsl:attribute name="id">
|
6316
|
-
<xsl:value-of select="concat($id,'
|
6377
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
6317
6378
|
</xsl:attribute>
|
6318
6379
|
<xsl:copy-of select="node()"/>
|
6319
6380
|
</xsl:copy>
|
@@ -7560,11 +7621,17 @@
|
|
7560
7621
|
</xsl:when>
|
7561
7622
|
<xsl:otherwise>
|
7562
7623
|
|
7624
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7625
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7626
|
+
|
7563
7627
|
<xsl:variable name="element">
|
7564
7628
|
<xsl:choose>
|
7565
7629
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
7566
7630
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7567
7631
|
</xsl:when>
|
7632
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7633
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7634
|
+
</xsl:when>
|
7568
7635
|
<xsl:otherwise>
|
7569
7636
|
<fo:block xsl:use-attribute-sets="image-style">
|
7570
7637
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -7580,10 +7647,24 @@
|
|
7580
7647
|
<xsl:copy-of select="@*"/>
|
7581
7648
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
7582
7649
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
7583
|
-
|
7584
|
-
|
7585
|
-
|
7586
|
-
|
7650
|
+
|
7651
|
+
<xsl:choose>
|
7652
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7653
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7654
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7655
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7656
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7657
|
+
</xsl:if>
|
7658
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7659
|
+
</xsl:when>
|
7660
|
+
<xsl:otherwise>
|
7661
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7662
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7663
|
+
</xsl:if>
|
7664
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7665
|
+
</xsl:otherwise>
|
7666
|
+
</xsl:choose>
|
7667
|
+
|
7587
7668
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7588
7669
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7589
7670
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -9102,7 +9183,7 @@
|
|
9102
9183
|
<!-- ====== -->
|
9103
9184
|
<xsl:template match="*[local-name() = 'termexample']">
|
9104
9185
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
9105
|
-
|
9186
|
+
<xsl:call-template name="refine_termexample-style"/>
|
9106
9187
|
<xsl:call-template name="setBlockSpanAll"/>
|
9107
9188
|
|
9108
9189
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
@@ -9791,13 +9872,19 @@
|
|
9791
9872
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9792
9873
|
</xsl:when>
|
9793
9874
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9794
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9875
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9876
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9877
|
+
</xsl:when>
|
9878
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9795
9879
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9796
9880
|
</xsl:when>
|
9797
9881
|
</xsl:choose>
|
9798
9882
|
|
9799
9883
|
</xsl:template>
|
9800
9884
|
|
9885
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9886
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9887
|
+
|
9801
9888
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9802
9889
|
<!-- 0xA0 to space replacement -->
|
9803
9890
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -11398,7 +11485,7 @@
|
|
11398
11485
|
|
11399
11486
|
<xsl:template name="printEdition">
|
11400
11487
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
11401
|
-
|
11488
|
+
|
11402
11489
|
<xsl:choose>
|
11403
11490
|
<xsl:when test="$edition_i18n != ''">
|
11404
11491
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
@@ -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.
|
20
|
+
<!-- VERSION v1.3.0 -->
|
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">
|
@@ -146,6 +146,9 @@
|
|
146
146
|
<data type="boolean"/>
|
147
147
|
</attribute>
|
148
148
|
</optional>
|
149
|
+
<optional>
|
150
|
+
<attribute name="style"/>
|
151
|
+
</optional>
|
149
152
|
<oneOrMore>
|
150
153
|
<ref name="PureTextElement"/>
|
151
154
|
</oneOrMore>
|
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.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|