metanorma-plateau 1.2.1 → 1.2.3
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/plateau/init.rb +2 -1
- data/lib/isodoc/plateau/plateau.international-standard.xsl +25 -9
- data/lib/isodoc/plateau/presentation_xml_convert.rb +1 -1
- data/lib/metanorma/plateau/biblio.rng +18 -8
- data/lib/metanorma/plateau/cleanup.rb +1 -11
- data/lib/metanorma/plateau/converter.rb +8 -6
- data/lib/metanorma/plateau/isodoc.rng +27 -10
- data/lib/metanorma/plateau/version.rb +1 -1
- data/lib/relaton/render-plateau/general.rb +3 -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: 2b4ede8a282db7fb5088115a55e9278b0447cc589054bb791b1b4aa2e489d131
|
|
4
|
+
data.tar.gz: 58fd4dc3eb13d644fc5aad09b802a62d04b802e1c4fd186af425249e838804ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be94be61342f4238cef4b6715d4eb17d818ed3f85ffa4248298f8c3760304d02c69060403a455b7e832e75a61d85ba4c8b3231dc20a8dc3604d96370c65af982
|
|
7
|
+
data.tar.gz: f872733250771b13dca726427203dc2d9a149f611be8b8df9d07e3bbab421abcd8cecd68a46835644f29c0a536254a995b98edcb4ecb3d16efef51f94f70c85e
|
data/lib/isodoc/plateau/init.rb
CHANGED
|
@@ -25,7 +25,8 @@ module IsoDoc
|
|
|
25
25
|
|
|
26
26
|
def bibrenderer(options = {})
|
|
27
27
|
::Relaton::Render::Plateau::General.new(options
|
|
28
|
-
.merge(language: @lang, script: @script, i18nhash: @i18n.get
|
|
28
|
+
.merge(language: @lang, script: @script, i18nhash: @i18n.get,
|
|
29
|
+
config: @relatonrenderconfig))
|
|
29
30
|
end
|
|
30
31
|
end
|
|
31
32
|
end
|
|
@@ -3135,7 +3135,7 @@
|
|
|
3135
3135
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
3136
3136
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
|
3137
3137
|
|
|
3138
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
3138
|
+
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() > 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
3139
3139
|
|
|
3140
3140
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
3141
3141
|
|
|
@@ -11959,10 +11959,10 @@
|
|
|
11959
11959
|
<!-- END Admonition -->
|
|
11960
11960
|
<!-- ================ -->
|
|
11961
11961
|
|
|
11962
|
-
<xsl:attribute-set name="
|
|
11962
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
11963
11963
|
</xsl:attribute-set>
|
|
11964
11964
|
|
|
11965
|
-
<xsl:template name="
|
|
11965
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
11966
11966
|
</xsl:template>
|
|
11967
11967
|
|
|
11968
11968
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -14016,6 +14016,10 @@
|
|
|
14016
14016
|
<!-- ===================================== -->
|
|
14017
14017
|
|
|
14018
14018
|
<xsl:attribute-set name="annex-title-style">
|
|
14019
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
14020
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
14021
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
14022
|
+
<xsl:attribute name="space-before">0mm</xsl:attribute>
|
|
14019
14023
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
14020
14024
|
|
|
14021
14025
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -14160,11 +14164,6 @@
|
|
|
14160
14164
|
<xsl:attribute name="space-before">9mm</xsl:attribute>
|
|
14161
14165
|
<xsl:attribute name="margin-bottom">9mm</xsl:attribute>
|
|
14162
14166
|
</xsl:if>
|
|
14163
|
-
<xsl:if test="ancestor::mn:annex">
|
|
14164
|
-
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
14165
|
-
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
14166
|
-
<xsl:attribute name="space-before">0mm</xsl:attribute>
|
|
14167
|
-
</xsl:if>
|
|
14168
14167
|
<xsl:if test="$doctype = 'technical-report'">
|
|
14169
14168
|
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
14170
14169
|
</xsl:if>
|
|
@@ -14225,6 +14224,20 @@
|
|
|
14225
14224
|
</xsl:if>
|
|
14226
14225
|
</xsl:if>
|
|
14227
14226
|
|
|
14227
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
14228
|
+
<xsl:variable name="annex_title_styles">
|
|
14229
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
14230
|
+
</xsl:variable>
|
|
14231
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
14232
|
+
</xsl:if>
|
|
14233
|
+
|
|
14234
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
14235
|
+
<xsl:variable name="bibliography_title_styles">
|
|
14236
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
14237
|
+
</xsl:variable>
|
|
14238
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
14239
|
+
</xsl:if>
|
|
14240
|
+
|
|
14228
14241
|
<xsl:if test="@type = 'floating-title' or @type = 'section-title'">
|
|
14229
14242
|
<xsl:copy-of select="@id"/>
|
|
14230
14243
|
</xsl:if>
|
|
@@ -14233,9 +14246,12 @@
|
|
|
14233
14246
|
</xsl:template> <!-- refine_title-style -->
|
|
14234
14247
|
|
|
14235
14248
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
14249
|
+
<xsl:param name="num"/>
|
|
14236
14250
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
14237
14251
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
14238
|
-
<xsl:apply-templates select="."
|
|
14252
|
+
<xsl:apply-templates select=".">
|
|
14253
|
+
<xsl:with-param name="num" select="$num"/>
|
|
14254
|
+
</xsl:apply-templates>
|
|
14239
14255
|
</xsl:for-each>
|
|
14240
14256
|
</xsl:template>
|
|
14241
14257
|
|
|
@@ -112,7 +112,7 @@ module IsoDoc
|
|
|
112
112
|
id = elem["bibitemid"] or return
|
|
113
113
|
b = @bibitem_lookup[id] or return
|
|
114
114
|
x = <<~XPATH
|
|
115
|
-
./docidentifier[not(#{
|
|
115
|
+
./docidentifier[not(#{SERIAL_NUM_DOCID} or @scope = 'biblio-tag' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type='title')]
|
|
116
116
|
XPATH
|
|
117
117
|
!b.at(ns(x)) && b.at(ns("./docidentifier[@type='title']"))
|
|
118
118
|
end
|
|
@@ -466,11 +466,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
466
466
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
|
467
467
|
</ref>
|
|
468
468
|
</optional>
|
|
469
|
-
<
|
|
469
|
+
<zeroOrMore>
|
|
470
470
|
<ref name="logo">
|
|
471
471
|
<a:documentation>A logo for the organization</a:documentation>
|
|
472
472
|
</ref>
|
|
473
|
-
</
|
|
473
|
+
</zeroOrMore>
|
|
474
474
|
</define>
|
|
475
475
|
<define name="orgname">
|
|
476
476
|
<element name="name">
|
|
@@ -502,6 +502,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
502
502
|
</define>
|
|
503
503
|
<define name="logo">
|
|
504
504
|
<element name="logo">
|
|
505
|
+
<optional>
|
|
506
|
+
<attribute name="type">
|
|
507
|
+
<a:documentation>The type of logo</a:documentation>
|
|
508
|
+
</attribute>
|
|
509
|
+
</optional>
|
|
505
510
|
<ref name="image-no-id"/>
|
|
506
511
|
</element>
|
|
507
512
|
</define>
|
|
@@ -513,6 +518,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
513
518
|
<a:documentation>Description of what is being depicted</a:documentation>
|
|
514
519
|
</attribute>
|
|
515
520
|
</optional>
|
|
521
|
+
<optional>
|
|
522
|
+
<attribute name="type">
|
|
523
|
+
<a:documentation>Description of what kind of depiction this</a:documentation>
|
|
524
|
+
</attribute>
|
|
525
|
+
</optional>
|
|
516
526
|
<zeroOrMore>
|
|
517
527
|
<ref name="image-no-id">
|
|
518
528
|
<a:documentation>A visual depiction of the bibliographic item</a:documentation>
|
|
@@ -690,7 +700,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
|
|
|
690
700
|
<define name="CitationType">
|
|
691
701
|
<attribute name="bibitemid">
|
|
692
702
|
<a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
|
|
693
|
-
<
|
|
703
|
+
<ref name="IdRefType"/>
|
|
694
704
|
</attribute>
|
|
695
705
|
<choice>
|
|
696
706
|
<zeroOrMore>
|
|
@@ -1236,9 +1246,9 @@ Refer to `BibliographicItem` for definitions</a:documentation>
|
|
|
1236
1246
|
<optional>
|
|
1237
1247
|
<ref name="validity"/>
|
|
1238
1248
|
</optional>
|
|
1239
|
-
<
|
|
1249
|
+
<zeroOrMore>
|
|
1240
1250
|
<ref name="depiction"/>
|
|
1241
|
-
</
|
|
1251
|
+
</zeroOrMore>
|
|
1242
1252
|
</define>
|
|
1243
1253
|
<define name="btitle">
|
|
1244
1254
|
<a:documentation>A title of a bibliographic item, associated with a type of title</a:documentation>
|
|
@@ -1296,17 +1306,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
|
1296
1306
|
</define>
|
|
1297
1307
|
<define name="validityBegins">
|
|
1298
1308
|
<element name="validityBegins">
|
|
1299
|
-
<ref name="
|
|
1309
|
+
<ref name="ISO8601DateTime"/>
|
|
1300
1310
|
</element>
|
|
1301
1311
|
</define>
|
|
1302
1312
|
<define name="validityEnds">
|
|
1303
1313
|
<element name="validityEnds">
|
|
1304
|
-
<ref name="
|
|
1314
|
+
<ref name="ISO8601DateTime"/>
|
|
1305
1315
|
</element>
|
|
1306
1316
|
</define>
|
|
1307
1317
|
<define name="validityRevision">
|
|
1308
1318
|
<element name="revision">
|
|
1309
|
-
<ref name="
|
|
1319
|
+
<ref name="ISO8601DateTime"/>
|
|
1310
1320
|
</element>
|
|
1311
1321
|
</define>
|
|
1312
1322
|
<define name="TypedTitleString">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Metanorma
|
|
2
2
|
module Plateau
|
|
3
3
|
# after term def processed, process source after paragraphs so that
|
|
4
|
-
# the moving of paragraphs there does not
|
|
4
|
+
# the moving of paragraphs there does not include termdef
|
|
5
5
|
class Converter < Jis::Converter
|
|
6
6
|
def termdef_cleanup(xmldoc)
|
|
7
7
|
super
|
|
@@ -13,16 +13,6 @@ module Metanorma
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
# Abandoned in favour of JIS ordering
|
|
17
|
-
# def pub_class(bib)
|
|
18
|
-
# return 1 if bib.at("#{PUBLISHER}[name = '#{pub_hash['en']}']") ||
|
|
19
|
-
# bib.at("#{PUBLISHER}[name = '#{pub_hash['ja']}']") ||
|
|
20
|
-
# bib.at("#{PUBLISHER}[abbreviation = 'MLIT']")
|
|
21
|
-
# return 2 if bib["type"] == "standard"
|
|
22
|
-
#
|
|
23
|
-
# 3
|
|
24
|
-
# end
|
|
25
|
-
|
|
26
16
|
def biblio_reorder(xmldoc)
|
|
27
17
|
xmldoc.xpath("//references").each do |r|
|
|
28
18
|
biblio_reorder1(r)
|
|
@@ -44,8 +44,9 @@ module Metanorma
|
|
|
44
44
|
|
|
45
45
|
def metadata_id(node, xml)
|
|
46
46
|
if id = node.attr("docidentifier")
|
|
47
|
-
xml
|
|
48
|
-
|
|
47
|
+
add_noko_elem(xml, "docidentifier",
|
|
48
|
+
"PLATEAU #{id.sub(/^PLATEAU /, '')}", type: "PLATEAU",
|
|
49
|
+
primary: "true")
|
|
49
50
|
else iso_id(node, xml)
|
|
50
51
|
end
|
|
51
52
|
end
|
|
@@ -53,16 +54,17 @@ module Metanorma
|
|
|
53
54
|
# do not use pubid
|
|
54
55
|
def iso_id(node, xml)
|
|
55
56
|
id = node.attr("docnumber") or return
|
|
56
|
-
xml
|
|
57
|
-
|
|
57
|
+
add_noko_elem(xml, "docidentifier",
|
|
58
|
+
"PLATEAU #{id.sub(/^PLATEAU /, '')}", type: "PLATEAU",
|
|
59
|
+
primary: "true")
|
|
58
60
|
end
|
|
59
61
|
|
|
60
62
|
# do not use pubid
|
|
61
63
|
def metadata_status(node, xml)
|
|
62
64
|
stage = get_stage(node)
|
|
63
65
|
xml.status do |s|
|
|
64
|
-
s
|
|
65
|
-
|
|
66
|
+
add_noko_elem(s, "stage", stage)
|
|
67
|
+
add_noko_elem(s, "iteration", node.attr("iteration"))
|
|
66
68
|
end
|
|
67
69
|
end
|
|
68
70
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<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">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.5 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
|
|
|
905
905
|
</element>
|
|
906
906
|
</define>
|
|
907
907
|
<define name="image" combine="choice">
|
|
908
|
-
<
|
|
909
|
-
<
|
|
910
|
-
|
|
911
|
-
<
|
|
912
|
-
|
|
913
|
-
<
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
908
|
+
<choice>
|
|
909
|
+
<element name="image">
|
|
910
|
+
<ref name="RequiredId"/>
|
|
911
|
+
<ref name="ImageAttributes"/>
|
|
912
|
+
<optional>
|
|
913
|
+
<element name="svg">
|
|
914
|
+
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
915
|
+
<oneOrMore>
|
|
916
|
+
<choice>
|
|
917
|
+
<text/>
|
|
918
|
+
<ref name="AnyElement"/>
|
|
919
|
+
</choice>
|
|
920
|
+
</oneOrMore>
|
|
921
|
+
</element>
|
|
922
|
+
</optional>
|
|
923
|
+
</element>
|
|
924
|
+
<element name="svg">
|
|
925
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
926
|
+
<oneOrMore>
|
|
927
|
+
<choice>
|
|
928
|
+
<text/>
|
|
929
|
+
<ref name="AnyElement"/>
|
|
930
|
+
</choice>
|
|
931
|
+
</oneOrMore>
|
|
932
|
+
</element>
|
|
933
|
+
</choice>
|
|
917
934
|
</define>
|
|
918
935
|
<define name="ParagraphFnBody" combine="interleave">
|
|
919
936
|
<ref name="BlockSource">
|
|
@@ -10,6 +10,7 @@ module Relaton
|
|
|
10
10
|
module Plateau
|
|
11
11
|
class General < ::Relaton::Render::Jis::General
|
|
12
12
|
def initialize(opt = {})
|
|
13
|
+
@configpath = opt[:config]
|
|
13
14
|
i18n = opt[:i18n] ||
|
|
14
15
|
i18n_klass(language: opt[:language], script: opt[:script],
|
|
15
16
|
locale: opt[:locale], i18nhash: opt[:i18nhash])
|
|
@@ -77,7 +78,8 @@ module Relaton
|
|
|
77
78
|
i18n = i18n_config(lang, @i18n.config[@lang]).get
|
|
78
79
|
::Relaton::Render::Plateau::General.new(options
|
|
79
80
|
.deep_merge(yaml)
|
|
80
|
-
.merge(language: lang, script: script, i18nhash: i18n
|
|
81
|
+
.merge(language: lang, script: script, i18nhash: i18n,
|
|
82
|
+
config: @configpath))
|
|
81
83
|
end
|
|
82
84
|
|
|
83
85
|
def bibrenderer_lang_prep(lang)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-plateau
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-jis
|