metanorma-ribose 2.5.2 → 2.5.3
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/html/htmlstyle.css +3 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +102 -7
- 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: ad837cc7cdfb00ad1c42691462db593520aca7bd1cdea7e0f04df34224b2aae7
|
4
|
+
data.tar.gz: 6ba4858570d7362138b247e3cb04027a7b9d833396169dc37afa3d6218c7b0dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ff3c59e23df8a4dccdf73588b51738b14cefa49f2b04ce35851b5909153ffe0dae4703c64b977be41501c888da528e00c3a8eca24914d2840036e83062c8d3
|
7
|
+
data.tar.gz: 7a8f288c813fc170520cc35dae69c67f220eb876370872894d66ccd6535cf439a28fe356809c7ee3216b125f79b8d47286deb5791071ea904ae2369053f5a7d7
|
@@ -82,6 +82,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
82
82
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
83
83
|
font-size: {{monospacefontsize}}; }
|
84
84
|
|
85
|
+
sub, sup {
|
86
|
+
font-size: 0.75em; }
|
87
|
+
|
85
88
|
article, aside, details, figcaption, figure,
|
86
89
|
footer, header, hgroup, menu, nav, section {
|
87
90
|
display: block; }
|
@@ -4598,6 +4598,7 @@
|
|
4598
4598
|
|
4599
4599
|
<fo:block role="SKIP">
|
4600
4600
|
<xsl:apply-templates/>
|
4601
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
4601
4602
|
</fo:block>
|
4602
4603
|
</fo:table-cell>
|
4603
4604
|
</xsl:template> <!-- cell in table header row - 'th' -->
|
@@ -4661,6 +4662,8 @@
|
|
4661
4662
|
|
4662
4663
|
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
4663
4664
|
|
4665
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
4666
|
+
|
4664
4667
|
</fo:block>
|
4665
4668
|
</fo:table-cell>
|
4666
4669
|
</xsl:template> <!-- td -->
|
@@ -7457,14 +7460,16 @@
|
|
7457
7460
|
<xsl:template match="*[local-name()='link']" name="link">
|
7458
7461
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
7459
7462
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
7463
|
+
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
7460
7464
|
<xsl:variable name="target">
|
7461
7465
|
<xsl:choose>
|
7462
7466
|
<xsl:when test="@updatetype = 'true'">
|
7463
7467
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7464
7468
|
</xsl:when>
|
7465
7469
|
<!-- link to the PDF attachment -->
|
7466
|
-
<xsl:when test="
|
7467
|
-
<xsl:
|
7470
|
+
<xsl:when test="$isLinkToEmbeddedFile = 'true'">
|
7471
|
+
<xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
|
7472
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
|
7468
7473
|
</xsl:when>
|
7469
7474
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
7470
7475
|
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
@@ -7495,6 +7500,11 @@
|
|
7495
7500
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7496
7501
|
</xsl:if>
|
7497
7502
|
|
7503
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7504
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
7505
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
7506
|
+
</xsl:if>
|
7507
|
+
|
7498
7508
|
<xsl:call-template name="refine_link-style"/>
|
7499
7509
|
|
7500
7510
|
<xsl:choose>
|
@@ -7505,6 +7515,9 @@
|
|
7505
7515
|
<xsl:call-template name="insert_basic_link">
|
7506
7516
|
<xsl:with-param name="element">
|
7507
7517
|
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
7518
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7519
|
+
<xsl:attribute name="role">Annot</xsl:attribute>
|
7520
|
+
</xsl:if>
|
7508
7521
|
<xsl:choose>
|
7509
7522
|
<xsl:when test="normalize-space(.) = ''">
|
7510
7523
|
<xsl:call-template name="add-zero-spaces-link-java">
|
@@ -7517,6 +7530,10 @@
|
|
7517
7530
|
</xsl:otherwise>
|
7518
7531
|
</xsl:choose>
|
7519
7532
|
</fo:basic-link>
|
7533
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
7534
|
+
<!-- reserve space at right for PaperClip icon -->
|
7535
|
+
<fo:inline keep-with-previous.within-line="always"> </fo:inline>
|
7536
|
+
</xsl:if>
|
7520
7537
|
</xsl:with-param>
|
7521
7538
|
</xsl:call-template>
|
7522
7539
|
</xsl:otherwise>
|
@@ -13030,9 +13047,14 @@
|
|
13030
13047
|
</x:xmpmeta>
|
13031
13048
|
<!-- add attachments -->
|
13032
13049
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13033
|
-
<xsl:variable name="
|
13034
|
-
|
13035
|
-
<
|
13050
|
+
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
13051
|
+
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
13052
|
+
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
13053
|
+
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
13054
|
+
<!-- Todo: need update -->
|
13055
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
13056
|
+
|
13057
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
|
13036
13058
|
<xsl:attribute name="src">
|
13037
13059
|
<xsl:choose>
|
13038
13060
|
<xsl:when test="normalize-space() != ''">
|
@@ -13048,18 +13070,27 @@
|
|
13048
13070
|
<xsl:if test="$description != ''">
|
13049
13071
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13050
13072
|
</xsl:if>
|
13073
|
+
<xsl:if test="$afrelationship != ''">
|
13074
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13075
|
+
</xsl:if>
|
13051
13076
|
</pdf:embedded-file>
|
13052
13077
|
</xsl:for-each>
|
13053
13078
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13054
13079
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13055
13080
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13056
13081
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13082
|
+
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
13057
13083
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13058
13084
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13059
|
-
|
13085
|
+
<!-- Todo: need update -->
|
13086
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
13087
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
13060
13088
|
<xsl:if test="$description != ''">
|
13061
13089
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13062
13090
|
</xsl:if>
|
13091
|
+
<xsl:if test="$afrelationship != ''">
|
13092
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13093
|
+
</xsl:if>
|
13063
13094
|
</pdf:embedded-file>
|
13064
13095
|
</xsl:for-each>
|
13065
13096
|
</xsl:if>
|
@@ -13079,6 +13110,12 @@
|
|
13079
13110
|
<!-- Get or calculate depth of the element -->
|
13080
13111
|
<xsl:template name="getLevel">
|
13081
13112
|
<xsl:param name="depth"/>
|
13113
|
+
<!-- <xsl:message>
|
13114
|
+
<xsl:choose>
|
13115
|
+
<xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
|
13116
|
+
<xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
|
13117
|
+
</xsl:choose>
|
13118
|
+
</xsl:message> -->
|
13082
13119
|
<xsl:choose>
|
13083
13120
|
<xsl:when test="normalize-space(@depth) != ''">
|
13084
13121
|
<xsl:value-of select="@depth"/>
|
@@ -13099,8 +13136,27 @@
|
|
13099
13136
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
13100
13137
|
<xsl:value-of select="$level_total - 2"/>
|
13101
13138
|
</xsl:when>
|
13139
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
13140
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
13141
|
+
<xsl:choose>
|
13142
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13143
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13144
|
+
</xsl:when>
|
13145
|
+
<xsl:otherwise>
|
13146
|
+
<xsl:value-of select="$level_total - 2"/>
|
13147
|
+
</xsl:otherwise>
|
13148
|
+
</xsl:choose>
|
13149
|
+
</xsl:when>
|
13102
13150
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13103
|
-
<xsl:
|
13151
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
13152
|
+
<xsl:choose>
|
13153
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13154
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13155
|
+
</xsl:when>
|
13156
|
+
<xsl:otherwise>
|
13157
|
+
<xsl:value-of select="$level_total - 1"/>
|
13158
|
+
</xsl:otherwise>
|
13159
|
+
</xsl:choose>
|
13104
13160
|
</xsl:when>
|
13105
13161
|
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
13106
13162
|
<xsl:value-of select="$level_total - 1"/>
|
@@ -13108,6 +13164,17 @@
|
|
13108
13164
|
<xsl:when test="parent::*[local-name() = 'annex']">
|
13109
13165
|
<xsl:value-of select="$level_total - 1"/>
|
13110
13166
|
</xsl:when>
|
13167
|
+
<xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
|
13168
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
13169
|
+
<xsl:choose>
|
13170
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13171
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13172
|
+
</xsl:when>
|
13173
|
+
<xsl:otherwise>
|
13174
|
+
<xsl:value-of select="$level_total - 1"/>
|
13175
|
+
</xsl:otherwise>
|
13176
|
+
</xsl:choose>
|
13177
|
+
</xsl:when>
|
13111
13178
|
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
13112
13179
|
<xsl:value-of select="$level_total"/>
|
13113
13180
|
</xsl:when>
|
@@ -13466,6 +13533,20 @@
|
|
13466
13533
|
|
13467
13534
|
<!-- END: insert cover page image -->
|
13468
13535
|
|
13536
|
+
<xsl:template name="insertVerticalChar">
|
13537
|
+
<xsl:param name="str"/>
|
13538
|
+
<xsl:if test="string-length($str) > 0">
|
13539
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
13540
|
+
<fo:block-container width="1em">
|
13541
|
+
<fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
|
13542
|
+
</fo:block-container>
|
13543
|
+
</fo:inline-container>
|
13544
|
+
<xsl:call-template name="insertVerticalChar">
|
13545
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
13546
|
+
</xsl:call-template>
|
13547
|
+
</xsl:if>
|
13548
|
+
</xsl:template>
|
13549
|
+
|
13469
13550
|
<xsl:template name="number-to-words">
|
13470
13551
|
<xsl:param name="number"/>
|
13471
13552
|
<xsl:param name="first"/>
|
@@ -13753,4 +13834,18 @@
|
|
13753
13834
|
</xsl:if>
|
13754
13835
|
</xsl:template>
|
13755
13836
|
|
13837
|
+
<xsl:template match="@*|node()" mode="set_table_role_skip">
|
13838
|
+
<xsl:copy>
|
13839
|
+
<xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
|
13840
|
+
</xsl:copy>
|
13841
|
+
</xsl:template>
|
13842
|
+
|
13843
|
+
<xsl:template match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
|
13844
|
+
<xsl:copy>
|
13845
|
+
<xsl:apply-templates select="@*" mode="set_table_role_skip"/>
|
13846
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
13847
|
+
<xsl:apply-templates select="node()" mode="set_table_role_skip"/>
|
13848
|
+
</xsl:copy>
|
13849
|
+
</xsl:template>
|
13850
|
+
|
13756
13851
|
</xsl:stylesheet>
|
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.3
|
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-09-
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|