metanorma-cc 2.4.11 → 2.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +30 -3
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.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: facd0c9522de467534082219cf82fc6c1bcc871defebf31aaf01b6349d144097
|
|
4
|
+
data.tar.gz: c15ab9ee72453f2ae9ee1143f94c45d878a3758c581d268eabcc382d59eeb180
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fcc4a4554181abcabc75f6b4a1e7ef55507f199fc2ff7dc95bbcb04296300b9ddc931d2c84c493f923dd1e9772ede691a68ee829b679e3f947ae036897b945c
|
|
7
|
+
data.tar.gz: cfebbfd36efc24ca4ef056368bb96c08b5fe5beec55e4e8393891130a2585dd355b6d3455b229eff8a816ccb6fae65cf4fe11aea4edc10475df9d4d2aa403fe0
|
|
@@ -6635,18 +6635,33 @@
|
|
|
6635
6635
|
|
|
6636
6636
|
<xsl:template match="*[local-name()='localityStack']"/>
|
|
6637
6637
|
|
|
6638
|
+
<xsl:variable name="pdfAttachmentsList_">
|
|
6639
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
6640
|
+
<attachment filename="{@name}"/>
|
|
6641
|
+
</xsl:for-each>
|
|
6642
|
+
</xsl:variable>
|
|
6643
|
+
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
|
6644
|
+
|
|
6638
6645
|
<xsl:template match="*[local-name()='link']" name="link">
|
|
6646
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
|
6647
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
|
6639
6648
|
<xsl:variable name="target">
|
|
6640
6649
|
<xsl:choose>
|
|
6641
6650
|
<xsl:when test="@updatetype = 'true'">
|
|
6642
6651
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
6643
6652
|
</xsl:when>
|
|
6653
|
+
<!-- link to the PDF attachment -->
|
|
6654
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
6655
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
|
6656
|
+
</xsl:when>
|
|
6657
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
6658
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
|
6659
|
+
</xsl:when>
|
|
6644
6660
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
|
6645
|
-
<!-- link to the PDF attachment -->
|
|
6646
6661
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
|
6647
6662
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
|
6648
6663
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
|
6649
|
-
</xsl:when>
|
|
6664
|
+
</xsl:when> -->
|
|
6650
6665
|
<xsl:otherwise>
|
|
6651
6666
|
<xsl:value-of select="normalize-space(@target)"/>
|
|
6652
6667
|
</xsl:otherwise>
|
|
@@ -11247,6 +11262,17 @@
|
|
|
11247
11262
|
<xsl:copy-of select="."/>
|
|
11248
11263
|
</xsl:template>
|
|
11249
11264
|
|
|
11265
|
+
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
|
11266
|
+
<xsl:copy>
|
|
11267
|
+
<xsl:copy-of select="@*"/>
|
|
11268
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
|
11269
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
|
11270
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
|
11271
|
+
<xsl:value-of select="."/>
|
|
11272
|
+
</xsl:if>
|
|
11273
|
+
</xsl:copy>
|
|
11274
|
+
</xsl:template>
|
|
11275
|
+
|
|
11250
11276
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
|
11251
11277
|
<xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
|
11252
11278
|
<xsl:copy>
|
|
@@ -12121,7 +12147,8 @@
|
|
|
12121
12147
|
</xsl:when>
|
|
12122
12148
|
<xsl:otherwise>
|
|
12123
12149
|
<!-- _{filename}_attachments -->
|
|
12124
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
|
12150
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
|
12151
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
|
12125
12152
|
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
|
12126
12153
|
</xsl:otherwise>
|
|
12127
12154
|
</xsl:choose>
|
data/lib/metanorma/cc/version.rb
CHANGED
data/metanorma-cc.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-cc
|
|
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-cc lets you write CalConnect standards in AsciiDoc syntax.
|
|
169
183
|
|