metanorma-iso 3.5.1.pre.alpha.3 → 3.5.1
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/Gemfile +6 -17
- data/lib/isodoc/iso/iso.amendment.xsl +17 -6
- data/lib/isodoc/iso/iso.international-standard.xsl +17 -6
- data/lib/isodoc/iso/presentation_terms.rb +15 -2
- data/lib/metanorma/iso/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: 831161353a536b05475fec90f22cef8b2709f3e602ba8efe93d8ffdcf1d6ed24
|
|
4
|
+
data.tar.gz: 1cb5e973d0fc7952fe56a26415f647fdf90242d95e54556a2f581f3b5c5695e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bdda034c20c33f234a65a4b07c4adaaf8b2269c61e493366b720ac84e155330b40918c34534742fb545faf5f5198810a9f8f70c6ff7a51968bf3903dbdf3755
|
|
7
|
+
data.tar.gz: 15a94ad86c2d8dc3bc997d23baeb3b0c758317f6ca685d044beab8f8b5c2b93ca4f037ef74705ae2f67beac1063d6b078e1cca5146f873e0b5e893f6af720210
|
data/Gemfile
CHANGED
|
@@ -2,27 +2,16 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
gem "metanorma-mirror", "~> 1.0", github: "metanorma/metanorma-mirror", branch: "main"
|
|
5
|
-
|
|
6
|
-
# names it for resolution (isodoc's range alone is prerelease-blind).
|
|
7
|
-
gem "relaton", "~> 3.0.0.pre.alpha"
|
|
5
|
+
gem "relaton", "~> 3.0"
|
|
8
6
|
|
|
9
7
|
gem "canon"
|
|
10
|
-
|
|
11
|
-
# that the relaton 3 prerelease chain co-resolves with; the released
|
|
12
|
-
# 3.7.3 still pins ~> 1.3.0 and conflicts. Revert to the gem once an
|
|
13
|
-
# isodoc release carries #846.
|
|
14
|
-
gem "isodoc", github: "metanorma/isodoc", branch: "main"
|
|
8
|
+
gem "isodoc", "~> 3.7.4.pre.alpha" # carries the relaton-render range #846
|
|
15
9
|
# plugin-lutaml main carries LutamlDataPreprocessor (registered by
|
|
16
10
|
# standoc main's converter); released 0.7.53 does not define it yet.
|
|
17
11
|
gem "metanorma-plugin-lutaml", github: "metanorma/metanorma-plugin-lutaml", branch: "main"
|
|
18
|
-
gem "metanorma-utils", "~> 2.0
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# gem does not define Standoc::Document yet. Revert to the gem once a
|
|
22
|
-
# standoc release carries it.
|
|
23
|
-
gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"# metanorma-document main carries the relaton-bib 2.2.0.pre allowance;
|
|
24
|
-
# the released 0.5.1 does not yet, so the pin stays until that release.
|
|
25
|
-
gem "metanorma-document", github: "metanorma/metanorma-document", branch: "main"
|
|
12
|
+
gem "metanorma-utils", "~> 2.0" # GcBudget + the array-join table cell buffer
|
|
13
|
+
gem "metanorma-standoc", "~> 3.5.1.pre.alpha" # Standoc::Document split + the pubid-dispatch refs world
|
|
14
|
+
gem "metanorma-document", "~> 0.5.2.pre.alpha" # relaton-bib 2.2.0.pre allowance
|
|
26
15
|
gem "rake"
|
|
27
16
|
# relaton-bib 2.2.0.pre is the pubid-2-native line required by
|
|
28
17
|
# metanorma-document 0.4.0.
|
|
@@ -33,7 +22,7 @@ gem "simplecov"
|
|
|
33
22
|
gem "timecop"
|
|
34
23
|
gem "webmock"
|
|
35
24
|
gem "uniword", path: "../uniword" if File.exist?(File.expand_path("../uniword/Gemfile", __dir__))
|
|
36
|
-
gem "lutaml-model",
|
|
25
|
+
gem "lutaml-model", "~> 0.8"
|
|
37
26
|
# html2doc >= 1.12 is required for correct OMML math handling in Word output
|
|
38
27
|
# (isodoc main also pins ~> 1.12).
|
|
39
28
|
gem "html2doc", "~> 1.12.0"
|
|
@@ -476,12 +476,6 @@
|
|
|
476
476
|
</xsl:variable>
|
|
477
477
|
<xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
|
|
478
478
|
|
|
479
|
-
<xsl:template name="getVariable">
|
|
480
|
-
<xsl:param name="variable"/>
|
|
481
|
-
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
482
|
-
<xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
|
|
483
|
-
</xsl:template>
|
|
484
|
-
|
|
485
479
|
<xsl:variable name="COLUMN_GAP">8.5mm</xsl:variable>
|
|
486
480
|
|
|
487
481
|
<xsl:variable name="PROOF_TEXT">PROOF/ÉPREUVE</xsl:variable>
|
|
@@ -22530,6 +22524,23 @@
|
|
|
22530
22524
|
</xsl:choose>
|
|
22531
22525
|
</xsl:template>
|
|
22532
22526
|
|
|
22527
|
+
<xsl:template name="getVariable">
|
|
22528
|
+
<xsl:param name="variable"/>
|
|
22529
|
+
<!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
|
|
22530
|
+
in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
|
|
22531
|
+
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
22532
|
+
<xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
|
|
22533
|
+
</xsl:template>
|
|
22534
|
+
|
|
22535
|
+
<!-- get variable value with the internal elements(nodes), e.g. formatting -->
|
|
22536
|
+
<xsl:template name="getVariableCopyOf">
|
|
22537
|
+
<xsl:param name="variable"/>
|
|
22538
|
+
<!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
|
|
22539
|
+
in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
|
|
22540
|
+
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
22541
|
+
<xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
|
|
22542
|
+
</xsl:template>
|
|
22543
|
+
|
|
22533
22544
|
<!-- ============================================= -->
|
|
22534
22545
|
<!-- mode="print_as_xml", for debug purposes -->
|
|
22535
22546
|
<!-- ============================================= -->
|
|
@@ -476,12 +476,6 @@
|
|
|
476
476
|
</xsl:variable>
|
|
477
477
|
<xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
|
|
478
478
|
|
|
479
|
-
<xsl:template name="getVariable">
|
|
480
|
-
<xsl:param name="variable"/>
|
|
481
|
-
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
482
|
-
<xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
|
|
483
|
-
</xsl:template>
|
|
484
|
-
|
|
485
479
|
<xsl:variable name="COLUMN_GAP">8.5mm</xsl:variable>
|
|
486
480
|
|
|
487
481
|
<xsl:variable name="PROOF_TEXT">PROOF/ÉPREUVE</xsl:variable>
|
|
@@ -22530,6 +22524,23 @@
|
|
|
22530
22524
|
</xsl:choose>
|
|
22531
22525
|
</xsl:template>
|
|
22532
22526
|
|
|
22527
|
+
<xsl:template name="getVariable">
|
|
22528
|
+
<xsl:param name="variable"/>
|
|
22529
|
+
<!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
|
|
22530
|
+
in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
|
|
22531
|
+
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
22532
|
+
<xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
|
|
22533
|
+
</xsl:template>
|
|
22534
|
+
|
|
22535
|
+
<!-- get variable value with the internal elements(nodes), e.g. formatting -->
|
|
22536
|
+
<xsl:template name="getVariableCopyOf">
|
|
22537
|
+
<xsl:param name="variable"/>
|
|
22538
|
+
<!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
|
|
22539
|
+
in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
|
|
22540
|
+
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
22541
|
+
<xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
|
|
22542
|
+
</xsl:template>
|
|
22543
|
+
|
|
22533
22544
|
<!-- ============================================= -->
|
|
22534
22545
|
<!-- mode="print_as_xml", for debug purposes -->
|
|
22535
22546
|
<!-- ============================================= -->
|
|
@@ -11,7 +11,7 @@ module IsoDoc
|
|
|
11
11
|
concept_term(docxml)
|
|
12
12
|
(docxml.xpath(ns("//concept")) - docxml.xpath(ns("//term//concept")))
|
|
13
13
|
.each do |node|
|
|
14
|
-
node
|
|
14
|
+
in_concept_container?(node) and
|
|
15
15
|
concept_render(node, ital: "false", ref: "false",
|
|
16
16
|
linkref: "true", linkmention: "false")
|
|
17
17
|
end
|
|
@@ -22,12 +22,25 @@ module IsoDoc
|
|
|
22
22
|
m = {}
|
|
23
23
|
(f.xpath(ns(".//concept")) - f.xpath(ns(".//term//concept")))
|
|
24
24
|
.each do |c|
|
|
25
|
-
c
|
|
25
|
+
in_concept_container?(c) and
|
|
26
26
|
concept_term1(c, m)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# Node#ancestors(selector) runs an XPath match per ancestor; with
|
|
32
|
+
# this called per concept on deeply nested terms it is quadratic on
|
|
33
|
+
# large vocabularies. Walk parents directly instead.
|
|
34
|
+
def in_concept_container?(node)
|
|
35
|
+
parent = node.parent
|
|
36
|
+
while parent.is_a?(Nokogiri::XML::Element)
|
|
37
|
+
return true if %w[definition source related].include?(parent.name)
|
|
38
|
+
|
|
39
|
+
parent = parent.parent
|
|
40
|
+
end
|
|
41
|
+
false
|
|
42
|
+
end
|
|
43
|
+
|
|
31
44
|
def concept_term1(node, seen)
|
|
32
45
|
term = to_xml(node.at(ns("./refterm")))
|
|
33
46
|
if term && seen[term]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-iso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.5.1
|
|
4
|
+
version: 3.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-document
|