<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
    targetNamespace="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:its="http://www.w3.org/2005/11/its">
    <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
    <!--
    Schema generated from ODD source 2006-09-08T01:47:58+09:00. This schema has been developed using the ODD (One Document Does it
    all) language of the Text Encoding Initiative (). This is a literate programming language for writing XML schemas, with three
    characteristics: (1) The element and attribute set is specified using
      an XML vocabulary which includes support for macros
      (like DTD entities, or schema patterns), a hierarchical
      class system for attributes and elements, and creation
      of modules. (2) The content models for elements and attributes is
      written using embedded RELAX NG XML notation. (3) Documentation for elements, attributes, value
      lists etc. is written inline, along with examples and
      other supporting material. XSLT transformations
      are provided by the TEI to extract documentation in
      HTML, XSL FO or LaTeX forms, and to generate RELAX NG
      documents and DTD. From the RELAX NG documents, James
      Clark's trang
      can be used to create XML Schema documents.
  -->
    <xs:element name="rules">
        <xs:annotation>
            <xs:documentation>Container for global rules.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="its:rules.content">
                    <xs:attributeGroup ref="its:rules.attributes"/>
                    <xs:attributeGroup ref="xml:specialAttrs"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="rules.content">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="its:ns"/>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="its:translateRule"/>
                <xs:element ref="its:locInfoRule"/>
                <xs:element ref="its:termRule"/>
                <xs:element ref="its:dirRule"/>
                <xs:element ref="its:rubyRule"/>
                <xs:element ref="its:langRule"/>
                <xs:element ref="its:withinTextRule"/>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>
    <xs:attributeGroup name="rules.attributes">
        <xs:attributeGroup ref="its:att.version.attributes"/>
        <xs:attribute ref="xlink:href"/>
    </xs:attributeGroup>
    <xs:element name="ns">
        <xs:annotation>
            <xs:documentation>An element to describe namespace URIs and prefixes within XPath
                expressions in rules elements.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:ns.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="ns.attributes">
        <xs:attribute name="prefix" use="required" type="xs:NCName">
            <xs:annotation>
                <xs:documentation>The namespace prefix used in selection
                expressions.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="uri" use="required" type="xs:anyURI">
            <xs:annotation>
                <xs:documentation>The namespace being identified.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.selector.attributes">
        <xs:attributeGroup ref="its:att.selector.attribute.selector"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.selector.attribute.selector">
        <xs:attribute name="selector" use="required" type="xs:string">
            <xs:annotation>
                <xs:documentation>Expression identifing the nodes to be selected.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.version.attributes">
        <xs:attributeGroup ref="its:att.version.attribute.version"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.version.attribute.version">
        <xs:attribute name="version" use="required" form="qualified" type="xs:float">
            <xs:annotation>
                <xs:documentation>Version of the ITS schema.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="span">
        <xs:annotation>
            <xs:documentation>Inline element to contain ITS information.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="its:span.content">
                    <xs:attributeGroup ref="its:span.attributes"/>
                    <xs:attributeGroup ref="xml:specialAttrs"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="span.content" mixed="true">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="its:ruby"/>
        </xs:sequence>
    </xs:complexType>
    <xs:attributeGroup name="span.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:element name="translateRule">
        <xs:annotation>
            <xs:documentation>Rule about translatability.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:translateRule.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="translateRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="translate" use="required">
            <xs:annotation>
                <xs:documentation>The translatability information to be applied to selected
                nodes.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="yes">
                        <xs:annotation>
                            <xs:documentation>The nodes need to be translated.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="no">
                        <xs:annotation>
                            <xs:documentation>The nodes must not be translated.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.translate.attributes">
        <xs:attributeGroup ref="its:att.translate.attribute.translate"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.translate.attribute.translate">
        <xs:attribute name="translate" form="qualified">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="yes">
                        <xs:annotation>
                            <xs:documentation>The nodes need to be translated.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="no">
                        <xs:annotation>
                            <xs:documentation>The nodes must not be translated.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="locInfoRule">
        <xs:annotation>
            <xs:documentation>Rule about localization information.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="its:locInfoRule.content">
                    <xs:attributeGroup ref="its:locInfoRule.attributes"/>
                    <xs:attributeGroup ref="xml:specialAttrs"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="locInfoRule.content">
        <xs:sequence>
            <xs:element minOccurs="0" ref="its:locInfo"/>
        </xs:sequence>
    </xs:complexType>
    <xs:attributeGroup name="locInfoRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="locInfoPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node that holds the
                    localization information.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="locInfoType" use="required">
            <xs:annotation>
                <xs:documentation>The type of localization information.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="alert">
                        <xs:annotation>
                            <xs:documentation>Localization information is an
                            alert.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="description">
                        <xs:annotation>
                            <xs:documentation>Localization information is a
                            description.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="locInfoRef" type="xs:anyURI">
            <xs:annotation>
                <xs:documentation>URI referring to the location of the localization
                information.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="locInfoRefPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node that holds the URI
                    referring to the location of the localization information.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="locInfo">
        <xs:annotation>
            <xs:documentation>Contains localization information.</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attributeGroup ref="its:locInfo.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="locInfo.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.locInfo.attributes">
        <xs:attributeGroup ref="its:att.locInfo.attribute.locInfo"/>
        <xs:attributeGroup ref="its:att.locInfo.attribute.locInfoType"/>
        <xs:attributeGroup ref="its:att.locInfo.attribute.locInfoRef"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.locInfo.attribute.locInfo">
        <xs:attribute name="locInfo" form="qualified" type="xs:string">
            <xs:annotation>
                <xs:documentation>Localization information.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.locInfo.attribute.locInfoType">
        <xs:attribute name="locInfoType" form="qualified">
            <xs:annotation>
                <xs:documentation>The type of localization information.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="alert">
                        <xs:annotation>
                            <xs:documentation>Localization information is an
                            alert.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="description">
                        <xs:annotation>
                            <xs:documentation>Localization information is a
                            description.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.locInfo.attribute.locInfoRef">
        <xs:attribute name="locInfoRef" form="qualified" type="xs:anyURI">
            <xs:annotation>
                <xs:documentation>URI referring to the location of the localization
                information.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="termRule">
        <xs:annotation>
            <xs:documentation>Rule about terminological information.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:termRule.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="termRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="termInfoRef" type="xs:anyURI">
            <xs:annotation>
                <xs:documentation>Pointer to a resource containing information about the
                term.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="termInfoRefPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>The location of a local pointer to a resource containing
                    information about the term. </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.term.attributes">
        <xs:attributeGroup ref="its:att.term.attribute.termInfoRef"/>
        <xs:attributeGroup ref="its:att.term.attribute.term"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.term.attribute.termInfoRef">
        <xs:attribute name="termInfoRef" form="qualified" type="xs:anyURI">
            <xs:annotation>
                <xs:documentation>Pointer to a resource containing information about the
                term.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.term.attribute.term">
        <xs:attribute name="term" form="qualified">
            <xs:annotation>
                <xs:documentation>Indicates a term locally.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="yes">
                        <xs:annotation>
                            <xs:documentation>Only the value 'yes' is possible for the term
                                attribute.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="dirRule">
        <xs:annotation>
            <xs:documentation>Rule about directionality.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:dirRule.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="dirRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="dir" use="required">
            <xs:annotation>
                <xs:documentation>The text direction for the selection.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="ltr">
                        <xs:annotation>
                            <xs:documentation>Left-to-right text.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="rtl">
                        <xs:annotation>
                            <xs:documentation>Right-to-left text.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="lro">
                        <xs:annotation>
                            <xs:documentation>Left-to-right override.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="rlo">
                        <xs:annotation>
                            <xs:documentation>Right-to-left override.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.dir.attributes">
        <xs:attributeGroup ref="its:att.dir.attribute.dir"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="att.dir.attribute.dir">
        <xs:attribute name="dir" form="qualified">
            <xs:annotation>
                <xs:documentation>The text direction for the context.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="ltr">
                        <xs:annotation>
                            <xs:documentation>Left-to-right text.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="rtl">
                        <xs:annotation>
                            <xs:documentation>Right-to-left text.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="lro">
                        <xs:annotation>
                            <xs:documentation>Left-to-right override.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="rlo">
                        <xs:annotation>
                            <xs:documentation>Right-to-left override.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="rubyRule">
        <xs:annotation>
            <xs:documentation>Rule about Ruby markup.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:rubyRule.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="rubyRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="rubyPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a ruby element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rbPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a rb element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rtPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a rt element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rpPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a rp element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rbcPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a rbc element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rtcPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a rtc element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rubyText" type="xs:string">
            <xs:annotation>
                <xs:documentation>Ruby text.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rbspanPointer" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which corresponds to
                    a rbspan attribute.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="ruby">
        <xs:annotation>
            <xs:documentation>Ruby markup.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="its:ruby.content">
                    <xs:attributeGroup ref="its:ruby.attributes"/>
                    <xs:attributeGroup ref="xml:specialAttrs"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="ruby.content">
        <xs:choice>
            <xs:sequence>
                <xs:element ref="its:rb"/>
                <xs:choice>
                    <xs:element ref="its:rt"/>
                    <xs:sequence>
                        <xs:element ref="its:rp"/>
                        <xs:element ref="its:rt"/>
                        <xs:element ref="its:rp"/>
                    </xs:sequence>
                </xs:choice>
            </xs:sequence>
            <xs:sequence>
                <xs:element ref="its:rbc"/>
                <xs:element ref="its:rtc"/>
                <xs:element minOccurs="0" ref="its:rtc"/>
            </xs:sequence>
        </xs:choice>
    </xs:complexType>
    <xs:attributeGroup name="ruby.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:element name="rb">
        <xs:annotation>
            <xs:documentation>Ruby base text.</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attributeGroup ref="its:rb.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="rb.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:element name="rt">
        <xs:annotation>
            <xs:documentation>Ruby text.</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attributeGroup ref="its:rt.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="rt.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
        <xs:attribute name="rbspan" type="xs:string">
            <xs:annotation>
                <xs:documentation>Allows an rt element to span multiple rb elements in complex ruby
                    markup.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="rbc">
        <xs:annotation>
            <xs:documentation>Container for rb elements in the case of complex ruby
            markup.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="its:rbc.content">
                    <xs:attributeGroup ref="its:rbc.attributes"/>
                    <xs:attributeGroup ref="xml:specialAttrs"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="rbc.content">
        <xs:sequence>
            <xs:element maxOccurs="unbounded" ref="its:rb"/>
        </xs:sequence>
    </xs:complexType>
    <xs:attributeGroup name="rbc.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:element name="rtc">
        <xs:annotation>
            <xs:documentation>Container for rt elements in the case of complex ruby markup.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="its:rtc.content">
                    <xs:attributeGroup ref="its:rtc.attributes"/>
                    <xs:attributeGroup ref="xml:specialAttrs"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="rtc.content">
        <xs:sequence>
            <xs:element maxOccurs="unbounded" ref="its:rt"/>
        </xs:sequence>
    </xs:complexType>
    <xs:attributeGroup name="rtc.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:element name="rp">
        <xs:annotation>
            <xs:documentation>Used in the case of simple ruby markup to specify characters that can
                denote the beginning and end of ruby text when user agents do not have other ways to
                present ruby text distinctively from the base text.</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attributeGroup ref="its:rp.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="rp.attributes">
        <xs:attributeGroup ref="its:att.translate.attributes"/>
        <xs:attributeGroup ref="its:att.locInfo.attributes"/>
        <xs:attributeGroup ref="its:att.term.attributes"/>
        <xs:attributeGroup ref="its:att.dir.attributes"/>
    </xs:attributeGroup>
    <xs:element name="langRule">
        <xs:annotation>
            <xs:documentation>Rule about language identification markup.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:langRule.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="langRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="langPointer" use="required" type="xs:string">
            <xs:annotation>
                <xs:documentation>Relative XPath expression pointing to a node which contains
                    language information.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <xs:element name="withinTextRule">
        <xs:annotation>
            <xs:documentation>Rule about markup of "intext" elements.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attributeGroup ref="its:withinTextRule.attributes"/>
            <xs:attributeGroup ref="xml:specialAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="withinTextRule.attributes">
        <xs:attributeGroup ref="its:att.selector.attributes"/>
        <xs:attribute name="withinText" use="required">
            <xs:annotation>
                <xs:documentation>States whether current context is regarded as "within
                text".</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="yes">
                        <xs:annotation>
                            <xs:documentation>The element and its content are part of the flow of
                                its parent element.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="no">
                        <xs:annotation>
                            <xs:documentation>The element splits the text flow of its parent element
                                and its content is an independent text flow.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="nested">
                        <xs:annotation>
                            <xs:documentation>The element is part of the flow of its parent element,
                                its content is an independent flow.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
</xs:schema>
