<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
  ns="http://www.xmlmind.com/xmleditor/schema/example3" 
  xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <ref name="doc-element"/>
  </start>

  <define name="doc-element">
    <element name="doc">
      <oneOrMore>
        <ref name="para-element"/>
      </oneOrMore>
    </element>
  </define>

  <define name="para-element">
    <element name="para">
      <mixed>
        <optional>
          <attribute name="align" a:defaultValue="left">
            <choice>
              <value>left</value>
              <value>center</value>
              <value>right</value>
            </choice>
          </attribute>
        </optional>
      </mixed>
    </element>
  </define>
</grammar>
