<?xml-stylesheet href="../forms/xsltforms/xsltforms.xsl" type="text/xsl"?>
<?xsltforms-options debug="no"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://www.w3.org/1999/xhtml"
      xmlns:xf="http://www.w3.org/2002/xforms"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<head>
   <title>Constraint</title>
   <style type="text/css">
      body { font-family: sans-serif}
   </style> 
   <model xmlns="http://www.w3.org/2002/xforms">
      <instance><data xmlns="">
	 <birth/><death/><years/>
      </data>
      </instance>
      <bind nodeset="death" constraint=". &gt;= ../birth"/>
      <bind nodeset="years" readonly="true()" calculate="../death - ../birth"/>
   </model>
</head>
<body>
   <group xmlns="http://www.w3.org/2002/xforms">
      <input incremental="true" ref="birth"><label>Year of birth:</label></input><h:br/>
      <input incremental="true" ref="death"><label>Year of death:</label></input><h:br/>
      <output ref="years"><label>Number of years:</label></output>
   </group>
</body>
</html>
