Skip to content

Commit

Permalink
update grammar & implement multiple copyrights
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Jun 3, 2020
1 parent 5a0acbc commit d1db22e
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 9 deletions.
40 changes: 35 additions & 5 deletions grammars/biblio.rng
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<text/>
</element>
</define>
<define name="LocalizedString">
<define name="LocalizedString1">
<optional>
<!-- multiple languages and scripts possible: comma delimit them if so -->
<attribute name="language"/>
Expand All @@ -98,6 +98,16 @@
</optional>
<text/>
</define>
<define name="LocalizedString">
<choice>
<ref name="LocalizedString1"/>
<oneOrMore>
<element name="variant">
<ref name="LocalizedString1"/>
</element>
</oneOrMore>
</choice>
</define>
<!--
Unlike UML, change type to format: type is overloaded
Would be need if plain were default value and could omit the attribute
Expand All @@ -121,7 +131,7 @@
</optional>
<ref name="LocalizedStringOrXsAny"/>
</define>
<define name="LocalizedStringOrXsAny">
<define name="LocalizedStringOrXsAny1">
<optional>
<!-- multiple languages and scripts possible: comma delimit them if so -->
<attribute name="language"/>
Expand All @@ -136,6 +146,16 @@
</choice>
</oneOrMore>
</define>
<define name="LocalizedStringOrXsAny">
<choice>
<ref name="LocalizedStringOrXsAny1"/>
<oneOrMore>
<element name="variant">
<ref name="LocalizedStringOrXsAny1"/>
</element>
</oneOrMore>
</choice>
</define>
<define name="contributor">
<element name="contributor">
<zeroOrMore>
Expand Down Expand Up @@ -641,9 +661,9 @@
<optional>
<ref name="status"/>
</optional>
<optional>
<zeroOrMore>
<ref name="copyright"/>
</optional>
</zeroOrMore>
<zeroOrMore>
<ref name="docrelation"/>
</zeroOrMore>
Expand Down Expand Up @@ -1001,7 +1021,17 @@
<optional>
<ref name="to"/>
</optional>
<ref name="owner"/>
<oneOrMore>
<ref name="owner"/>
</oneOrMore>
<optional>
<ref name="copyright_scope"/>
</optional>
</element>
</define>
<define name="copyright_scope">
<element name="scope">
<text/>
</element>
</define>
<define name="from">
Expand Down
18 changes: 17 additions & 1 deletion grammars/isodoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
<optional>
<attribute name="alt"/>
</optional>
<optional>
<attribute name="case">
<choice>
<value>capital</value>
<value>lowercase</value>
</choice>
</attribute>
</optional>
<text/>
</element>
</define>
Expand Down Expand Up @@ -902,7 +910,15 @@
<attribute name="id">
<data type="ID"/>
</attribute>
<ref name="paragraph"/>
<oneOrMore>
<choice>
<ref name="paragraph"/>
<ref name="ul"/>
<ref name="ol"/>
<ref name="dl"/>
<ref name="formula"/>
</choice>
</oneOrMore>
</element>
</define>
<define name="termexample">
Expand Down
10 changes: 9 additions & 1 deletion grammars/isostandard.rng
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
</define>
<define name="sections">
<element name="sections">
<zeroOrMore>
<choice>
<ref name="note"/>
<ref name="admonition"/>
</choice>
</zeroOrMore>
<ref name="clause"/>
<optional>
<choice>
Expand Down Expand Up @@ -263,6 +269,8 @@
<value>publicly-available-specification</value>
<value>international-workshop-agreement</value>
<value>guide</value>
<value>amendment</value>
<value>technical-corrigendum</value>
</choice>
</define>
<define name="structuredidentifier">
Expand Down Expand Up @@ -510,7 +518,7 @@
</attribute>
</optional>
<oneOrMore>
<ref name="paragraph-with-footnote"/>
<ref name="BasicBlock"/>
</oneOrMore>
</element>
</define>
Expand Down
3 changes: 3 additions & 0 deletions lib/relaton_ietf/scrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ def dates(reference)
[RelatonBib::BibliographicDate.new(type: "published", on: date)]
end

# rubocop:disable Metrics/MethodLength, Metrics/AbcSize

#
# Extract document identifiers from reference
#
Expand All @@ -337,6 +339,7 @@ def docids(reference, ver)
RelatonBib::DocumentIdentifier.new(id: id, type: si[:name])
end.compact
end
# enable Metrics/MethodLength, Metrics/AbcSize

#
# Extract series form reference
Expand Down
2 changes: 1 addition & 1 deletion lib/relaton_ietf/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RelatonIetf
VERSION = "1.0.4".freeze
VERSION = "1.1.0".freeze
end
2 changes: 1 addition & 1 deletion relaton_ietf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "vcr"
spec.add_development_dependency "webmock"

spec.add_dependency "relaton-bib", ">= 1.0.4"
spec.add_dependency "relaton-bib", "~> 1.1.0"
end

0 comments on commit d1db22e

Please sign in to comment.