<?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.b setvalue element with expression and literal, element with neither</title>
    	<link rel="stylesheet" href="../../driverPages/forms/TestSuite11.css" type="text/css"/>
    	<xforms:model id="m1">
       		<xforms:instance xmlns="">
				<car>
					<originalColor>white</originalColor>
					<currentColor>blue</currentColor>
					<originalCondition>excellent</originalCondition>
					<currentCondition>fair</currentCondition>
				</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.b setvalue element with expression and literal, element with neither</xforms:label>
	  	</xforms:group>
  		<xforms:group>
  			<xforms:label>
  			  You must see the value "white" in the Color output control and the value 
  			  "excellent" in the Condition 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 being 
  			  empty. 
			</xforms:label>
  		</xforms:group>
		<xforms:group>
		<xforms:output ref="/car/originalColor">
			<xforms:label>Color : </xforms:label>
		</xforms:output>

		<xforms:trigger>	<!-- both expression and literal -->
			<xforms:label>Set color</xforms:label>
			<xforms:action ev:event="DOMActivate">
				<xforms:setvalue ref="/car/originalColor" value="/car/currentColor">lapis blue metallic</xforms:setvalue>
			</xforms:action>
		</xforms:trigger>
		</xforms:group>
		<xforms:group>
		<xforms:output ref="/car/originalCondition">
			<xforms:label>Condition : </xforms:label>
		</xforms:output>

		<xforms:trigger>	<!-- using expression -->
			<xforms:label>Set condition</xforms:label>
			<xforms:action ev:event="DOMActivate">
				<xforms:setvalue ref="/car/originalCondition"/>
			</xforms:action>
		</xforms:trigger>
		</xforms:group>
		
  </body>
</html>