<?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">
  <head>
    <title>g.2.d repeat-index precedence over repeat-item (non-normative)</title>
    <link rel="stylesheet" href="g2d.css" type="text/css"/>
    <xforms:model>
      <xforms:instance>
        <car xmlns="">
          <make>Honda</make>
          <make>Toyota</make>
          <make>Acura</make>
        </car>
      </xforms:instance>
    </xforms:model>
  </head>
  <body>
  	<xforms:group>
  		<xforms:label class="title">g.2.d repeat-index precedence over repeat-item (non-normative)</xforms:label>
  	</xforms:group>
    <xforms:group>
    	<xforms:label>
		You must see a list of cars. Also, the repeat item 
		with the current index must have a dashed box around it with a 
		yellow background. When you change the index with the triggers at the 
		bottom the selected repeat-item must have the dashed box and yellow 
		background. All other repeat-items must have a dotted border with an 
		orange background.
		</xforms:label>
    </xforms:group>
   	<xforms:repeat id="repeat1" nodeset="/car/make">
   		<xforms:output ref=".">
			<xforms:label/>
   		</xforms:output>
   	</xforms:repeat>
   	<xforms:trigger>
   		<xforms:label>Set Index to 1</xforms:label>
   		<xforms:setindex ev:event="DOMActivate" repeat="repeat1" index="1"/>
   	</xforms:trigger>
   	<xforms:trigger>
   		<xforms:label>Set Index to 2</xforms:label>
   		<xforms:setindex ev:event="DOMActivate" repeat="repeat1" index="2"/>
   	</xforms:trigger>
   	<xforms:trigger>
   		<xforms:label>Set Index to 3</xforms:label>
   		<xforms:setindex ev:event="DOMActivate" repeat="repeat1" index="3"/>
   	</xforms:trigger>
   	<xforms:output value="index('repeat1')">
		<xforms:label>Index : </xforms:label>
	</xforms:output>
	
  </body>
</html>