Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows <references> to be in <references>; Issue 49 #70

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions draft-iab-rfc7991bis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1106,11 +1106,9 @@ See <xref target="cdata.and.escaping"/> for a description of how to deal with is
<iref item="Elements" subitem="displayreference"/>
<iref item="displayreference element" subitem="inside back"/>Optional &lt;<x:ref>displayreference</x:ref>&gt; elements (<xref target="element.displayreference"/>)</li>


<li><!--AG-->
<iref item="Elements" subitem="references"/>
<iref item="references element" subitem="inside back"/>Optional &lt;<x:ref>references</x:ref>&gt; elements (<xref target="element.references"/>)</li>

<iref item="references element" subitem="inside back"/>One &lt;<x:ref>references</x:ref>&gt; element (<xref target="element.references"/>)</li>

<li><!--AG-->
<iref item="Elements" subitem="section"/>
Expand Down Expand Up @@ -3129,7 +3127,7 @@ See <xref target="cdata.and.escaping"/> for a description of how to deal with is
This vocabulary supports the split with the &lt;<x:ref>name</x:ref>&gt; child element.
In general, the title should be either "Normative References" or "Informative References".
</t>
<t><!--AG-->This element appears as a child element of &lt;<x:ref>back</x:ref>&gt; (<xref target="element.back"/>).</t>
<t><!--AG-->This element appears as a child element of &lt;<x:ref>back</x:ref>&gt; (<xref target="element.back"/>) and &lt;<x:ref>references</x:ref>&gt; (<xref target="element.references"/>).</t>
<t anchor="element.references.contents"><!--AG-->
<xref format="none" target="grammar.references">Content model</xref>:</t>
<t><!--AG-->In this order:</t>
Expand All @@ -3139,17 +3137,28 @@ See <xref target="cdata.and.escaping"/> for a description of how to deal with is
<iref item="Elements" subitem="name"/>
<iref item="name element" subitem="inside references"/>One optional &lt;<x:ref>name</x:ref>&gt; element (<xref target="element.name"/>)</li>

<li><!--AG-->
<t>In any order:</t>
<ul><!--AG-->
<li><!--AG-->
<iref item="Elements" subitem="reference"/>
<iref item="reference element" subitem="inside references"/>&lt;<x:ref>reference</x:ref>&gt; elements (<xref target="element.reference"/>)</li>
<li><!--AG-->
<iref item="Elements" subitem="referencegroup"/>
<iref item="referencegroup element" subitem="inside references"/>&lt;<x:ref>referencegroup</x:ref>&gt; elements (<xref target="element.referencegroup"/>)</li>
</ul>
</li>
<t><!--AG-->Either:</t>
<ul empty="true"><!--AG-->

<li><!--AG-->
<iref item="Elements" subitem="references"/>
<iref item="references element" subitem="inside references"/>One or more &lt;<x:ref>references</x:ref>&gt; elements (<xref target="element.references"/>)</li>

</ul>
<t><!--AG-->Or:</t>
<ul empty="true"><!--AG-->
<li><!--AG-->
<t>In any order:</t>
<ul><!--AG-->
<li><!--AG-->
<iref item="Elements" subitem="reference"/>
<iref item="reference element" subitem="inside references"/>&lt;<x:ref>reference</x:ref>&gt; elements (<xref target="element.reference"/>)</li>
<li><!--AG-->
<iref item="Elements" subitem="referencegroup"/>
<iref item="referencegroup element" subitem="inside references"/>&lt;<x:ref>referencegroup</x:ref>&gt; elements (<xref target="element.referencegroup"/>)</li>
</ul>
</li>
</ul>
</ol>

<!--references/@anchor-->
Expand Down Expand Up @@ -4521,7 +4530,7 @@ See <xref target="cdata.and.escaping"/> for a description of how to deal with is
<iref item="Attributes" subitem="align"/>
<iref item="table element" subitem="align attribute"/>
<iref item="align attribute" subitem="in table element"/>
<t><!--AG-->
<t>
Controls whether the table appears left justified, centered (default),
or right justified.
Tables are aligned relative to the left margin of the document.
Expand Down Expand Up @@ -7635,7 +7644,7 @@ include "svg.rnc"
attribute xml:base { text }?,
attribute xml:lang { text }?,
displayreference*,
references*,
references,
section*
}

Expand All @@ -7655,7 +7664,7 @@ include "svg.rnc"
attribute anchor { xsd:ID }?,
attribute title { text }?,
name?,
(reference | referencegroup)*
(references+ | (reference | referencegroup)*)
}

<strong anchor="grammar.reference">reference</strong><iref item="reference element"/> =
Expand Down Expand Up @@ -8598,7 +8607,7 @@ to the v3 schema.</t>
+ attribute xml:base { text }?,
+ attribute xml:lang { text }?,
+ displayreference*,
+ references*,
+ references,
+ section*
+ }
+ displayreference =
Expand All @@ -8618,7 +8627,7 @@ to the v3 schema.</t>
+ attribute anchor { xsd:ID }?,
+ attribute title { text }?,
+ name?,
+ (reference | referencegroup)*
+ (references+ | (reference | referencegroup)*)
}
reference =
element reference {
Expand Down
21 changes: 12 additions & 9 deletions xml2rfcv3.rng
Original file line number Diff line number Diff line change
Expand Up @@ -1941,9 +1941,7 @@
<zeroOrMore>
<ref name="displayreference"/>
</zeroOrMore>
<zeroOrMore>
<ref name="references"/>
</zeroOrMore>
<ref name="references"/>
<zeroOrMore>
<ref name="section"/>
</zeroOrMore>
Expand Down Expand Up @@ -1985,12 +1983,17 @@
<optional>
<ref name="name"/>
</optional>
<zeroOrMore>
<choice>
<ref name="reference"/>
<ref name="referencegroup"/>
</choice>
</zeroOrMore>
<choice>
<oneOrMore>
<ref name="references"/>
</oneOrMore>
<zeroOrMore>
<choice>
<ref name="reference"/>
<ref name="referencegroup"/>
</choice>
</zeroOrMore>
</choice>
</element>
</define>
<define name="reference">
Expand Down