<?xml version="1.0"?>
<xsl:stylesheet
	xmlns:xinclude="http://www.w3.org/1999/XML/xinclude"
	xmlns:xlink="http://ww.w3.org/TR/xlink"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	exclude-result-prefixes="xinclude xlink"
	version="1.0">

<xsl:output method="xml" 
	    encoding="utf-8"
	    doctype-public="-//Tellme Networks//Voice Markup Language 1.0//EN"
	    doctype-system="http://resources.tellme.com/toolbox/vxml-tellme.dtd"
	    indent = "yes"/>

<xsl:template match="/">
	<vxml application="http://resources.tellme.com/lib/universals.vxml">

	    <form id="userID">
		 <field name="document.login.userID">
			  <grammar>
			  <![CDATA[
			  Five_digits
			  ]]>
			  </grammar>

			  <prompt>
			    <audio>Welcome to Didier's lab</audio>
			    <pause>500</pause>
			    <audio>This experiment is about the construction of an XML server</audio>
			    <pause>500</pause>
			    <audio>every other week, we'll add a new building block to the XML server</audio>
			    <pause>750</pause>
			    <audio>to log on the server</audio>
			    <pause>500</pause>
			    <audio>Please dial or say your 5 digit user ID</audio>
			  </prompt>

			  <noinput>
			    <audio>Sorry, I didn't hear you</audio>
			    <reprompt/>
			  </noinput>

			  <default>
			    <reprompt/>
			  </default>

			  <filled>
			      <audio>I heard you say {document.login.userID}</audio>
			      <goto next="#password"/>
			  </filled>

		 </field>
	   </form>

	    <form id="password">
		 <field name="document.login.password">
			  <grammar>
			  <![CDATA[
			   Four_digits
			  ]]>
			  </grammar>

			  <prompt>
			    <audio>Please dial or say your 4 digit password</audio>
			  </prompt>

			  <noinput>
			    <audio>Sorry, I didn't hear you</audio>
			    <reprompt/>
			  </noinput>

			  <default>
			    <reprompt/>
			  </default>

			  <filled>
			      <audio>I heard you say {document.login.password}</audio>
			      <goto>
			      <xsl:attribute name="next"><xsl:value-of select="xdoc/xform/@action"/></xsl:attribute>
			      <xsl:attribute name="method"><xsl:value-of select="xdoc/xform/@method"/></xsl:attribute>
			      <xsl:attribute name="submit">{document.allmypostdata}</xsl:attribute>
			      </goto>
			  </filled>
		 </field>
	   </form>  
	</vxml>
</xsl:template>

</xsl:stylesheet>
