metanorma-standoc 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/standoc/biblio.rng +102 -5
- data/lib/metanorma/standoc/blocks.rb +3 -6
- data/lib/metanorma/standoc/cleanup_xref.rb +2 -1
- data/lib/metanorma/standoc/isodoc.rng +7 -0
- data/lib/metanorma/standoc/ref_sect.rb +2 -1
- data/lib/metanorma/standoc/section.rb +1 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- data/spec/metanorma/cleanup_spec.rb +1 -1
- data/spec/metanorma/refs_spec.rb +111 -117
- data/spec/vcr_cassettes/bsi16341.yml +36 -36
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +50 -50
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +13 -13
- data/spec/vcr_cassettes/hide_refs.yml +62 -62
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +27 -27
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +36 -36
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_124.yml +11 -11
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +228 -52
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +55 -55
- data/spec/vcr_cassettes/std-link.yml +15 -15
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 322efef58275c5330db01582e8ead5ea9c5c496e8a6c5e96aafd8c8413a4412f
|
4
|
+
data.tar.gz: f88ff574288ee6159fd0e4b05eb076767daede15afd3187d2de05dc1aae295bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88c019751884a354f2217c7f67798365e4dfa4fdf15f573f8fa95d98b65abb483da40e6a5f8bd6c1fedb76a8d5d1fe72417cff24b94224bd5ecb625389dd926
|
7
|
+
data.tar.gz: 4eaa00800dc54f99af38e012923472d50215308e8ba96d2ebe8414ffb9e38c266a0de29e18fc80ba2536d82c7f47ea0df8bea8b892d7610c7d67b46d088bf430
|
@@ -623,6 +623,97 @@
|
|
623
623
|
<zeroOrMore>
|
624
624
|
<ref name="bsource"/>
|
625
625
|
</zeroOrMore>
|
626
|
+
<oneOrMore>
|
627
|
+
<ref name="docidentifier"/>
|
628
|
+
</oneOrMore>
|
629
|
+
<optional>
|
630
|
+
<ref name="docnumber"/>
|
631
|
+
</optional>
|
632
|
+
<zeroOrMore>
|
633
|
+
<ref name="bdate"/>
|
634
|
+
</zeroOrMore>
|
635
|
+
<zeroOrMore>
|
636
|
+
<ref name="contributor"/>
|
637
|
+
</zeroOrMore>
|
638
|
+
<optional>
|
639
|
+
<ref name="edition"/>
|
640
|
+
</optional>
|
641
|
+
<zeroOrMore>
|
642
|
+
<ref name="version"/>
|
643
|
+
</zeroOrMore>
|
644
|
+
<zeroOrMore>
|
645
|
+
<ref name="biblionote"/>
|
646
|
+
</zeroOrMore>
|
647
|
+
<zeroOrMore>
|
648
|
+
<ref name="language"/>
|
649
|
+
</zeroOrMore>
|
650
|
+
<zeroOrMore>
|
651
|
+
<ref name="script"/>
|
652
|
+
</zeroOrMore>
|
653
|
+
<zeroOrMore>
|
654
|
+
<ref name="bibabstract"/>
|
655
|
+
</zeroOrMore>
|
656
|
+
<optional>
|
657
|
+
<ref name="status"/>
|
658
|
+
</optional>
|
659
|
+
<zeroOrMore>
|
660
|
+
<ref name="copyright"/>
|
661
|
+
</zeroOrMore>
|
662
|
+
<zeroOrMore>
|
663
|
+
<ref name="docrelation"/>
|
664
|
+
</zeroOrMore>
|
665
|
+
<zeroOrMore>
|
666
|
+
<ref name="series"/>
|
667
|
+
</zeroOrMore>
|
668
|
+
<optional>
|
669
|
+
<ref name="medium"/>
|
670
|
+
</optional>
|
671
|
+
<zeroOrMore>
|
672
|
+
<ref name="bplace"/>
|
673
|
+
</zeroOrMore>
|
674
|
+
<zeroOrMore>
|
675
|
+
<ref name="bprice"/>
|
676
|
+
</zeroOrMore>
|
677
|
+
<zeroOrMore>
|
678
|
+
<ref name="extent"/>
|
679
|
+
</zeroOrMore>
|
680
|
+
<optional>
|
681
|
+
<ref name="bibliographic_size"/>
|
682
|
+
</optional>
|
683
|
+
<zeroOrMore>
|
684
|
+
<ref name="accesslocation"/>
|
685
|
+
</zeroOrMore>
|
686
|
+
<zeroOrMore>
|
687
|
+
<ref name="license"/>
|
688
|
+
</zeroOrMore>
|
689
|
+
<zeroOrMore>
|
690
|
+
<ref name="bclassification"/>
|
691
|
+
</zeroOrMore>
|
692
|
+
<zeroOrMore>
|
693
|
+
<ref name="bkeyword"/>
|
694
|
+
</zeroOrMore>
|
695
|
+
<optional>
|
696
|
+
<ref name="validity"/>
|
697
|
+
</optional>
|
698
|
+
</define>
|
699
|
+
<define name="ReducedBibliographicItem">
|
700
|
+
<optional>
|
701
|
+
<attribute name="type">
|
702
|
+
<ref name="BibItemType"/>
|
703
|
+
</attribute>
|
704
|
+
</optional>
|
705
|
+
<optional>
|
706
|
+
<ref name="fetched"/>
|
707
|
+
</optional>
|
708
|
+
<optional>
|
709
|
+
<ref name="formattedref"/>
|
710
|
+
</optional>
|
711
|
+
<zeroOrMore>
|
712
|
+
<ref name="btitle"/>
|
713
|
+
</zeroOrMore>
|
714
|
+
<zeroOrMore>
|
715
|
+
<ref name="bsource"/>
|
716
|
+
</zeroOrMore>
|
626
717
|
<zeroOrMore>
|
627
718
|
<ref name="docidentifier"/>
|
628
719
|
</zeroOrMore>
|
@@ -638,9 +729,9 @@
|
|
638
729
|
<optional>
|
639
730
|
<ref name="edition"/>
|
640
731
|
</optional>
|
641
|
-
<
|
732
|
+
<zeroOrMore>
|
642
733
|
<ref name="version"/>
|
643
|
-
</
|
734
|
+
</zeroOrMore>
|
644
735
|
<zeroOrMore>
|
645
736
|
<ref name="biblionote"/>
|
646
737
|
</zeroOrMore>
|
@@ -833,6 +924,12 @@
|
|
833
924
|
<data type="boolean"/>
|
834
925
|
</attribute>
|
835
926
|
</optional>
|
927
|
+
<optional>
|
928
|
+
<attribute name="language"/>
|
929
|
+
</optional>
|
930
|
+
<optional>
|
931
|
+
<attribute name="script"/>
|
932
|
+
</optional>
|
836
933
|
<text/>
|
837
934
|
</element>
|
838
935
|
</define>
|
@@ -1172,7 +1269,7 @@
|
|
1172
1269
|
</element>
|
1173
1270
|
</optional>
|
1174
1271
|
<element name="bibitem">
|
1175
|
-
<ref name="
|
1272
|
+
<ref name="ReducedBibliographicItem"/>
|
1176
1273
|
</element>
|
1177
1274
|
<choice>
|
1178
1275
|
<zeroOrMore>
|
@@ -1197,9 +1294,9 @@
|
|
1197
1294
|
<optional>
|
1198
1295
|
<ref name="revision-date"/>
|
1199
1296
|
</optional>
|
1200
|
-
<
|
1297
|
+
<optional>
|
1201
1298
|
<ref name="draft"/>
|
1202
|
-
</
|
1299
|
+
</optional>
|
1203
1300
|
</element>
|
1204
1301
|
</define>
|
1205
1302
|
<define name="vedition">
|
@@ -38,9 +38,7 @@ module Metanorma
|
|
38
38
|
role == "form" and return form(node)
|
39
39
|
role == "definition" and return termdefinition(node)
|
40
40
|
result = []
|
41
|
-
node.blocks.each
|
42
|
-
result << send(b.context, b)
|
43
|
-
end
|
41
|
+
node.blocks.each { |b| result << send(b.context, b) }
|
44
42
|
result
|
45
43
|
end
|
46
44
|
|
@@ -82,7 +80,7 @@ module Metanorma
|
|
82
80
|
noko do |xml|
|
83
81
|
xml.termexample **attr_code(id_attr(node)
|
84
82
|
.merge(
|
85
|
-
keepasterm: node.option?("termexample")
|
83
|
+
keepasterm: node.option?("termexample") || nil,
|
86
84
|
)) do |ex|
|
87
85
|
wrap_in_para(node, ex)
|
88
86
|
end
|
@@ -244,8 +242,7 @@ module Metanorma
|
|
244
242
|
noko do |xml|
|
245
243
|
xml.passthrough **attr_code(formats:
|
246
244
|
node.attr("format") || "metanorma") do |p|
|
247
|
-
p << c.encode(c.decode(node.content),
|
248
|
-
:basic, :hexadecimal)
|
245
|
+
p << c.encode(c.decode(node.content), :basic, :hexadecimal)
|
249
246
|
end
|
250
247
|
end
|
251
248
|
end
|
@@ -68,9 +68,10 @@ module Metanorma
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def xref_to_eref(elem)
|
71
|
+
c = HTMLEntities.new
|
71
72
|
elem["bibitemid"] = elem["target"]
|
72
73
|
if ref = @anchors&.dig(elem["target"], :xref)
|
73
|
-
elem["citeas"] =
|
74
|
+
elem["citeas"] = c.decode(ref)
|
74
75
|
else
|
75
76
|
elem["citeas"] = ""
|
76
77
|
xref_to_eref1(elem)
|
@@ -703,6 +703,9 @@
|
|
703
703
|
<optional>
|
704
704
|
<attribute name="tag"/>
|
705
705
|
</optional>
|
706
|
+
<optional>
|
707
|
+
<attribute name="type"/>
|
708
|
+
</optional>
|
706
709
|
<optional>
|
707
710
|
<attribute name="multilingual-rendering">
|
708
711
|
<ref name="MultilingualRenderingType"/>
|
@@ -738,6 +741,9 @@
|
|
738
741
|
<optional>
|
739
742
|
<attribute name="tag"/>
|
740
743
|
</optional>
|
744
|
+
<optional>
|
745
|
+
<attribute name="type"/>
|
746
|
+
</optional>
|
741
747
|
<optional>
|
742
748
|
<attribute name="multilingual-rendering">
|
743
749
|
<ref name="MultilingualRenderingType"/>
|
@@ -2059,6 +2065,7 @@
|
|
2059
2065
|
<value>compare</value>
|
2060
2066
|
<value>contrast</value>
|
2061
2067
|
<value>see</value>
|
2068
|
+
<value>seealso</value>
|
2062
2069
|
</choice>
|
2063
2070
|
</define>
|
2064
2071
|
<define name="deprecates">
|
@@ -84,7 +84,8 @@ module Metanorma
|
|
84
84
|
if ref[:code].nil? || ref[:no_year] || @bibdb.nil?
|
85
85
|
res << [ref, idx, nil]
|
86
86
|
else
|
87
|
-
@bibdb.fetch_async(ref[:code],
|
87
|
+
@bibdb.fetch_async(HTMLEntities.new.decode(ref[:code]),
|
88
|
+
ref[:year], ref) do |doc|
|
88
89
|
res << [ref, idx, doc]
|
89
90
|
end
|
90
91
|
end
|
@@ -152,7 +152,7 @@ module Metanorma
|
|
152
152
|
attrs[:bibitem] = true if node.option? "bibitem"
|
153
153
|
attrs[:level] = node.attr("level")
|
154
154
|
set_obligation(attrs, node)
|
155
|
-
xml.send
|
155
|
+
xml.send :clause, **attr_code(attrs) do |xml_section|
|
156
156
|
xml_section.title { |n| n << node.title } unless node.title.nil?
|
157
157
|
xml_section << node.content
|
158
158
|
end
|
data/metanorma-standoc.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_dependency "latexmath"
|
39
39
|
spec.add_dependency "mathml2asciimath"
|
40
40
|
spec.add_dependency "metanorma-utils", "~> 1.2.8"
|
41
|
-
spec.add_dependency "relaton-cli", "~> 1.
|
41
|
+
spec.add_dependency "relaton-cli", "~> 1.11.0"
|
42
42
|
spec.add_dependency "relaton-iev", "~> 1.1.0"
|
43
43
|
spec.add_dependency "unicode2latex", "~> 0.0.1"
|
44
44
|
|
@@ -1299,7 +1299,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1299
1299
|
<sourcecode id='L__xf6_we'>
|
1300
1300
|
<name>
|
1301
1301
|
See
|
1302
|
-
<eref type='inline' bibitemid='L__xf6_wner2016' citeas='
|
1302
|
+
<eref type='inline' bibitemid='L__xf6_wner2016' citeas='Löwner et al. 2016'/>
|
1303
1303
|
</name>
|
1304
1304
|
ABC
|
1305
1305
|
</sourcecode>
|
data/spec/metanorma/refs_spec.rb
CHANGED
@@ -1656,127 +1656,121 @@ RSpec.describe Metanorma::Standoc do
|
|
1656
1656
|
<clause id="_" inline-header="false" obligation="normative">
|
1657
1657
|
<title>Clause 4</title>
|
1658
1658
|
<p id="_">
|
1659
|
-
<eref type="inline" bibitemid="iso123" citeas="RFC 8341"/>
|
1659
|
+
<eref type="inline" bibitemid="iso123" citeas="IETF RFC 8341"/>
|
1660
1660
|
</p>
|
1661
1661
|
</clause>
|
1662
1662
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
1663
1663
|
<title>Normative references</title>
|
1664
1664
|
#{NORM_REF_BOILERPLATE}
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
</series>
|
1775
|
-
<series type='main'>
|
1776
|
-
<title format='text/plain' language='en' script='Latn'>RFC</title>
|
1777
|
-
<number>8341</number>
|
1778
|
-
</series>
|
1779
|
-
</bibitem>
|
1665
|
+
<bibitem id='iso123' type='standard'>
|
1666
|
+
<fetched/>
|
1667
|
+
<title type='main' format='text/plain'>Network Configuration Access Control Model</title>
|
1668
|
+
<uri type='src'>https://www.rfc-editor.org/info/rfc8341</uri>
|
1669
|
+
<docidentifier type='IETF' primary='true'>RFC 8341</docidentifier>
|
1670
|
+
<docidentifier type='IETF' scope='anchor'>RFC8341</docidentifier>
|
1671
|
+
<docidentifier type='DOI'>10.17487/RFC8341</docidentifier>
|
1672
|
+
<docnumber>RFC8341</docnumber>
|
1673
|
+
<date type='published'>
|
1674
|
+
<on>2018-03</on>
|
1675
|
+
</date>
|
1676
|
+
<contributor>
|
1677
|
+
<role type='author'/>
|
1678
|
+
<person>
|
1679
|
+
<name>
|
1680
|
+
<completename language='en' script='Latn'>A. Bierman</completename>
|
1681
|
+
</name>
|
1682
|
+
</person>
|
1683
|
+
</contributor>
|
1684
|
+
<contributor>
|
1685
|
+
<role type='author'/>
|
1686
|
+
<person>
|
1687
|
+
<name>
|
1688
|
+
<completename language='en' script='Latn'>M. Bjorklund</completename>
|
1689
|
+
</name>
|
1690
|
+
</person>
|
1691
|
+
</contributor>
|
1692
|
+
<language>en</language>
|
1693
|
+
<script>Latn</script>
|
1694
|
+
<abstract format='text/html' language='en' script='Latn'>
|
1695
|
+
<p id='_'>
|
1696
|
+
The standardization of network configuration interfaces for use with
|
1697
|
+
the Network Configuration Protocol (NETCONF) or the RESTCONF
|
1698
|
+
protocol requires a structured and secure operating environment that
|
1699
|
+
promotes human usability and multi-vendor interoperability. There is
|
1700
|
+
a need for standard mechanisms to restrict NETCONF or RESTCONF
|
1701
|
+
protocol access for particular users to a preconfigured subset of
|
1702
|
+
all available NETCONF or RESTCONF protocol operations and content.
|
1703
|
+
This document defines such an access control model.
|
1704
|
+
</p>
|
1705
|
+
<p id='_'>This document obsoletes RFC 6536.</p>
|
1706
|
+
</abstract>
|
1707
|
+
<series>
|
1708
|
+
<title format='text/plain'>STD</title>
|
1709
|
+
<number>91</number>
|
1710
|
+
</series>
|
1711
|
+
<series>
|
1712
|
+
<title format='text/plain'>RFC</title>
|
1713
|
+
<number>8341</number>
|
1714
|
+
</series>
|
1715
|
+
<keyword>NETCONF RESTCONF</keyword>
|
1716
|
+
<keyword>YANG</keyword>
|
1717
|
+
<keyword>XML</keyword>
|
1718
|
+
</bibitem>
|
1719
|
+
<bibitem id='iso124' type='standard'>
|
1720
|
+
<fetched/>
|
1721
|
+
<title type='main' format='text/plain'>Network Configuration Access Control Model</title>
|
1722
|
+
<uri type='src'>https://www.rfc-editor.org/info/rfc8341</uri>
|
1723
|
+
<docidentifier type='IETF' primary='true'>RFC 8341</docidentifier>
|
1724
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
1725
|
+
<docidentifier type='IETF' scope='anchor'>RFC8341</docidentifier>
|
1726
|
+
<docidentifier type='DOI'>10.17487/RFC8341</docidentifier>
|
1727
|
+
<docnumber>RFC8341</docnumber>
|
1728
|
+
<date type='published'>
|
1729
|
+
<on>2018-03</on>
|
1730
|
+
</date>
|
1731
|
+
<contributor>
|
1732
|
+
<role type='author'/>
|
1733
|
+
<person>
|
1734
|
+
<name>
|
1735
|
+
<completename language='en' script='Latn'>A. Bierman</completename>
|
1736
|
+
</name>
|
1737
|
+
</person>
|
1738
|
+
</contributor>
|
1739
|
+
<contributor>
|
1740
|
+
<role type='author'/>
|
1741
|
+
<person>
|
1742
|
+
<name>
|
1743
|
+
<completename language='en' script='Latn'>M. Bjorklund</completename>
|
1744
|
+
</name>
|
1745
|
+
</person>
|
1746
|
+
</contributor>
|
1747
|
+
<language>en</language>
|
1748
|
+
<script>Latn</script>
|
1749
|
+
<abstract format='text/html' language='en' script='Latn'>
|
1750
|
+
<p id='_'>
|
1751
|
+
The standardization of network configuration interfaces for use with
|
1752
|
+
the Network Configuration Protocol (NETCONF) or the RESTCONF
|
1753
|
+
protocol requires a structured and secure operating environment that
|
1754
|
+
promotes human usability and multi-vendor interoperability. There is
|
1755
|
+
a need for standard mechanisms to restrict NETCONF or RESTCONF
|
1756
|
+
protocol access for particular users to a preconfigured subset of
|
1757
|
+
all available NETCONF or RESTCONF protocol operations and content.
|
1758
|
+
This document defines such an access control model.
|
1759
|
+
</p>
|
1760
|
+
<p id='_'>This document obsoletes RFC 6536.</p>
|
1761
|
+
</abstract>
|
1762
|
+
<series>
|
1763
|
+
<title format='text/plain'>STD</title>
|
1764
|
+
<number>91</number>
|
1765
|
+
</series>
|
1766
|
+
<series>
|
1767
|
+
<title format='text/plain'>RFC</title>
|
1768
|
+
<number>8341</number>
|
1769
|
+
</series>
|
1770
|
+
<keyword>NETCONF RESTCONF</keyword>
|
1771
|
+
<keyword>YANG</keyword>
|
1772
|
+
<keyword>XML</keyword>
|
1773
|
+
</bibitem>
|
1780
1774
|
</references>
|
1781
1775
|
</bibliography>
|
1782
1776
|
</standard-document>
|
@@ -2495,7 +2489,7 @@ RSpec.describe Metanorma::Standoc do
|
|
2495
2489
|
<foreword id='_' obligation='informative'>
|
2496
2490
|
<title>Foreword</title>
|
2497
2491
|
<p id='_'>
|
2498
|
-
<eref type='inline' bibitemid='iso124' citeas='[&
|
2492
|
+
<eref type='inline' bibitemid='iso124' citeas='[<strong>A</strong>.<fn reference="1"><p>hello</p> </fn>]'/>
|
2499
2493
|
</p>
|
2500
2494
|
</foreword>
|
2501
2495
|
</preface>
|