<?xml version="1.0"?>
<?xml-stylesheet href="Training-to-slidy.xsl" type="text/xsl"?>
<!DOCTYPE training SYSTEM "training.dtd">
<training> 
<training-material id="XForms"> 
  <title>Managing electronic records business objects using XForms and
	 Genericode at the National Archives and Records Administration</title>
  <presentation-info> <conference-name>Balisage 2009</conference-name> 
  <date>August 11-14, 2009</date></presentation-info> <authorinfo> <author> 
  <name>Quyen L. Nguyen</name> <company>National Archives and Records
  Administration</company> 
  <e-mail>quyen.nguyen@nara.gov</e-mail></author><author><name>Betty
  Harvey</name><company>Electronic Commerce Connection, Inc.</company> 
  <e-mail>harvey@eccnet.com</e-mail></author></authorinfo> 
  <introduction id="Main-Intro"> 
	 <list> 
		<item>Motivation 
		  <list> 
			 <item>Business Requirements</item> 
			 <item>System Architecture</item> 
		  </list> </item> 
		<item>XForms and Genericode Approach 
		  <list> 
			 <item>Benefits</item> 
			 <item>Design and Implementation</item> 
		  </list> </item> 
	 </list> 
  </introduction> <section id="section1"> 
  <title>Motivation</title> 
  <introduction id="section1intro"> 
	 <para>Business and Technical Perspectives: 
		<list> 
		  <item>ERA: fulfill NARA mission in the information technology
			 age</item> 
		  <item>Provide long term preservation and access to digital
			 objects</item> 
		  <item>Archivists and Agencies Record Managers will have a modernized
			 system with automatic workflow that can streamline the digital archive business
			 process.</item> 
		  <item>SOA Framework and XML in ERA System</item> 
		</list> </para> 
  </introduction> 
  <slide id="slide1"> 
	 <title>System Challenges</title> <figure id="evolution"><caption>Evolution
	 Relativity</caption><graphic name="graphics/evolution_relativity.jpg"
	 width="173" height="338" alt="Evolution Relativity"/></figure> 
	 <list> 
		<item> Variety of domains and data types. </item> 
		<item> Rapid volume growth. </item> 
	 </list> 
  </slide> 
  <slide id="slide2"> 
	 <title>ERA Non-Functional Requirements</title> 
	 <list> 
		<item> Evolvability 
		  <list> 
			 <item>New record types, data types, and services could be
				added</item> 
			 <item>New technologies in software and hardware could be
				inserted</item> 
		  </list> </item> 
		<item> Scalability. Ability to adapt to the growth of record volume and
		  user community. </item> 
		<item>User-friendly</item> 
		<item>Secure</item> 
		<item>Highly available</item> 
		<item>Open standards</item> 
	 </list> 
  </slide> 
  <slide id="slide3"> 
  	<title>Archival Business Object (ABO) Requirements </title> 
	 <list> 
		<item>Elimination of free text form.</item> 
		<item>Structured fields that conform to a pre-defined data model.</item> 
		<item>System validation of input data.</item> 
		<item>Elaborate validation based on embedded business rules during
		  creation/update of business objects.</item> 
		<item>Presentation of ABO. 
			<list><item>Browser View: W3C HTML standard browser.</item>
			<item>Print View: XML --> XSL-FO --> PDF</item></list></item> 
		<item>CRUDVS (Create, Retrieve, Update, Delete, Versioning, Search)
		  operations will be supported.</item> 
		<item>Storage model: XML Format</item> 
	 </list> 
  </slide> 

  <slide id="slide4"> 
	 <title>Authority Lists</title> 
	 <list> 
		<item>Controlled vocabulary</item> 
		<item>Controlled enumerated values</item> 
		<item>Authority List Management
		<list>
			<item>Maintainability</item>
			<item>Responsible organization</item>
		</list>
		</item>
	 	<item>Building queries from various forms of search terms</item>
	 	<!-- There are 20 Authority Lists currently in the Transfer request and
	 		I think the Record Schedule may have a lot more.-->
	 	<item>There can more than  20 authority lists in one ABO form</item>
	 </list> 
  </slide> 

  <slide id="slide4a"> 
	 <title>Simple Authority List</title> 
	 <para><b>Name-value pairs:</b></para>
  	<table border="1"> 
		<tbody> 
			<tr>
				<td><b>Name</b></td>
				<td><b>Value/Definition</b></td>
			</tr>
		  <tr> 
			 <td>NARA</td> 
			 <td>National Archives and Records Administration</td> 
		  </tr> 
		  <tr> 
			 <td>USPTO</td> 
			 <td>United States Patent and Trademark Office</td> 
		  </tr> 
		  <tr> 
			 <td>NOAA</td> 
			 <td>National Oceanic and Atmospheric Administration</td> 
		  </tr> 
		  <tr> 
			 <td>...</td> 
			 <td>...</td> 
		  </tr> 
		</tbody> 
	 </table> 
  </slide> 
  <slide id="slide4b"> 
	 <title>Complex Authority List</title> 
	 <list> 
		<item>More than a single name-value pair</item> 
	 </list> 
	 <para>This table can be considered a complex code list because it contains
		values for the same information <i>Paper Name</i>. </para> 
	 <table border="1"> 
		<tbody> 
		  <tr> 
			 <td><b>Container Code</b></td> 
			 <td><b>Description</b></td> 
		  	<td><b>Depth</b></td> 
		  	<td><b>Width</b></td> 
			 <td><b>Height</b></td> 
		  	<td><b>TotalCubicFoot</b></td> 
		  </tr> 
		  <tr> 
		  	<td>ACF-S </td> 
		  	<td>Archival Quality Cubic Foot Container, Standard </td> 
		  	<td>16.500</td> 
		  	<td>12.500</td> 
		  	<td>10.750</td> 
		  	<td>2217.188</td> 
		  </tr> 
		  <tr> 
		  	<td>AER-A </td> 
		  	<td>Aerial Film Can, Standard </td> 
			 <td>5.500</td> 
		  	<td>5.500</td> 
		  	<td>10.000</td>
		  	<td>302.5</td>
		  </tr> 
			
		  <tr> 
		  	<td>AER-B </td> 
		  	<td> Aerial Film Can, 500</td> 
			 <td>7.250</td> 
			 <td> 7.250</td> 
		  	<td> 9.500</td> 
		  	<td> 499.3438</td> 
		  </tr> 
		</tbody> 
	 </table> 
  </slide> 
  
  <slide id="slide5"> 
	 <title>Business Rules</title> 
	 <list> 
		<item>Required or Optional data. 
		  <list> 
			 <item>GAO Concurrent Status</item> 
		  </list> </item> 
		<item>Inter-dependency between fields 
		  <list> 
			 <item>Agency Manual Indicator=yes, then: Manual Name, Manual Version,
				Item ID within Manual.</item> 
			 <item>Authority List filtered based on another field</item> 
			 <item>Calculation performed based on some fields being selected</item> 
		  </list> </item> 
		<item>Editable field based on state</item> 
	 </list> 
  </slide> 
  
  <slide id="slide6"> 
	 <title>Workflow</title> <figure id="TR_workflow"> <caption>TR
	 Workflow</caption>
	 <graphic name="graphics/TR_workflow.jpg" width="400" height="600"
	  alt="TR Workflow"/> </figure> 
	 <list> 
		<item>BPM workflow</item> 
		<item>System orchestration</item> 
	 </list> 
  </slide> 


  <slide id="slide7"> 
	 <title>SOA Framework</title> <figure id="soa_layer"><caption></caption>
	 <graphic name="graphics/BusinessObject.jpg" width="400" height="500"
	  alt="SOA Layers"/> </figure> 
	 <list> 
		<item>XML at: 
		  <list> 
			 <item>Business level</item> 
			 <item>Communication level</item> 
			 <item>Storage model</item> 
		  </list> </item> 
	 </list> 
  </slide> 
  <slide id="slide8"> 
	 <title>In Search of an Approach for e-Forms</title> 
	 <list> 
		<item>How to ensure data integrity?
		<list><item>Validate input data</item></list>
		</item>
		<item>How to facilitate data exchange between components and services? 
		  <list> 
			 <item>SOA framework</item> 
			 <item>Data conversion</item> 
		  </list> </item> 
		<item>Performance: response time and user experience</item> 
		<item>Consistency 
		  <list> 
			 <item>Uniform and consistent error handling and error messages</item>
			 
		  </list> </item> 
		<item>Modularity and reuse</item> 
		<item>Low cost maintenance</item> 
		<item>Modality of User-interface</item> 
		<item>Storage Model</item> 
		<item>Standard support</item> 
	 </list> 
  </slide> 
  <slide id="slide9"> 
	 <title>In Search of an Approach for e-Forms and Code Lists</title> 
	 <list> 
		<item>Separate evolvability</item> 
		<item>Separate modularity</item> 
		<item>Separation of control</item> 
	 </list> 
  </slide> 
  <slide id="slide10"> 
	 <title>Alternative Approaches for e-Forms</title> 
	 <example>
		
   &lt;html&gt;
   &lt;body&gt;
   &lt;form action="createTR.php" method="post"&gt;
   Transfer Request ID: &lt;input type="text" name="tr-id" /&gt;
   Agency: &lt;input type="text" name="agency" /&gt;
   &lt;input type="submit" /&gt;
   &lt;/form&gt;
   &lt;/body&gt;
   &lt;/html&gt;
   </example>
	 <example>
   &lt;form action="createTR.jsp" method="post"&gt;
   </example>
	 <example>
   &lt;form action="createTR.asp" method="post"&gt;
   </example>



  </slide> 
  <slide id="slide11"> 
	 <title>Alternative Approaches: Discussion</title> 
	 <list> 
		<header>Benefits</header> 
		<item>Can design with MVC</item> 
		<item>Leverage J2EE, .NET</item> 
		<item>Leverage power of procedural language for business logic</item> 
	 </list> 
  </slide> 
  <slide id="slide12"> 
	 <title>Aternative Approaches: Issues</title> 
	 <list> 
		<item>How to add or change a field? 
		  <list> 
			 <item>Changes required throughout all layers of MVC</item> 
			 <item>Development cost</item> 
			 <item>Turn-around time</item> 
		  </list> </item> 
		<item>How to format field or section to make it attractive?
		<list>
			<item>Screen refreshes upon value selection in authority list</item>
		</list>
		</item>
		<item>How to represent values in a code list?</item> 
		<item>Relation with XML data
		<list>
			<item>Marshalling of XML data</item>
			<item>Modification to schema requires code recompilation</item>
		</list>
		</item>
	 </list> 
  </slide> 
  <slide id="slide13"> 
	 <title>Aternative Approach for Authority Lists</title> 
	 <para>Use xsd:enumeration </para> 
	 <list> 
		<item>Code list changes, schema changes</item> 
		<item>Schema version</item> 
		<item>How to implement complex code lists?</item> 
	 </list> 
	 <para>Use relational database </para> 
	 <list> 
		<item>SQL in applications</item> 
		<item>Maintenance issue</item> 
		<item>Data exchange requires conversion</item> 
	 </list> 
  </slide> 
  <slide id="slide14"> 
	 <title>Problem Summary</title> 
	 <list> 
		<item>Evolvable design 
		  <list> 
			 <item>Extensible</item> 
			 <item>Adaptive to changing business rules</item> 
			 <item>Cost effective</item> 
		  </list> </item> 
		<item>Fit into ERA SOA architecture</item> 
		<item>XML standard based</item> 
	 </list> 
  </slide> </section> <section id="section-xform-intro"> 
  <title>Brief Introduction to XForms</title> 
  <introduction id="section1xform1intro"> 
	 <para>This section will provide a brief introduction into the XForms
		specification and the benefits of using XForms for creating business
		documents.</para> 
  </introduction> 
  <slide id="slide1186673"> 
	 <title>XForms Specification</title> 
	 <list> 
		<item>XForms is a W3C Specification 
		  <list> 
			 <item>Version 3 - dated 29 October 2007</item> 
			 <item>Version 2 - dated14 March 2006</item> 
			 <item>Version 1 - dated 14 October 2003</item> 
		  </list></item> 
	 </list> 
  </slide> 
  
  <!-- slide id="slide0729"> 
	 <title>Problems with Current Forms</title> 
	 <para>JSP Forms have several problems that are solved with XForm
		Forms</para> 
	 <list> 
		<item>Change of focus when selecting from pull-down menu 
		  <list> 
			 <item>Screen visibly refreshes</item> 
			 <item>Moves focus to top of page</item> 
		  </list></item> 
		<item>Cannot work directly with XML model</item> 
		<item>Overwriting of selectable text.</item> 
		<item>Modification to schema requires new compilation of Java Bean</item>
		
	 </list> 
  </slide -->
  
  <slide id="slide99"> 
	 <title>Benefits of XForms</title> 
  	<list> <item>Described as <i>ext generation of webforms</i></item>
		<item>Standard Vocabulary</item> 
		<item>Reusable modules (XInclude)</item> 
		<item>Native XML Results</item> 
		<item>Use of MVC (Model-view-controller) - separation of business logic
		  and user interface.</item> 
		<item>Used with other vocabularies, usually XHTML but could be custom
		vocabulary.</item>
  		<item>Behaves as an HTML form.  Complexity is hidden from user.</item>
	 </list> 
	<!-- <para>The user should not be able to distinguish what technology is being
		used for a well-designed form.</para> 
	 <para>XForms has been described as "<i>Next generation of webforms</i>".
		Actually XForms is an XML vocabulary for defining forms and it is not limited
		to the web</para> 
	 <para>Most implementation of XForms are web-based implementations.</para>--> 
  </slide> 
  <slide id="slide946"> 
	 <title>XForms Controls</title> 
	 <para>Very similar to HTML forms but with more functionality.</para> 
	 <table border="1"> 
		<tbody> 
		  <tr> 
			 <td valign="bottom"><b>XForms </b><br/><b>Control</b></td> 
			 <td valign="bottom"><b>Definition</b></td> 
			 <td valign="bottom">Example</td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:input&gt;</td> 
			 <td>Free form text. </td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#input">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:secret&gt;</td> 
			 <td>Used to capture data while being hidden. Can be used to capture
				password information.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#secret">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:textarea&gt;</td> 
			 <td>Free formed block of text in a multiline format.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#textarea">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:output&gt;</td> 
			 <td>Display information to the user. </td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#output">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:upload&gt;</td> 
			 <td>Provides the ability for a user to upload an external file.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#upload">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:range&gt;</td> 
			 <td>Provides the ability for a person to upload a value from a range
				of values.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#range">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:trigger&gt;</td> 
			 <td>Provides a user triggered action</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#trigger">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:select&gt;</td> 
			 <td>Provides the ability to allow the user to select multiple values
				from a list.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#select">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:select1&gt;</td> 
			 <td>Provides the ability to allow the user to select a single value
				from a list.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#select1">Link to
				Example</xlink></td> 
		  </tr> 
		  <tr> 
			 <td>&lt;xforms:submit&gt;</td> 
			 <td>Provides the ability submit data to a processor. Works in
				conjunction with the &lt;xforms:submission&gt; element.</td> 
			 <td><xlink
				href="http://www.eccnet.com:8080/XForms/SimpleForm/controls#submit">Link to
				Example</xlink></td> 
		  </tr> 
		</tbody> 
	 </table> 
  </slide></section> <section id="Genericode-section"> 
  <title>Genericode Introduction</title> 
  <slide id="slide480"> 
	 <title>What is Genericode</title> 
	 <list> 
		<item>OASIS-Open Specifcation <br/><xlink
		  href="http://docs.oasis-open.org/codelist/cs-genericode-1.0/doc/oasis-code-list-representation-genericode.pdf">http://docs.oasis-open.org/codelist/cs-genericode-1.0/doc/oasis-code-list-representation-genericode.pdf</xlink></item>
		
		<item>Specification for encoding code lists in XML</item> 
		<item>XML W3C Schema </item> 
	 </list> 
  </slide> 
 </section> 
 
 <section id="GenericodeXforms"> 
  <title>Genericode and XForms</title> 
  <slide id="slide910"> 
	 <title>Genericode Structure</title> 
	 <para>Three major sections:</para> 
	 <list> 
		<item>Identification Section</item> 
		<item>Column Setup Section</item> 
		<item>The body of the code list.</item> 
	 </list><figure id="CodeList-fig"> <caption>CodeList
	 Structure</caption><graphic name="graphics/CodeListStructure.jpg" width="642"
	 height="561" alt="CodeList Structure"/></figure> 
  </slide> 
 	<slide><title>Sample Genericode</title>
 	<example>
 		<![CDATA[
<CodeList xmlns="http://docs.oasis-open.org/codelist/ns/genericode/1.0/" 
 	xmlns:era="http://archives.gov/era/schema" 
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xsi:schemaLocation="http://docs.oasis-open.org/codelist/ns/genericode/1.0/ 
                  ile:/G:/Projects/standards/Genericode/genericode.xsd">
    <Identification xmlns="">
         <LongName xml:lang="en">Holdings_Measurements</LongName>
      <Version>1</Version>
      <Agency>
            <LongName xml:lang="en">US National Archives Records Administration</LongName>
         <Identifier>1</Identifier>
       </Agency>
</Identification>

    <ColumnSet xmlns="">
         <Column Id="ContainerCode" Use="required">
         <ShortName>Container Code</ShortName>
         <Data Type="xsd:normalizedString" xml:lang="en"/>
      </Column>
      <Column Id="ContainerDescription" Use="Required">
         <ShortName>Container Description</ShortName>
         <Data Type="xsd:string" xml:lang="en"/>
      </Column>
      <Column Id="Depth" Use="Optional">
         <ShortName>Depth</ShortName>
         <Data Type="xsd:integer" xml:lang="en"/>
      </Column>
      <Column Id="Width" Use="Optional">
         <ShortName>Width</ShortName>
         <Data Type="xsd:integer" xml:lang="en"/>
      </Column>
      <Column Id="Height" Use="Optional">
         <ShortName>Height</ShortName>
         <Data Type="xsd:integer" xml:lang="en"/>
      </Column>
      <Column Id="TotalCubicFoot" Use="Optional">
         <ShortName>Total Cubic Footage</ShortName>
         <Data Type="xsd:integer" xml:lang="en"/>
      </Column>
    </ColumnSet>
    <SimpleCodeList xmlns="">
        <Row>
            <Value ColumnRef="ContainerCode">
            <SimpleValue>ACF-S</SimpleValue>
         </Value>
         <Value ColumnRef="ContainerDescription">
            <SimpleValue>Archival Quality Cubic Foot Container, Standard</SimpleValue>
         </Value>
         <Value ColumnRef="Depth">
            <SimpleValue>16.500</SimpleValue>
         </Value>
         <Value ColumnRef="Width">
            <SimpleValue>12.500</SimpleValue>
         </Value>
         <Value ColumnRef="Height">
            <SimpleValue>10.750</SimpleValue>
         </Value>
         <Value ColumnRef="TotalCubicFoot">
            <SimpleValue>2217.188</SimpleValue>
         </Value>
      </Row>
      <Row>
            <Value ColumnRef="ContainerCode">
            <SimpleValue>AER-A</SimpleValue>
         </Value>
         <Value ColumnRef="ContainerDescription">
            <SimpleValue>Aerial Film Can, Standard</SimpleValue>
         </Value>
         <Value ColumnRef="Depth">
            <SimpleValue>5.500</SimpleValue>
         </Value>
         <Value ColumnRef="Width">
            <SimpleValue>5.500</SimpleValue>
         </Value>
         <Value ColumnRef="Height">
            <SimpleValue>10.000</SimpleValue>
         </Value>
         <Value ColumnRef="TotalCubicFoot">
            <SimpleValue>302.5</SimpleValue>
         </Value>
      </Row>
      <Row>
            <Value ColumnRef="ContainerCode">
            <SimpleValue>AER-B</SimpleValue>
         </Value>
         <Value ColumnRef="ContainerDescription">
            <SimpleValue>Aerial Film Can, 500</SimpleValue>
         </Value>
         <Value ColumnRef="Depth">
            <SimpleValue>7.250</SimpleValue>
         </Value>
         <Value ColumnRef="Width">
            <SimpleValue>7.250</SimpleValue>
         </Value>
         <Value ColumnRef="Height">
            <SimpleValue>9.500</SimpleValue>
         </Value>
         <Value ColumnRef="TotalCubicFoot">
            <SimpleValue>499.343</SimpleValue>
         </Value>
      </Row>
...
</SimpleCodeList>
</CodeList>
	
 		]]>
 	</example></slide>
  <slide id="slide95678985"> 
	 <title>Genericode and XML Fat</title> 
	 <para>What is XML fat?</para> 
	 <list> 
		<item>Layers <i>unnecessary</i> of XML hierarchy for the application layer?</item> 
		<item><i>Unnecessary</i> is in the eye of the beholder.
		<list>
			<item>Genericode provides a 'standard' format to create, maintain and 
			update code lists.</item>
		</list></item> 
		<item>There are arguments for and against direct use of Genericode in the
			application layer.
			<list><item>Agree not to argue amonst ourselves about the BMI (Body Mass Index)
			of Genericode</item>
				<item><i>Let's Move Forward</i></item> </list></item> 
		
	 </list> 
  </slide> 
  <slide id="slide6536"> 
	 <title>Reduced Fat Code List Approach</title> 
	 <para>In many cases the <i>fat</i> content of the genericode is not a
		concern. However when organizations have multiple codelists and hundreds of
		codes for a single code list cutting the <i>fat</i> is essential for
		streamlined forms.</para> 
	 <list> 
		<item>Developed a XSLT </item> 
		<item>Convert Genericode to 'fat free' version</item> 
		<item>Fat-free version less than 25% size of Genericode. (Paper example
		  87 lines vs. 22 lines)</item> 
		<item>Expedites processing of code list.</item> 
		<item>Code names located in elements vs. attributes.</item> 
	 </list> 
  </slide> 
  <slide id="slide742151796"> 
	 <title>Conversion to Form Code List</title><figure id="conversion.jpg"> 
	 <caption>Conversion To Form Code List</caption><graphic
	 name="graphics/conversion.jpg" width="771" height="357"
	 alt="Conversion To Form CodeList"/></figure> 
  </slide> 
  <slide id="slide461738049"> 
	 <title>Fat Free Version of Paper Code List Example</title> 

	 <example>
	 	<![CDATA[
<FormCodeList codeListName="Holdings_Measurements" version="1">
      <Row>
        <ContainerCode>ACF-S</ContainerCode>
         <ContainerDescription>Archival Quality Cubic Foot Container, 
                   Standard</ContainerDescription>
         <Depth>16.500</Depth>
         <Width>12.500</Width>
         <Height>10.750</Height>

         <TotalCubicFoot>10.750</TotalCubicFoot>
      </Row>
      <Row>
        <ContainerCode>AER-A</ContainerCode>
         <ContainerDescription>Aerial Film Can, Standard</ContainerDescription>
         <Depth>5.500</Depth>
         <Width>5.500</Width>

         <Height>10.000</Height>
         <TotalCubicFoot>10.000</TotalCubicFoot>
      </Row>
      <Row>
        <ContainerCode>AER-B</ContainerCode>
         <ContainerDescription>Aerial Film Can, 500</ContainerDescription>
         <Depth>7.250</Depth>

         <Width>7.250</Width>
         <Height>9.500</Height>
         <TotalCubicFoot>9.500</TotalCubicFoot>
      </Row>
...
</FormCodeList>
	 	]]>
</example>
  </slide> 
  <slide id="slide79216"> 
	 <title>Incorporating Form Codelist into XForm</title> 
	 <list> 
		<item>XForms &lt;xforms:instance&gt; element can point to a file.</item> 
		<item>Can point to a fully-qualified URL</item> 
		<item>Point to the local file system</item> 
	 </list> 
  </slide> 
  <slide id="QualifiedURL"> 
	 <title>Fully Qualified URL for Code List</title> 
	 <para>The two examples below are both fully-qualified URL's. The first
		example points to the eXist XML repository that contains the codelists. The
		second example points to a fully qualified URL.</para> 
	 <para>In the example below the &lt;xforms:instance&gt; element points to
		the filesystem. The directory root is the directory where the XForms is
		located.</para><example-grp> 
	 <header>Full URL</header> 
	 <example>
	 <![CDATA[
<xforms:instance id="Container-instance" 
      src="http://localhost:8080/exist/rest/db/home/era/CodeLists/ContainerFormCodeList.xml"/>
 
 <xforms:instance id="Container-instance" 
      src="http://www.myurl.com/codelists/ContainerFormCodeList.xml"/>
	 ]]>	
</example>
	 </example-grp> 
  </slide> 
  <slide id="filesystemcodelist"> 
	 <title>Code List Located on the File System</title> 
	 <para>A code list can reside on the file system. The XForms engine will
		require access to the file system.</para><example-grp> 
	 <header>Pointing to the File System</header> 
	 <example>	 	
&lt;xforms:instance id="AccessRestriction-instance" 
     src="CodeLists/ContainerFormCodeList.xml"/&gt;</example>

	 </example-grp> 
  </slide> 
  <slide id="slide19"> 
	 <title>Using the Code List Select1</title> 
	 <list> 
		<item>Create an <b>&lt;xforms:select1&gt;</b> control. The
		  &lt;xforms:select1&gt; control creates a radio button selection.</item> 
		<item>The <i>'nodeset'</i> attribute is the fully-qualified XPath
		  statement to retrieve a list of values from the codelist.</item> 
		<item>Notice in the sample below, the &lt;forms:label&gt; and
		  &lt;xforms:value&gt; are the same. The label displays the value of the
		  PaperCode.</item> 
	 </list><example-grp> 
	 <header>Example of Select1 for Container Type</header> 
	 <example>
&lt;xforms:select1 ref="era:ContainerType"&gt;
   &lt;xforms:item&gt;
      &lt;xforms:label&gt;Choose One...&lt;/xforms:label&gt;
       &lt;xforms:value/&gt;
   &lt;/xforms:item&gt;
   &lt;xforms:itemset nodeset="instance('Container-instance')/Row/ContainerDescription"&gt;
      &lt;xforms:label ref="."/&gt;
      &lt;xforms:value ref="."/&gt;
   &lt;/xforms:itemset&gt;
&lt;/xforms:select1&gt;
</example>

	 </example-grp><figure id="figure386121"><caption>Select1
	 Display</caption><graphic name="graphics/container-dropdown.jpg"
	 alt="Select1 Display" width="739" height="359"/></figure><note>Only 1 value can
	 be saves.</note> 
  </slide> 
  <slide id="slide39886"> 
	 <title>Repeating Codes</title> 
	 <para>If you have repeating values, you should use
		<b>&lt;xforms:repeat&gt;</b> to wrap each code into XML.</para> 
	 <example>
&lt;xforms:repeat nodeset="era:ContainerInformation/era:Container" id="repeatContainer"&gt;
  &lt;xforms:select1 ref="era:ContainerType"&gt;
       &lt;xforms:item&gt;
        &lt;xforms:label&gt;Choose One...&lt;/xforms:label&gt;
        &lt;xforms:value/&gt;
       &lt;/xforms:item&gt;
       &lt;xforms:itemset nodeset="instance('Container-instance')/Row/ContainerDescription"&gt;
        &lt;xforms:label ref="."/&gt;
        &lt;xforms:value ref="."/&gt;
       &lt;/xforms:itemset&gt;
      &lt;/xforms:select1&gt;
&lt;/xforms:repeat&gt;

&lt;xforms:trigger&gt;
     &lt;xforms:label&gt;Repeat Paper Code&lt;/xforms:label&gt;
     &lt;xforms:insert nodeset="Paper"
            at="index('papercode-repeat')"
            position="after" ev:event="DOMActivate" /&gt;
&lt;/xforms:trigger&gt;
</example>
	 <figure id="figure771269738"><caption>Display of Repeating
	 Codes</caption><graphic name="graphics/Select1-repeat.jpg"
	 alt="Display of Repeating Codes" width="698" height="141"/></figure> 
  </slide> 
  <slide id="slide1287"> 
	 <title>Populating Values From Single Code</title> 
	 <para>The <b>&lt;xforms:bind&gt;</b> element is uses to bind values from
		the codelist instance to the resulting XML document.</para> 
	 <para>From the code &lt;PaperCode&gt; we want to populate three values. We
		will need 1 <b>&lt;xforms:variable&gt; </b> and three
		<b>&lt;xforms:bind&gt;</b> elements.</para><example-grp> 
	 <header>Paper Code List</header> 
	 <example>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;FormCodeList codeListName="Holdings_Measurements" version="1"&gt;
   &lt;Row&gt;
       &lt;ContainerCode&gt;ACF-S&lt;/ContainerCode&gt;
       &lt;ContainerDescription&gt;Archival Quality Cubic Foot Container, Standard&lt;/ContainerDescription&gt;
       &lt;Depth&gt;16.500&lt;/Depth&gt;
       &lt;Width&gt;12.500&lt;/Width&gt;
       &lt;Height&gt;10.750&lt;/Height&gt;
       &lt;TotalCubicFoot&gt;10.750&lt;/TotalCubicFoot&gt;
   &lt;/Row&gt;
        . . .
&lt;/FormCodeList&gt;
</example>

	 </example-grp> 
  </slide> 
  <slide id="slide99129784"> 
	 <title>Setting the &lt;xforms:variable&gt; element</title> 
	 <para>The <b>&lt;xforms:variable&gt;</b> element is used to provide the
		capability to compare the instance value (form) against the codelist value. The
		codelist can reside in the database or on the filesystem.</para><deflist> 
	 <header>&lt;xforms:variable&gt; attributes</header><termgrp> 
	 <term>name</term><definition>The name you give the variable. This will be the
	 name you use to reference the name in a calculation.</definition></termgrp> 
	 <termgrp><term>select</term><definition>The XPath location to location value
	 you want to set the variable too. </definition></termgrp></deflist> 
	 <example-grp> 
	 <header>Set XForms Variable</header> 
	 <example>         
 &lt;xforms:variable name="containerType" 
                  select="era:ContainerInformation/era:Container/era:ContainerType"/&gt;
    &lt;xforms:setvalue ref="era:ContainerDimensions/era:Height" 
                     ev:event="DOMActivate"/&gt;
              
            
</example>

	 </example-grp> 
  </slide> 
  <slide id="slide439136"> 
	 <title>Setting &lt;xforms:bind&gt;</title> 
	 <para>The <b>&lt;xforms:bind&gt;</b> element must be used for every value
		in the codelist that gets set.</para><deflist> 
	 <header>&lt;xforms:bind&gt; attributes</header><termgrp> 
	 <term>nodeset</term><definition>The XPath statement for the element and/or
	 attribute being set.</definition></termgrp><termgrp> 
	 <term>calculate</term><definition>The XPath for determining the value that
	 should be populated. Notice a variable is used to compare against.
	 <i>[ContainerDescription = $containerType]</i></definition></termgrp></deflist>
	 <example-grp> 
	 <header>XForms Binds</header> 
	 <example>
 &lt;xforms:bind nodeset="descendant::era:Height"  id="bindHeight"
   calculate="instance('Container-instance')/Row[ContainerDescription = $containerType]/Height"/&gt;
  &lt;xforms:bind nodeset="descendant::era:Width"  id="bindWidth"
 calculate="instance('Container-instance')/Row[ContainerDescription = $containerType]/Width"/&gt;
. . .
</example>

	 </example-grp> 
  </slide> 
  <slide id="slide15795314"> 
	 <title>XForms-Genericode Demo</title> <figure id="demo"> 
	 <caption></caption><graphic name="graphics/demo.jpg" height="187" width="171"
	 alt="Graphics Demo"/></figure> 
	 <para>Demo of XForms-Genericode</para> 
  </slide> 
  <slide id="Demo"> 
	 <title>In the words of Andy Kaufman</title> <!--We can remove Andy Kaufman-->
	 <figure id="andy_kaufman"><caption></caption><graphic
	 name="graphics/Andy_Kaufman.jpg" width="80" height="80"
	 alt="Andy Kaufman"/></figure> 
	 <para>Thank You Very Much!</para> 
	 <para align="center">The End</para> 
  </slide></section>
</training-material></training>

