<?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>11.6.1.b resource element with value attribute</title>
    <link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
    <xforms:model id="test_model">
    	<xforms:instance>
    		<root xmlns="">
    			<data>1</data>
    			<data>2</data>
    		</root>
    	</xforms:instance>
    	<xforms:instance id="rsrc_holder">
    		<root xmlns="">
    			<rsrc>http://xformstest.org/cgi-bin/echo.sh</rsrc>
    		</root>
    	</xforms:instance>
    	<xforms:submission id="sub1" resource="http://bad.url" method="put">
    		<xforms:resource value="instance('rsrc_holder')/rsrc">http://bad.url</xforms:resource>
    	</xforms:submission>   					   
    </xforms:model>
  </head>
  <body>
  	<xforms:group>
  		<xforms:label class="title">11.6.1.b resource element with value attribute</xforms:label>
  	</xforms:group>
  	<xforms:group>
  		<xforms:label>
  		  When you activate the Submit control the instance data must be submitted to the xformstest.org site. 
  		  If the page is replaced by the form data then you have passed the 
  		  test case. 
  		</xforms:label>
  	</xforms:group>
  	<xforms:group>
  		<xforms:submit submission="sub1">
  			<xforms:label>Submit</xforms:label>
  		</xforms:submit>
  		
  		<xforms:action ev:event="xforms-submit-error" ev:observer="test_model">
  			<xforms:message level="modal">Unable to submit</xforms:message>
  		</xforms:action>
  	</xforms:group>
  	
  	
  </body>
</html>
