<?xml-stylesheet type="text/xsl" href="/xforms-tests/xsltforms/xsltforms.xsl"?>
<html xmlns:my="http://commerce.example.com/payment" xmlns:txs="http://sourceforge.net/projects/txs" xmlns="http://www.w3.org/1999/xhtml" xmlns:req="http://www.agencexml.com/requests" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  	<head>
    	<title>10.2.a setvalue elements with expression or literal</title>
    	<link rel="stylesheet" href="../../driverPages/forms/TestSuite11.css" type="text/css"/>
    	<xforms:model id="m1">
       		<xforms:instance xmlns="">
				<car>
					<color>white</color>
					<originalCondition>excellent</originalCondition>
					<currentCondition>fair</currentCondition>
					<make>Toyota</make>
				</car>
       		</xforms:instance>
       		<xforms:bind id="color" nodeset="/car/color"/>
       		<xforms:bind id="year" nodeset="/car/year"/>
    	</xforms:model>
  	</head>
  	<body>
  		<xforms:group>
	  		<xforms:label class="title">10.2.a setvalue elements with expression or literal</xforms:label>
	  	</xforms:group>
  		<xforms:group>
  			<xforms:label>
  			  You must see the value "white" in the Color output control, the value 
  			  "excellent" in the Condition output control, and the value "Toyoto" 
			  in the Make output control. 
  			  When you activate the Set Color trigger the value in the Color output must change to "blue". 
  			  When you activate the Set Condition trigger the value in the Condition output must change to 
  			  "fair". 
  			  When you activate the Set Make trigger the value in the Make output must not change. 
			</xforms:label>
  		</xforms:group>
		<xforms:group>
		  <xforms:output ref="/car/color">
			<xforms:label>Color : </xforms:label>
		  </xforms:output>
		  <xforms:trigger> <!-- uses literal -->
			<xforms:label>Set Color</xforms:label>
			  <xforms:action ev:event="DOMActivate">
				<xforms:setvalue ref="/car/color">blue</xforms:setvalue>
			  </xforms:action>
		  </xforms:trigger>
		</xforms:group>
		<xforms:group>
			<xforms:output ref="/car/originalCondition">
				<xforms:label>Original Condition : </xforms:label>
			</xforms:output>
			<xforms:trigger>	<!-- uses expression -->
				<xforms:label>Set Condition</xforms:label>
				<xforms:action ev:event="DOMActivate">
					<xforms:setvalue ref="/car/originalCondition" value="/car/currentCondition"/>
				</xforms:action>
			</xforms:trigger>
		</xforms:group>
		
		<xforms:group>
			<xforms:output ref="/car/make">
				<xforms:label>Make : </xforms:label>
			</xforms:output>
			<xforms:trigger>	<!-- uses expression -->
				<xforms:label>Set Make</xforms:label>
				<xforms:action ev:event="DOMActivate">
					<xforms:setvalue ref="/car/doabarrelroll">FAIL</xforms:setvalue>
				</xforms:action>
			</xforms:trigger>
		</xforms:group>
		
	<!-- 
		<xforms:trigger>
			<xforms:label>Reset Values</xforms:label>
			<xforms:action ev:event="DOMActivate">
				<xforms:setvalue ref="/car/originalCondition" value="/car/currentCondition"/>
			</xforms:action>
		  </xforms:trigger>
		</xforms:group>
	-->
  </body>
</html>
