metanorma-unece 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/unece/biblio.rng +33 -51
- data/lib/asciidoctor/unece/converter.rb +0 -13
- data/lib/asciidoctor/unece/isodoc.rng +6 -1
- data/lib/asciidoctor/unece/isostandard.rng +3 -10
- data/lib/isodoc/unece/html/htmlstyle.scss +1 -1
- data/lib/isodoc/unece/html/unece.scss +38 -0
- data/lib/isodoc/unece/html_convert.rb +2 -2
- data/lib/isodoc/unece/word_convert.rb +1 -1
- data/lib/metanorma/unece/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: d57ec6b1ffe41604dea3328e8505de9814849ecf913324e30c5e8f1ae4821fc4
|
4
|
+
data.tar.gz: 9cef0ef017720fd8b7e121fe364cbee2d43fcfb051ffa2f52d04a78e37e0d476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be0195806b5f0c4b981aadb4b8b7069adebd76147d94aa16908583f9450feac754505d9ca64c8c63c545641669f5210472d01957b8268ef489d278bae4fc63be
|
7
|
+
data.tar.gz: fd9ce24b37a37692142aafb21ee974b1c1f6ba06967bc35595107a7e895367025b504a7578451ba1fd1b1a5c0fce3aa0a75359d0f4d20b1df62e98758ba4db99
|
@@ -18,6 +18,21 @@
|
|
18
18
|
of this.
|
19
19
|
-->
|
20
20
|
<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">
|
21
|
+
<!--
|
22
|
+
https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
|
23
|
+
iso8601date = xsd:string { pattern = "([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?" }
|
24
|
+
Somewhat dumbed down for XSD regex:
|
25
|
+
-->
|
26
|
+
<define name="ISO8601DateTime">
|
27
|
+
<data type="string">
|
28
|
+
<param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+)?)?((:?)[0-5]\d([.,]\d+)?)?([zZ]|([\+\-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?</param>
|
29
|
+
</data>
|
30
|
+
</define>
|
31
|
+
<define name="ISO8601Date">
|
32
|
+
<data type="string">
|
33
|
+
<param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
|
34
|
+
</data>
|
35
|
+
</define>
|
21
36
|
<define name="status">
|
22
37
|
<element name="status">
|
23
38
|
<ref name="LocalizedString"/>
|
@@ -375,10 +390,7 @@
|
|
375
390
|
</define>
|
376
391
|
<define name="date">
|
377
392
|
<element name="date">
|
378
|
-
<
|
379
|
-
<data type="gYear"/>
|
380
|
-
<data type="date"/>
|
381
|
-
</choice>
|
393
|
+
<ref name="ISO8601Date"/>
|
382
394
|
</element>
|
383
395
|
</define>
|
384
396
|
<define name="locality">
|
@@ -561,10 +573,7 @@
|
|
561
573
|
</define>
|
562
574
|
<define name="fetched">
|
563
575
|
<element name="fetched">
|
564
|
-
<
|
565
|
-
<data type="dateTime"/>
|
566
|
-
<data type="date"/>
|
567
|
-
</choice>
|
576
|
+
<ref name="ISO8601DateTime"/>
|
568
577
|
</element>
|
569
578
|
</define>
|
570
579
|
<define name="validity">
|
@@ -582,26 +591,17 @@
|
|
582
591
|
</define>
|
583
592
|
<define name="validityBegins">
|
584
593
|
<element name="validityBegins">
|
585
|
-
<
|
586
|
-
<data type="dateTime"/>
|
587
|
-
<data type="date"/>
|
588
|
-
</choice>
|
594
|
+
<ref name="ISO8601DateTime"/>
|
589
595
|
</element>
|
590
596
|
</define>
|
591
597
|
<define name="validityEnds">
|
592
598
|
<element name="validityEnds">
|
593
|
-
<
|
594
|
-
<data type="dateTime"/>
|
595
|
-
<data type="date"/>
|
596
|
-
</choice>
|
599
|
+
<ref name="ISO8601DateTime"/>
|
597
600
|
</element>
|
598
601
|
</define>
|
599
602
|
<define name="validityRevision">
|
600
603
|
<element name="revision">
|
601
|
-
<
|
602
|
-
<data type="dateTime"/>
|
603
|
-
<data type="date"/>
|
604
|
-
</choice>
|
604
|
+
<ref name="ISO8601DateTime"/>
|
605
605
|
</element>
|
606
606
|
</define>
|
607
607
|
<define name="TypedTitleString">
|
@@ -632,10 +632,7 @@
|
|
632
632
|
<attribute name="text"/>
|
633
633
|
</optional>
|
634
634
|
<optional>
|
635
|
-
<
|
636
|
-
<data type="gYear"/>
|
637
|
-
<data type="date"/>
|
638
|
-
</choice>
|
635
|
+
<ref name="ISO8601Date"/>
|
639
636
|
</optional>
|
640
637
|
</define>
|
641
638
|
<define name="bdate">
|
@@ -660,25 +657,16 @@
|
|
660
657
|
<choice>
|
661
658
|
<group>
|
662
659
|
<element name="from">
|
663
|
-
<
|
664
|
-
<data type="gYear"/>
|
665
|
-
<data type="date"/>
|
666
|
-
</choice>
|
660
|
+
<ref name="ISO8601Date"/>
|
667
661
|
</element>
|
668
662
|
<optional>
|
669
663
|
<element name="to">
|
670
|
-
<
|
671
|
-
<data type="gYear"/>
|
672
|
-
<data type="date"/>
|
673
|
-
</choice>
|
664
|
+
<ref name="ISO8601Date"/>
|
674
665
|
</element>
|
675
666
|
</optional>
|
676
667
|
</group>
|
677
668
|
<element name="on">
|
678
|
-
<
|
679
|
-
<data type="gYear"/>
|
680
|
-
<data type="date"/>
|
681
|
-
</choice>
|
669
|
+
<ref name="ISO8601Date"/>
|
682
670
|
</element>
|
683
671
|
</choice>
|
684
672
|
</element>
|
@@ -791,20 +779,12 @@
|
|
791
779
|
</define>
|
792
780
|
<define name="seriesfrom">
|
793
781
|
<element name="from">
|
794
|
-
<
|
795
|
-
<data type="dateTime"/>
|
796
|
-
<data type="date"/>
|
797
|
-
<data type="gYear"/>
|
798
|
-
</choice>
|
782
|
+
<ref name="ISO8601Date"/>
|
799
783
|
</element>
|
800
784
|
</define>
|
801
785
|
<define name="seriesto">
|
802
786
|
<element name="to">
|
803
|
-
<
|
804
|
-
<data type="dateTime"/>
|
805
|
-
<data type="date"/>
|
806
|
-
<data type="gYear"/>
|
807
|
-
</choice>
|
787
|
+
<ref name="ISO8601Date"/>
|
808
788
|
</element>
|
809
789
|
</define>
|
810
790
|
<define name="seriesnumber">
|
@@ -899,7 +879,7 @@
|
|
899
879
|
</define>
|
900
880
|
<define name="revision-date">
|
901
881
|
<element name="revision-date">
|
902
|
-
<
|
882
|
+
<ref name="ISO8601Date"/>
|
903
883
|
</element>
|
904
884
|
</define>
|
905
885
|
<define name="draft">
|
@@ -922,10 +902,12 @@
|
|
922
902
|
<define name="AnyElement">
|
923
903
|
<element>
|
924
904
|
<anyName/>
|
925
|
-
<
|
926
|
-
<
|
927
|
-
|
928
|
-
|
905
|
+
<oneOrMore>
|
906
|
+
<choice>
|
907
|
+
<text/>
|
908
|
+
<ref name="AnyElement"/>
|
909
|
+
</choice>
|
910
|
+
</oneOrMore>
|
929
911
|
</element>
|
930
912
|
</define>
|
931
913
|
</grammar>
|
@@ -193,19 +193,6 @@ module Asciidoctor
|
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
196
|
-
def admonition(node)
|
197
|
-
return termnote(node) if in_terms?
|
198
|
-
return note(node) if node.attr("name") == "note"
|
199
|
-
noko do |xml|
|
200
|
-
xml.admonition **admonition_attrs(node) do |a|
|
201
|
-
unless node.title.nil?
|
202
|
-
a.name { |name| name << node.title }
|
203
|
-
end
|
204
|
-
wrap_in_para(node, a)
|
205
|
-
end
|
206
|
-
end.join("\n")
|
207
|
-
end
|
208
|
-
|
209
196
|
def clause_parse(attrs, xml, node)
|
210
197
|
abstract_parse(attrs, xml, node) && return if node.attr("style") == "abstract"
|
211
198
|
super
|
@@ -250,24 +250,17 @@
|
|
250
250
|
<choice>
|
251
251
|
<group>
|
252
252
|
<element name="from">
|
253
|
-
<
|
254
|
-
<data type="gYear"/>
|
255
|
-
<data type="date"/>
|
256
|
-
</choice>
|
253
|
+
<ref name="ISO8601Date"/>
|
257
254
|
</element>
|
258
255
|
<optional>
|
259
256
|
<element name="to">
|
260
|
-
<
|
261
|
-
<data type="gYear"/>
|
262
|
-
<data type="date"/>
|
263
|
-
</choice>
|
257
|
+
<ref name="ISO8601Date"/>
|
264
258
|
</element>
|
265
259
|
</optional>
|
266
260
|
</group>
|
267
261
|
<element name="on">
|
268
262
|
<choice>
|
269
|
-
<
|
270
|
-
<data type="date"/>
|
263
|
+
<ref name="ISO8601Date"/>
|
271
264
|
<value>--</value>
|
272
265
|
</choice>
|
273
266
|
</element>
|
@@ -69,6 +69,44 @@ p.FigureTitle
|
|
69
69
|
mso-fareast-font-family:$bodyfont;
|
70
70
|
mso-bidi-font-family:$bodyfont;
|
71
71
|
mso-ansi-language:EN-GB;}
|
72
|
+
p.SourceTitle
|
73
|
+
{mso-style-unhide:no;
|
74
|
+
mso-style-qformat:yes;
|
75
|
+
mso-style-parent:"";
|
76
|
+
margin-top:0cm;
|
77
|
+
margin-right:0cm;
|
78
|
+
margin-bottom:6.0pt;
|
79
|
+
margin-left:0cm;
|
80
|
+
text-align:center;
|
81
|
+
line-height:12.0pt;
|
82
|
+
page-break-before:avoid;
|
83
|
+
mso-pagination:widow-orphan;
|
84
|
+
tab-stops:20.15pt;
|
85
|
+
font-size:11.0pt;
|
86
|
+
font-weight:bold;
|
87
|
+
font-family:$bodyfont;
|
88
|
+
mso-fareast-font-family:$bodyfont;
|
89
|
+
mso-bidi-font-family:$bodyfont;
|
90
|
+
mso-ansi-language:EN-GB;}
|
91
|
+
p.AdmonitionTitle
|
92
|
+
{mso-style-unhide:no;
|
93
|
+
mso-style-qformat:yes;
|
94
|
+
mso-style-parent:"";
|
95
|
+
margin-top:0cm;
|
96
|
+
margin-right:0cm;
|
97
|
+
margin-bottom:6.0pt;
|
98
|
+
margin-left:0cm;
|
99
|
+
text-align:center;
|
100
|
+
line-height:12.0pt;
|
101
|
+
page-break-after:avoid;
|
102
|
+
mso-pagination:widow-orphan;
|
103
|
+
tab-stops:20.15pt;
|
104
|
+
font-size:11.0pt;
|
105
|
+
font-weight:bold;
|
106
|
+
font-family:$bodyfont;
|
107
|
+
mso-fareast-font-family:$bodyfont;
|
108
|
+
mso-bidi-font-family:$bodyfont;
|
109
|
+
mso-ansi-language:EN-GB;}
|
72
110
|
p.TableTitle
|
73
111
|
{mso-style-unhide:no;
|
74
112
|
mso-style-qformat:yes;
|
@@ -16,8 +16,8 @@ module IsoDoc
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def convert1(docxml, filename, dir)
|
19
|
-
FileUtils.cp html_doc_path('logo.jpg'), "logo.jpg"
|
20
|
-
@files_to_delete << "logo.jpg"
|
19
|
+
FileUtils.cp html_doc_path('logo.jpg'), File.join(@localdir, "logo.jpg")
|
20
|
+
@files_to_delete << File.join(@localdir, "logo.jpg")
|
21
21
|
super
|
22
22
|
end
|
23
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-unece
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|