<grammar xmlns="http://relaxng.org/ns/structure/1.0">

  <define name="inline">
    <zeroOrMore>
      <ref name="inline.class"/>
    </zeroOrMore>
  </define>

  <define name="inline.class">
    <choice>
      <text/>
      <element name="bold">
	<ref name="inline"/>
      </element>
      <element name="italic">
	<ref name="inline"/>
      </element>
    </choice>
  </define>

</grammar>