Skip to content

Commit

Permalink
update grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Jan 7, 2024
1 parent 6a1afe5 commit 613213b
Show file tree
Hide file tree
Showing 20 changed files with 53,174 additions and 52,771 deletions.
199 changes: 147 additions & 52 deletions grammars/basicdoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,89 @@
<ref name="pagebreak"/>
<ref name="hr"/>
<ref name="bookmark"/>
<ref name="amend"/>
</choice>
</define>
<define name="amend">
<element name="amend">
<ref name="AmendType"/>
</element>
</define>
<define name="AmendType">
<optional>
<attribute name="id">
<data type="ID"/>
</attribute>
</optional>
<attribute name="change">
<choice>
<value>add</value>
<value>modify</value>
<value>delete</value>
<value>replace</value>
</choice>
</attribute>
<optional>
<attribute name="path"/>
</optional>
<optional>
<attribute name="path_end"/>
</optional>
<optional>
<attribute name="title"/>
</optional>
<optional>
<element name="location">
<zeroOrMore>
<choice>
<ref name="locality"/>
<ref name="localityStack"/>
</choice>
</zeroOrMore>
</element>
</optional>
<optional>
<element name="description">
<zeroOrMore>
<ref name="BasicBlock"/>
</zeroOrMore>
</element>
</optional>
<optional>
<element name="newcontent">
<optional>
<attribute name="id">
<data type="ID"/>
</attribute>
</optional>
<zeroOrMore>
<ref name="BasicBlock"/>
</zeroOrMore>
</element>
</optional>
<zeroOrMore>
<ref name="classification"/>
</zeroOrMore>
<zeroOrMore>
<ref name="contributor"/>
</zeroOrMore>
</define>
<define name="classification">
<element name="classification">
<ref name="classification_tag"/>
<ref name="classification_value"/>
</element>
</define>
<define name="classification_tag">
<element name="tag">
<text/>
</element>
</define>
<define name="classification_value">
<element name="value">
<text/>
</element>
</define>
<define name="paragraph">
<element name="p">
<ref name="ParagraphType"/>
Expand Down Expand Up @@ -715,27 +796,36 @@
</define>
<define name="ruby">
<element name="ruby">
<zeroOrMore>
<choice>
<ref name="PureTextElement"/>
<ref name="rp"/>
<ref name="rt"/>
</choice>
</zeroOrMore>
<choice>
<ref name="ruby_pronunciation"/>
<ref name="ruby_annotation"/>
</choice>
<choice>
<text/>
<ref name="ruby"/>
</choice>
</element>
</define>
<define name="rp">
<element name="rp">
<zeroOrMore>
<ref name="PureTextElement"/>
</zeroOrMore>
<define name="ruby_pronunciation">
<element name="pronunciation">
<attribute name="value"/>
<optional>
<attribute name="script"/>
</optional>
<optional>
<attribute name="lang"/>
</optional>
</element>
</define>
<define name="rt">
<element name="rt">
<zeroOrMore>
<ref name="PureTextElement"/>
</zeroOrMore>
<define name="ruby_annotation">
<element name="annotation">
<attribute name="value"/>
<optional>
<attribute name="script"/>
</optional>
<optional>
<attribute name="lang"/>
</optional>
</element>
</define>
<define name="br">
Expand Down Expand Up @@ -914,44 +1004,49 @@
-->
<define name="image">
<element name="image">
<attribute name="id">
<data type="ID"/>
<ref name="Image"/>
</element>
</define>
<define name="Image">
<attribute name="id">
<data type="ID"/>
</attribute>
<attribute name="src">
<data type="anyURI"/>
</attribute>
<attribute name="mimetype"/>
<optional>
<attribute name="filename"/>
</optional>
<optional>
<attribute name="width">
<ref name="ImageSize"/>
</attribute>
<attribute name="src">
</optional>
<optional>
<attribute name="height">
<ref name="ImageSize"/>
</attribute>
</optional>
<optional>
<attribute name="alt"/>
</optional>
<optional>
<attribute name="title"/>
</optional>
<optional>
<attribute name="longdesc">
<data type="anyURI"/>
</attribute>
<attribute name="mimetype"/>
<optional>
<attribute name="filename"/>
</optional>
<optional>
<attribute name="width">
<choice>
<data type="int"/>
<value>auto</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="height">
<choice>
<data type="int"/>
<value>auto</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="alt"/>
</optional>
<optional>
<attribute name="title"/>
</optional>
<optional>
<attribute name="longdesc">
<data type="anyURI"/>
</attribute>
</optional>
</element>
</optional>
</define>
<define name="ImageSize">
<choice>
<data type="string">
<param name="pattern">\d+([.]\d+)?(%?)</param>
</data>
<value>auto</value>
</choice>
</define>
<define name="video">
<element name="video">
Expand Down
45 changes: 44 additions & 1 deletion grammars/biblio-standoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,42 @@
-->
<include href="biblio.rng">
<define name="BibData">
<ref name="BibliographicItem"/>
<ref name="StandardBibliographicItem"/>
<optional>
<ref name="ext"/>
</optional>
</define>
<define name="docrelation">
<element name="relation">
<attribute name="type">
<ref name="DocRelationType"/>
</attribute>
<optional>
<element name="description">
<ref name="FormattedString"/>
</element>
</optional>
<element name="bibitem">
<ref name="StandardReducedBibliographicItem"/>
</element>
<choice>
<zeroOrMore>
<ref name="locality"/>
</zeroOrMore>
<zeroOrMore>
<ref name="localityStack"/>
</zeroOrMore>
</choice>
<choice>
<zeroOrMore>
<ref name="sourceLocality"/>
</zeroOrMore>
<zeroOrMore>
<ref name="sourceLocalityStack"/>
</zeroOrMore>
</choice>
</element>
</define>
</include>
<define name="ext">
<element name="ext">
Expand Down Expand Up @@ -161,4 +192,16 @@
</optional>
</element>
</define>
<define name="StandardBibliographicItem">
<ref name="BibliographicItem"/>
<zeroOrMore>
<ref name="amend"/>
</zeroOrMore>
</define>
<define name="StandardReducedBibliographicItem">
<ref name="ReducedBibliographicItem"/>
<zeroOrMore>
<ref name="amend"/>
</zeroOrMore>
</define>
</grammar>
32 changes: 32 additions & 0 deletions grammars/biblio.rng
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@
</element>
</define>
<define name="FullNameType">
<optional>
<ref name="name_abbreviation"/>
</optional>
<choice>
<group>
<zeroOrMore>
Expand All @@ -266,6 +269,11 @@
<ref name="variantname"/>
</zeroOrMore>
</define>
<define name="name_abbreviation">
<element name="abbreviation">
<ref name="LocalizedString"/>
</element>
</define>
<define name="prefix">
<element name="prefix">
<ref name="LocalizedString"/>
Expand Down Expand Up @@ -348,6 +356,9 @@
<zeroOrMore>
<ref name="contact"/>
</zeroOrMore>
<optional>
<ref name="logo"/>
</optional>
</element>
</define>
<define name="orgname">
Expand All @@ -366,6 +377,21 @@
</choice>
</element>
</define>
<define name="logo">
<element name="logo">
<ref name="image"/>
</element>
</define>
<define name="depiction">
<element name="depiction">
<optional>
<attribute name="scope"/>
</optional>
<zeroOrMore>
<ref name="image"/>
</zeroOrMore>
</element>
</define>
<define name="NameWithVariants">
<element name="primary">
<ref name="LocalizedString"/>
Expand Down Expand Up @@ -752,6 +778,9 @@
<optional>
<ref name="validity"/>
</optional>
<optional>
<ref name="depiction"/>
</optional>
</define>
<define name="ReducedBibliographicItem">
<optional>
Expand Down Expand Up @@ -849,6 +878,9 @@
<optional>
<ref name="validity"/>
</optional>
<optional>
<ref name="depiction"/>
</optional>
</define>
<define name="btitle">
<element name="title">
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.17.0".freeze
VERSION = "1.18.0".freeze
end
2 changes: 1 addition & 1 deletion relaton_ietf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")

spec.add_dependency "relaton-bib", "~> 1.17.0"
spec.add_dependency "relaton-bib", "~> 1.18.0"
spec.add_dependency "relaton-index", "~> 0.2.3"
end
2 changes: 1 addition & 1 deletion spec/examples/bcp_47.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<bibdata type="standard" schema-version="v1.2.5">
<bibdata type="standard" schema-version="v1.2.8">
<fetched>2022-11-26</fetched>
<title format="text/plain" language="en" script="Latn">Best Current Practice 47</title>
<uri type="src">https://www.rfc-editor.org/info/bcp47</uri>
Expand Down
2 changes: 1 addition & 1 deletion spec/examples/bib_item.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<bibdata type="standard" schema-version="v1.2.5">
<bibdata type="standard" schema-version="v1.2.8">
<fetched>2023-07-02</fetched>
<title type="main" format="text/plain">Network Configuration Access Control Model</title>
<uri type="src">https://www.rfc-editor.org/info/rfc8341</uri>
Expand Down
2 changes: 1 addition & 1 deletion spec/examples/from-bibxm-ids.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<bibdata type="standard" schema-version="v1.2.5">
<bibdata type="standard" schema-version="v1.2.8">
<title format="text/plain" language="en" script="Latn">Forming Intuitive Email Addresses</title>
<uri type="src">https://datatracker.ietf.org/doc/html/draft--pale-email-00</uri>
<docidentifier type="Internet-Draft" primary="true">draft--pale-email-00</docidentifier>
Expand Down
Loading

0 comments on commit 613213b

Please sign in to comment.