metanorma-ribose 2.4.10 → 2.4.12
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 +38 -5
- data/lib/metanorma/ribose/isodoc.rng +5 -5
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ead04a3f02a2de2f0d13bee5b3769b1bb3481b97168a7653d90296466f1bf39a
|
4
|
+
data.tar.gz: d56daa4297255da6ebcdb64ff0397ac22480d0802febab8e9824df81ecdfd29b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 779ef1ff124ce316f7684f47486d76f62b72f20c5aac64105f08e982f875cafa7b68af27e741a6b4947feb7cf0d03a3e2c53a1600162428385d0bdd52a6d4332
|
7
|
+
data.tar.gz: 37a61afdf7f21a230eacf50189f116f7f79c4ed2f0f11da550dbad05b307842fac68026ee88387345a4f24707a013497affda511080168784b23c91fe57eed4f
|
@@ -7419,18 +7419,33 @@
|
|
7419
7419
|
|
7420
7420
|
<xsl:template match="*[local-name()='localityStack']"/>
|
7421
7421
|
|
7422
|
+
<xsl:variable name="pdfAttachmentsList_">
|
7423
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
7424
|
+
<attachment filename="{@name}"/>
|
7425
|
+
</xsl:for-each>
|
7426
|
+
</xsl:variable>
|
7427
|
+
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
7428
|
+
|
7422
7429
|
<xsl:template match="*[local-name()='link']" name="link">
|
7430
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
7431
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
7423
7432
|
<xsl:variable name="target">
|
7424
7433
|
<xsl:choose>
|
7425
7434
|
<xsl:when test="@updatetype = 'true'">
|
7426
7435
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7427
7436
|
</xsl:when>
|
7437
|
+
<!-- link to the PDF attachment -->
|
7438
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
7439
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
7440
|
+
</xsl:when>
|
7441
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
7442
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
7443
|
+
</xsl:when>
|
7428
7444
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7429
|
-
<!-- link to the PDF attachment -->
|
7430
7445
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7431
7446
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7432
7447
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7433
|
-
</xsl:when>
|
7448
|
+
</xsl:when> -->
|
7434
7449
|
<xsl:otherwise>
|
7435
7450
|
<xsl:value-of select="normalize-space(@target)"/>
|
7436
7451
|
</xsl:otherwise>
|
@@ -9086,8 +9101,11 @@
|
|
9086
9101
|
</xsl:template>
|
9087
9102
|
|
9088
9103
|
<xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
9104
|
+
<xsl:param name="element"/>
|
9089
9105
|
<xsl:copy>
|
9090
|
-
<xsl:apply-templates mode="contents_item"
|
9106
|
+
<xsl:apply-templates mode="contents_item">
|
9107
|
+
<xsl:with-param name="element" select="$element"/>
|
9108
|
+
</xsl:apply-templates>
|
9091
9109
|
</xsl:copy>
|
9092
9110
|
</xsl:template>
|
9093
9111
|
|
@@ -9154,7 +9172,10 @@
|
|
9154
9172
|
|
9155
9173
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
9156
9174
|
<xsl:template match="*[local-name() = 'span']" mode="contents_item">
|
9157
|
-
<xsl:
|
9175
|
+
<xsl:param name="element"/>
|
9176
|
+
<xsl:apply-templates mode="contents_item">
|
9177
|
+
<xsl:with-param name="element" select="$element"/>
|
9178
|
+
</xsl:apply-templates>
|
9158
9179
|
</xsl:template>
|
9159
9180
|
|
9160
9181
|
<!-- =============== -->
|
@@ -12020,6 +12041,17 @@
|
|
12020
12041
|
<xsl:copy-of select="."/>
|
12021
12042
|
</xsl:template>
|
12022
12043
|
|
12044
|
+
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12045
|
+
<xsl:copy>
|
12046
|
+
<xsl:copy-of select="@*"/>
|
12047
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
12048
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
12049
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
12050
|
+
<xsl:value-of select="."/>
|
12051
|
+
</xsl:if>
|
12052
|
+
</xsl:copy>
|
12053
|
+
</xsl:template>
|
12054
|
+
|
12023
12055
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
12024
12056
|
<xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
12025
12057
|
<xsl:copy>
|
@@ -12894,7 +12926,8 @@
|
|
12894
12926
|
</xsl:when>
|
12895
12927
|
<xsl:otherwise>
|
12896
12928
|
<!-- _{filename}_attachments -->
|
12897
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
12929
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
12930
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
12898
12931
|
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
12899
12932
|
</xsl:otherwise>
|
12900
12933
|
</xsl:choose>
|
@@ -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.3.
|
20
|
+
<!-- VERSION v1.3.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">
|
@@ -331,9 +331,9 @@
|
|
331
331
|
<zeroOrMore>
|
332
332
|
<ref name="table-note"/>
|
333
333
|
</zeroOrMore>
|
334
|
-
<
|
334
|
+
<zeroOrMore>
|
335
335
|
<ref name="source"/>
|
336
|
-
</
|
336
|
+
</zeroOrMore>
|
337
337
|
</define>
|
338
338
|
<define name="FigureAttr">
|
339
339
|
<optional>
|
@@ -380,9 +380,9 @@
|
|
380
380
|
<zeroOrMore>
|
381
381
|
<ref name="note"/>
|
382
382
|
</zeroOrMore>
|
383
|
-
<
|
383
|
+
<zeroOrMore>
|
384
384
|
<ref name="source"/>
|
385
|
-
</
|
385
|
+
</zeroOrMore>
|
386
386
|
</define>
|
387
387
|
<define name="source">
|
388
388
|
<element name="source">
|
data/metanorma-ribose.gemspec
CHANGED
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.12
|
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-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0.9'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: xml-c14n
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
description: |
|
168
182
|
metanorma-ribose lets you write Ribose standards in AsciiDoc syntax.
|
169
183
|
|