<?xml version="1.0"?>
<!DOCTYPE xsd:schema SYSTEM "http://www.w3.org/1999/XMLSchema.dtd"[
<!ENTITY % p "xsd:" >
<!ENTITY % s ":xsd" >
<!-- keep this schema XML 1.0 valid -->
<!ATTLIST xsd:schema
    xmlns:html CDATA #FIXED "http://www.w3.org/1999/xhtml"
>
]>
<xsd:schema
  xmlns:xsd="http://www.w3.org/1999/XMLSchema"
  targetNamespace="http://www.w3.org/1999/xhtml"
  xmlns:html="http://www.w3.org/1999/xhtml"
  elementFormDefault="unqualified"
  attributeFormDefault="unqualified">

  <xsd:annotation>
    <xsd:documentation xml:lang="en">
	Group ruby
    </xsd:documentation>
  </xsd:annotation>

  <xsd:complexType name="ruby.group.content"
                   base="html:ruby.minimal" derivedBy="extension">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
	Extend the content model to allow group ruby.
      </xsd:documentation>
    </xsd:annotation>

    <xsd:choice>
      <xsd:sequence>
        <xsd:element ref="html:rb"/>
        <xsd:choice>
          <xsd:element ref="html:rt"/>
          <xsd:sequence>
            <xsd:element ref="html:rp"/>
            <xsd:element ref="html:rt"/>
            <xsd:element ref="html:rp"/>
          </xsd:sequence>
        </xsd:choice>
      </xsd:sequence>
      <xsd:sequence>
        <xsd:element ref="html:rbc"/>
        <xsd:element ref="html:rtc"/>
        <xsd:element ref="html:rtc" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
    </xsd:choice>
  </xsd:complexType>

  <xsd:annotation>
    <xsd:documentation xml:lang="en">
	rbc: ruby base component
    </xsd:documentation>
  </xsd:annotation>

  <xsd:complexType name="rbc.minimal" content="elementOnly" abstract="true">
    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
      <xsd:element ref="html:rb"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:annotation>
    <xsd:documentation xml:lang="en">
	Define complexTypes "rbc.content" and "rbc.attrib" to extend
	the content model and the attribute list of the rbc element
	respectively.
    </xsd:documentation>
  </xsd:annotation>

  <xsd:complexType name="rbc.final"
                   base="html:rbc.attrib" derivedBy="extension"/>

  <xsd:element name="rbc" type="html:rbc.final"/>

  <xsd:annotation>
    <xsd:documentation xml:lang="en">
	rtc: ruby text component
    </xsd:documentation>
  </xsd:annotation>

  <xsd:complexType name="rtc.minimal" content="elementOnly" abstract="true">
    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
      <xsd:element ref="html:rt"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:annotation>
    <xsd:documentation xml:lang="en">
	Define complexTypes "rtc.content" and "rtc.attrib" to extend
	the content model and the attribute list of the rtc element
	respectively.
    </xsd:documentation>
  </xsd:annotation>

  <xsd:complexType name="rtc.final"
                   base="html:rtc.attrib" derivedBy="extension"/>

  <xsd:element name="rtc" type="rtc.final"/>

  <xsd:complexType name="rt.attrib"
                   base="html:rt.minimal" derivedBy="extension">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
	The rbspan attribute is added only when group ruby is used.
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attribute name="rbspan" type="xsd:positiveInteger"
                   use="default" value="1"/>
  </xsd:complexType>

</xsd:schema>
