<schema xmlns="http://www.ascc.net/xml/schematron"
        xmlns:x1="http://www.w3.org/1999/xhtml"
        xmlns:x2="http://www.w3.org/2002/06/xhtml2/">
  <title>Schematron schema for Ruby Annotation</title>

  <ns prefix="x1" uri="http://www.w3.org/1999/xhtml"/>
  <ns prefix="x2" uri="http://www.w3.org/2002/06/xhtml2/"/>

  <p>Author: Masayasu Ishikawa</p>

  <p>CAUTION: This is purely experimental.</p>

  <pattern name="Exclusion" id="exclusion"
    see="http://www.w3.org/TR/ruby/#rb">

    <rule role="ruby_nest1" context="x1:ruby">
      <report test="ancestor::x1:ruby"
      >The ruby element MUST NOT contain other ruby elements.</report>
    </rule>

    <rule role="ruby_nest2" context="x2:ruby">
      <report test="ancestor::x2:ruby"
      >The ruby element MUST NOT contain other ruby elements.</report>
    </rule>

  </pattern>

</schema>
