<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<html
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xf="http://www.w3.org/2002/xforms" 
	xmlns:sample="http://www.agencexml.com/sample"
	>
   <head>
      <title>Select List From File</title>
      
      /* the default model */
      <xf:model>
         <xf:instance>
            <sample:Data>
                  <sample:MyXMLSchemaTypeCode/>
            </sample:Data>
         </xf:instance>
      </xf:model>
      
      <!-- read the codes from an external file into this model -->
      <xf:model id="XMLSchemaTypeCode">
         <xf:instance src="XMLSchemaTypeCode.xml"/>
      </xf:model>
      
   </head>
   <body>
			<div id="xformControl">
				<span>
					<input type="checkbox" onclick="$('console').style.display = this.checked? 'block' : 'none';"  checked="checked"/> Debug
				</span>
			</div>
      <p>This selection list was read from a file.</p>
      <xf:select1  ref="/sample:Data/sample:MyXMLSchemaTypeCode" appearance="minimal" incremental="true">
         <xf:label>Select XML Schema data type: </xf:label>
         <xf:itemset model="XMLSchemaTypeCode" nodeset="/sample:XMLSchemaTypeCode/sample:item">
            <xf:label ref="sample:label"/>
            <xf:value ref="sample:value"/>
         </xf:itemset>
      </xf:select1>
      <br/>
      <xf:output ref="/sample:Data/sample:MyXMLSchemaTypeCode">
         <xf:label>Value of MyXMLSchemaTypeCode: </xf:label>
      </xf:output>
			<div id="console"></div>
   </body>
</html>
