<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.text-technology.de/sekimo/doc"
  targetNamespace="http://www.text-technology.de/sekimo/doc"
  xmlns:sgf="http://www.text-technology.de/sekimo" xmlns:xml="http://www.w3.org/XML/1998/namespace"
  elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" />
  <xsd:import namespace="http://www.text-technology.de/sekimo" schemaLocation="root.xsd" />
  <xsd:element name="text">
    <xsd:complexType>
      <xsd:choice maxOccurs="unbounded">
        <xsd:element ref="para"/>
        <xsd:element ref="list"/>
        <xsd:element ref="nontext"/>
      </xsd:choice>
      <xsd:attributeGroup ref="attlist.text"/>
      <xsd:attribute ref="sgf:segment" use="required" />
      <xsd:attribute ref="sgf:previousVersionLogEntry" use="optional" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="para">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element minOccurs="0" maxOccurs="unbounded" ref="inline"/>
      </xsd:sequence>
      <xsd:attributeGroup ref="attlist.para"/>
      <xsd:attribute ref="sgf:segment" use="required" />
      <xsd:attribute ref="sgf:previousVersionLogEntry" use="optional" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="inline">
    <xsd:complexType>
      <xsd:attributeGroup ref="attlist.inline"/>
      <xsd:attribute ref="sgf:segment" use="required" />
      <xsd:attribute ref="sgf:previousVersionLogEntry" use="optional" />
    	<xsd:attribute ref="xml:lang"/>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="list">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element maxOccurs="unbounded" ref="item"/>
      </xsd:sequence>
      <xsd:attributeGroup ref="attlist.list"/>
    	<xsd:attribute ref="sgf:segment"/>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="item">
    <xsd:complexType>
      <xsd:choice maxOccurs="unbounded">
        <xsd:element ref="list"/>
        <xsd:element ref="nontext"/>
        <xsd:element ref="para"/>
      </xsd:choice>
      <xsd:attribute ref="sgf:segment" use="required" />
      <xsd:attribute ref="sgf:previousVersionLogEntry" use="optional" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="nontext">
    <xsd:complexType>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element ref="para"/>
        <xsd:element ref="nontext"/>
      </xsd:choice>
      <xsd:attributeGroup ref="attlist.nontext"/>
      <xsd:attribute ref="sgf:segment" use="required" />
      <xsd:attribute ref="sgf:previousVersionLogEntry" use="optional" />
    </xsd:complexType>
  </xsd:element>
  <xsd:attributeGroup name="attlist.text">
    <xsd:attribute ref="xml:lang" use="optional" />    
  </xsd:attributeGroup>
  <xsd:attributeGroup name="attlist.nontext">
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:token">
          <xsd:enumeration value="image"/>
          <xsd:enumeration value="table"/>
          <xsd:enumeration value="other"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:attributeGroup>
  <xsd:attributeGroup name="attlist.para">
    <xsd:attribute ref="xml:lang" />
    <xsd:attribute name="skip" default="no">
      <xsd:simpleType>
        <xsd:restriction base="xsd:token">
          <xsd:enumeration value="yes"/>
          <xsd:enumeration value="no"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="type">
      <xsd:simpleType>
        <xsd:restriction base="xsd:token">
          <xsd:enumeration value="caption"/>
          <xsd:enumeration value="ling_example"/>
          <xsd:enumeration value="other"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:attributeGroup>
  <xsd:attributeGroup name="attlist.inline">
    <xsd:attribute name="lang"/>
  </xsd:attributeGroup>
  <xsd:attributeGroup name="attlist.list">
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:token">
          <xsd:enumeration value="ordered"/>
          <xsd:enumeration value="unordered"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:attributeGroup>
</xsd:schema>

