<?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:xhtml="http://www.w3.org/1999/xhtml">
  <head>
    <title>3.2.4.c node-set binding - bind attribute of itemset element</title>
    <link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
    <xforms:model id="carsForSale">
      <xforms:instance>
        <carsAvailable xmlns="">
          <car>Audi</car>
          <car>BMW</car>
          <car>Mercedes</car>
          <car>Porsche</car>
          <car>Volkswagen</car>
          <carOrder/>
        </carsAvailable>
      </xforms:instance>
      <xforms:bind id="bind_carOrder" nodeset="/carsAvailable/carOrder"/>
      <xforms:bind id="bind_car" nodeset="/carsAvailable/car"/>
      <!-- submission has a bind to bind_carOrder, and should only submit that element -->
      <xforms:submission id="submit_carOrder" action="http://www.agencexml.com/xforms-tests/xsltforms/echo.php" bind="bind_carOrder" method="post"/>
    </xforms:model>
  </head>
  <body>
  	<xforms:group>
  		<xforms:label class="title">3.2.4.c node-set binding - bind attribute of itemset element</xforms:label>
  	</xforms:group>
    <xforms:group>
    	<xforms:label>
	      You must be able to select any or all of the items in the select control. After activating the Submit Cars 
      	trigger you must be able to see all the values you selected displayed on the screen in the form data.
	    </xforms:label>
	    <!-- No other elements of the data instance should be submitted due to the bind. -->
    </xforms:group>    

    <xforms:select bind="bind_carOrder">
     	<xforms:label>Cars</xforms:label>
      	<!-- itemset uses bind instead of nodeset -->
        <xforms:itemset bind="bind_car">
	        <xforms:label ref="."/>
    	    <xforms:value ref="."/>
        </xforms:itemset>
    </xforms:select>
    
    <xforms:submit submission="submit_carOrder">
        <xforms:label>Submit Cars</xforms:label>
    </xforms:submit>

	
  </body>
</html>
