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

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

<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
     schemaLocation="http://www.w3.org/2001/xml.xsd"/>

 <!--  Include MURML-scheme -->
 <!--   <xsd:include schemaLocation="file:neca_murml.xsd"/> -->

  <xsd:annotation>
    <xsd:documentation>
   !!!!!!      VERSION that contains constraintCode 
   This is a schema for specifying neca's "gesticon", i.e. lexicon of gestures
   Version 0.3 
   Last edited: 12.05.2004
   Hannes Pirker, Neil Tipper

   The purpose the gesticon is to provide a data-base which holds
   information on the set of possible gestures: their name, their
   function and/or semantics (if applicable), and information on their
   physical realisation, both in terms of location and timing.

   This gesticon is to be used by both the M-NLG as well as the GA-module.

 * todo: the specification of constraints should make use of XPath! 

 Changelog:

  hp 15.4.: 
* enforce "version=0.3"

  hp 14.1.:
*  allow for attributes "begin" / "end" in addition to "aligntype" in order to allow for more variability in the temporal alignment. 
*  allow for optional attribute "priority" 
*  introduce different form-types for modalities body and face 
   (the latter including info on mouth and eye_brows)
* allow a attribute "specialpos" in type handpos 
   
  hp 13.1.: 
  allow optinal attribute "time" at version/last edited
  add brigitte's facial "meanings" e.g. "sad" "fear" "Schelm"...

    </xsd:documentation> 
  </xsd:annotation>

 <!-- =======================================================   --> 
  <xsd:annotation>
    <xsd:documentation>The toplevel element: necaGesticon</xsd:documentation>
  </xsd:annotation>
  <!-- =======================================================   --> 
 
  <xsd:element name="necaGesticon">
    <xsd:annotation>
      <xsd:documentation>
	The root node of the gesture lexicon
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
	<xsd:element name="comment" type="xsd:string" minOccurs="0" 
		     maxOccurs="1"/>

	<!-- constraintCodes will become mandatory! optionality is for 
	     testing only --> 	
	<xsd:element name="constraintCodes" type="constraintCodes" 
		     minOccurs="0" maxOccurs="1"/>
	<xsd:element name="gesticonEntry" type="gesticonEntryType" minOccurs="1"
		     maxOccurs="unbounded"/>
	
      </xsd:sequence>
      <xsd:attribute name="version" use="required" fixed="0.3" type="float.range1"/>
      <xsd:attribute name="date"    use="optional" type="xsd:string"/>
      <xsd:attribute name="time"    use="optional" type="xsd:string"/>
    </xsd:complexType>
  </xsd:element>


<!-- =============================================================== -->
<!-- ======================== constraintCode(s) ==================== -->
<!-- =============================================================== -->

  <xsd:complexType name="constraintCodes">
    <xsd:annotation>
      <xsd:documentation>
	The element that holds the constraint-codes
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="constraintCode" type="constraintCodeType" minOccurs="1" maxOccurs="unbounded" />
    </xsd:sequence>
    <!-- mapgoal: in theory different mappings could be specified 
    in neca mapgoal always is "rrl" --> 
    <xsd:attribute name="mapgoal" use="required" type="xsd:string"/> 
  </xsd:complexType>
 

 <xsd:element name="logicals" abstract="true"/>
  <xsd:annotation>
    <xsd:documentation>The 'logical_struct' 
      group uses this abstract element. Elements with 'logicals' as
      their substitution class are then alternatives for
      'logical_truct'. Currently these are 'and' | 'or' and 'not'</xsd:documentation>
  </xsd:annotation>

  <xsd:group name="logical_struct">
    <xsd:sequence>
      <xsd:element ref="logicals"/>
    </xsd:sequence>
  </xsd:group>

  <!-- top-level element "constraint" to be used in logical-structure -->
  <xsd:element name="constraint"  type="gestureConstraint"/>

 <!-- logical_struct - elements -->
  <xsd:element name="and" type="andType" substitutionGroup="logicals"/>
  <xsd:complexType name="andType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:group   ref="logical_struct"/>
      <xsd:element ref="constraint"/>
    </xsd:choice>
  </xsd:complexType>

  <xsd:element name="or" type="orType" substitutionGroup="logicals"/>
  <xsd:complexType name="orType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:group   ref="logical_struct"/>
      <xsd:element ref="constraint"/>
    </xsd:choice>
  </xsd:complexType>

  <xsd:element name="not" type="notType" substitutionGroup="logicals"/>
  <xsd:complexType name="notType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:group   ref="logical_struct"/>
      <xsd:element ref="constraint"/>
    </xsd:choice>
  </xsd:complexType>


  <xsd:complexType name="constraintCodeType">
    <xsd:annotation>
      <xsd:documentation>
	the constraint-element within constraintMapping
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:annotation>
	<xsd:documentation>
	  verbatim: just provide a text describing the purpose of this constraint
	</xsd:documentation>
      </xsd:annotation>
      <xsd:element name="verbatim" type="xsd:string" 
		   minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
    <!-- name is the KEY to <constraint> -->
    <xsd:attribute name="name" use="required" type="xsd:ID"/> 
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <!-- the "special" value is reserved for all unforseen cases 
	  it is intended that it is handled by "special" - java code -->
	  <xsd:enumeration value="special"/>
	  <!-- still unclear: what happens, when a attribute is missing?? -->
	  <xsd:enumeration value="attributeEquals"/>
	  <xsd:enumeration value="attributeInRangeLong"/>
	  <xsd:enumeration value="attributeInRangeFloat"/>
	  <xsd:enumeration value="attributeLessThanLong"/>
	  <xsd:enumeration value="attributeGreaterThanLong"/>
	  <xsd:enumeration value="attributeLessThanFloat"/>
	  <xsd:enumeration value="attributeGreaterThanFloat"/>
	  <!-- is there a necessity for "negation-types"???? 
	    what is the semantic when attribute is missing at all??? -->
	  <xsd:enumeration value="attributeNotEquals"/>
	  <xsd:enumeration value="attributeNotInRangeLong"/>
	  <xsd:enumeration value="attributeNotInRangeFloat"/>
	  <!-- not shure, whether the "Exists"-type is useful at all  -->
	  <xsd:enumeration value="elementExists"/>
	  <!-- the TEXTUAL content of an element is checked for equality -->
	  <xsd:enumeration value="elementTextEquals"/>

	  <xsd:enumeration value="attributeExists"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="scope" use="required">
      <xsd:annotation>	
	<xsd:documentation>
	  scope: specify where the elements/attributes are to be found: at the dialogueAct-level or at the speakerInfo-level
	</xsd:documentation>
      </xsd:annotation>
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="dialogueAct"/>
	  <xsd:enumeration value="speakerInfo"/>
	  <!-- there could be cases  when you want to check properties of the adressee, e.g. his/her gender. In RRL multiple adresses are allowed, thus ONE has to be sprcified here --> 
	  <xsd:enumeration value="addresseeInfo"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <!-- the element within rrl where attribute is located -->
    <xsd:attribute name="element" use="required" type="xsd:string"/>
    <!-- the attribute within the RRL which is to be used for comparison -->
    <xsd:attribute name="attribute" use="required" type="xsd:string"/>
    
    <xsd:attribute name="compareTo" use="required">
      <xsd:annotation>	
	<xsd:documentation>
	  compareTo specifies the name of the attribute in gesticonEntry which is to be 
	  compared with. At the moment this is always "val" for testing equality/ less/ greater than/  and "range" for the others. But in the future additional attributes could be employed
	</xsd:documentation>
      </xsd:annotation>    
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="val"/>
	  <xsd:enumeration value="range"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>
 

<!-- ======================================================= -->

  <xsd:complexType name="gesticonEntryType">
    <xsd:annotation>
      <xsd:documentation>
	The type of gesture entries in the gesticon
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:annotation>
	<xsd:documentation>
	  verbatim: just provide a text describing the gesture
	</xsd:documentation>
      </xsd:annotation>
      <xsd:element name="verbatim" type="xsd:string" 
		   minOccurs="0" maxOccurs="1" />
      <xsd:element name="restrictions" type="gestureRestrict" minOccurs="0" maxOccurs="1" />
      <!-- Specify (any number) of possible functions of a gesture -->
      <xsd:element name="function" type="gestureFunctionType" 
		   minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="form" type="gestureFormType" 
	           minOccurs="0" maxOccurs="1"/>
      <xsd:element name="playercode" type="playerCode" 
	           minOccurs="1" maxOccurs="unbounded"/>
    </xsd:sequence>
    <!-- "identifier" is NOT the unique key anymore: there may be several entried e.g. one for ritchie and one for tina. At the moment "identifier" and "meaning" fullfil the same purpose: decide WHICH one to keep  -->
    <xsd:attribute name="identifier"  use="required" type="xsd:string"/>
    <!-- "key" now is the unique key -->
    <xsd:attribute name="key"         use="required" type="xsd:ID"/>
    <xsd:attribute name="modality" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <!-- WHAT ELSE?  -->
	  <xsd:enumeration value="viseme"/>
	  <xsd:enumeration value="body"/> <!-- obsolete? to be used for complex movements? -->
	  <xsd:enumeration value="face"/>
	  <xsd:enumeration value="head"/>
	  <xsd:enumeration value="posture"/>
	  <xsd:enumeration value="arms"/>
	  <xsd:enumeration value="legs"/>
	  <xsd:enumeration value="unknown"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <!-- priority from 0-10, not shure whether this will be used at all!
         Alternatively gestures could automatically be ranked according to
	their "type": emblematic > iconic > deictic > beat > unspecific > idle  -->
    <xsd:attribute name="priority"   use="optional" type="int.range10"/>	
  </xsd:complexType>
    
 <!-- =======================================================   --> 


  <xsd:complexType name="gestureRestrict">
    <xsd:annotation>
      <xsd:documentation>
	Element that holds any application restriction for a gesture be it emotion, personality, cultural factors etc.
      </xsd:documentation>
    </xsd:annotation>
  <!--   <xsd:sequence> -->
      <!-- hier sollte AND und OR und evtl. NOT erlaubt werden --> 
      <xsd:choice>
	<xsd:group ref="logical_struct"/>
      </xsd:choice>
      <!-- 
      <xsd:element name="constraint"   type="gestureConstraint"  minOccurs="0" maxOccurs="unbounded"/>
      -->
  <!--     </xsd:sequence> -->
  </xsd:complexType>

  <xsd:complexType name="gestureConstraint">
    <xsd:annotation>
      <xsd:documentation>
	Constraints for application of gesture
      </xsd:documentation>
    </xsd:annotation>

    <xsd:attribute name="name"   use="required" type="xsd:IDREF"/>
    <xsd:attribute name="val"    use="optional" type="xsd:string"/>
<!-- todo: specify range more exactly: allow only "xxx:yyy" --> 
    <xsd:attribute name="range"  use="optional" type="xsd:string"/>
  </xsd:complexType>


  <xsd:complexType name="gestureFunctionType">
    <xsd:annotation>
      <xsd:documentation>
	Specifying Functions of a gesture. This information is to be
	used in order to keep a gesture "underspecified". There might
	be a number of gestures with the same value for "function" -
	e.g. "greeting". Gesture assignment then can pick one of them.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <!-- WHAT ELSE?  beat-emphsizing? -->
	  <xsd:enumeration value="idle"/>
	  <xsd:enumeration value="iconic"/>
	  <xsd:enumeration value="emblematic"/>
	  <xsd:enumeration value="deictic"/>
	  <xsd:enumeration value="beat"/>
	  <xsd:enumeration value="unspecific"/>
	  <xsd:enumeration value="unknown"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <!-- attach_to should be "da" "np" "vp" "word" "accent" -->
    <xsd:attribute name="attach_to" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <!-- WHAT ELSE?   -->
	  <xsd:enumeration value="word"/>
	  <xsd:enumeration value="np"/>
	  <xsd:enumeration value="vp"/>
	  <xsd:enumeration value="pp"/>
	  <xsd:enumeration value="sentence"/>
	  <xsd:enumeration value="dialogueAct"/>
	  <xsd:enumeration value="accent"/> <!-- ??? for beat ??? -->
	  <xsd:enumeration value="phoneme"/>
	  <xsd:enumeration value="none"/>
	  <xsd:enumeration value="unknown"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <!-- start and end can have both positive and negative values 
    and is to be used in order to fine-control delayed start/end times.
    The value of "start" "end" always is relative to the start/end of the object it is aligned to. Currently this has a clear semantic for parallel-alignment only ??? -->
    <xsd:attribute name="start" type="xsd:integer" use="optional" />
    <xsd:attribute name="end"   type="xsd:integer" use="optional" />

    <!-- reuse alignType from neca-rrl -->
    <xsd:attribute name="aligntype" type="alignType" use="required" />

    <xsd:attribute name="meaning" use="required">
      <xsd:simpleType>
      <!-- at the moment it's just an unrestricted string -->
      <xsd:restriction base="xsd:string">
	<!-- add the list of possible values here -->
	<xsd:enumeration value="unknown"/>	
	<xsd:enumeration value="toDo"/> <!-- for beat, unspecific and deictic -->
	<xsd:enumeration value="none"/> <!-- for beat, unspecific and deictic -->
	<xsd:enumeration value="NA"/> <!-- NA = Not Available -->
	<xsd:enumeration value="big"/> <!-- example of iconic gesture -->
	<xsd:enumeration value="box"/> <!-- example of iconic gesture -->
	<xsd:enumeration value="ego"/> <!-- for deictic gesture to speaker  -->
	<xsd:enumeration value="you"/> <!-- for deictic gesture to hearer   -->
	<!-- greeting goodbye etc. might be better put under <restriction>???  -->
	<xsd:enumeration value="greeting"/>
	<xsd:enumeration value="goodbye"/>
	<!-- additional "meanings" used in facial expressions, 
	maybe there should be a betteer place han meaning ????  -->
	<xsd:enumeration value="sad"/>
	<xsd:enumeration value="happy"/>
	<xsd:enumeration value="fear"/>
	<xsd:enumeration value="anger"/>
	<xsd:enumeration value="disgust"/>
	<xsd:enumeration value="neutral"/>
	<xsd:enumeration value="surprise"/>
	<xsd:enumeration value="melancholy"/>
	<xsd:enumeration value="false_laugh"/>
	<xsd:enumeration value="disdain"/>
	<xsd:enumeration value="reproach"/>
	<xsd:enumeration value="Schelm"/>
	<xsd:enumeration value="dreamy"/>
 

      </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute> 
  </xsd:complexType>


<!-- Note: this has been copied from neca_rrl.xsd  
     should probably be imported from that schema instead ? -->
  <xsd:simpleType name="alignType">
    <xsd:restriction base="xsd:string">
      <xsd:annotation>
	<xsd:documentation>
	  How are gesture G and "alignto" element X coupled to each other?
          PARALELLISM
	  par_start :    G and X start at the same time
	  par_end   :    G and X stops at the same time
	  
          par_adjust_to_fit	(formerly: par_stretch)
	:   G's duration is forced to be the same as X's : they start and stop at the same time

	  atstress:  G is aligned to the STRESSED position of X

	  SEQUENTIALITY
	  seq_before :    G is performed before X --> preceede
	  seq_after  :    G is performed after  X --> succeede
	</xsd:documentation>
      </xsd:annotation>


      <xsd:enumeration value="toDo"/>
      <xsd:enumeration value="unknown"/>
      <!-- parallelism -->
      <!-- par_start -->
      <xsd:enumeration value="par"/>
      <xsd:enumeration value="par_start"/>
      <xsd:enumeration value="par_end"/>
      <xsd:enumeration value="par_stretch"/>
      <!-- a better name for par_stretch ??? -->
      <xsd:enumeration value="par_adjust_to_fit"/> 
      <!-- sequentiality -->
      <xsd:enumeration value="seq_before"/>
      <xsd:enumeration value="seq_after"/>
      <!-- or do you prefer the following tags instead ?? -->
      <xsd:enumeration value="preceede"/>
      <xsd:enumeration value="succeede"/>
      <!-- special value: align "around" stressed-positions, to be used for beat-gestures? -->
      <xsd:enumeration value="atstress"/>
      <!-- "none" could be used when a <gesture> is alone in a speech-act (or is the first one in a sequence of <gesture>s -->
      <xsd:enumeration value="none"/>
    </xsd:restriction>
  </xsd:simpleType>

<!-- =================================================== -->


  <xsd:complexType name="gestureFormType">
    <xsd:annotation>
      <xsd:documentation>
	Specifying the physisical realisation -- especially the timing behaviour of a gesture 
      </xsd:documentation>
    </xsd:annotation>
    <!-- A gesture may be composed of a <prepare> a <stroke> and a <retract>  phase -->
    <xsd:sequence>
      <xsd:choice maxOccurs="1">
	<!-- mouth and brow-positions -->
	<xsd:element name="position" type="position_face"
		     minOccurs="0" maxOccurs="1"/>
	<!-- the start and end-position of the hand -->
	<xsd:element name="position" type="position_hands" 
		     minOccurs="0" maxOccurs="1"/>
      </xsd:choice>
      <xsd:element name="components" minOccurs="0" maxOccurs="1">
	<xsd:complexType>
	  <xsd:sequence>
	    <xsd:element name="prepare"  type="gestureForm" minOccurs="0" />
	    <xsd:element name="hold"     type="gestureForm" minOccurs="0" />
	    <xsd:element name="stroke"   type="gestureForm" minOccurs="0" />
	    <xsd:element name="hold"     type="gestureForm" minOccurs="0" />
	    <xsd:element name="retract"  type="gestureForm" minOccurs="0" />
	  </xsd:sequence>
	</xsd:complexType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>

 <xsd:complexType name="position_face">
    <xsd:annotation>
      <xsd:documentation>
	Specifying the physisical realisation -- shape-info for mouth, eye_brows...
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="mouth"     type="mouthpos" minOccurs="0" maxOccurs="1"/>
      <xsd:element name="eye_brows" type="browpos"  minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
</xsd:complexType>


 <xsd:complexType name="mouthpos">
    <xsd:annotation>
      <xsd:documentation>
	Shape-info for mouth
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="smile_open"/>
	  <xsd:enumeration value="smile_closed"/>
	  <xsd:enumeration value=""/>
	  <xsd:enumeration value=""/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>


 <xsd:complexType name="browpos">
    <xsd:annotation>
      <xsd:documentation>
	Shape-info for brows
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="up"/>
	  <xsd:enumeration value="down"/>
	  <xsd:enumeration value="inner_down"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>


 <xsd:complexType name="position_hands">
    <xsd:annotation>
      <xsd:documentation>
	Specifying the physisical realisation -- start and end-poition of hands 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <!-- minOccurs="0" is only for testing --> 
      <xsd:element name="start" type="handpos" minOccurs="0" maxOccurs="1"/>
      <xsd:element name="end" type="handpos" minOccurs="0" maxOccurs="1"/>
    </xsd:sequence>
</xsd:complexType>

  <xsd:complexType name="handpos">
    <xsd:annotation>
      <xsd:documentation>
	left and right present information on the position of left and right hands in space. This value is used in order to check whether 2 gesture can be concatenated, whether an idle-gesture (going back to a neutral position) etc. 
In attribute "specialpos" special-positions can be specified. This is to be used for gestures which need a certain well defined neighbour: gestures are only allowed if specialpos-attribute of the neighbouring gestures are compatible (equal). 
Specially suited for return-gestures in Charamel! 
      </xsd:documentation>
    </xsd:annotation>    
    <xsd:attribute name="left"    type="handpos1" />
    <xsd:attribute name="right"   type="handpos1" />
    <xsd:attribute name="special" type="xsd:string" use="optional"/>
  </xsd:complexType>

 <xsd:simpleType name="handpos1">
    <xsd:annotation>
      <xsd:documentation>
        Values:
            (T)op (M)id (D)own
            (O)utside (C)entral
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="TC"/>
      <xsd:enumeration value="TO"/>
      <xsd:enumeration value="MC"/>
      <xsd:enumeration value="MO"/>
      <xsd:enumeration value="DC"/>
      <xsd:enumeration value="DO"/>
    </xsd:restriction>
  </xsd:simpleType>


  <xsd:complexType name="gestureForm">
    <xsd:annotation>
      <xsd:documentation>
	Specifying the timing behaviour of a gesture 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="dur">
	<xsd:complexType>
	  <xsd:attributeGroup ref="gestTimingAttr"/>
	</xsd:complexType>
      </xsd:element>
      <!-- later on other elements should follow that describe the form ...--> 
    </xsd:sequence>
    <!-- do we really need an id here? -->
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <!-- static or dynamic -->
    <xsd:attribute name="type" use="optional">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="static"/>
	  <xsd:enumeration value="dynamic"/>
	  <xsd:enumeration value="unknown"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>

  <xsd:attributeGroup name="gestTimingAttr">
    <xsd:attribute name="min"        type="dur" use="optional"/>
    <xsd:attribute name="default"    type="dur" use="required"/>
    <xsd:attribute name="max"        type="dur" use="optional"/>
  </xsd:attributeGroup>


  <xsd:complexType name="playerCode">
    <xsd:annotation>
      <xsd:documentation>
	Specifying link to player-specific code
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="flash"/>
	  <xsd:enumeration value="msagent"/>
	  <xsd:enumeration value="charactor"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <!-- type of "id" should be IDREF, but this is impossible -->
    <xsd:attribute name="id"     use="required" type="xsd:string"/>
    <!-- person: tina, ritchie, any -->
    <!-- is NOT part of playercode anymore, but has to be specified under <restricions> -->
    <!-- 
    <xsd:attribute name="person" use="required">
      <xsd:simpleType>
	<xsd:restriction base="xsd:string">
	  <xsd:enumeration value="tina"/>
	  <xsd:enumeration value="ritchie"/>
	  <xsd:enumeration value="any"/>
	</xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>	
    -->
    <!-- the default duration (needed for charactor): a copy of the value found in <form> -->
    <xsd:attribute name="length" use="optional" type="dur"/>
  </xsd:complexType>

<!-- ======================================================= -->

  <xsd:annotation>
    <xsd:documentation>General Datatypes</xsd:documentation>
  </xsd:annotation>


 <!-- 

 ATTENTION: this is the same as "duration" in neca_murml.xsd
  
  <xsd:simpleType name="dur">
    <xsd:annotation>
      <xsd:documentation>Duration follows "Times" in
	CCS specification; e.g. "25ms", "3s"</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]+m?s"/>
    </xsd:restriction>
  </xsd:simpleType>
-->

  <!-- for the moment being we only allow integer: all values are in [ms]
  and in addition the special value "$dur"  -->
  <xsd:simpleType name="dur">
    <xsd:union memberTypes="xsd:nonNegativeInteger specialDurVal"/>
    <!--  this was:
        <xsd:restriction base="xsd:nonNegativeInteger"/>
    -->
    </xsd:simpleType>

  <xsd:simpleType name="specialDurVal">
    <!-- special value used in attribute "dur" -->
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="$dur"/>
    </xsd:restriction>
  </xsd:simpleType>

<!-- but compare rrl:zeroToOneScaleType -->
 <!-- float.range1 is also defined in neca.murml.xsd -->

  <xsd:simpleType name="float.range1">
    <xsd:annotation>
      <xsd:documentation>0.0 - 100.0 </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:float">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="100.0"/>
    </xsd:restriction>
  </xsd:simpleType>


 <xsd:simpleType name="int.range10">
    <xsd:annotation>
      <xsd:documentation>0 - 10</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="10"/>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>




