<?xml version="1.0"?>
<grammar ns="http://www.example.com/choice"
         xmlns="http://relaxng.org/ns/structure/1.0">
  <start> 
    <element name="doc" ns="">
      <ref name="elem"/>
      <optional>
        <ref name="elem"/>
        <optional>
          <ref name="elem"/>
        </optional>
      </optional>
    </element>
  </start>

  <define name="elem">
    <element name="elem" ns="">
      <text/>
    </element>
  </define>
</grammar>
