<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <head>
  	<title>6.2.1.a atomic datatype</title>
  	<link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
    <xforms:model>
      <xforms:instance xmlns="">
      	<first-name>Frank</first-name>
      </xforms:instance>
      <xsd:schema>
        <xsd:simpleType name="nonEmptyString">
  		  <xsd:restriction base="xsd:string">
  			  <xsd:minLength value="1"/>
  		  </xsd:restriction>
  	    </xsd:simpleType>
  	  </xsd:schema>
  	  <xforms:bind type="nonEmptyString" nodeset="/first-name"/>
    </xforms:model>
  </head>
  <body>
  	<xforms:label class="title">6.2.1.a atomic datatype</xforms:label>
	<xforms:group>
		<xforms:label>
			The First Name input control is bound to an atomic datatype. 
			When you activate the Use Joe trigger you must see an xforms-valid message. 
			When you activate the Use Empty String trigger you must see an xforms-invalid message. 
		</xforms:label>
	</xforms:group>
	
	<xforms:input ref="/first-name">
		<xforms:label>First Name : </xforms:label>
		<xforms:message ev:event="xforms-valid" level="modal">xforms-valid</xforms:message>
  	  	<xforms:message ev:event="xforms-invalid" level="modal">xforms-invalid</xforms:message>
	</xforms:input>
	
	<xforms:trigger>
		<xforms:label>Use Empty String</xforms:label>
		<xforms:setvalue ref="/first-name" ev:event="DOMActivate"/>
	</xforms:trigger>
	
	<xforms:trigger>
		<xforms:label>Use Joe</xforms:label>
		<xforms:setvalue ref="/first-name" ev:event="DOMActivate">Joe</xforms:setvalue>
	</xforms:trigger>
	
  </body>
</html>
