<?xml version="1.0" encoding="UTF-8"?>
<rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0"
              datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <!-- Handling of element overloading when inheriting from a base
       template
  -->
  <rng:define name="overload">
    <rng:optional>
      <!--
          Alter matched element with content
      -->
      <rng:choice>
        <rng:attribute name="position">
          <rng:choice>
            <!-- Insert content before first child -->
            <rng:value>before</rng:value>
            <!-- Insert content after last child -->
            <rng:value>after</rng:value>
            <!-- Replace all children with content -->
            <rng:value>inside</rng:value>
            <!-- Replace matched element itself with content -->
            <rng:value>replace</rng:value>
          </rng:choice>
        </rng:attribute>
        <rng:group>
          <rng:attribute name="position">
            <!-- Edit element attributes -->
            <rng:value>attributes</rng:value>
          </rng:attribute>
          <rng:oneOrMore>
            <rng:element name="attribute">
              <rng:attribute name="name"><rng:text/></rng:attribute>
              <rng:text />
            </rng:element>
          </rng:oneOrMore>
        </rng:group>
      </rng:choice>
    </rng:optional>
  </rng:define>

    <rng:define name="access_rights">
        <rng:optional>
            <rng:attribute name="groups"/>
        </rng:optional>
    </rng:define>



  <rng:define name="container">
    <rng:optional><rng:attribute name="col"/></rng:optional>
    <rng:zeroOrMore>
      <rng:choice>
        <rng:ref name="notebook"/>
        <rng:ref name="field"/>
        <rng:ref name="group"/>
        <rng:ref name="button"/>
        <rng:ref name="hpaned" />
        <rng:ref name="label" />
        <rng:ref name="separator"/>
        <rng:ref name="image"/>
        <rng:ref name="form"/>
        <rng:ref name="vpaned"/>
        <rng:ref name="filter"/>
        <rng:ref name="html"/>
        <rng:element name="newline"><rng:empty/></rng:element>
        <rng:element name="properties"><rng:empty/></rng:element>
      </rng:choice>
    </rng:zeroOrMore>
  </rng:define>

    <rng:define name="form">
        <rng:element name="form">
            <rng:ref name="overload"/>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="editable"/></rng:optional>
            <rng:optional><rng:attribute name="type"/></rng:optional>
            <rng:optional><rng:attribute name="link"/></rng:optional>
            <rng:ref name="container"/>
        </rng:element>
    </rng:define>

    <rng:define name="diagram">
        <rng:element name="diagram">
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="node"/>
                    <rng:ref name="arrow"/>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="node">
        <rng:element name="node">
            <rng:attribute name="object"/>
            <rng:optional><rng:attribute name="shape"/></rng:optional>
            <rng:optional><rng:attribute name="bgcolor"/></rng:optional>
            <rng:optional><rng:attribute name="form_view_ref"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="field"/>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="arrow">
        <rng:element name="arrow">
            <rng:attribute name="object" />
            <rng:attribute name="source" />
            <rng:attribute name="destination" />
            <rng:optional><rng:attribute name="form_view_ref"/></rng:optional>
            <rng:optional><rng:attribute name="label"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="field"/>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="tree">
        <rng:element name="tree">
            <rng:ref name="overload"/>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="colors"/></rng:optional>
            <rng:optional><rng:attribute name="color"/></rng:optional>
            <rng:optional><rng:attribute name="editable"/></rng:optional>
            <rng:optional><rng:attribute name="toolbar"/></rng:optional>
            <rng:optional><rng:attribute name="link"/></rng:optional>
            <rng:optional><rng:attribute name="type"/></rng:optional>
            <rng:optional><rng:attribute name="limit"/></rng:optional>
            <rng:optional><rng:attribute name="min_rows"/></rng:optional>
            <rng:optional><rng:attribute name="on_write"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="field"/>
                    <rng:ref name="separator"/>
                    <rng:ref name="tree"/>
                    <rng:ref name="group"/>
                    <rng:ref name="button"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="html"/>
                    <rng:element name="newline"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="search">
        <rng:element name="search">
            <rng:ref name="overload"/>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="col"/></rng:optional>
            <rng:optional><rng:attribute name="type"/></rng:optional>
            <rng:optional><rng:attribute name="link"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="field"/>
                    <rng:ref name="group"/>
                    <rng:ref name="separator"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="search"/>
                    <rng:element name="newline"><rng:empty/></rng:element>
                    <rng:element name="properties"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="image">
        <rng:element name="image">
            <rng:attribute name="name"/>
        </rng:element>
    </rng:define>

    <rng:define name="html">
        <rng:element name="html">
            <rng:zeroOrMore>
                    <rng:text/>
                    <rng:ref name="any"/>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="label">
        <rng:element name="label">
            <rng:ref name="overload"/>
            <rng:optional><rng:attribute name="align"/></rng:optional>
            <rng:optional><rng:attribute name="nolabel"/></rng:optional>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="angle"/></rng:optional>
            <rng:optional><rng:attribute name="fill"/></rng:optional>
            <rng:optional><rng:attribute name="help"/></rng:optional>
            <rng:optional><rng:attribute name="width"/></rng:optional>
            <rng:optional><rng:attribute name="wrap"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="notebook"/>
                    <rng:ref name="field"/>
                    <rng:ref name="group"/>
                    <rng:ref name="button"/>
                    <rng:ref name="hpaned" />
                    <rng:ref name="label" />
                    <rng:ref name="separator"/>
                    <rng:ref name="image"/>
                    <rng:ref name="form"/>
                    <rng:ref name="vpaned"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="html"/>
                    <rng:element name="newline"><rng:empty/></rng:element>
                    <rng:element name="properties"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="level">
        <rng:element name="level">
            <rng:optional><rng:attribute name="object"/></rng:optional>
            <rng:optional><rng:attribute name="link"/></rng:optional>
            <rng:optional><rng:attribute name="domain"/></rng:optional>
            <rng:zeroOrMore>
                <rng:ref name="field"/>
            </rng:zeroOrMore>
            <rng:zeroOrMore>
                <rng:ref name="html"/>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="gantt">
        <rng:element name="gantt">
            <rng:optional><rng:attribute name="mode">
              <rng:choice>
                 <rng:value>day</rng:value>
                 <rng:value>3days</rng:value>
                 <rng:value>week</rng:value>
                 <rng:value>3weeks</rng:value>
                 <rng:value>month</rng:value>
                 <rng:value>3months</rng:value>
                 <rng:value>year</rng:value>
                 <rng:value>3years</rng:value>
                 <rng:value>5years</rng:value>
              </rng:choice></rng:attribute>
            </rng:optional>
            <rng:optional><rng:attribute name="color"/></rng:optional>
            <rng:optional><rng:attribute name="date_delay"/></rng:optional>
            <rng:optional><rng:attribute name="date_start"/></rng:optional>
            <rng:optional><rng:attribute name="date_stop"/></rng:optional>
            <rng:optional><rng:attribute name="date_string"/></rng:optional>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:zeroOrMore>
                <rng:optional><rng:ref name="level"/></rng:optional>
                <rng:optional><rng:ref name="field"/></rng:optional>
                <rng:optional><rng:ref name="html"/></rng:optional>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="hpaned">
        <rng:element name="hpaned">
            <rng:optional>
              <rng:attribute name="position">
                <rng:data type="int"/>
              </rng:attribute>
            </rng:optional>
            <rng:zeroOrMore>
                <rng:ref name="any" />
                <rng:optional><rng:ref name="html"/></rng:optional>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="vpaned">
        <rng:element name="vpaned">
            <rng:optional>
              <rng:attribute name="position">
                <rng:data type="int"/>
              </rng:attribute>
            </rng:optional>
            <rng:zeroOrMore>
                <rng:optional><rng:ref name="any"/></rng:optional>
                <rng:optional><rng:ref name="html"/></rng:optional>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="any">
        <rng:element>
            <rng:anyName/>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:attribute>
                        <rng:anyName/>
                    </rng:attribute>
                    <rng:text/>
                    <rng:ref name="any"/>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="page">
        <rng:element name="page">
            <rng:ref name="overload"/>
            <rng:ref name="access_rights"/>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="name"/></rng:optional>
            <rng:optional><rng:attribute name="attrs"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:element name="newline"><rng:empty/></rng:element>
                    <rng:element name="properties"><rng:empty/></rng:element>
                    <rng:ref name="label" />
                    <rng:ref name="field"/>
                    <rng:ref name="group"/>
                    <rng:ref name="separator"/>
                    <rng:ref name="button"/>
                    <rng:ref name="form" />
                    <rng:ref name="page" />
                    <rng:ref name="notebook"/>
                    <rng:ref name="hpaned"/>
                    <rng:ref name="vpaned"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="html"/>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="notebook">
        <rng:element name="notebook">
            <rng:ref name="overload"/>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="tabpos"/></rng:optional>
            <rng:oneOrMore>
                <rng:ref name="page"/>
            </rng:oneOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="separator">
        <rng:element name="separator">
            <rng:ref name="overload"/>
            <rng:ref name="access_rights"/>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="rowspan"/></rng:optional>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="col"/></rng:optional>
            <rng:optional><rng:attribute name="select"/></rng:optional>
            <rng:optional><rng:attribute name="orientation"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="separator"/>
                    <rng:ref name="button"/>
                    <rng:ref name="field"/>
                    <rng:ref name="label" />
                    <rng:ref name="group" />
                    <rng:ref name="filter"/>
                    <rng:ref name="html"/>
                    <rng:element name="properties"><rng:empty/></rng:element>
                    <rng:element name="newline"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="xpath">
        <rng:element name="xpath">
            <rng:optional><rng:attribute name="expr"/></rng:optional>
            <rng:ref name="overload"/>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="any"/>
                    <rng:ref name="button"/>
                    <rng:ref name="html"/>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="data">
        <rng:element name="data">
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="form"/>
                    <rng:ref name="tree"/>
                    <rng:ref name="field"/>
                    <rng:ref name="label"/>
                    <rng:ref name="separator"/>
                    <rng:ref name="notebook"/>
                    <rng:ref name="page"/>
                    <rng:ref name="xpath"/>
                    <rng:ref name="button"/>
                    <rng:ref name="group"/>
                    <rng:ref name="graph"/>
		    <rng:ref name="gallery"/>
                    <rng:ref name="html"/>
                    <rng:element name="newline"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="field">
        <rng:element name="field">
            <rng:attribute name="name" />
            <rng:ref name="overload"/>
            <rng:ref name="access_rights"/>
            <rng:optional><rng:attribute name="editable"/></rng:optional>
            <rng:optional><rng:attribute name="domain_filter"/></rng:optional>
            <rng:optional><rng:attribute name="attrs"/></rng:optional>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="completion"/></rng:optional>
            <rng:optional><rng:attribute name="width"/></rng:optional>
            <rng:optional><rng:attribute name="type"/></rng:optional>
            <rng:optional><rng:attribute name="ref"/></rng:optional>
            <rng:optional><rng:attribute name="eval"/></rng:optional>
            <rng:optional><rng:attribute name="search"/></rng:optional>
            <rng:optional><rng:attribute name="model"/></rng:optional>
            <rng:optional><rng:attribute name="use"/></rng:optional>
            <rng:optional><rng:attribute name="on_change"/></rng:optional>
            <rng:optional><rng:attribute name="domain"/></rng:optional>
            <rng:optional><rng:attribute name="filter_domain"/></rng:optional>
            <rng:optional><rng:attribute name="invisible"/></rng:optional>
            <rng:optional><rng:attribute name="password"/></rng:optional>
            <rng:optional><rng:attribute name="comparator"/></rng:optional>
            <rng:optional><rng:attribute name="sum"/></rng:optional>
            <rng:optional><rng:attribute name="bold"/></rng:optional>
            <rng:optional><rng:attribute name="avg"/></rng:optional>
            <rng:optional><rng:attribute name="select"/></rng:optional>
            <rng:optional><rng:attribute name="group"/></rng:optional>
            <rng:optional><rng:attribute name="operator"/></rng:optional>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="nolabel"/></rng:optional>
            <rng:optional><rng:attribute name="default"/></rng:optional>
            <rng:optional><rng:attribute name="default_get"/></rng:optional>
            <rng:optional><rng:attribute name="required"/></rng:optional>
            <rng:optional><rng:attribute name="readonly"/></rng:optional>
            <rng:optional><rng:attribute name="view_mode"/></rng:optional>
            <rng:optional><rng:attribute name="search_mode"/></rng:optional>
            <rng:optional><rng:attribute name="widget"/></rng:optional>
            <rng:optional><rng:attribute name="context"/></rng:optional>
            <rng:optional><rng:attribute name="states"/></rng:optional>
            <rng:optional><rng:attribute name="digits"/></rng:optional>
            <rng:optional><rng:attribute name="icon"/></rng:optional>
            <rng:optional><rng:attribute name="mode"/></rng:optional>
            <rng:optional><rng:attribute name="img_width"/></rng:optional>
            <rng:optional><rng:attribute name="img_height"/></rng:optional>
            <rng:optional><rng:attribute name="size"/></rng:optional>
            <rng:optional><rng:attribute name="filename"/></rng:optional>
            <rng:optional><rng:attribute name="fieldname"/></rng:optional>
            <rng:optional><rng:attribute name="height"/></rng:optional>
            <rng:optional><rng:attribute name="rowspan"/></rng:optional>
            <rng:optional><rng:attribute name="align"/></rng:optional>
            <rng:optional><rng:attribute name="selection"/></rng:optional>
            <rng:optional><rng:attribute name="default_focus"/></rng:optional>
            <rng:optional><rng:attribute name="filters"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="diagram"/>
                    <rng:ref name="form"/>
                    <rng:ref name="data"/>
                    <rng:ref name="tree"/>
                    <rng:ref name="field"/>
                    <rng:ref name="label"/>
                    <rng:ref name="separator"/>
                    <rng:ref name="xpath"/>
                    <rng:ref name="button"/>
                    <rng:ref name="group"/>
                    <rng:ref name="graph"/>
		    <rng:ref name="gallery"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="notebook"/>
                    <rng:ref name="html"/>
                    <rng:element name="newline"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="group">
        <rng:element name="group">
            <rng:ref name="overload"/>
            <rng:ref name="access_rights"/>
            <rng:optional><rng:attribute name="attrs"/></rng:optional>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="rowspan"/></rng:optional>
            <rng:optional><rng:attribute name="expand"/></rng:optional>
            <rng:optional><rng:attribute name="states"/></rng:optional>
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="fill"/></rng:optional>
            <rng:optional><rng:attribute name="height"/></rng:optional>
            <rng:optional><rng:attribute name="width"/></rng:optional>
            <rng:optional><rng:attribute name="name"/></rng:optional>
            <rng:optional><rng:attribute name="color" /></rng:optional>
            <rng:ref name="container"/>
        </rng:element>
    </rng:define>

    <rng:define name="calendar">
        <rng:element name="calendar">
            <rng:optional><rng:attribute name="string" /></rng:optional>
            <rng:optional><rng:attribute name="color" /></rng:optional>
            <rng:optional><rng:attribute name="date_start" /></rng:optional>
            <rng:optional><rng:attribute name="date_stop" /></rng:optional>
            <rng:optional><rng:attribute name="day_length" /></rng:optional>
            <rng:optional><rng:attribute name="date_delay" /></rng:optional>
            <rng:optional><rng:attribute name="type" /></rng:optional>
            <rng:optional><rng:attribute name="mode" /></rng:optional>
            <rng:oneOrMore>
                <rng:ref name="field"/>
            </rng:oneOrMore>
            <rng:zeroOrMore>
                <rng:ref name="html"/>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="graph">
        <rng:element name="graph">
            <rng:optional><rng:attribute name="string" /></rng:optional>
            <rng:optional><rng:attribute name="orientation" /></rng:optional>
            <rng:optional><rng:attribute name="type" /></rng:optional>
            <rng:optional><rng:attribute name="color"/></rng:optional>
            <rng:oneOrMore>
                <rng:ref name="field"/>
            </rng:oneOrMore>
            <rng:zeroOrMore>
                <rng:ref name="html"/>
            </rng:zeroOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="gallery">
        <rng:element name="gallery">
            <rng:optional><rng:attribute name="string"/></rng:optional>
            <rng:optional><rng:attribute name="width"/></rng:optional>
            <rng:optional><rng:attribute name="height"/></rng:optional>
            <rng:optional><rng:attribute name="col"/></rng:optional>
            <rng:oneOrMore>
                <rng:ref name="field"/>
            </rng:oneOrMore>
        </rng:element>
    </rng:define>

    <rng:define name="button">
        <rng:element name="button">
            <rng:ref name="overload"/>
            <rng:ref name="access_rights"/>
            <rng:optional><rng:attribute name="attrs"/></rng:optional>
            <rng:optional><rng:attribute name="invisible"/></rng:optional>
            <rng:optional><rng:attribute name="name" /></rng:optional>
            <rng:optional><rng:attribute name="icon" /></rng:optional>
            <rng:optional><rng:attribute name="string" /></rng:optional>
            <rng:optional><rng:attribute name="states" /></rng:optional>
            <rng:optional><rng:attribute name="type" /></rng:optional>
            <rng:optional><rng:attribute name="special" /></rng:optional>
            <rng:optional><rng:attribute name="align" /></rng:optional>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="target"/></rng:optional>
            <rng:optional><rng:attribute name="readonly"/></rng:optional>
            <rng:optional><rng:attribute name="context"/></rng:optional>
            <rng:optional><rng:attribute name="confirm"/></rng:optional>
            <rng:optional><rng:attribute name="help"/></rng:optional>
            <rng:optional><rng:attribute name="default_focus"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="form" />
                    <rng:ref name="field" />
                    <rng:ref name="tree" />
                    <rng:ref name="notebook" />
                    <rng:ref name="graph" />
                    <rng:ref name="calendar" />
                    <rng:ref name="gantt" />
                    <rng:ref name="gallery" />
                    <rng:ref name="xpath" />
                    <rng:ref name="page" />
                    <rng:ref name="separator"/>
                    <rng:ref name="button"/>
                    <rng:ref name="group"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="html"/>
                    <rng:element name="properties"><rng:empty/></rng:element>
                    <rng:element name="newline"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>

        </rng:element>
    </rng:define>

    <rng:define name="filter">
        <rng:element name="filter">
            <rng:ref name="overload"/>
            <rng:ref name="access_rights"/>
            <rng:optional><rng:attribute name="attrs"/></rng:optional>
            <rng:optional><rng:attribute name="name" /></rng:optional>
            <rng:optional><rng:attribute name="separator" /></rng:optional>
            <rng:optional><rng:attribute name="icon" /></rng:optional>
            <rng:optional><rng:attribute name="string" /></rng:optional>
            <rng:optional><rng:attribute name="type" /></rng:optional>
            <rng:optional><rng:attribute name="align" /></rng:optional>
            <rng:optional><rng:attribute name="colspan"/></rng:optional>
            <rng:optional><rng:attribute name="readonly"/></rng:optional>
            <rng:optional><rng:attribute name="context"/></rng:optional>
            <rng:optional><rng:attribute name="help"/></rng:optional>
            <rng:optional><rng:attribute name="domain"/></rng:optional>
            <rng:optional><rng:attribute name="default"/></rng:optional>
            <rng:zeroOrMore>
                <rng:choice>
                    <rng:ref name="form" />
                    <rng:ref name="field" />
                    <rng:ref name="tree" />
                    <rng:ref name="notebook" />
                    <rng:ref name="graph" />
                    <rng:ref name="calendar" />
                    <rng:ref name="gantt" />
                    <rng:ref name="xpath" />
                    <rng:ref name="page" />
                    <rng:ref name="separator"/>
                    <rng:ref name="button"/>
                    <rng:ref name="filter"/>
                    <rng:ref name="html"/>
                    <rng:element name="properties"><rng:empty/></rng:element>
                    <rng:element name="newline"><rng:empty/></rng:element>
                </rng:choice>
            </rng:zeroOrMore>

        </rng:element>
    </rng:define>

    <rng:start>
        <rng:choice>
            <rng:ref name="diagram" />
            <rng:ref name="form" />
            <rng:ref name="search" />
            <rng:ref name="group" />
            <rng:ref name="field" />
            <rng:ref name="tree" />
            <rng:ref name="notebook" />
            <rng:ref name="graph" />
            <rng:ref name="calendar" />
            <rng:ref name="data" />
            <rng:ref name="gantt" />
            <rng:ref name="gallery" />
            <rng:ref name="xpath" />
            <rng:ref name="page" />
            <rng:ref name="separator"/>
            <rng:ref name="button"/>
            <rng:ref name="filter"/>
            <rng:ref name="label" />
            <rng:ref name="html"/>
        </rng:choice>
    </rng:start>
</rng:grammar>
