<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsd:schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
                            "http://www.w3.org/2001/XMLSchema.dtd" [
<!ENTITY % p 'xsd:'>
<!ENTITY % s ':xsd'>
<!-- keep this schema XML 1.0 valid -->
<!ATTLIST xsd:schema
    xmlns:xsi CDATA #FIXED 'http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation CDATA #IMPLIED
>
]>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            targetNamespace="http://www.w3.org/1999/xhtml"
            xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd"
            version="1.1" xml:lang="en">

	<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
* $RCSfile: max-ruby.xsd,v $
* $Revision: 1.4 $
* $Date: 2001/05/21 19:02:06 $
* $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:anyAttribute namespace="##other"/>
	</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:element name="ruby">
	<xsd:complexType>
		<xsd:group ref="Ruby.content"/>
		<xsd:attributeGroup ref="Ruby.common.attlist"/>
	</xsd:complexType>
	</xsd:element>	

	<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:element name="rbc">
	<xsd:complexType>
		<xsd:sequence maxOccurs="unbounded">
			<xsd:element ref="rb"/>
		</xsd:sequence>
		<xsd:attributeGroup ref="Rbc.common.attlist"/>
	</xsd:complexType>
	</xsd:element>	
	
	<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:element name="rtc">
	<xsd:complexType>
		<xsd:sequence maxOccurs="unbounded">
			<xsd:element ref="rt"/>
		</xsd:sequence>
		<xsd:attributeGroup ref="Rtc.common.attlist"/>
	</xsd:complexType>
	</xsd:element>
	
	<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:element name="rb">
	<xsd:complexType 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>	

	<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:element name="rt">
	<xsd:complexType 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>	
	
	<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:element name="rp">
	<xsd:complexType mixed="true">
		<xsd:attributeGroup ref="Rp.common.attlist"/>
	</xsd:complexType>
	</xsd:element>	

</xsd:schema>
