metanorma-ribose 2.4.2 → 2.4.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/ribose.standard.xsl +66 -9
- data/lib/metanorma/ribose/biblio.rng +28 -25
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc2ec5eeef14d9e06ebd9eca89316b6063d00f6f777d68b60df5d4908efc182e
|
4
|
+
data.tar.gz: 02bede05c476fea899b62630855f888dbf1abc7680ca1b7d9b2cecf1b4ab3f0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0de437c7729d1d4b95faaedc1e7f036b9902f77af20c464051bf957fd80f9c03a4948dde957d5d57fae095742c38bdd789a4cc11687488ffc95d3dfb85d7698
|
7
|
+
data.tar.gz: 10ba2c72751a3c91a9d9451b364a76690ddfe70ad10b197a81bb2d9f27f57d760224b4c2e7dcec86fac63741d8171dcc9d7dc50e24737ba140f51dc80c2962d7
|
@@ -1216,6 +1216,8 @@
|
|
1216
1216
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
1217
1217
|
<xsl:variable name="images" select="document($svg_images)"/>
|
1218
1218
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
1219
|
+
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
1220
|
+
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
1219
1221
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
1220
1222
|
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
|
1221
1223
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
@@ -1268,6 +1270,20 @@
|
|
1268
1270
|
<xsl:call-template name="getLang"/>
|
1269
1271
|
</xsl:variable>
|
1270
1272
|
|
1273
|
+
<xsl:variable name="inputxml_filename_prefix">
|
1274
|
+
<xsl:choose>
|
1275
|
+
<xsl:when test="contains($inputxml_filename, '.presentation.xml')">
|
1276
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
|
1277
|
+
</xsl:when>
|
1278
|
+
<xsl:when test="contains($inputxml_filename, '.xml')">
|
1279
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
|
1280
|
+
</xsl:when>
|
1281
|
+
<xsl:otherwise>
|
1282
|
+
<xsl:value-of select="$inputxml_filename"/>
|
1283
|
+
</xsl:otherwise>
|
1284
|
+
</xsl:choose>
|
1285
|
+
</xsl:variable>
|
1286
|
+
|
1271
1287
|
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
|
1272
1288
|
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
|
1273
1289
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
@@ -2235,6 +2251,10 @@
|
|
2235
2251
|
|
2236
2252
|
</xsl:attribute-set>
|
2237
2253
|
|
2254
|
+
<xsl:template name="refine_figure-block-style">
|
2255
|
+
|
2256
|
+
</xsl:template>
|
2257
|
+
|
2238
2258
|
<xsl:attribute-set name="figure-style">
|
2239
2259
|
<!-- background for image -->
|
2240
2260
|
<xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
|
@@ -3192,7 +3212,7 @@
|
|
3192
3212
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3193
3213
|
|
3194
3214
|
<xsl:variable name="colwidths">
|
3195
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3215
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
|
3196
3216
|
<xsl:call-template name="calculate-column-widths">
|
3197
3217
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3198
3218
|
<xsl:with-param name="table" select="$simple-table"/>
|
@@ -3304,6 +3324,11 @@
|
|
3304
3324
|
<fo:table-column column-width="{@width}"/>
|
3305
3325
|
</xsl:for-each>
|
3306
3326
|
</xsl:when>
|
3327
|
+
<xsl:when test="@class = 'dl'">
|
3328
|
+
<xsl:for-each select=".//*[local-name()='tr'][1]/*">
|
3329
|
+
<fo:table-column column-width="{@width}"/>
|
3330
|
+
</xsl:for-each>
|
3331
|
+
</xsl:when>
|
3307
3332
|
<xsl:otherwise>
|
3308
3333
|
<xsl:call-template name="insertTableColumnWidth">
|
3309
3334
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -4579,6 +4604,7 @@
|
|
4579
4604
|
<!-- ===================== -->
|
4580
4605
|
<!-- Definition List -->
|
4581
4606
|
<!-- ===================== -->
|
4607
|
+
|
4582
4608
|
<xsl:template match="*[local-name()='dl']">
|
4583
4609
|
<xsl:variable name="isAdded" select="@added"/>
|
4584
4610
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -4791,10 +4817,21 @@
|
|
4791
4817
|
</xsl:variable>
|
4792
4818
|
|
4793
4819
|
<xsl:variable name="colwidths">
|
4794
|
-
<xsl:
|
4795
|
-
|
4796
|
-
<xsl:
|
4797
|
-
|
4820
|
+
<xsl:choose>
|
4821
|
+
<!-- dl from table[@class='dl'] -->
|
4822
|
+
<xsl:when test="*[local-name() = 'colgroup']">
|
4823
|
+
<autolayout/>
|
4824
|
+
<xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
|
4825
|
+
<column><xsl:value-of select="translate(@width,'%m','')"/></column>
|
4826
|
+
</xsl:for-each>
|
4827
|
+
</xsl:when>
|
4828
|
+
<xsl:otherwise>
|
4829
|
+
<xsl:call-template name="calculate-column-widths">
|
4830
|
+
<xsl:with-param name="cols-count" select="2"/>
|
4831
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
4832
|
+
</xsl:call-template>
|
4833
|
+
</xsl:otherwise>
|
4834
|
+
</xsl:choose>
|
4798
4835
|
</xsl:variable>
|
4799
4836
|
|
4800
4837
|
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
@@ -6901,6 +6938,12 @@
|
|
6901
6938
|
<xsl:when test="@updatetype = 'true'">
|
6902
6939
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
6903
6940
|
</xsl:when>
|
6941
|
+
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
6942
|
+
<!-- link to the PDF attachment -->
|
6943
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
6944
|
+
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
6945
|
+
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
6946
|
+
</xsl:when>
|
6904
6947
|
<xsl:otherwise>
|
6905
6948
|
<xsl:value-of select="normalize-space(@target)"/>
|
6906
6949
|
</xsl:otherwise>
|
@@ -7310,6 +7353,7 @@
|
|
7310
7353
|
<xsl:variable name="isAdded" select="@added"/>
|
7311
7354
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7312
7355
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7356
|
+
<xsl:call-template name="refine_figure-block-style"/>
|
7313
7357
|
|
7314
7358
|
<xsl:call-template name="setTrackChangesStyles">
|
7315
7359
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -11669,10 +11713,10 @@
|
|
11669
11713
|
|
11670
11714
|
<xsl:template name="addPDFUAmeta">
|
11671
11715
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
11672
|
-
|
11673
|
-
|
11674
|
-
|
11675
|
-
|
11716
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
11717
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
11718
|
+
</pdf:dictionary>
|
11719
|
+
</pdf:catalog>
|
11676
11720
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
11677
11721
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
11678
11722
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
@@ -11724,6 +11768,19 @@
|
|
11724
11768
|
</rdf:Description>
|
11725
11769
|
</rdf:RDF>
|
11726
11770
|
</x:xmpmeta>
|
11771
|
+
<!-- add attachments -->
|
11772
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
11773
|
+
<xsl:choose>
|
11774
|
+
<xsl:when test="normalize-space() != ''">
|
11775
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
|
11776
|
+
</xsl:when>
|
11777
|
+
<xsl:otherwise>
|
11778
|
+
<!-- _{filename}_attachments -->
|
11779
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
11780
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
11781
|
+
</xsl:otherwise>
|
11782
|
+
</xsl:choose>
|
11783
|
+
</xsl:for-each>
|
11727
11784
|
</xsl:template> <!-- addPDFUAmeta -->
|
11728
11785
|
|
11729
11786
|
<xsl:template name="getId">
|
@@ -338,29 +338,32 @@
|
|
338
338
|
</define>
|
339
339
|
<define name="organization">
|
340
340
|
<element name="organization">
|
341
|
-
<
|
342
|
-
<ref name="orgname"/>
|
343
|
-
</oneOrMore>
|
344
|
-
<zeroOrMore>
|
345
|
-
<ref name="subdivision"/>
|
346
|
-
</zeroOrMore>
|
347
|
-
<optional>
|
348
|
-
<ref name="abbreviation"/>
|
349
|
-
</optional>
|
350
|
-
<zeroOrMore>
|
351
|
-
<ref name="uri"/>
|
352
|
-
</zeroOrMore>
|
353
|
-
<zeroOrMore>
|
354
|
-
<ref name="org-identifier"/>
|
355
|
-
</zeroOrMore>
|
356
|
-
<zeroOrMore>
|
357
|
-
<ref name="contact"/>
|
358
|
-
</zeroOrMore>
|
359
|
-
<optional>
|
360
|
-
<ref name="logo"/>
|
361
|
-
</optional>
|
341
|
+
<ref name="OrganizationType"/>
|
362
342
|
</element>
|
363
343
|
</define>
|
344
|
+
<define name="OrganizationType">
|
345
|
+
<oneOrMore>
|
346
|
+
<ref name="orgname"/>
|
347
|
+
</oneOrMore>
|
348
|
+
<zeroOrMore>
|
349
|
+
<ref name="subdivision"/>
|
350
|
+
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="abbreviation"/>
|
353
|
+
</optional>
|
354
|
+
<zeroOrMore>
|
355
|
+
<ref name="uri"/>
|
356
|
+
</zeroOrMore>
|
357
|
+
<zeroOrMore>
|
358
|
+
<ref name="org-identifier"/>
|
359
|
+
</zeroOrMore>
|
360
|
+
<zeroOrMore>
|
361
|
+
<ref name="contact"/>
|
362
|
+
</zeroOrMore>
|
363
|
+
<optional>
|
364
|
+
<ref name="logo"/>
|
365
|
+
</optional>
|
366
|
+
</define>
|
364
367
|
<define name="orgname">
|
365
368
|
<element name="name">
|
366
369
|
<choice>
|
@@ -371,10 +374,10 @@
|
|
371
374
|
</define>
|
372
375
|
<define name="subdivision">
|
373
376
|
<element name="subdivision">
|
374
|
-
<
|
375
|
-
<
|
376
|
-
|
377
|
-
|
377
|
+
<optional>
|
378
|
+
<attribute name="type"/>
|
379
|
+
</optional>
|
380
|
+
<ref name="OrganizationType"/>
|
378
381
|
</element>
|
379
382
|
</define>
|
380
383
|
<define name="logo">
|
data/metanorma-ribose.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
31
31
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~> 2.6.
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 2.6.2"
|
33
33
|
|
34
34
|
spec.add_development_dependency "debug"
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.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-
|
11
|
+
date: 2024-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.6.
|
19
|
+
version: 2.6.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.6.
|
26
|
+
version: 2.6.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|