metanorma-ribose 2.5.3 → 2.5.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2a208e23afd90c2aa649421d15bd39117706eca766ef491431b52f5ea176d6
|
4
|
+
data.tar.gz: 9b22ff4c6861fee21e9aac9182f6c064441bd0af71076c4e901b9d6dfcda62f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa20ac0be3b2af9dfef258d583b4d54ea9ffb783cd73fac4621629dd374589d2378cc9a59f5b94559bbf9eb47223bdbe39ec59132bc8a2ab548304208ab127ca
|
7
|
+
data.tar.gz: 102e0dbfea1d9b793693cefcb816defe54bca03fd60ff0e0717b9d842f184aaad551c7645b9b5b317b65a4956bb72c4991958f54a6b0a55fbe0d630f4dad9171
|
@@ -4735,7 +4735,8 @@
|
|
4735
4735
|
</xsl:choose>
|
4736
4736
|
</xsl:variable>
|
4737
4737
|
<xsl:variable name="current_fn_number_text">
|
4738
|
-
|
4738
|
+
|
4739
|
+
<xsl:value-of select="$current_fn_number"/>
|
4739
4740
|
|
4740
4741
|
</xsl:variable>
|
4741
4742
|
|
@@ -4771,8 +4772,10 @@
|
|
4771
4772
|
|
4772
4773
|
<xsl:call-template name="insert_basic_link">
|
4773
4774
|
<xsl:with-param name="element">
|
4774
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl"
|
4775
|
-
<
|
4775
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
4776
|
+
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
4777
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
4778
|
+
</fo:inline>
|
4776
4779
|
</fo:basic-link>
|
4777
4780
|
</xsl:with-param>
|
4778
4781
|
</xsl:call-template>
|
@@ -5053,7 +5056,7 @@
|
|
5053
5056
|
|
5054
5057
|
<xsl:call-template name="refine_fn-reference-style"/>
|
5055
5058
|
|
5056
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5059
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5057
5060
|
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
|
5058
5061
|
<xsl:attribute name="internal-destination">
|
5059
5062
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
@@ -6064,9 +6067,19 @@
|
|
6064
6067
|
</fo:inline>
|
6065
6068
|
</xsl:template>
|
6066
6069
|
|
6067
|
-
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
6070
|
+
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
|
6071
|
+
<xsl:param name="txt"/>
|
6068
6072
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
6069
|
-
<xsl:variable name="text"
|
6073
|
+
<xsl:variable name="text">
|
6074
|
+
<xsl:choose>
|
6075
|
+
<xsl:when test="$txt != ''">
|
6076
|
+
<xsl:value-of select="$txt"/>
|
6077
|
+
</xsl:when>
|
6078
|
+
<xsl:otherwise>
|
6079
|
+
<xsl:value-of select="."/>
|
6080
|
+
</xsl:otherwise>
|
6081
|
+
</xsl:choose>
|
6082
|
+
</xsl:variable>
|
6070
6083
|
<xsl:variable name="ratio_">
|
6071
6084
|
0.75
|
6072
6085
|
</xsl:variable>
|
@@ -7512,9 +7525,12 @@
|
|
7512
7525
|
<xsl:apply-templates/>
|
7513
7526
|
</xsl:when>
|
7514
7527
|
<xsl:otherwise>
|
7528
|
+
<xsl:variable name="alt_text">
|
7529
|
+
<xsl:call-template name="getAltText"/>
|
7530
|
+
</xsl:variable>
|
7515
7531
|
<xsl:call-template name="insert_basic_link">
|
7516
7532
|
<xsl:with-param name="element">
|
7517
|
-
<fo:basic-link external-destination="{$target}" fox:alt-text="{$
|
7533
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
|
7518
7534
|
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7519
7535
|
<xsl:attribute name="role">Annot</xsl:attribute>
|
7520
7536
|
</xsl:if>
|
@@ -7541,6 +7557,14 @@
|
|
7541
7557
|
</fo:inline>
|
7542
7558
|
</xsl:template> <!-- link -->
|
7543
7559
|
|
7560
|
+
<xsl:template name="getAltText">
|
7561
|
+
<xsl:choose>
|
7562
|
+
<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
|
7563
|
+
<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
|
7564
|
+
<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
|
7565
|
+
</xsl:choose>
|
7566
|
+
</xsl:template>
|
7567
|
+
|
7544
7568
|
<!-- ======================== -->
|
7545
7569
|
<!-- Appendix processing -->
|
7546
7570
|
<!-- ======================== -->
|
@@ -7571,7 +7595,7 @@
|
|
7571
7595
|
<xsl:template match="*[local-name() = 'callout']">
|
7572
7596
|
<xsl:choose>
|
7573
7597
|
<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
|
7574
|
-
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{
|
7598
|
+
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
|
7575
7599
|
</xsl:choose>
|
7576
7600
|
</xsl:template>
|
7577
7601
|
|
@@ -7600,7 +7624,10 @@
|
|
7600
7624
|
<xsl:template match="*[local-name() = 'xref']">
|
7601
7625
|
<xsl:call-template name="insert_basic_link">
|
7602
7626
|
<xsl:with-param name="element">
|
7603
|
-
<
|
7627
|
+
<xsl:variable name="alt_text">
|
7628
|
+
<xsl:call-template name="getAltText"/>
|
7629
|
+
</xsl:variable>
|
7630
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
7604
7631
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
7605
7632
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7606
7633
|
</xsl:if>
|
@@ -10088,12 +10115,14 @@
|
|
10088
10115
|
|
10089
10116
|
<xsl:when test="contains(normalize-space($fo_element), 'list')">
|
10090
10117
|
|
10091
|
-
<xsl:variable name="
|
10118
|
+
<xsl:variable name="provisional_distance_between_starts_">
|
10092
10119
|
7
|
10093
10120
|
</xsl:variable>
|
10094
|
-
<xsl:variable name="
|
10121
|
+
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
10122
|
+
<xsl:variable name="indent_">
|
10095
10123
|
0
|
10096
10124
|
</xsl:variable>
|
10125
|
+
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
10097
10126
|
|
10098
10127
|
<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
10099
10128
|
<fo:list-item>
|
@@ -10819,14 +10848,17 @@
|
|
10819
10848
|
</xsl:when>
|
10820
10849
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
10821
10850
|
|
10822
|
-
<xsl:variable name="
|
10851
|
+
<xsl:variable name="type" select="../@type"/>
|
10823
10852
|
|
10824
|
-
|
10853
|
+
<xsl:variable name="label">
|
10825
10854
|
|
10826
10855
|
<xsl:variable name="style_prefix_">
|
10827
10856
|
<xsl:if test="$type = 'roman'">
|
10828
10857
|
<!-- Example: (i) -->
|
10829
10858
|
</xsl:if>
|
10859
|
+
<xsl:if test="$type = 'alphabet'">
|
10860
|
+
|
10861
|
+
</xsl:if>
|
10830
10862
|
</xsl:variable>
|
10831
10863
|
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
10832
10864
|
|
@@ -10852,13 +10884,15 @@
|
|
10852
10884
|
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
10853
10885
|
<xsl:value-of select="$style_prefix"/>
|
10854
10886
|
</xsl:if>
|
10887
|
+
|
10855
10888
|
<xsl:value-of select="@label"/>
|
10889
|
+
|
10856
10890
|
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
10857
10891
|
<xsl:value-of select="$style_suffix"/>
|
10858
10892
|
</xsl:if>
|
10859
10893
|
</xsl:variable>
|
10860
10894
|
|
10861
|
-
|
10895
|
+
<xsl:value-of select="normalize-space($label)"/>
|
10862
10896
|
|
10863
10897
|
</xsl:when>
|
10864
10898
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
@@ -13052,7 +13086,8 @@
|
|
13052
13086
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
13053
13087
|
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
13054
13088
|
<!-- Todo: need update -->
|
13055
|
-
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = '
|
13089
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
13090
|
+
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
13056
13091
|
|
13057
13092
|
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
|
13058
13093
|
<xsl:attribute name="src">
|
@@ -13073,6 +13108,9 @@
|
|
13073
13108
|
<xsl:if test="$afrelationship != ''">
|
13074
13109
|
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13075
13110
|
</xsl:if>
|
13111
|
+
<xsl:if test="$volatile != ''">
|
13112
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
13113
|
+
</xsl:if>
|
13076
13114
|
</pdf:embedded-file>
|
13077
13115
|
</xsl:for-each>
|
13078
13116
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
@@ -13083,14 +13121,18 @@
|
|
13083
13121
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13084
13122
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13085
13123
|
<!-- Todo: need update -->
|
13086
|
-
|
13124
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
13125
|
+
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
13087
13126
|
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
13088
13127
|
<xsl:if test="$description != ''">
|
13089
13128
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13090
13129
|
</xsl:if>
|
13091
13130
|
<xsl:if test="$afrelationship != ''">
|
13092
|
-
|
13093
|
-
|
13131
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13132
|
+
</xsl:if>
|
13133
|
+
<xsl:if test="$volatile != ''">
|
13134
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
13135
|
+
</xsl:if>
|
13094
13136
|
</pdf:embedded-file>
|
13095
13137
|
</xsl:for-each>
|
13096
13138
|
</xsl:if>
|
@@ -13137,10 +13179,31 @@
|
|
13137
13179
|
<xsl:value-of select="$level_total - 2"/>
|
13138
13180
|
</xsl:when>
|
13139
13181
|
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
13140
|
-
|
13182
|
+
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
13183
|
+
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
13184
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
|
13185
|
+
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
13186
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
|
13187
|
+
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
13188
|
+
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
13189
|
+
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
13190
|
+
<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
|
13191
|
+
<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
|
13192
|
+
<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
|
13141
13193
|
<xsl:choose>
|
13142
|
-
<xsl:when test="string(number($
|
13143
|
-
<xsl:value-of select="number($
|
13194
|
+
<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
|
13195
|
+
<xsl:value-of select="number($curr_clause_depth)"/>
|
13196
|
+
</xsl:when>
|
13197
|
+
<xsl:otherwise>
|
13198
|
+
<xsl:value-of select="$level_total - 2"/>
|
13199
|
+
</xsl:otherwise>
|
13200
|
+
</xsl:choose>
|
13201
|
+
</xsl:when>
|
13202
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
|
13203
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
13204
|
+
<xsl:choose>
|
13205
|
+
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
13206
|
+
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
13144
13207
|
</xsl:when>
|
13145
13208
|
<xsl:otherwise>
|
13146
13209
|
<xsl:value-of select="$level_total - 2"/>
|
@@ -13148,7 +13211,7 @@
|
|
13148
13211
|
</xsl:choose>
|
13149
13212
|
</xsl:when>
|
13150
13213
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13151
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
13214
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
13152
13215
|
<xsl:choose>
|
13153
13216
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13154
13217
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -72,6 +72,9 @@ standards defining organization, and that is rendered in a distinct manner</a:do
|
|
72
72
|
from other documents in the same doctype</a:documentation>
|
73
73
|
</ref>
|
74
74
|
</optional>
|
75
|
+
<ref name="flavor">
|
76
|
+
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
77
|
+
</ref>
|
75
78
|
<optional>
|
76
79
|
<ref name="editorialgroup">
|
77
80
|
<a:documentation>Groups associated with the production of the standards document, typically within
|
@@ -113,6 +116,16 @@ a standards definition organization</a:documentation>
|
|
113
116
|
<define name="DocumentSubtype">
|
114
117
|
<text/>
|
115
118
|
</define>
|
119
|
+
<define name="flavor">
|
120
|
+
<element name="flavor">
|
121
|
+
<ref name="MetanormaFlavor"/>
|
122
|
+
</element>
|
123
|
+
</define>
|
124
|
+
<define name="MetanormaFlavor">
|
125
|
+
<a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
|
126
|
+
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
127
|
+
<text/>
|
128
|
+
</define>
|
116
129
|
<define name="editorialgroup">
|
117
130
|
<a:documentation>A group associated with the production of the standards document, typically within
|
118
131
|
a standards definition organization</a:documentation>
|
@@ -1382,18 +1382,7 @@ Applies whether the resource has already been created or not, and whether it is
|
|
1382
1382
|
<define name="bdate">
|
1383
1383
|
<a:documentation>Significant date in the lifecycle of the bibliographic item, including its production and its access</a:documentation>
|
1384
1384
|
<element name="date">
|
1385
|
-
<
|
1386
|
-
<a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
|
1387
|
-
<choice>
|
1388
|
-
<ref name="BibliographicDateType"/>
|
1389
|
-
<text/>
|
1390
|
-
</choice>
|
1391
|
-
</attribute>
|
1392
|
-
<optional>
|
1393
|
-
<attribute name="text">
|
1394
|
-
<a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
|
1395
|
-
</attribute>
|
1396
|
-
</optional>
|
1385
|
+
<ref name="bDateAttributes"/>
|
1397
1386
|
<optional>
|
1398
1387
|
<choice>
|
1399
1388
|
<group>
|
@@ -1416,6 +1405,20 @@ Applies whether the resource has already been created or not, and whether it is
|
|
1416
1405
|
</optional>
|
1417
1406
|
</element>
|
1418
1407
|
</define>
|
1408
|
+
<define name="bDateAttributes">
|
1409
|
+
<attribute name="type">
|
1410
|
+
<a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
|
1411
|
+
<choice>
|
1412
|
+
<ref name="BibliographicDateType"/>
|
1413
|
+
<text/>
|
1414
|
+
</choice>
|
1415
|
+
</attribute>
|
1416
|
+
<optional>
|
1417
|
+
<attribute name="text">
|
1418
|
+
<a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
|
1419
|
+
</attribute>
|
1420
|
+
</optional>
|
1421
|
+
</define>
|
1419
1422
|
<define name="docidentifier">
|
1420
1423
|
<a:documentation>An identifier of a bibliographic item in an international standard scheme</a:documentation>
|
1421
1424
|
<element name="docidentifier">
|
@@ -1884,6 +1887,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
|
|
1884
1887
|
<value>hasAnnotation</value>
|
1885
1888
|
<value>draftOf</value>
|
1886
1889
|
<value>hasDraft</value>
|
1890
|
+
<value>preliminaryDraftOf</value>
|
1891
|
+
<value>hasPreliminaryDraft</value>
|
1892
|
+
<value>revisionDraftOf</value>
|
1893
|
+
<value>hasRevisionDraft</value>
|
1887
1894
|
<value>editionOf</value>
|
1888
1895
|
<value>hasEdition</value>
|
1889
1896
|
<value>updates</value>
|
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.5.
|
4
|
+
version: 2.5.4
|
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-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|