lib/asciidoctor/sample/isodoc.rng in metanorma-sample-1.3.9 vs lib/asciidoctor/sample/isodoc.rng in metanorma-sample-1.3.11

- old
+ new

@@ -22,13 +22,84 @@ <!-- include "biblio.rnc" { } --> <include href="basicdoc.rng"> <start> <ref name="standard-document"/> </start> + <define name="hyperlink"> + <element name="link"> + <attribute name="target"> + <data type="anyURI"/> + </attribute> + <optional> + <attribute name="type"> + <ref name="ReferenceFormat"/> + </attribute> + </optional> + <optional> + <attribute name="alt"/> + </optional> + <text/> + </element> + </define> + <define name="xref"> + <element name="xref"> + <attribute name="target"> + <data type="IDREF"/> + </attribute> + <optional> + <attribute name="type"> + <ref name="ReferenceFormat"/> + </attribute> + </optional> + <optional> + <attribute name="alt"/> + </optional> + <text/> + </element> + </define> + <define name="example"> + <element name="example"> + <attribute name="id"> + <data type="ID"/> + </attribute> + <optional> + <attribute name="unnumbered"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="subsequence"/> + </optional> + <optional> + <ref name="tname"/> + </optional> + <oneOrMore> + <choice> + <ref name="formula"/> + <ref name="ul"/> + <ref name="ol"/> + <ref name="dl"/> + <ref name="quote"/> + <ref name="sourcecode"/> + <ref name="paragraph-with-footnote"/> + <ref name="figure"/> + </choice> + </oneOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + </element> + </define> <define name="BibDataExtensionType"> <ref name="doctype"/> + <optional> + <ref name="editorialgroup"/> + </optional> <zeroOrMore> + <ref name="ics"/> + </zeroOrMore> + <zeroOrMore> <ref name="structuredidentifier"/> </zeroOrMore> </define> <define name="TitleType"> <text/> @@ -37,10 +108,11 @@ <element name="sections"> <oneOrMore> <choice> <ref name="clause"/> <ref name="terms"/> + <ref name="term-clause"/> <ref name="definitions"/> </choice> </oneOrMore> </element> </define> @@ -50,24 +122,288 @@ <attribute name="id"> <data type="ID"/> </attribute> </optional> <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> <ref name="section-title"/> </optional> <zeroOrMore> <ref name="BasicBlock"/> </zeroOrMore> <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + <zeroOrMore> <ref name="bibitem"/> <zeroOrMore> <ref name="note"/> </zeroOrMore> </zeroOrMore> + <zeroOrMore> + <ref name="references"/> + </zeroOrMore> </element> </define> + <define name="note"> + <element name="note"> + <attribute name="id"> + <data type="ID"/> + </attribute> + <oneOrMore> + <choice> + <ref name="paragraph"/> + <ref name="ul"/> + <ref name="ol"/> + <ref name="dl"/> + <ref name="formula"/> + </choice> + </oneOrMore> + </element> + </define> + <define name="Basic-Section"> + <optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + </optional> + <optional> + <attribute name="language"/> + </optional> + <optional> + <attribute name="script"/> + </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> + <ref name="section-title"/> + </optional> + <group> + <oneOrMore> + <ref name="BasicBlock"/> + </oneOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + </group> + </define> + <define name="li"> + <element name="li"> + <group> + <optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + </optional> + <oneOrMore> + <ref name="BasicBlock"/> + </oneOrMore> + </group> + <!-- exclude figures? --> + </element> + </define> + <define name="dd"> + <element name="dd"> + <zeroOrMore> + <!-- exclude figures? --> + <ref name="BasicBlock"/> + </zeroOrMore> + </element> + </define> + <define name="thead"> + <element name="thead"> + <oneOrMore> + <ref name="tr"/> + </oneOrMore> + </element> + </define> + <define name="td"> + <element name="td"> + <optional> + <attribute name="colspan"/> + </optional> + <optional> + <attribute name="rowspan"/> + </optional> + <optional> + <attribute name="align"> + <choice> + <value>left</value> + <value>right</value> + <value>center</value> + </choice> + </attribute> + </optional> + <choice> + <zeroOrMore> + <choice> + <ref name="TextElement"/> + <ref name="fn"/> + </choice> + </zeroOrMore> + <oneOrMore> + <choice> + <ref name="paragraph-with-footnote"/> + <ref name="dl"/> + <ref name="ul"/> + <ref name="ol"/> + <ref name="figure"/> + </choice> + </oneOrMore> + </choice> + </element> + </define> + <define name="th"> + <element name="th"> + <optional> + <attribute name="colspan"/> + </optional> + <optional> + <attribute name="rowspan"/> + </optional> + <optional> + <attribute name="align"> + <choice> + <value>left</value> + <value>right</value> + <value>center</value> + </choice> + </attribute> + </optional> + <choice> + <zeroOrMore> + <choice> + <ref name="TextElement"/> + <ref name="fn"/> + </choice> + </zeroOrMore> + <oneOrMore> + <ref name="paragraph-with-footnote"/> + </oneOrMore> + </choice> + </element> + </define> + <define name="table-note"> + <element name="note"> + <optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + </optional> + <ref name="paragraph"/> + </element> + </define> </include> + <!-- end overrides --> + <define name="BasicBlock" combine="choice"> + <choice> + <ref name="requirement"/> + <ref name="recommendation"/> + <ref name="permission"/> + </choice> + </define> + <define name="bibliography"> + <element name="bibliography"> + <oneOrMore> + <choice> + <ref name="references"/> + <ref name="reference-clause"/> + </choice> + </oneOrMore> + </element> + </define> + <define name="reference-clause"> + <element name="clause"> + <optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + </optional> + <optional> + <attribute name="language"/> + </optional> + <optional> + <attribute name="script"/> + </optional> + <optional> + <attribute name="inline-header"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> + <ref name="section-title"/> + </optional> + <zeroOrMore> + <ref name="BasicBlock"/> + </zeroOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + <choice> + <oneOrMore> + <ref name="reference-clause"/> + </oneOrMore> + <zeroOrMore> + <ref name="references"/> + </zeroOrMore> + </choice> + </element> + </define> + <define name="editorialgroup"> + <element name="editorialgroup"> + <oneOrMore> + <ref name="technical-committee"/> + </oneOrMore> + </element> + </define> + <define name="technical-committee"> + <element name="technical-committee"> + <ref name="IsoWorkgroup"/> + </element> + </define> + <define name="IsoWorkgroup"> + <optional> + <attribute name="number"> + <data type="int"/> + </attribute> + </optional> + <optional> + <attribute name="type"/> + </optional> + <text/> + </define> + <define name="ics"> + <element name="ics"> + <element name="code"> + <text/> + </element> + <element name="text"> + <text/> + </element> + </element> + </define> <define name="standard-document"> <element name="standard-document"> <ref name="bibdata"/> <optional> <ref name="boilerplate"/> @@ -87,11 +423,11 @@ <define name="preface"> <element name="preface"> <oneOrMore> <choice> <ref name="content"/> - <ref name="abstract"/> + <ref name="preface_abstract"/> <ref name="foreword"/> <ref name="introduction"/> <ref name="acknowledgements"/> </choice> </oneOrMore> @@ -155,16 +491,27 @@ </optional> <optional> <attribute name="script"/> </optional> <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> <ref name="section-title"/> </optional> <oneOrMore> <zeroOrMore> <ref name="BasicBlock"/> </zeroOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> <ref name="dl"/> </oneOrMore> </element> </define> <define name="content"> @@ -201,25 +548,38 @@ </optional> <optional> <attribute name="script"/> </optional> <optional> + <attribute name="inline-header"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> <ref name="section-title"/> </optional> - <choice> + <group> <group> <zeroOrMore> <ref name="BasicBlock"/> </zeroOrMore> <zeroOrMore> <ref name="note"/> </zeroOrMore> </group> - <oneOrMore> + <zeroOrMore> <ref name="content-subsection"/> - </oneOrMore> - </choice> + </zeroOrMore> + </group> </define> <define name="clause"> <element name="clause"> <optional> <attribute name="type"/> @@ -238,35 +598,95 @@ </optional> <optional> <attribute name="script"/> </optional> <optional> + <attribute name="inline-header"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> <ref name="section-title"/> </optional> - <choice> + <group> <group> <zeroOrMore> <ref name="BasicBlock"/> </zeroOrMore> <zeroOrMore> <ref name="note"/> </zeroOrMore> </group> - <oneOrMore> + <zeroOrMore> <choice> <ref name="clause-subsection"/> <ref name="terms"/> <ref name="definitions"/> </choice> - </oneOrMore> - </choice> + </zeroOrMore> + </group> </define> + <define name="Annex-Section"> + <optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + </optional> + <optional> + <attribute name="language"/> + </optional> + <optional> + <attribute name="script"/> + </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> + <ref name="section-title"/> + </optional> + <group> + <group> + <zeroOrMore> + <ref name="BasicBlock"/> + </zeroOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + </group> + <zeroOrMore> + <choice> + <ref name="annex-subsection"/> + <ref name="terms"/> + <ref name="definitions"/> + <ref name="references"/> + </choice> + </zeroOrMore> + </group> + </define> <define name="clause-subsection"> <element name="clause"> <ref name="Clause-Section"/> </element> </define> + <define name="annex-subsection"> + <element name="clause"> + <ref name="Annex-Section"/> + </element> + </define> <define name="annex"> <element name="annex"> <optional> <attribute name="id"> <data type="ID"/> @@ -276,32 +696,42 @@ <attribute name="language"/> </optional> <optional> <attribute name="script"/> </optional> + <optional> + <attribute name="inline-header"> + <data type="boolean"/> + </attribute> + </optional> <attribute name="obligation"> <choice> <value>normative</value> <value>informative</value> </choice> </attribute> <optional> <ref name="section-title"/> </optional> - <choice> + <group> <group> <zeroOrMore> <ref name="BasicBlock"/> </zeroOrMore> <zeroOrMore> <ref name="note"/> </zeroOrMore> </group> - <oneOrMore> - <ref name="clause-subsection"/> - </oneOrMore> - </choice> + <zeroOrMore> + <choice> + <ref name="annex-subsection"/> + <ref name="terms"/> + <ref name="definitions"/> + <ref name="references"/> + </choice> + </zeroOrMore> + </group> </element> </define> <define name="terms"> <element name="terms"> <optional> @@ -313,16 +743,40 @@ <attribute name="language"/> </optional> <optional> <attribute name="script"/> </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> + <ref name="section-title"/> + </optional> <zeroOrMore> <ref name="BasicBlock"/> </zeroOrMore> - <oneOrMore> - <ref name="term"/> - </oneOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + <choice> + <oneOrMore> + <ref name="term"/> + </oneOrMore> + <group> + <zeroOrMore> + <ref name="terms"/> + </zeroOrMore> + <optional> + <ref name="definitions"/> + </optional> + </group> + </choice> </element> </define> <define name="term"> <element name="term"> <optional> @@ -411,11 +865,17 @@ </oneOrMore> </element> </define> <define name="definition"> <element name="definition"> - <ref name="paragraph"/> + <oneOrMore> + <choice> + <ref name="paragraph"/> + <ref name="figure"/> + <ref name="formula"/> + </choice> + </oneOrMore> </element> </define> <define name="termnote"> <element name="termnote"> <attribute name="id"> @@ -507,8 +967,62 @@ <optional> <element name="year"> <text/> </element> </optional> + </element> + </define> + <define name="preface_abstract"> + <element name="abstract"> + <ref name="Basic-Section"/> + </element> + </define> + <define name="term-clause"> + <element name="clause"> + <optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + </optional> + <optional> + <attribute name="language"/> + </optional> + <optional> + <attribute name="script"/> + </optional> + <optional> + <attribute name="inline-header"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="obligation"> + <choice> + <value>normative</value> + <value>informative</value> + </choice> + </attribute> + </optional> + <optional> + <ref name="section-title"/> + </optional> + <zeroOrMore> + <ref name="BasicBlock"/> + </zeroOrMore> + <zeroOrMore> + <ref name="note"/> + </zeroOrMore> + <zeroOrMore> + <choice> + <ref name="term-clause"/> + <ref name="terms"/> + <ref name="definitions"/> + </choice> + </zeroOrMore> + </element> + </define> + <define name="termdocsource"> + <element name="termdocsource"> + <ref name="CitationType"/> </element> </define> </grammar>