lib/metanorma/m3aawg/m3d.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="https://www.metanorma.org/ns/m3d" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<!--
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
we cannot have a new default namespace: we will end up with a grammar with two different
namespaces, one for isostandard and one for csand additions. And we do not want that.
-->
<include href="relaton-m3aawg.rng"/>
<include href="isodoc.rng">
<start>
<ref name="m3d-standard"/>
</start>
<define name="figure">
<element name="figure">
<attribute name="id">
<data type="ID"/>
</attribute>
<optional>
<attribute name="unnumbered">
<data type="boolean"/>
</attribute>
</optional>
<optional>
<attribute name="number"/>
</optional>
<optional>
<attribute name="subsequence"/>
</optional>
<optional>
<attribute name="class"/>
</optional>
<optional>
<ref name="source"/>
</optional>
<optional>
<ref name="tname"/>
</optional>
<choice>
<oneOrMore>
<ref name="figure"/>
</oneOrMore>
<group>
<choice>
<zeroOrMore>
<ref name="TextElement"/>
</zeroOrMore>
<ref name="pre"/>
</choice>
<zeroOrMore>
<ref name="note"/>
</zeroOrMore>
<optional>
<ref name="dl"/>
</optional>
</group>
</choice>
</element>
</define>
</include>
<define name="m3d-standard">
<element name="m3d-standard">
<attribute name="version"/>
<attribute name="type">
<choice>
<value>semantic</value>
<value>presentation</value>
</choice>
</attribute>
<ref name="bibdata"/>
<zeroOrMore>
<ref name="termdocsource"/>
</zeroOrMore>
<optional>
<ref name="misccontainer"/>
</optional>
<optional>
<ref name="boilerplate"/>
</optional>
<ref name="preface"/>
<oneOrMore>
<ref name="sections"/>
</oneOrMore>
<zeroOrMore>
<ref name="annex"/>
</zeroOrMore>
<ref name="bibliography"/>
<zeroOrMore>
<ref name="indexsect"/>
</zeroOrMore>
</element>
</define>
</grammar>