<?xml version="1.0" encoding="utf-8"?>
<rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:teix="http://www.tei-c.org/ns/Examples" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://www.w3.org/2005/11/its"><!--Schema generated 2006-02-17T11:19:30+09:00
--><!--Set predeclared macros-->
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="data.selector">
      <rng:text xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="data.itsBoolean">
      <rng:choice xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec">
         <rng:value>yes</rng:value>
         <rng:value>no</rng:value>
      </rng:choice>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="data.dirValues">
      <rng:choice xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec">
         <rng:value>ltr</rng:value>
         <rng:value>rtl</rng:value>
         <rng:value>lro</rng:value>
         <rng:value>rlo</rng:value>
      </rng:choice>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="data.locInfoType">
      <rng:choice xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec">
         <rng:value>alert</rng:value>
         <rng:value>description</rng:value>
      </rng:choice>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="data.itsBooleanTrue">
      <rng:choice xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec">
         <rng:value>yes</rng:value>
      </rng:choice>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.selector.attributes">
      <ref name="att.selector.attribute.translateSelector"/>
      <ref name="att.selector.attribute.locInfoSelector"/>
      <ref name="att.selector.attribute.termSelector"/>
      <ref name="att.selector.attribute.dirSelector"/>
      <ref name="att.selector.attribute.rubySelector"/>
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.selector.attribute.translateSelector">
      <rng:optional>
         <rng:attribute name="translateSelector" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.selector"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.selector.attribute.locInfoSelector">
      <rng:optional>
         <rng:attribute name="locInfoSelector" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.selector"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.selector.attribute.termSelector">
      <rng:optional>
         <rng:attribute name="termSelector" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.selector"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.selector.attribute.dirSelector">
      <rng:optional>
         <rng:attribute name="dirSelector" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.selector"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.selector.attribute.rubySelector">
      <rng:optional>
         <rng:attribute name="rubySelector" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.selector"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="documentRules">
      <element name="documentRules">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">This element contains rules for ITS information, to be used in documents.</a:documentation>
         <ref name="documentRules.content"/>
         <ref name="documentRules.attributes"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="documentRules.content">
      <rng:group xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec">
         <rng:zeroOrMore>
            <rng:ref name="ns"/>
         </rng:zeroOrMore>
         <rng:oneOrMore>
            <rng:ref name="documentRule"/>
         </rng:oneOrMore>
      </rng:group>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="documentRules.attributes">
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="ns">
      <element name="ns">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">An element to describe namespace URIs and prefixes within XPath expressions in
                selector attributes.</a:documentation>
         <ref name="ns.content"/>
         <ref name="ns.attributes"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="ns.content">
      <rng:empty xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="ns.attributes">
      <ref name="att.nsident.attributes"/>
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.nsident.attributes">
      <ref name="att.nsident.attribute.prefix"/>
      <ref name="att.nsident.attribute.uri"/>
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.nsident.attribute.prefix">
      <rng:attribute name="prefix" ns="http://www.w3.org/2005/11/its">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
         <data type="NCName"/>
      </rng:attribute>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.nsident.attribute.uri">
      <rng:attribute name="uri" ns="http://www.w3.org/2005/11/its">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
         <data type="anyURI"/>
      </rng:attribute>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="documentRule">
      <element name="documentRule">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">A rule to express ITS information and select parts of a document respectively.
                documentRule is to be used in a in rule context only.</a:documentation>
         <ref name="documentRule.content"/>
         <ref name="documentRule.attributes"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="documentRule.content">
      <rng:empty xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="documentRule.attributes">
      <ref name="att.selector.attributes"/>
      <ref name="att.datacats.attributes"/>
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="schemaRule">
      <element name="schemaRule">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">A rule to express ITS information about the element declaration to which the
                schemaRule element is attached as schema annotation.</a:documentation>
         <ref name="schemaRule.content"/>
         <ref name="schemaRule.attributes"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="schemaRule.content">
      <rng:empty xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="schemaRule.attributes">
      <ref name="att.datacats.attributes"/>
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attributes">
      <ref name="att.datacats.attribute.translate"/>
      <ref name="att.datacats.attribute.locInfo"/>
      <ref name="att.datacats.attribute.locInfoType"/>
      <ref name="att.datacats.attribute.term"/>
      <ref name="att.datacats.attribute.termRef"/>
      <ref name="att.datacats.attribute.dir"/>
      <ref name="att.datacats.attribute.rubyText"/>
      <empty/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.translate">
      <rng:optional>
         <rng:attribute name="translate" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.itsBoolean"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.locInfo">
      <rng:optional>
         <rng:attribute name="locInfo" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <text/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.locInfoType">
      <rng:optional>
         <rng:attribute name="locInfoType" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.locInfoType"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.term">
      <rng:optional>
         <rng:attribute name="term" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.itsBooleanTrue"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.termRef">
      <rng:optional>
         <rng:attribute name="termRef" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <data type="anyURI"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.dir">
      <rng:optional>
         <rng:attribute name="dir" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <ref name="data.dirValues"/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.datacats.attribute.rubyText">
      <rng:optional>
         <rng:attribute name="rubyText" ns="http://www.w3.org/2005/11/its">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
            <text/>
         </rng:attribute>
      </rng:optional>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="rubyBase">
      <element name="rubyBase">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
         <ref name="rubyBase.content"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="rubyBase.content">
      <rng:text xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="ruby">
      <element name="ruby">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
         <ref name="ruby.content"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="ruby.content">
      <rng:group xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec">
         <rng:ref name="rubyBase"/>
         <rng:ref name="rubyText"/>
      </rng:group>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="rubyText">
      <element name="rubyText">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
         <ref name="rubyText.content"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="rubyText.content">
      <rng:text xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="span">
      <element name="span">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">An element used as a general container for ITS data category attributes.</a:documentation>
         <ref name="span.content"/>
         <ref name="span.attributes"/>
      </element>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="span.content">
      <rng:text xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spec="http://example.com/xmlspec"/>
   </define>
   <define xmlns="http://relaxng.org/ns/structure/1.0" name="span.attributes">
      <ref name="att.datacats.attributes"/>
      <empty/>
   </define>
   <rng:start>
      <rng:ref name="documentRules"/>
   </rng:start>
</rng:grammar>