<?xml version="1.0" encoding="UTF-8"?>
<!--

  $Author: richard $

  $Revision: 1.8 $

  $Log: 2,v $
  Revision 1.8  2002/04/23 08:45:57  richard
  spelling

  Revision 1.7  2002/04/20 08:09:21  richard
  yesno

  Revision 1.6  2002/04/19 14:47:02  richard
  utofailed

  Revision 1.5  2002/03/16 10:59:34  richard
  rewrite test

  Revision 1.4  2002/01/29 12:12:30  gb
  Modified loads of tests to fix mostly syntatic errors, including non quoting of attribute values and the incorrect use of macros, usually [[autofailed]].
  Modified Files:
   	wml2/markup/contextandnav/wmlanchorelement/3
   	wml2/markup/formsmodule/inputelementformat/wmlemptyokattribute/1
   	wml2/markup/formsmodule/inputelementformat/wmlemptyokattribute/2
   	wml2/markup/formsmodule/inputelementformat/wmlemptyokattribute/3
   	wml2/markup/formsmodule/inputelementformat/wmlemptyokattribute/4
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/1
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/11
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/12
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/2
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/3
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/4
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/5
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/6
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/7
  	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/8
   	wml2/markup/formsmodule/inputelementformat/wmlformatattribute/9
   	wml2/markup/formsmodule/wmlonpickattribute/1
   	wml2/markup/formsmodule/wmlonpickattribute/2
   	wml2/markup/formsmodule/wmlonpickattribute/3
   	wml2/markup/structuremodule/bodyelement/1
   	wml2/markup/structuremodule/wmlcardelement/1
   	wml2/markup/structuremodule/wmlcardelement/2
   	wml2/markup/structuremodule/wmlcardelement/3
   	wml2/uabehaviour/attribexplang/1
   	wml2/uabehaviour/attribexplang/wmlvariable/regendocument/1
   	wml2/uabehaviour/attribexplang/wmlvariable/regendocument/2
   	wml2/uabehaviour/attribexplang/wmlvariable/validation/2
   	wml2/uabehaviour/attribexplang/wmlvariable/variableref/1
   	wml2/uabehaviour/attribexplang/wmlvariable/variableref/2
   	wml2/uabehaviour/attribexplang/wmlvariable/variableref/5
   	wml2/uabehaviour/attribexplang/wmlvariable/variableref/6
   	wml2/uabehaviour/attribexplang/wmlvariable/variablescoping/declarations/2
  	wml2/uabehaviour/backkey/2
   	wml2/uabehaviour/eventmodel/eventbindings/typedevents/1
   	wml2/uabehaviour/eventmodel/eventbindings/typedevents/2
   	wml2/uabehaviour/eventmodel/eventbindings/typedevents/3
   	wml2/uabehaviour/eventmodel/eventbindings/typedevents/4
   	wml2/uabehaviour/eventmodel/eventbindings/typedevents/5

  Revision 1.3  2001/10/30 16:22:27  gb
  Modified all the test files in the wml2 directory such that it puts the <?xml?> declaration back at the top of the file, before the comment.

  Revision 1.2  2001/10/08 21:56:13  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/attribexplang/wmlvariable/variablescoping/declarations/2" 
	class="A" scope="wml2" testtype="application" type="manual" 
	source="wml2#5.5.1.4.1" device="both">
	<assertion>When a form control element is placed inside of a FORM element, 
	and that control names a variable with the WML:NAME attribute, that form 
	control variable must be globally scoped.
	</assertion>
	<notes>Needs 3 cards as the first card as the newcontext attribute
	that can reset the value of the ichoice variable
	</notes>
	<specnote>Create a card(c1) that sets a variable on entry
	(e.g. wml:setvar name="x" value="cat") and then shows that variables value 
	to the user. Card(c1) could also hold a link to navigate to a second 
	card(c2) that has an INPUT element which is within a form control element. 
	The INPUT element should name and set the WML:NAME attribute(wml:name='x'). 
	Display the card note the value, then navigate to the second card(c2). 
	Enter a different value into the input control and then go back to the 
	first card(c1). The value of the variable should now hold the value that 
	the user input.
	</specnote>
	<results>
		<result>
			<name>submit</name>
			<value>yes</value>
		</result>
	</results>
	<method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
				<wml:onevent type="enterforward">
					<wml:go href="#card1" />
				</wml:onevent>
				[[auto_failed]]
			</wml:card>
			<wml:card id="card1" title="card1">
				<wml:onevent type="enterforward">
					<wml:go href="#card2" />
				</wml:onevent>
				<p>The value of the $$choice variable is $choice</p>
  			<p>Is the value of the control variable &apos;train&apos; ?
  				<br/>
  				[[yesno]]
  			</p>
  		</wml:card>
			<wml:card id="card2" title="card2">
				<wml:do type="prev">
					<wml:prev />
				</wml:do>
				<p>Please submit the form without selecting anything
					And then Go back to the previous card</p>
				<form action="#card3">
     			<fieldset>
  					<p>Choice</p>
	    			<select wml:name="choice" wml:value="train">
  	    			<option value="plane">Airplane</option>
			  			<option value="train">Railway</option>
							<option value="car">Automobile</option>
						</select>
	   			</fieldset>
  				<fieldset>
   					<input type="submit" value="submit" />
   				</fieldset>
   			</form>
			</wml:card>
		]]>
  </method>
</test>
