<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified"
 xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
>
    <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" 
               schemaLocation="xhtml-datatypes-1.xsd" />
    <xs:annotation>
        <xs:documentation>
      This is the XML Schema module for Ruby Basic.
      $Id: xhtml-ruby-basic-1.xsd,v 1.6 2005/09/26 22:54:53 ahby Exp $
    </xs:documentation>
        <xs:documentation source="xhtml-copyright-1.xsd"/>
    </xs:annotation>
    <xs:annotation>
        <xs:documentation>
      "Ruby" are short runs of text alongside the base text, typically
      used in East Asian documents to indicate pronunciation or to
      provide a short annotation. The full specification for Ruby is here:
      
        http://www.w3.org/TR/2001/REC-ruby-20010531/

      This module defines "Ruby Basic" or "simple Ruby" as described
      in the specification:
      
        http://www.w3.org/TR/ruby/#simple-ruby1
        
      This module declares the elements and their attributes used to
      support simple ruby annotation markup. Elements defined here are
          * ruby, rb, rt, rp
      Ruby Basic does not use the rbc or rtc elements.
      The content of the ruby element for Ruby Basic
      uses the rp element for fallback purposes.        
    </xs:documentation>
        <xs:documentation source="http://www.w3.org/TR/2001/REC-ruby-20010531/#simple-ruby1"/>
    </xs:annotation>
    <xs:group name="xhtml.ruby.content.simple">
        <xs:sequence>
            <xs:element name="rb" type="xhtml.rb.type"/>
            <xs:choice>
                <xs:element name="rt" type="xhtml.rt.type"/>
                <xs:sequence>
                    <xs:element name="rp" type="xhtml.rp.type"/>
                    <xs:element name="rt" type="xhtml.rt.type"/>
                    <xs:element name="rp" type="xhtml.rp.type"/>
                </xs:sequence>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <!-- 
   add to this group any common attributes for all Ruby elements 
  -->
    <xs:attributeGroup name="xhtml.ruby.common.attrib"/>
    <xs:complexType name="xhtml.ruby.type">
        <xs:group ref="xhtml.ruby.content.simple"/>
        <xs:attributeGroup ref="xhtml.ruby.common.attrib"/>
    </xs:complexType>
    <!-- 
   rb (ruby base) element 
  -->
    <xs:attributeGroup name="xhtml.rb.attrib">
        <xs:attributeGroup ref="xhtml.ruby.common.attrib"/>
    </xs:attributeGroup>
    <xs:complexType name="xhtml.rb.type" mixed="true">
        <xs:attributeGroup ref="xhtml.rb.attrib"/>
    </xs:complexType>
    <!--
   rt (ruby text) element 
  -->
    <xs:attributeGroup name="xhtml.rt.attrib">
        <xs:attributeGroup ref="xhtml.ruby.common.attrib"/>
    </xs:attributeGroup>
    <!--
   Note that the rbspan element is not used in Ruby Basic
  -->
    <xs:complexType name="xhtml.rt.type" mixed="true">
        <xs:attributeGroup ref="xhtml.rt.attrib"/>
    </xs:complexType>
    <!-- 
   rp (ruby parenthesis) element 
  -->
    <xs:attributeGroup name="xhtml.rp.attrib">
        <xs:attributeGroup ref="xhtml.ruby.common.attrib"/>
    </xs:attributeGroup>
    <xs:complexType name="xhtml.rp.type" mixed="true">
        <xs:attributeGroup ref="xhtml.rp.attrib"/>
    </xs:complexType>
</xs:schema>

