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

  $Author: richard $

  $Revision: 1.5 $

  $Log: 1,v $
  Revision 1.5  2002/04/20 08:09:21  richard
  yesno

  Revision 1.4  2002/03/16 10:59:33  richard
  rewrite test

  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/1" 
	class="A" scope="wml2" testtype="application" type="manual" 
	source="wml2#5.5.1.4.1" device="both">
  <assertion>When a variable is declared within a form control element using 
  the WML:NAME attribute, the variable must be globally scoped.
  </assertion>
  <specnote>Create a card that has a SELECT element and three OPTIONS
 	elements within a form control element. The SELECT element should name 
 	and set a WML:NAME attribute variable and a predefined value. Display 
 	the variable into the first card but not in the form and make sure 
 	that the variable has the selected value.
  </specnote>
  <results>
    <result>
      <name>submit</name>
      <value>yes</value>
    </result>
  </results>
  <method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
				<p>Please submit the form without selecting anything</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>
				<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>
		]]>
  </method>
</test>
