<?xml version="1.0" ?>
<xs:schema targetNamespace="http://xaira.org/ns/1.0" xmlns:q="http://xaira.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="xgrammar">
		<xs:complexType>
			<xs:all>
				<xs:element name="labels">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="label" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence></xs:sequence>
									<xs:attribute name="element" type="xs:string" />
									<xs:attribute name="attribute" type="xs:string" />
									<xs:attribute name="id" type="xs:ID" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="wtags">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="wtag" maxOccurs="unbounded" minOccurs="0">
								<xs:complexType>
									<xs:sequence />
									<xs:attribute name="gi" type="xs:string" />
									<xs:attribute name="id" type="xs:ID" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
        <xs:element name="addkeys">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="addkey" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="codebook" type="q:codebooktype" maxOccurs="unbounded"></xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:string" />
                  <xs:attribute name="gloss" type="xs:string" />
                  <xs:attribute name="freq" type="xs:nonNegativeInteger" />
                  <xs:attribute name="lemma" type="q:yesno" default="no" />
                  <xs:attribute name="id" type="xs:ID" />
                  <xs:attribute name="attribute" type="xs:string" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="lemmaschemes">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="lemmascheme" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="key" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence></xs:sequence>
                        <xs:attribute name="name" type="xs:string" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:string" />
                  <xs:attribute name="gloss" type="xs:string" />
                  <xs:attribute name="id" type="xs:ID" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      <xs:element name="regions">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="region" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="value" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence></xs:sequence>
                        <xs:attribute name="name" type="xs:string" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:string" />
                  <xs:attribute name="gloss" type="xs:string" />
                  <xs:attribute name="addkey" type="xs:nonNegativeInteger" />
                  <xs:attribute name="id" type="xs:ID" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
          <xs:element name="namespaces">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="namespace" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence />
									<xs:attribute name="uri" type="xs:string" />
									<xs:attribute name="freq" type="xs:nonNegativeInteger" />
									<xs:attribute name="id" type="xs:ID" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="elements">
					<xs:complexType>
						<xs:sequence>
							<xs:sequence>
								<xs:element name="globals" minOccurs="0" maxOccurs="1">
									<xs:complexType>
										<xs:sequence>
											<xs:element name="attribute" type="q:attributetype" maxOccurs="unbounded" minOccurs="0" />
										</xs:sequence>
									</xs:complexType>
								</xs:element>
								<xs:element name="element" minOccurs="0" maxOccurs="unbounded">
									<xs:complexType>
										<xs:sequence>
											<xs:element name="attribute" type="q:attributetype" maxOccurs="unbounded" minOccurs="0" />
										</xs:sequence>
										<xs:attribute name="name" type="xs:string" />
										<xs:attribute name="gloss" type="xs:string" />
										<xs:attribute name="freq" type="xs:nonNegativeInteger" />
										<xs:attribute name="id" type="xs:ID" use="required" />
										<xs:attribute name="ns" type="xs:string" />
										<xs:attribute name="bib" type="q:yesno" default="no" />
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="bibelements" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="element" minOccurs="0" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="attribute" type="q:attributetype" maxOccurs="unbounded" minOccurs="0" />
									</xs:sequence>
									<xs:attribute name="name" type="xs:string" />
									<xs:attribute name="gloss" type="xs:string" />
									<xs:attribute name="freq" type="xs:nonNegativeInteger" />
									<xs:attribute name="id" type="xs:ID" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="taxonomies">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="taxonomy" maxOccurs="unbounded" type="q:taxonomytype"></xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="chartable" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="char" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence></xs:sequence>
									<xs:attribute name="name" type="xs:string" />
									<xs:attribute name="code" type="xs:hexBinary" />
									<xs:attribute name="freq" type="xs:string" />
									<xs:attribute name="id" type="xs:ID" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="radix" type="xs:positiveInteger" />
					</xs:complexType>
				</xs:element>
				<xs:element name="coderanges">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="charset" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence />
									<xs:attribute name="name" type="xs:string" />
									<xs:attribute name="id" type="xs:ID" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:all>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="attributetype">
		<xs:sequence>
			<xs:element name="menu" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="item" maxOccurs="unbounded">
							<xs:complexType>
								<xs:sequence />
								<xs:attribute name="name" type="xs:string" />
								<xs:attribute name="desc" type="xs:string" />
								<xs:attribute name="id" type="xs:ID" />
								<xs:attribute name="taxid" type="xs:string" />
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="id" type="xs:ID" />
				</xs:complexType>
			</xs:element>
			<xs:element name="codebook" type="q:codebooktype" minOccurs="0" />
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" />
		<xs:attribute name="gloss" type="xs:string" />
		<xs:attribute name="freq" type="xs:nonNegativeInteger" />
		<xs:attribute name="id" type="xs:ID" use="required" />
		<xs:attribute name="ip" type="q:iptype" />
		<xs:attribute name="target" type="xs:string" />
		<xs:attribute name="taxid" type="xs:string" />
		<xs:attribute name="ns" type="xs:string" />
		<xs:attribute name="bib" type="q:yesno" default="no" />
	</xs:complexType>
	<xs:complexType name="codebooktype">
		<xs:sequence>
			<xs:element name="code" maxOccurs="unbounded" minOccurs="0">
				<xs:complexType>
					<xs:sequence />
					<xs:attribute name="name" type="xs:string" />
					<xs:attribute name="gloss" type="xs:string" />
					<xs:attribute name="freq" type="xs:nonNegativeInteger" />
					<xs:attribute name="id" type="xs:ID" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:ID" />
	</xs:complexType>
	<xs:simpleType name="yesno">
		<xs:restriction base="xs:string">
			<xs:enumeration value="yes" />
			<xs:enumeration value="no" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="iptype">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ID" />
			<xs:enumeration value="IDREF" />
			<xs:enumeration value="CDATA" />
			<xs:enumeration value="MULTIDREFS" />
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="taxonomytype">
		<xs:sequence>
			<xs:choice maxOccurs="unbounded" minOccurs="0">
				<xs:element name="taxonomy" type="q:taxonomytype" />
				<xs:element name="class">
					<xs:complexType>
						<xs:sequence />
						<xs:attribute name="desc" type="xs:string" />
						<xs:attribute name="taxid" type="xs:string" />
						<xs:attribute name="id" type="xs:ID" />
					</xs:complexType>
				</xs:element>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="desc" type="xs:string" />
		<xs:attribute name="taxid" type="xs:string" />
		<xs:attribute name="id" type="xs:ID" />
	</xs:complexType>
</xs:schema>