<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<xsd:group name="ifElements">
		<xsd:sequence>
			<xsd:element ref="if" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:group>
	<xsd:group name="eventElements">
		<xsd:choice>
			<xsd:element ref="cancel" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="move" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="send" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:group>
	<xsd:group name="dialogElements">
		<xsd:choice>
			<xsd:element ref="dialogprepare" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="dialogstart" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="dialogterminate" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:group>
	<xsd:group name="executableContent">
		<xsd:choice>
			<xsd:group ref="dialogElements"/>
			<xsd:group ref="ecmaScriptElements"/>
			<xsd:group ref="eventElements"/>
			<xsd:group ref="fetchElements"/>
			<xsd:group ref="ifElements"/>
			<xsd:group ref="telephonyActionElements"/>
			<xsd:element ref="createccxml" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="log" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="exit" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:group>
	<xsd:group name="ecmaScriptElements">
		<xsd:choice>
			<xsd:element ref="var" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="assign" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:group>
	<xsd:group name="fetchElements">
		<xsd:choice>
			<xsd:element ref="fetch" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="goto" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:group>
	<xsd:group name="telephonyActionElements">
		<xsd:choice>
			<xsd:element ref="accept" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="createcall" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="createconference" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="destroyconference" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="disconnect" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="join" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="merge" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="redirect" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="reject" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="unjoin" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:group>
	<xsd:element name="accept">
		<xsd:complexType>
			<xsd:attribute name="connectionid" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="cancel">
		<xsd:complexType>
			<xsd:attribute name="sendid" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="assign">
		<xsd:complexType>
			<xsd:attribute name="name" use="required" type="VariableName.datatype"/>
			<xsd:attribute name="expr" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="createcall">
		<xsd:complexType>
			<xsd:attribute name="dest" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="connectionid" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="aai" type="ECMAScript.expression"/>
			<xsd:attribute name="callerid" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
			<xsd:attribute name="timeout" type="ECMAScript.expression"/>
			<xsd:attribute name="joinid" type="ECMAScript.expression"/>
			<xsd:attribute name="joindirection" default="'both'" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="createccxml">
		<xsd:complexType>
			<xsd:attribute name="next" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="namelist" type="VariableNames.datatype"/>
			<xsd:attribute name="method" default="'get'" type="ECMAScript.expression"/>
			<xsd:attribute name="sessionid" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="timeout" type="ECMAScript.expression"/>
			<xsd:attribute name="maxage" type="ECMAScript.expression"/>
			<xsd:attribute name="maxstale" type="ECMAScript.expression"/>
			<xsd:attribute name="enctype" default="'application/x-www-form-urlencoded'" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="createconference">
		<xsd:complexType>
			<xsd:attribute name="conferenceid" use="required" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
			<xsd:attribute name="confname" type="ECMAScript.expression"/>
			<xsd:attribute name="reservedtalkers" type="ECMAScript.expression"/>
			<xsd:attribute name="reservedlisteners" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ccxml">
		<xsd:complexType>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:group ref="ecmaScriptElements"/>
				<xsd:element ref="eventprocessor" minOccurs="1" maxOccurs="1"/>
				<xsd:element ref="meta" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="metadata" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:choice>
			<xsd:attribute name="version" use="required" type="ccxml.version"/>
			<xsd:attribute ref="xml:base"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="destroyconference">
		<xsd:complexType>
			<xsd:attribute name="conferenceid" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="dialogprepare">
		<xsd:complexType>
			<xsd:attribute name="connectionid" type="ECMAScript.expression"/>
			<xsd:attribute name="conferenceid" type="ECMAScript.expression"/>
			<xsd:attribute name="src" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="type" default="'application/voicexml+xml'" type="ECMAScript.expression"/>
			<xsd:attribute name="namelist" type="VariableNames.datatype"/>
			<xsd:attribute name="dialogid" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="maxage" type="ECMAScript.expression"/>
			<xsd:attribute name="maxstale" type="ECMAScript.expression"/>
			<xsd:attribute name="enctype" default="'application/x-www-form-urlencoded'" type="ECMAScript.expression"/>
			<xsd:attribute name="method" default="'get'" type="ECMAScript.expression"/>
			<xsd:attribute name="mediadirection" default="'both'" type="ECMAScript.expression"/>

		</xsd:complexType>
	</xsd:element>
	<xsd:element name="dialogstart">
		<xsd:complexType>
			<xsd:attribute name="prepareddialogid" type="ECMAScript.expression"/>
			<xsd:attribute name="connectionid" type="ECMAScript.expression"/>
			<xsd:attribute name="conferenceid" type="ECMAScript.expression"/>
			<xsd:attribute name="src" type="ECMAScript.expression"/>
			<xsd:attribute name="type" default="'application/voicexml+xml'" type="ECMAScript.expression"/>
			<xsd:attribute name="namelist" type="VariableNames.datatype"/>
			<xsd:attribute name="dialogid" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="maxage" type="ECMAScript.expression"/>
			<xsd:attribute name="maxstale" type="ECMAScript.expression"/>
			<xsd:attribute name="enctype" default="'application/x-www-form-urlencoded'" type="ECMAScript.expression"/>
			<xsd:attribute name="method" default="'get'" type="ECMAScript.expression"/>
			<xsd:attribute name="mediadirection" default="'both'" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="dialogterminate">
		<xsd:complexType>
			<xsd:attribute name="dialogid" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="immediate" default="false" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="disconnect">
		<xsd:complexType>
			<xsd:attribute name="connectionid" type="ECMAScript.expression"/>
			<xsd:attribute name="reason" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="else">
		<xsd:complexType/>
	</xsd:element>
	<xsd:element name="elseif">
		<xsd:complexType>
			<xsd:attribute name="cond" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="eventprocessor">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="statevariable" type="VariableName.datatype"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="fetch">
		<xsd:complexType>
			<xsd:attribute name="next" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="type" default="'application/ccxml+xml'" type="ECMAScript.expression"/>
			<xsd:attribute name="namelist" type="VariableNames.datatype"/>
			<xsd:attribute name="method" default="'get'" type="ECMAScript.expression"/>
			<xsd:attribute name="fetchid" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="timeout" type="ECMAScript.expression"/>
			<xsd:attribute name="maxage" type="ECMAScript.expression"/>
			<xsd:attribute name="maxstale" type="ECMAScript.expression"/>
			<xsd:attribute name="enctype" default="'application/x-www-form-urlencoded'" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="goto">
		<xsd:complexType>
			<xsd:attribute name="fetchid" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="if">
		<xsd:complexType>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:element ref="else" />
				<xsd:element ref="elseif" />
				<xsd:group ref="executableContent" />
			</xsd:choice>
			<xsd:attribute name="cond" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="join">
		<xsd:complexType>
			<xsd:attribute name="id1" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="id2" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="duplex" default="'full'" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
			<xsd:attribute name="entertone" type="ECMAScript.expression" default="'true'"/>
			<xsd:attribute name="exittone" type="ECMAScript.expression" default="'true'"/>
			<xsd:attribute name="autoinputgain" type="ECMAScript.expression" default="true"/>
			<xsd:attribute name="autooutputgain" type="ECMAScript.expression" default="true"/>
			<xsd:attribute name="dtmfclamp" type="ECMAScript.expression" default="true"/>
			<xsd:attribute name="toneclamp" type="ECMAScript.expression" default="true"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="log">
		<xsd:complexType>
			<xsd:attribute name="label" type="ECMAScript.expression"/>
			<xsd:attribute name="expr" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="merge">
		<xsd:complexType>
			<xsd:attribute name="connectionid1" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="connectionid2" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="move">
		<xsd:complexType>
			<xsd:attribute name="source" type="ECMAScript.expression"/>
			<xsd:attribute name="event" type="ECMAScript.expression"/>
			<xsd:attribute name="sessionid" use="required" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="redirect">
		<xsd:complexType>
			<xsd:attribute name="connectionid" type="ECMAScript.expression"/>
			<xsd:attribute name="dest" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="reason" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="reject">
		<xsd:complexType>
			<xsd:attribute name="connectionid" type="ECMAScript.expression"/>
			<xsd:attribute name="reason" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="script">
		<xsd:complexType mixed="true">
			<xsd:choice/>
			<xsd:attribute name="src" type="URI.datatype"/>
			<xsd:attribute name="fetchid" type="ECMAScript.expression"/>
			<xsd:attribute name="charset" type="xsd:string"/>
			<xsd:attribute name="timeout" type="xsd:string"/>
			<xsd:attribute name="maxage" type="xsd:string"/>
			<xsd:attribute name="maxstale" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="send">
		<xsd:complexType mixed="true">
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:any namespace="##other" processContents="lax"/>
			</xsd:choice>
			<xsd:attribute name="target" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="targettype" type="ECMAScript.expression" default="'ccxml'"/>
			<xsd:attribute name="sendid" type="ECMAScript.LeftHandSideExpression"/>
			<xsd:attribute name="delay" type="ECMAScript.expression" default="'0s'"/>
			<xsd:attribute name="data" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
			<xsd:attribute name="namelist" type="VariableNames.datatype"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="transition">
		<xsd:complexType>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:group ref="executableContent"/>
			</xsd:choice>
			<xsd:attribute name="state" type="xsd:string"/>
			<xsd:attribute name="event" type="xsd:string"/>
			<xsd:attribute name="cond" default="true" type="ECMAScript.expression"/>
			<xsd:attribute name="name" type="VariableName.datatype"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="unjoin">
		<xsd:complexType>
			<xsd:attribute name="id1" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="id2" use="required" type="ECMAScript.expression"/>
			<xsd:attribute name="hints" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="var">
		<xsd:complexType>
			<xsd:attribute name="name" use="required" type="VariableName.datatype"/>
			<xsd:attribute name="expr" type="ECMAScript.expression"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="meta">
		<xsd:complexType>
			<xsd:attribute name="name" type="xsd:NMTOKEN"/>
			<xsd:attribute name="content" use="required" type="xsd:string"/>
			<xsd:attribute name="http-equiv" type="xsd:NMTOKEN"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="exit">
		<xsd:complexType>
			<xsd:attribute name="expr" type="ECMAScript.expression"/>
			<xsd:attribute name="namelist" type="VariableNames.datatype"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:simpleType name="ccxml.version">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="1.0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ECMAScript.expression">
		<xsd:restriction base="xsd:string"/>
	</xsd:simpleType>
	<xsd:simpleType name="ECMAScript.LeftHandSideExpression">
		<xsd:annotation>
			<xsd:documentation>Variable name which are modeled on NMTOKENS
	    except that "$" is permitted. Additional constraints: must 
	    follow ECMAScript variable naming conventions; not include ECMAScript 
	    reserve words
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:token">
			<xsd:pattern value="[$\c]+"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="VariableName.datatype">
		<xsd:annotation>
			<xsd:documentation>Variable name which are modeled on NMTOKENS
	    except that "$" is permitted. Additional constraints: must 
	    follow ECMAScript variable naming conventions; not include ECMAScript 
	    reserve words
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:token">
			<xsd:pattern value="[$\c]+"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="VariableNames.datatype">
		<xsd:annotation>
			<xsd:documentation>space separated list of variable names</xsd:documentation>
		</xsd:annotation>
		<xsd:list itemType="VariableName.datatype"/>
	</xsd:simpleType>
	<xsd:simpleType name="Duplex.datatype">
		<xsd:annotation>
			<xsd:documentation>get or post</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:NMTOKEN">
			<xsd:enumeration value="full"/>
			<xsd:enumeration value="half"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="Boolean.datatype">
		<xsd:annotation>
			<xsd:documentation>Boolean: true or false only</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:NMTOKENS">
			<xsd:enumeration value="true"/>
			<xsd:enumeration value="false"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="URI.datatype">
		<xsd:annotation>
			<xsd:documentation>URI (RFC2396)</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:anyURI"/>
	</xsd:simpleType>
	<xsd:element name="metadata">
		<xsd:complexType>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:any namespace="##other" processContents="lax"/>
			</xsd:choice>
			<xsd:anyAttribute namespace="##any" processContents="strict"/>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>