<?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>Credit</title>
   <style type="text/css">
      body { font-family: sans-serif}
      .block {display: block}
      .h {font-weight: bold}
   </style>

   <model xmlns="http://www.w3.org/2002/xforms">
      <instance>
         <data xmlns="">
	    <variant>deluxe</variant>
	    <color>yellow</color>
	 </data>
      </instance>
      <bind nodeset="color"
	    readonly="../variant='basic'"
	    calculate="if(../variant='basic', 'black', .)"/>
   </model>
</head>
<body>
   <group xmlns="http://www.w3.org/2002/xforms">
      <select1 class="block" ref="variant">
	 <label>Variant</label>
	 <item>
	    <label>Basic</label>
	    <value>basic</value>
	 </item>
	 <item>
	    <label>Deluxe</label>
	    <value>deluxe</value>
	 </item>
      </select1>
      <select1 ref="color">
	 <label>Colour</label>
	 <item>
	    <label>Black</label>
	    <value>black</value>
	 </item>
	 <item>
	    <label>Red</label>
	    <value>red</value>
	 </item>
	 <item>
	    <label>Yellow</label>
	    <value>yellow</value>
	 </item>
      </select1>
   </group>
</body>
</html>
