<?xml version="1.0" encoding="ISO-8859-1"?>


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:annotation>
      <xsd:documentation>
      hp. 25.11.2002 The purpose of this scheme is to define
      'smil-related' elements (i.e. 'par' and 'seq' to be used within
      neca. This might be replaced by a REAL integration of smil20 one
      day.
    </xsd:documentation>
</xsd:annotation>

 <xsd:element name="struct" abstract="true"/>
  <xsd:annotation>
    <xsd:documentation>The 'smil_structure' 
      group uses this abstract element. Elements with 'struct' as
      their substitution class are then alternatives for
      'structrure'. Currently these are 'seq' and 'par'</xsd:documentation>
  </xsd:annotation>

  <xsd:group name="smil_structure">
    <xsd:sequence>
      <xsd:element ref="struct"/>
    </xsd:sequence>
  </xsd:group>

<xsd:element name="awc" abstract="true">
   <xsd:annotation>
      <xsd:documentation>The 'allowed-within-container'
	group uses this abstract element. Elements with awc as
	their substitution class are then alternatives for
	'allowed-within-container'. 
      These are the 'leafs' allowed in the smil_structure elements</xsd:documentation>
    </xsd:annotation>
 </xsd:element>

 <xsd:group name="allowed-within-container">
    <xsd:choice>
      <xsd:element ref="awc"/>
    </xsd:choice>
  </xsd:group>

 <!-- smil_structure - elements -->
  <xsd:element name="par" type="parType" substitutionGroup="struct"/>
  <xsd:complexType name="parType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:group ref="smil_structure"/>
      <xsd:group ref="allowed-within-container"/>
    </xsd:choice>
    <xsd:attributeGroup ref="smil_timingAttributes"/>
 </xsd:complexType>

  <xsd:element name="seq" type="seqType" substitutionGroup="struct"/>
  <xsd:complexType name="seqType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:group ref="smil_structure"/>
      <xsd:group ref="allowed-within-container"/>
    </xsd:choice>
    <xsd:attributeGroup ref="smil_timingAttributes"/>
  </xsd:complexType>

 <!-- allowed-within-container - elements -->
 <!-- E.g. <gesture> ,  <act>, <audio> and <viseme> : these will be defined in the rrl-schema -->

 <xsd:attributeGroup name="smil_timingAttributes">
    <xsd:annotation>
      <xsd:documentation> Timing attributes for smil : at the moment
      only integer are allowed, which are interpreted as [ms] Later on
      values like "3.2s" or "25ms" could be allowed
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="dur"    type="xsd:nonNegativeInteger"                 use="optional"/>
    <xsd:attribute name="begin"  type="xsd:integer"             default="0"    use="optional"/>
    <xsd:attribute name="end"    type="xsd:nonNegativeInteger"                 use="optional"/>
 </xsd:attributeGroup>

</xsd:schema>
