<?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:test="http://example.org" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<head>
		<title>7.2.d context node for the computed expression is the node currently being processed</title>
		<link rel="stylesheet" href="../../driverPages/forms/TestSuite11.css" type="text/css"/>
		<xforms:model>
			<xforms:instance>
				<test:Lines>
					<test:Line>
						<test:Units>2</test:Units>
						<test:Price>3</test:Price>
						<test:Subtotal/>
					</test:Line>
					<test:Line>
						<test:Units>4</test:Units>
						<test:Price>5</test:Price>
						<test:Subtotal/>
					</test:Line>
					<test:Line>
						<test:Units>6</test:Units>
						<test:Price>7</test:Price>
						<test:Subtotal/>
					</test:Line>
				</test:Lines>
			</xforms:instance>
			<xforms:bind nodeset="test:Line/test:Subtotal" calculate="../test:Units * ../test:Price"/>
		</xforms:model>
	</head>
	<body>
		<xforms:group>
			<xforms:label class="title">
				7.2.d context node for the computed expression is the node currently being processed
			</xforms:label>
		</xforms:group>	
		<xforms:group>
			<xforms:label>
			<!-- 
				Rule 4: Create an instance with multiple Line elements each
				containing children Units, Price, Subtotal. Set the Units
				and Price of each Line to mutually distinct positive
				numbers. The nodeset, "Line/Subtotal", should be calculated with this 
				formula, "../Units * ../Price". -->
				You must see a value of "6" for the first Subtotal output, a value of "20" for the 
				second Subtotal output, and a value of "42" for the third Subtotal output. 
			</xforms:label>	
		</xforms:group>
		
		<xforms:repeat nodeset="test:Line">
			<xforms:group>
				<xforms:output ref="test:Subtotal">
					<xforms:label>Subtotal : </xforms:label>
				</xforms:output>
			</xforms:group>
		</xforms:repeat>
		
	</body>
</html>
