<?xml version="1.0" encoding="UTF-8"?>

<!-- Author: Wolfgang Meier "meier@ifs.tu-darmstadt.de" -->

<document xmlns:xi="http://www.w3.org/2001/XInclude">
  
   <!-- include header -->
   <xi:include href="context://header.xml"/>
       
   <!-- include sidebar -->
   <xi:include href="sidebar.xml"/>
       
   <body>
   
   <section title="Library Search Example">

   <p>This is a more "real life" example, powered by a single XQuery script.</p>
   
   <p>The sample collection contains 71098 book description (in RDF/XML)
   taken from our local university library.</p>
   
   <form action="biblio.xq" method="GET">
         
     <table width="90%" cellpadding="5" cellspacing="0" border="0" bgcolor="#EEEEEE">
       <tr bgcolor="#99CCFF">
	     <th width="20%" align="left">
	       Search in
	     </th>
	     <th width="40%" align="left">
	       Search what
	     </th>
		 <th width="20%" align="left">
		   Interpret as
		 </th>
		 <th width="20%" align="left">
		 </th>
       </tr>
       <tr>
	     <td width="20%" align="left">
	       <select name="field1" size="1">
	         <option value="any" selected="true">Any</option>
	         <option value="au">Creator,Editor</option>
	         <option value="ti">Title</option>
			 <option value="ab">Description</option>
	         <option value="su">Subject</option>
	       </select>
	     </td>
         <td width="40%" align="left">
       	   <input type="text" name="term1" size="30" />
	     </td>
		 <td width="20%" align="left">
		   <select name="mode1" size="1">
             <option value="near">near</option>
		     <option value="exact">exact match</option>
			 <option value="contains" selected="true">word list</option>
		   </select>
		 </td>
		 <td width="20%" align="left">
		   <select name="operator" size="1">
		     <option value="or" selected="true">or</option>
			 <option value="and" selected="false">and</option>
		   </select>
		 </td>
       </tr>
	   <tr>
	     <td width="20%" align="left">
	       <select name="field2" size="1">
	         <option value="any" selected="true">Any</option>
	         <option value="au">Creator,Editor</option>
	         <option value="ti">Title</option>
			 <option value="ab">Description</option>
	         <option value="su">Subject</option>
	       </select>
	     </td>
         <td width="40%" align="left">
       	   <input type="text" name="term2" size="30" />
	     </td>
		 <td width="20%" align="left">
		   <select name="mode2" size="1">
		   	 <option value="near">near</option>
		     <option value="exact">exact match</option>
			 <option value="contains" selected="true">word list</option>
		   </select>
		 </td>
		 <td width="20%" align="left">
		 </td>
	   </tr>
	   <tr>
	     <td align="left" valign="center" colspan="3">
	       <select name="howmany" size="1">
	         <option>15</option>
			 <option>30</option>
			 <option>50</option>
			 <option>100</option>
	       </select>
	       <small>hits will be displayed</small>
	     </td>
	     <td align="left">
       	       <input type="submit" />
	     </td>
	   </tr>
     </table>
   </form>

   <p><small>You may use wildcards *, ? and character ranges like [a-zA-Z] 
		   for search terms</small></p>

   </section>

   </body>

</document>
