Skip to content

Commit

Permalink
Added a 'u' element to hold unicode data in running text to the schema.
Browse files Browse the repository at this point in the history
 - Legacy-Id: 2786
  • Loading branch information
levkowetz committed Nov 30, 2018
1 parent bc3fd47 commit 00f9a47
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 20 deletions.
39 changes: 29 additions & 10 deletions cli/xml2rfc/data/v3.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@
element author {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute initials { text }?,
attribute asciiInitials { text }?,
attribute surname { text }?,
attribute asciiSurname { text }?,
attribute fullname { text }?,
attribute role { "editor" }?,
attribute role { "editor" | "contributor" }?,
attribute asciiFullname { text }?,
organization?,
address?
Expand Down Expand Up @@ -115,15 +116,15 @@
attribute xml:lang { text }?,
((city | code | country | region | street)*
| postalLine+
| (country
& region?
& city?
& cityarea?
& code?
& sortingcode?
& pobox?
& street*
& extaddr*))
| (city?
& cityarea?
& code?
& country
& extaddr*
& pobox?
& region?
& sortingcode?
& street*))
}

extaddr =
Expand Down Expand Up @@ -374,6 +375,7 @@
| sub
| sup
| tt
| u
| vspace
| xref)*
}
Expand Down Expand Up @@ -407,6 +409,7 @@
| sub
| sup
| tt
| u
| xref)+)
}

Expand Down Expand Up @@ -469,6 +472,7 @@
| sub
| sup
| tt
| u
| xref)+)
}

Expand Down Expand Up @@ -524,6 +528,7 @@
| sub
| sup
| tt
| u
| xref)+)
}

Expand Down Expand Up @@ -745,6 +750,7 @@
| sub
| sup
| tt
| u
| xref)*
}

Expand Down Expand Up @@ -836,6 +842,7 @@
| sub
| sup
| tt
| u
| xref)*)
}

Expand All @@ -860,6 +867,7 @@
| sub
| sup
| tt
| u
| xref)*)
}

Expand Down Expand Up @@ -950,6 +958,7 @@
attribute target { text }?,
[ a:defaultValue = "true" ]
attribute quoteTitle { "true" | "false" }?,
attribute quote-title { "true" | "false" }?,
stream?,
front,
(annotation | format | refcontent | seriesInfo)*
Expand Down Expand Up @@ -1008,6 +1017,7 @@
| sub
| sup
| tt
| u
| xref)*
}

Expand All @@ -1019,3 +1029,12 @@
}
start |= rfc

u =
element u {
attribute anchor { xsd:ID }?,
attribute ascii { text }?,
[ a:defaultValue = "lit-name-num" ]
attribute format { text }?,
attribute pn { xsd:ID }?,
text
}
65 changes: 55 additions & 10 deletions cli/xml2rfc/data/v3.rng
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@
<optional>
<attribute name="xml:lang"/>
</optional>
<optional>
<attribute name="anchor">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="initials"/>
</optional>
Expand All @@ -217,7 +222,10 @@
</optional>
<optional>
<attribute name="role">
<value>editor</value>
<choice>
<value>editor</value>
<value>contributor</value>
</choice>
</attribute>
</optional>
<optional>
Expand Down Expand Up @@ -298,10 +306,6 @@
<ref name="postalLine"/>
</oneOrMore>
<interleave>
<ref name="country"/>
<optional>
<ref name="region"/>
</optional>
<optional>
<ref name="city"/>
</optional>
Expand All @@ -311,18 +315,22 @@
<optional>
<ref name="code"/>
</optional>
<ref name="country"/>
<zeroOrMore>
<ref name="extaddr"/>
</zeroOrMore>
<optional>
<ref name="sortingcode"/>
<ref name="pobox"/>
</optional>
<optional>
<ref name="pobox"/>
<ref name="region"/>
</optional>
<optional>
<ref name="sortingcode"/>
</optional>
<zeroOrMore>
<ref name="street"/>
</zeroOrMore>
<zeroOrMore>
<ref name="extaddr"/>
</zeroOrMore>
</interleave>
</choice>
</element>
Expand Down Expand Up @@ -812,6 +820,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="vspace"/>
<ref name="xref"/>
</choice>
Expand Down Expand Up @@ -899,6 +908,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</oneOrMore>
Expand Down Expand Up @@ -1066,6 +1076,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</oneOrMore>
Expand Down Expand Up @@ -1194,6 +1205,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</oneOrMore>
Expand Down Expand Up @@ -1665,6 +1677,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</zeroOrMore>
Expand Down Expand Up @@ -1899,6 +1912,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</zeroOrMore>
Expand Down Expand Up @@ -1958,6 +1972,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</zeroOrMore>
Expand Down Expand Up @@ -2201,6 +2216,14 @@
</choice>
</attribute>
</optional>
<optional>
<attribute name="quote-title">
<choice>
<value>true</value>
<value>false</value>
</choice>
</attribute>
</optional>
<optional>
<ref name="stream"/>
</optional>
Expand Down Expand Up @@ -2318,6 +2341,7 @@
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="u"/>
<ref name="xref"/>
</choice>
</zeroOrMore>
Expand Down Expand Up @@ -2347,4 +2371,25 @@
<start combine="choice">
<ref name="rfc"/>
</start>
<define name="u">
<element name="u">
<optional>
<attribute name="anchor">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="ascii"/>
</optional>
<optional>
<attribute name="format" a:defaultValue="lit-name-num"/>
</optional>
<optional>
<attribute name="pn">
<data type="ID"/>
</attribute>
</optional>
<text/>
</element>
</define>
</grammar>

0 comments on commit 00f9a47

Please sign in to comment.