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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56e2b9105572c28858ffc12d075b16615ec8195836ad4bf7d7d2122fbf81dc05
4
- data.tar.gz: 2594f703aeba2f78a5bf3df715709f78b3b6da1a751cb52fedd3ebce299eaf2d
3
+ metadata.gz: 322efef58275c5330db01582e8ead5ea9c5c496e8a6c5e96aafd8c8413a4412f
4
+ data.tar.gz: f88ff574288ee6159fd0e4b05eb076767daede15afd3187d2de05dc1aae295bf
5
5
  SHA512:
6
- metadata.gz: eeef127fe3ea160b49aa62cbb1aa665fb4e0cdb6d1712f646667394a41633c89864a294900c444abc1fceb7fbe2649bdfb2f539d1ccc66d3df89cd247ea31655
7
- data.tar.gz: 2d1ded28e889db67a42275a5890a8e942b2b966e342e7bb7bc2b21129875394dff03ce1c1cd634b409ce72a68de0e4fd4eff518731cb3b8809c70d5c0c5f0449
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
- <optional>
732
+ <zeroOrMore>
642
733
  <ref name="version"/>
643
- </optional>
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="BibliographicItem"/>
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
- <zeroOrMore>
1297
+ <optional>
1201
1298
  <ref name="draft"/>
1202
- </zeroOrMore>
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 do |b|
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") ? "true" : nil,
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"] = HTMLEntities.new.encode(ref, :hexadecimal)
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], ref[:year], ref) do |doc|
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 "clause", **attr_code(attrs) do |xml_section|
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
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "2.1.2".freeze
22
+ VERSION = "2.1.3".freeze
23
23
  end
24
24
  end
@@ -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.9.0"
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='L&amp;#xf6;wner et al. 2016'/>
1302
+ <eref type='inline' bibitemid='L__xf6_wner2016' citeas='Löwner et al. 2016'/>
1303
1303
  </name>
1304
1304
  ABC
1305
1305
  </sourcecode>
@@ -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
- <bibitem id='iso123' type='standard'>
1666
- <fetched/>
1667
- <title format='text/plain' language='en' script='Latn'>Network Configuration Access Control Model</title>
1668
- <uri type='src'>https://www.rfc-editor.org/info/rfc8341</uri>
1669
- <docidentifier type='RFC' primary="true">RFC 8341</docidentifier>
1670
- <docidentifier type='RFC' 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='publisher'/>
1678
- <organization>
1679
- <name>Internet Engineering Task Force</name>
1680
- <abbreviation>IETF</abbreviation>
1681
- </organization>
1682
- </contributor>
1683
- <contributor>
1684
- <role type='author'/>
1685
- <person>
1686
- <name>
1687
- <completename language='en'>A. Bierman</completename>
1688
- </name>
1689
- </person>
1690
- </contributor>
1691
- <contributor>
1692
- <role type='author'/>
1693
- <person>
1694
- <name>
1695
- <completename language='en'>M. Bjorklund</completename>
1696
- </name>
1697
- </person>
1698
- </contributor>
1699
- <language>en</language>
1700
- <script>Latn</script>
1701
- <abstract format='text/html' language='en' script='Latn'>
1702
- <p id='_'>
1703
- The standardization of network configuration interfaces for use with
1704
- the Network Configuration Protocol (NETCONF) or the RESTCONF protocol
1705
- requires a structured and secure operating environment that promotes
1706
- human usability and multi-vendor interoperability. There is a need for
1707
- standard mechanisms to restrict NETCONF or RESTCONF protocol access
1708
- for particular users to a preconfigured subset of all available
1709
- NETCONF or RESTCONF protocol operations and content. This document
1710
- defines such an access control model.</p>
1711
- <p id='_'>This document obsoletes RFC 6536.</p>
1712
- </abstract>
1713
- <series type='main'>
1714
- <title format='text/plain' language='en' script='Latn'>STD</title>
1715
- <number>91</number>
1716
- </series>
1717
- <series type='main'>
1718
- <title format='text/plain' language='en' script='Latn'>RFC</title>
1719
- <number>8341</number>
1720
- </series>
1721
- </bibitem>
1722
- <bibitem id='iso124' type='standard'>
1723
- <fetched/>
1724
- <title format='text/plain' language='en' script='Latn'>Network Configuration Access Control Model</title>
1725
- <uri type='src'>https://www.rfc-editor.org/info/rfc8341</uri>
1726
- <docidentifier type='RFC' primary="true">RFC 8341</docidentifier>
1727
- <docidentifier type='metanorma'>[1]</docidentifier>
1728
- <docidentifier type='RFC' scope='anchor'>RFC8341</docidentifier>
1729
- <docidentifier type='DOI'>10.17487/RFC8341</docidentifier>
1730
- <docnumber>RFC8341</docnumber>
1731
- <date type='published'>
1732
- <on>2018-03</on>
1733
- </date>
1734
- <contributor>
1735
- <role type='publisher'/>
1736
- <organization>
1737
- <name>Internet Engineering Task Force</name>
1738
- <abbreviation>IETF</abbreviation>
1739
- </organization>
1740
- </contributor>
1741
- <contributor>
1742
- <role type='author'/>
1743
- <person>
1744
- <name>
1745
- <completename language='en'>A. Bierman</completename>
1746
- </name>
1747
- </person>
1748
- </contributor>
1749
- <contributor>
1750
- <role type='author'/>
1751
- <person>
1752
- <name>
1753
- <completename language='en'>M. Bjorklund</completename>
1754
- </name>
1755
- </person>
1756
- </contributor>
1757
- <language>en</language>
1758
- <script>Latn</script>
1759
- <abstract format='text/html' language='en' script='Latn'>
1760
- <p id='_'>
1761
- The standardization of network configuration interfaces for use with
1762
- the Network Configuration Protocol (NETCONF) or the RESTCONF protocol
1763
- requires a structured and secure operating environment that promotes
1764
- human usability and multi-vendor interoperability. There is a need for
1765
- standard mechanisms to restrict NETCONF or RESTCONF protocol access
1766
- for particular users to a preconfigured subset of all available
1767
- NETCONF or RESTCONF protocol operations and content. This document
1768
- defines such an access control model.</p>
1769
- <p id='_'>This document obsoletes RFC 6536.</p>
1770
- </abstract>
1771
- <series type='main'>
1772
- <title format='text/plain' language='en' script='Latn'>STD</title>
1773
- <number>91</number>
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='[&amp;#x3c;strong&amp;#x3e;A&amp;#x3c;/strong&amp;#x3e;.&amp;#x3c;fn reference=&amp;#x22;1&amp;#x22;&amp;#x3e;&amp;#x3c;p&amp;#x3e;hello&amp;#x3c;/p&amp;#x3e;&amp;#xa;&amp;#x3c;/fn&amp;#x3e;]'/>
2492
+ <eref type='inline' bibitemid='iso124' citeas='[&lt;strong&gt;A&lt;/strong&gt;.&lt;fn reference=&quot;1&quot;&gt;&lt;p&gt;hello&lt;/p&gt;&#10;&lt;/fn&gt;]'/>
2499
2493
  </p>
2500
2494
  </foreword>
2501
2495
  </preface>