relaton-cen 1.13.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +0 -1
- data/.github/workflows/release.yml +23 -0
- data/.rubocop.yml +1 -1
- data/Gemfile +9 -1
- data/README.adoc +22 -106
- data/grammars/basicdoc.rng +3 -28
- data/grammars/biblio-standoc.rng +164 -0
- data/grammars/biblio.rng +94 -21
- data/grammars/relaton-cen-compile.rng +11 -0
- data/grammars/relaton-cen.rng +4 -0
- data/grammars/relaton-iso-compile.rng +11 -0
- data/grammars/relaton-iso.rng +225 -0
- data/lib/relaton_cen/biblographic_item.rb +12 -0
- data/lib/relaton_cen/cen_bibliography.rb +0 -7
- data/lib/relaton_cen/hash_converter.rb +11 -0
- data/lib/relaton_cen/hit.rb +1 -1
- data/lib/relaton_cen/hit_collection.rb +0 -2
- data/lib/relaton_cen/processor.rb +2 -2
- data/lib/relaton_cen/scrapper.rb +2 -2
- data/lib/relaton_cen/version.rb +1 -1
- data/lib/relaton_cen/xml_parser.rb +4 -6
- data/lib/relaton_cen.rb +9 -0
- data/relaton_cen.gemspec +5 -15
- metadata +21 -142
- data/grammars/isodoc.rng +0 -2807
- data/grammars/isostandard.rng +0 -514
- data/grammars/reqt.rng +0 -223
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f7e94eea61650c826d444f99d41dd11b0a506b9b5f26b552034db3c5790e69
|
4
|
+
data.tar.gz: 6490ba9f131c3411b1c3b891a9fd7c9b254d6bfafcfc999d47c0405d53ad2eae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6fd2c4264184ee2f48a305307234dc7a9d4ccdf8ad5d2073676dd2813868b40996069664231618a1ad791e91e7f715b3084e765746480584eab9cc4f8a42c0c
|
7
|
+
data.tar.gz: 2fc22a3cbf50790f86fc567eb116344dc0a447f5a476fcc11eb3d61ab451e054efb92906aa46c594ea36d1825d7d146db793f51796d7b8e32c93335fcbb8cfb6
|
data/.github/workflows/rake.yml
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: release
|
4
|
+
|
5
|
+
on:
|
6
|
+
workflow_dispatch:
|
7
|
+
inputs:
|
8
|
+
next_version:
|
9
|
+
description: |
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
11
|
+
required: true
|
12
|
+
default: 'skip'
|
13
|
+
repository_dispatch:
|
14
|
+
types: [ do-release ]
|
15
|
+
|
16
|
+
|
17
|
+
jobs:
|
18
|
+
release:
|
19
|
+
uses: relaton/support/.github/workflows/release.yml@master
|
20
|
+
with:
|
21
|
+
next_version: ${{ github.event.inputs.next_version }}
|
22
|
+
secrets:
|
23
|
+
rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
@@ -5,6 +5,14 @@ source "https://rubygems.org"
|
|
5
5
|
# Specify your gem's dependencies in relaton_cen.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
+
gem "equivalent-xml", "~> 0.6"
|
9
|
+
gem "pry-byebug"
|
8
10
|
gem "rake", "~> 13.0"
|
9
|
-
|
10
11
|
gem "rspec", "~> 3.0"
|
12
|
+
gem "rubocop", "~> 1.17.0"
|
13
|
+
gem "rubocop-performance", "~> 1.11.0"
|
14
|
+
gem "rubocop-rails", "~> 2.10.0"
|
15
|
+
gem "ruby-jing"
|
16
|
+
gem "simplecov"
|
17
|
+
gem "vcr", "~> 5.0.0"
|
18
|
+
gem "webmock"
|
data/README.adoc
CHANGED
@@ -32,6 +32,7 @@ Or install it yourself as:
|
|
32
32
|
[source,ruby]
|
33
33
|
----
|
34
34
|
require 'relaton_cen'
|
35
|
+
=> true
|
35
36
|
|
36
37
|
hit_collection = RelatonCen::CenBibliography.search("CEN ISO/TS 21003-7")
|
37
38
|
=> <RelatonCen::HitCollection:0x00000000017de0 @ref=ISO/TS 21003-7 @fetched=false>
|
@@ -44,112 +45,27 @@ item = hit_collection[0].fetch
|
|
44
45
|
=== XML serialization
|
45
46
|
[source,ruby]
|
46
47
|
----
|
47
|
-
|
48
|
-
"<bibitem id="CENISO/TS21003-7-2019" type="standard">
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=204:110:0::::FSP_PROJECT,FSP_ORG_ID:68120,6137&cs=124CA2347A9843B3165EE35F066A30B7C</uri>
|
54
|
-
<docidentifier type="CEN">CEN ISO/TS 21003-7:2019</docidentifier>
|
55
|
-
<date type="adapted">
|
56
|
-
<on>2019-03-28</on>
|
57
|
-
</date>
|
58
|
-
<date type="issued">
|
59
|
-
<on>2019-05-29</on>
|
60
|
-
</date>
|
61
|
-
<date type="announced">
|
62
|
-
<on>2019-08-31</on>
|
63
|
-
</date>
|
64
|
-
<language>en</language>
|
65
|
-
<script>Latn</script>
|
66
|
-
<abstract format="text/plain" language="en" script="Latn">This document gives requirements and guidance for the assessment of conformity of compounds, products, and assemblies in accordance with the applicable part(s) of ISO 21003 intended to be included in the manufacturer's quality plan as part of the quality management system and for the establishment of certification procedures.
|
67
|
-
In conjunction with the other parts of ISO 21003 (see Foreword), this document is applicable to multilayer piping systems intended to be used for hot and cold water installations within buildings for the conveyance of water, whether or not intended for human consumption (domestic systems) and for heating systems, under design pressures and temperatures appropriate to the class of application (see ISO 21003-1:2008, Table 1).</abstract>
|
68
|
-
<status>
|
69
|
-
<stage>Published</stage>
|
70
|
-
</status>
|
71
|
-
<copyright>
|
72
|
-
<from>2019</from>
|
73
|
-
<owner>
|
74
|
-
<organization>
|
75
|
-
<name>European Committee for Standardization</name>
|
76
|
-
<abbreviation>CEN</abbreviation>
|
77
|
-
<uri>https://cen.eu</uri>
|
78
|
-
</organization>
|
79
|
-
</owner>
|
80
|
-
</copyright>
|
81
|
-
<relation type="obsoletes">
|
82
|
-
<bibitem type="standard">
|
83
|
-
<formattedref format="text/plain" language="en" script="Latn">CEN ISO/TS 21003-7:2008/A1:2010</formattedref>
|
84
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=CENWEB:110:0::::FSP_PROJECT:34670&cs=1739483DB0A85EDABBC435CE39F54C548</uri>
|
85
|
-
</bibitem>
|
86
|
-
</relation>
|
87
|
-
<relation type="obsoletes">
|
88
|
-
<bibitem type="standard">
|
89
|
-
<formattedref format="text/plain" language="en" script="Latn">CEN ISO/TS 21003-7:2008</formattedref>
|
90
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=CENWEB:110:0::::FSP_PROJECT:29120&cs=157CFB37153811CB6097F253DF9B57B89</uri>
|
91
|
-
</bibitem>
|
92
|
-
</relation>
|
93
|
-
<relation type="cites">
|
94
|
-
<bibitem type="standard">
|
95
|
-
<formattedref format="text/plain" language="en" script="Latn">ISO 17456</formattedref>
|
96
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=204:111:0::::FSP_PROJECT_CROSSREF,FSP_PROJECT:ISO-SPACE-17456,68120&cs=1FD4205F9B0E21546A862E6AEB321BD3D</uri>
|
97
|
-
</bibitem>
|
98
|
-
</relation>
|
99
|
-
<relation type="cites">
|
100
|
-
<bibitem type="standard">
|
101
|
-
<formattedref format="text/plain" language="en" script="Latn">ISO 21003-1</formattedref>
|
102
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=204:111:0::::FSP_PROJECT_CROSSREF,FSP_PROJECT:ISO-SPACE-21003-1,68120&cs=1E3BAF63C2639CA9E5C4B5F6B7F300413</uri>
|
103
|
-
</bibitem>
|
104
|
-
</relation>
|
105
|
-
<relation type="cites">
|
106
|
-
<bibitem type="standard">
|
107
|
-
<formattedref format="text/plain" language="en" script="Latn">ISO 21003-2</formattedref>
|
108
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=204:111:0::::FSP_PROJECT_CROSSREF,FSP_PROJECT:ISO-SPACE-21003-2,68120&cs=14788DF9FA188AC4B4ECBD949EB95F25C</uri>
|
109
|
-
</bibitem>
|
110
|
-
</relation>
|
111
|
-
<relation type="cites">
|
112
|
-
<bibitem type="standard">
|
113
|
-
<formattedref format="text/plain" language="en" script="Latn">ISO 21003-3</formattedref>
|
114
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=204:111:0::::FSP_PROJECT_CROSSREF,FSP_PROJECT:ISO-SPACE-21003-3,68120&cs=1DF2256C557AAF0DDCF7D85765E85640B</uri>
|
115
|
-
</bibitem>
|
116
|
-
</relation>
|
117
|
-
<relation type="cites">
|
118
|
-
<bibitem type="standard">
|
119
|
-
<formattedref format="text/plain" language="en" script="Latn">ISO 21003-5</formattedref>
|
120
|
-
<uri type="src">https://standards.cen.eu/dyn/www/f?p=204:111:0::::FSP_PROJECT_CROSSREF,FSP_PROJECT:ISO-SPACE-21003-5,68120&cs=196D7C9FE2A53D9185BE4E4A2DEE23636</uri>
|
121
|
-
</bibitem>
|
122
|
-
</relation>
|
123
|
-
<place>London</place>
|
124
|
-
</bibitem>"
|
48
|
+
item.to_xml
|
49
|
+
=> "<bibitem id="CENISO/TS21003-7-2019" type="standard" schema-version="v1.2.1">
|
50
|
+
<fetched>2022-12-03</fetched>
|
51
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Multilayer piping systems for hot and cold water installations inside buildings</title>
|
52
|
+
...
|
53
|
+
</bibitem>"
|
125
54
|
----
|
126
55
|
|
127
56
|
With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added.
|
128
57
|
[source,ruby]
|
129
58
|
----
|
130
|
-
|
131
|
-
"bibdata type="standard">
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
</
|
140
|
-
<ics>
|
141
|
-
<code>23.040.20</code>
|
142
|
-
<text>Plastics pipes</text>
|
143
|
-
</ics>
|
144
|
-
<ics>
|
145
|
-
<code>91.140.60</code>
|
146
|
-
<text>Water supply systems</text>
|
147
|
-
</ics>
|
148
|
-
<structuredidentifier type="CEN">
|
149
|
-
<project-number part="7">21003</project-number>
|
150
|
-
</structuredidentifier>
|
151
|
-
</ext>
|
152
|
-
</bibdata>"
|
59
|
+
item.to_xml bibdata: true
|
60
|
+
=> "<bibdata type="standard" schema-version="v1.2.1">
|
61
|
+
<fetched>2022-12-03</fetched>
|
62
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">Multilayer piping systems for hot and cold water installations inside buildings</title>
|
63
|
+
...
|
64
|
+
<ext schema-version="v1.0.1">
|
65
|
+
<doctype>international-standard</doctype>
|
66
|
+
...
|
67
|
+
</ext>
|
68
|
+
</bibdata>"
|
153
69
|
----
|
154
70
|
|
155
71
|
=== Typed links
|
@@ -165,7 +81,7 @@ item.link
|
|
165
81
|
=== Get code, and year
|
166
82
|
[source,ruby]
|
167
83
|
----
|
168
|
-
|
84
|
+
RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7:2019"
|
169
85
|
[relaton-cen] ("CEN ISO/TS 21003-7") fetching...
|
170
86
|
[relaton-cen] ("CEN ISO/TS 21003-7") found CEN ISO/TS 21003-7:2019
|
171
87
|
=> #<RelatonIsoBib::IsoBibliographicItem:0x00007fadcd596c58
|
@@ -185,16 +101,16 @@ hash = YAML.load_file 'spec/fixtures/bibdata.yaml'
|
|
185
101
|
=> {"id"=>"CENISO/TS21003-7-2019",
|
186
102
|
...
|
187
103
|
|
188
|
-
|
189
|
-
=> #<
|
104
|
+
RelatonCen::BibliographicItem.from_hash hash
|
105
|
+
=> #<RelatonCen::BibliographicItem:0x00007f9d0118cb58
|
190
106
|
...
|
191
107
|
----
|
192
108
|
|
193
109
|
=== Create bibliographic item from XML
|
194
110
|
[source,ruby]
|
195
111
|
----
|
196
|
-
|
197
|
-
=> #<
|
112
|
+
RelatonCen::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml", encoding: "UTF-8")
|
113
|
+
=> #<RelatonCen::BibliographicItem:0x00007f9cf12bc5b0
|
198
114
|
...
|
199
115
|
----
|
200
116
|
|
data/grammars/basicdoc.rng
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<include href="biblio.rng">
|
4
|
-
<start>
|
5
|
-
<ref name="document"/>
|
6
|
-
</start>
|
7
|
-
</include>
|
8
3
|
<define name="document">
|
9
4
|
<element name="document">
|
10
5
|
<optional>
|
@@ -527,7 +522,6 @@
|
|
527
522
|
<value>tip</value>
|
528
523
|
<value>important</value>
|
529
524
|
<value>caution</value>
|
530
|
-
<value>statement</value>
|
531
525
|
</choice>
|
532
526
|
</define>
|
533
527
|
<define name="figure">
|
@@ -688,6 +682,9 @@
|
|
688
682
|
</define>
|
689
683
|
<define name="underline">
|
690
684
|
<element name="underline">
|
685
|
+
<optional>
|
686
|
+
<attribute name="style"/>
|
687
|
+
</optional>
|
691
688
|
<zeroOrMore>
|
692
689
|
<ref name="PureTextElement"/>
|
693
690
|
</zeroOrMore>
|
@@ -1125,26 +1122,4 @@
|
|
1125
1122
|
</zeroOrMore>
|
1126
1123
|
</element>
|
1127
1124
|
</define>
|
1128
|
-
<define name="ext">
|
1129
|
-
<element name="ext">
|
1130
|
-
<ref name="BibDataExtensionType"/>
|
1131
|
-
</element>
|
1132
|
-
</define>
|
1133
|
-
<define name="BibDataExtensionType">
|
1134
|
-
<ref name="doctype"/>
|
1135
|
-
</define>
|
1136
|
-
<define name="doctype">
|
1137
|
-
<element name="doctype">
|
1138
|
-
<ref name="DocumentType"/>
|
1139
|
-
</element>
|
1140
|
-
</define>
|
1141
|
-
<define name="DocumentType">
|
1142
|
-
<value>document</value>
|
1143
|
-
</define>
|
1144
|
-
<define name="BibData">
|
1145
|
-
<ref name="BibliographicItem"/>
|
1146
|
-
<optional>
|
1147
|
-
<ref name="ext"/>
|
1148
|
-
</optional>
|
1149
|
-
</define>
|
1150
1125
|
</grammar>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
3
|
+
<!--
|
4
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
|
+
of relaton
|
6
|
+
|
7
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
8
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
9
|
+
-->
|
10
|
+
<include href="biblio.rng">
|
11
|
+
<define name="BibData">
|
12
|
+
<ref name="BibliographicItem"/>
|
13
|
+
<optional>
|
14
|
+
<ref name="ext"/>
|
15
|
+
</optional>
|
16
|
+
</define>
|
17
|
+
</include>
|
18
|
+
<define name="ext">
|
19
|
+
<element name="ext">
|
20
|
+
<ref name="BibDataExtensionType"/>
|
21
|
+
</element>
|
22
|
+
</define>
|
23
|
+
<define name="BibDataExtensionType">
|
24
|
+
<optional>
|
25
|
+
<attribute name="schema-version"/>
|
26
|
+
</optional>
|
27
|
+
<ref name="doctype"/>
|
28
|
+
<optional>
|
29
|
+
<ref name="docsubtype"/>
|
30
|
+
</optional>
|
31
|
+
<optional>
|
32
|
+
<ref name="editorialgroup"/>
|
33
|
+
</optional>
|
34
|
+
<zeroOrMore>
|
35
|
+
<ref name="ics"/>
|
36
|
+
</zeroOrMore>
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="structuredidentifier"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</define>
|
41
|
+
<define name="doctype">
|
42
|
+
<element name="doctype">
|
43
|
+
<optional>
|
44
|
+
<attribute name="abbreviation"/>
|
45
|
+
</optional>
|
46
|
+
<ref name="DocumentType"/>
|
47
|
+
</element>
|
48
|
+
</define>
|
49
|
+
<define name="DocumentType">
|
50
|
+
<text/>
|
51
|
+
</define>
|
52
|
+
<define name="docsubtype">
|
53
|
+
<element name="subdoctype">
|
54
|
+
<ref name="DocumentSubtype"/>
|
55
|
+
</element>
|
56
|
+
</define>
|
57
|
+
<define name="DocumentSubtype">
|
58
|
+
<text/>
|
59
|
+
</define>
|
60
|
+
<define name="editorialgroup">
|
61
|
+
<element name="editorialgroup">
|
62
|
+
<oneOrMore>
|
63
|
+
<ref name="technical-committee"/>
|
64
|
+
</oneOrMore>
|
65
|
+
</element>
|
66
|
+
</define>
|
67
|
+
<define name="technical-committee">
|
68
|
+
<element name="technical-committee">
|
69
|
+
<ref name="IsoWorkgroup"/>
|
70
|
+
</element>
|
71
|
+
</define>
|
72
|
+
<define name="IsoWorkgroup">
|
73
|
+
<optional>
|
74
|
+
<attribute name="number"/>
|
75
|
+
</optional>
|
76
|
+
<optional>
|
77
|
+
<attribute name="type"/>
|
78
|
+
</optional>
|
79
|
+
<optional>
|
80
|
+
<attribute name="identifier"/>
|
81
|
+
</optional>
|
82
|
+
<optional>
|
83
|
+
<attribute name="prefix"/>
|
84
|
+
</optional>
|
85
|
+
<text/>
|
86
|
+
</define>
|
87
|
+
<define name="ics">
|
88
|
+
<element name="ics">
|
89
|
+
<element name="code">
|
90
|
+
<text/>
|
91
|
+
</element>
|
92
|
+
<optional>
|
93
|
+
<element name="text">
|
94
|
+
<text/>
|
95
|
+
</element>
|
96
|
+
</optional>
|
97
|
+
</element>
|
98
|
+
</define>
|
99
|
+
<define name="structuredidentifier">
|
100
|
+
<element name="structuredidentifier">
|
101
|
+
<optional>
|
102
|
+
<attribute name="type"/>
|
103
|
+
</optional>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="agency">
|
106
|
+
<text/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
<optional>
|
110
|
+
<element name="class">
|
111
|
+
<text/>
|
112
|
+
</element>
|
113
|
+
</optional>
|
114
|
+
<element name="docnumber">
|
115
|
+
<text/>
|
116
|
+
</element>
|
117
|
+
<optional>
|
118
|
+
<element name="partnumber">
|
119
|
+
<text/>
|
120
|
+
</element>
|
121
|
+
</optional>
|
122
|
+
<optional>
|
123
|
+
<element name="edition">
|
124
|
+
<text/>
|
125
|
+
</element>
|
126
|
+
</optional>
|
127
|
+
<optional>
|
128
|
+
<element name="version">
|
129
|
+
<text/>
|
130
|
+
</element>
|
131
|
+
</optional>
|
132
|
+
<optional>
|
133
|
+
<element name="supplementtype">
|
134
|
+
<text/>
|
135
|
+
</element>
|
136
|
+
</optional>
|
137
|
+
<optional>
|
138
|
+
<element name="supplementnumber">
|
139
|
+
<text/>
|
140
|
+
</element>
|
141
|
+
</optional>
|
142
|
+
<optional>
|
143
|
+
<element name="amendment">
|
144
|
+
<text/>
|
145
|
+
</element>
|
146
|
+
</optional>
|
147
|
+
<optional>
|
148
|
+
<element name="corrigendum">
|
149
|
+
<text/>
|
150
|
+
</element>
|
151
|
+
</optional>
|
152
|
+
<optional>
|
153
|
+
<element name="language">
|
154
|
+
<text/>
|
155
|
+
</element>
|
156
|
+
</optional>
|
157
|
+
<optional>
|
158
|
+
<element name="year">
|
159
|
+
<text/>
|
160
|
+
</element>
|
161
|
+
</optional>
|
162
|
+
</element>
|
163
|
+
</define>
|
164
|
+
</grammar>
|