<?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:default="http://commerce.example.com/payment">
    <head>
        <title>2.2.a Example: Encapsulation of Instance Data</title>
        <link rel="stylesheet" href="../driverPages/forms/TestSuite11.css" type="text/css"/>
        <xforms:model>
            <xforms:instance>
                <my:payment xmlns="http://commerce.example.com/payment" method="cc">
                    <my:number/>
                    <my:expiry/>
                </my:payment>
            </xforms:instance>
            <xforms:submission id="submit" method="post" action="http://www.agencexml.com/xforms-tests/xsltforms/echo.php"/>
        </xforms:model>
    </head>
    <body>
        <xforms:group>
            <xforms:label class="title">2.2.a Example: Encapsulation of Instance Data</xforms:label>
        </xforms:group>
        <xforms:group>
            <xforms:label>
            	You must see a select1 control with the values "Cash" and "Credit" as well as two 
                input controls on the page. When you activate the Submit Now submit control this page must be 
                replaced by the form data. You must see the value "cc" if you had selected Credit or the 
                value "cash" if you had selected Cash. You must also see the values, if any, you entered 
                in the Credit Card Number and Expiration Date input controls. 
            </xforms:label>
        </xforms:group>
        <xforms:select1 ref="@method">
            <xforms:label>Select Payment Method:</xforms:label>
            <xforms:item>
                <xforms:label>Cash</xforms:label>
                <xforms:value>cash</xforms:value>
            </xforms:item>
            <xforms:item>
                <xforms:label>Credit</xforms:label>
                <xforms:value>cc</xforms:value>
            </xforms:item>
        </xforms:select1>
        <xforms:input ref="my:number">
            <xforms:label>Credit Card Number:</xforms:label>
        </xforms:input>
        <xforms:input ref="/my:payment/my:expiry">
            <xforms:label>Expiration Date:</xforms:label>
        </xforms:input>
        <xforms:submit submission="submit">
            <xforms:label>Submit Now</xforms:label>
        </xforms:submit>
    </body>
</html>
