<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.w3.org/1999/xhtml"
            xmlns="http://www.w3.org/1999/xhtml"
            version="1.1">

  <xsd:annotation>
    <xsd:documentation>
/**
* This is the XML Schema Ruby module for XHTML
*  Please use this formal public identifier to identify it:
*           "-//W3C//ELEMENTS XHTML Ruby 1.0//EN"
*
*/
    </xsd:documentation>

    <xsd:documentation>
/**
*
* Versioning block

* Author: Daniel Austin modified by Masayasu Ishikawa
* $RCSfile: xhtml-ruby-1.xsd,v $
* $Revision: 1.3 $
* $Date: 2001/05/31 11:43:58 $
* $Author: mimasa $
* (remove the NO below to see the full revision log)
* Log: $NOLog: $
*
*/
    </xsd:documentation>

    <xsd:documentation>
/**
* Ruby Elements
*
*        ruby, rbc, rtc, rb, rt, rp
*
*     This module declares the elements and their attributes used to
*     support ruby annotation markup.
*
*/
    </xsd:documentation>
    
  <xsd:documentation source="xhtml-copyright-1.txt"/>

  </xsd:annotation>
  
  <xsd:annotation>
    <xsd:documentation>
    Fragments for the content model of the ruby element
    </xsd:documentation>
  </xsd:annotation>

  <xsd:group name="Ruby.content.simple.fallback">
    <xsd:sequence>
      <xsd:element ref="rb"/>
      <xsd:choice>
        <xsd:element ref="rt"/>
        <xsd:sequence>
          <xsd:element ref="rp"/>
          <xsd:element ref="rt"/>
          <xsd:element ref="rp"/>
        </xsd:sequence>
      </xsd:choice>
    </xsd:sequence>
  </xsd:group>

  <xsd:group name="Ruby.content.simple">
    <xsd:sequence>
      <xsd:element ref="rb"/>
      <xsd:element ref="rt"/>
    </xsd:sequence>
  </xsd:group>

  <xsd:group name="Ruby.content.complex">
    <xsd:sequence>
      <xsd:element ref="rbc"/>
      <xsd:element ref="rtc"/>
      <xsd:element ref="rtc" minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
  </xsd:group>
  
  <xsd:annotation>
    <xsd:documentation>
    ruby element
    </xsd:documentation>
  </xsd:annotation>

  <xsd:attributeGroup name="Ruby.common.attrib">
    <xsd:annotation>
      <xsd:documentation>
    Ruby Common Attributes
  
     This attributeGroup provides an easy way to define common
    attributes for ruby elements. Ruby elements are intended to
    have common attributes of its parent markup language.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:attributeGroup>


  <xsd:attributeGroup name="Ruby.common.attlist">
    <xsd:annotation>
      <xsd:documentation>
      common attributes for ruby
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Ruby.common.attrib"/>
    <xsd:anyAttribute namespace="##other"/>
  </xsd:attributeGroup>

  <xsd:group name="Ruby.content">
    <xsd:choice>
      <xsd:group ref="Ruby.content.simple.fallback"/>
      <xsd:group ref="Ruby.content.complex"/>
    </xsd:choice>
  </xsd:group>
  
  <xsd:complexType name="Ruby.type">
    <xsd:group ref="Ruby.content"/>
    <xsd:attributeGroup ref="Ruby.common.attlist"/>
  </xsd:complexType>
  
  <xsd:element name="ruby" type="Ruby.type"/>

  <xsd:annotation>
    <xsd:documentation>
    rbc (ruby base component) element
    </xsd:documentation>

  </xsd:annotation>

  <xsd:attributeGroup name="Rbc.common.attlist">
    <xsd:annotation>
      <xsd:documentation>
      common attributes for rbc
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Ruby.common.attrib"/>
    <xsd:anyAttribute namespace="##other"/>
  </xsd:attributeGroup>
  
  <xsd:complexType name="Rbc.type">
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element ref="rb"/>
    </xsd:sequence>
    <xsd:attributeGroup ref="Rbc.common.attlist"/>
  </xsd:complexType>
  
  <xsd:element name="rbc" type="Rbc.type"/>
  
  <xsd:annotation>
    <xsd:documentation>
    rtc (ruby text component) element
    </xsd:documentation>
  </xsd:annotation>

  <xsd:attributeGroup name="Rtc.common.attlist">
    <xsd:annotation>
      <xsd:documentation>
      common attributes for rtc
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Ruby.common.attrib"/>
    <xsd:anyAttribute namespace="##other"/>
  </xsd:attributeGroup>
  
  <xsd:complexType name="Rtc.type">
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element ref="rt"/>
    </xsd:sequence>
    <xsd:attributeGroup ref="Rtc.common.attlist"/>
  </xsd:complexType>
  
  <xsd:element name="rtc" type="Rtc.type"/>

  <xsd:annotation>
    <xsd:documentation>
    rb (ruby base) element
    </xsd:documentation>
  </xsd:annotation>

  <xsd:attributeGroup name="Rb.common.attlist">
    <xsd:annotation>
      <xsd:documentation>
      common attributes for rb
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Ruby.common.attrib"/>
    <xsd:anyAttribute namespace="##other"/>
  </xsd:attributeGroup>
  
  <xsd:complexType name="Rb.type" mixed="true">
    <xsd:annotation>
      <xsd:documentation>
      Rb.type should not allow ruby descendent elements
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Rb.common.attlist"/>
  </xsd:complexType>
  
  <xsd:element name="rb" type="Rb.type"/>
  
  <xsd:annotation>
    <xsd:documentation>
    rt (ruby text) element
    </xsd:documentation>
  </xsd:annotation>

  <xsd:attributeGroup name="Rt.common.attlist">
    <xsd:annotation>
      <xsd:documentation>
      common attributes for rt

      rbspan attribute is used for complex ruby only
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attribute name="rbspan" type="xsd:positiveInteger"
      use="optional" default="1"/>
    <xsd:anyAttribute namespace="##other"/>
  </xsd:attributeGroup>

  <xsd:complexType name="Rt.type" mixed="true">
    <xsd:annotation>
      <xsd:documentation>
      Rt.type should not allow ruby descendent elements
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Rt.common.attlist"/>
  </xsd:complexType>
  
  <xsd:element name="rt" type="Rt.type"/>
  
  <xsd:annotation>
    <xsd:documentation>
    rp (ruby parenthesis) element
    </xsd:documentation>
  </xsd:annotation>

  <xsd:attributeGroup name="Rp.common.attlist">
    <xsd:annotation>
      <xsd:documentation>
      common attributes for rp
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attributeGroup ref="Ruby.common.attrib"/>
    <xsd:anyAttribute namespace="##other"/>
  </xsd:attributeGroup>

  <xsd:complexType name="Rp.type" mixed="true">
    <xsd:attributeGroup ref="Rp.common.attlist"/>
  </xsd:complexType>
  
  <xsd:element name="rp" type="Rp.type"/>

</xsd:schema>
