<?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>Trigger style</title>

   <style type="text/css">
      body { font-family: sans-serif}
      .h {font-weight: bold}
   </style> 

   <model xmlns="http://www.w3.org/2002/xforms">
      <instance>
	 <details xmlns="">
	    <name/>
	    <age/>
	    <maritalstatus/>
	    <spouse>
	       <name/>
	       <age/>
	    </spouse>
	 </details>
      </instance>
      <bind nodeset="spouse" relevant="../maritalstatus='m'" />
   </model>
</head>
<body>
   <group xmlns="http://www.w3.org/2002/xforms">
      <label class="h">You</label>
      <input ref="name"><label>Name</label></input><h:br/>
      <input ref="age"><label>Age</label></input><h:br/>
      <select1 ref="maritalstatus">
	 <label>Marital status</label>
	 <item><label>Single</label><value>s</value></item>
	 <item><label>Married</label><value>m</value></item>
	 <item><label>Widowed</label><value>w</value></item>
	 <item><label>Divorced</label><value>d</value></item>
	 </select1><h:br/>
	 <group ref="spouse">
	    <label class="h">Your spouse</label>
	    <input ref="name"><label>Name</label></input><h:br/>
	    <input ref="age"><label>Age</label></input>
	 </group>
   </group>
</body>
</html>
