<?xml version="1.0" encoding="UTF-8"?>
<!-- TED: TEmplated Database -->
<!-- October 24, 2002 -->
<!-- Version 1.0 -->
<!-- Change History -->

<!-- March 26, 2003 CM
     Added defaultSave, instanceLabel. Removed saveresults. 
-->
<!-- Feb 26, 2003 PM 
     Added "asynchAction" 
-->
<!-- Feb 20, 2003 PM 
     Added "asynch" and "asynchDivName" markup
-->
<!-- Feb 19, 2003 PM 
     Added "action" markup
-->
<!-- Added new markup limitbyvalue, limitbyvalueLabel, limitbyexistence
     limitbyexistenceLabel - CM 4Feb03 -->

<!-- December 12, 2002 CM 
     Cleaned up the documentation 
-->
<!-- December 5, 2002 CM -->
<!-- 1. removed use="optional" from all global attributes.
     2. removed the type declaration on page, visibility, entityKey, 
	attributes.
-->
<!-- November 20, 2002 CM -->
<!-- Added new elements :
	1. limit
	2. limitLabel
	3. saveresults
	4. saverecord
-->
<!-- 01/22/03 PM -->
<!-- 
     Added alternateView and alternateViewLabel
-->


<!--
	19Feb03 CM
	1. Added documentation

 	General Notes
	1. Some previous schemas used Tamino keywords such as text - they need to be escaped
	by  a ":". This notation may be used in some of the examples in this document.
-->
<!-- 2004-03-25 SLA  Added the "cull" attribute to specify culling of XDOM
                     subtrees during document instantiation.
-->

<!-- 2004/05/18
		1. Added fromHeadingSearch  
		(RKW) -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="http://hul.harvard.edu/ois/xml/ns/ted/TEDSchema.html"
           targetNamespace="urn-3:ois:TEDSchema"   
           version="1.0">

 <xs:attribute name="doctype" type="xs:string">
 <xs:annotation>
         <xs:documentation>
         doctype corresponds to the Tamino doctype for the schema. When you define
	 a schema in Tamino you must specify the doctype and it is generally
	 the top level element in the schema e.g. in bil /Project,
	 and in mpcol /parry.
	 </xs:documentation>
	 <xs:documentation>
	 The ted:doctype markup should be specified as the first piece
	 of ted markup in the schema.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="searchindex" type="xs:string">
 <xs:annotation>
         <xs:documentation>
         searchindex specifies the search index for simple search.
	 searchindex is specified as one or more paths

	 The path is the path to the element in the schema. This path should be relative 
	 to the doctype - it should not include the doctype. TED will accept paths that start
	 with and without leading slashes. TED will accept paths with double 
	 leading slashes. Leading double slash queries are expensive to process and should
	 only be used where necessary - the preferred approach is to use the full path.
	 e.g. ted:searchindex="/record"
	 or
	 e.g. ted:searchindex="record"
	 or
	 e.g. ted:searchindex="//record"

         </xs:documentation>
	 <xs:documentation>
 	 If the simple search index is the doctype, use a dot for the path
	 e.g. ted:searchindex="."
	 </xs:documentation>
         <xs:documentation>
	 If the search occurs in multiple indexes, use the following syntax:
	 ted:searchindex=". Project_Description/@projectID"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="advancedsearchboolean" type="xs:integer">
 <xs:annotation>
         <xs:documentation>
         advancedsearchboolean specifies the number of boolean options
	 The maximum number of booleans is 5. 
	 If the number of booleans is set to 2, 3 text input boxes 
	 are displayed in the user interface and 2 drop down menus 
	 with "and, or, not, near" options.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="advancedsearchindex" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 advancedsearch indexes are specified as name|path(s) pairs. 
	 index pairs are separated by , 
	 index name and path(s) are separated by |
	 The name is the name of the index. This name is displayed on the 
	 results screen when displaying the executed query to the user. This name 
	 may include spaces.
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should be relative 
	 to the doctype - it should not include the doctype. TED will accept paths that start
	 with and without leading slashes. TED will accept paths with double 
	 leading slashes. Leading double slash queries are expensive to process and should
	 only be used where necessary - the preferred approach is to use the full path.
	 e.g. ted:advancedsearchindex="Anywhere|/record, Singer|/record/singer/name"
	 or
	 e.g. ted:advancedsearchindex="Anywhere|record, Singer|record/singer/name"
	 or
	 e.g. ted:advancedsearchindex="Anywhere|//record"
	 </xs:documentation>

	 <xs:documentation>
	 If the path to the index in the schema is the same as the doctype
	 use . as the path. 
	 e.g. ted:advancedsearchindex="Anywhere|."
	 </xs:documentation>

	 <xs:documentation>
	 If the search index maps to more than one path in the schema, multiple
	 paths should be separated by spaces. 
	 e.g. ted:advancedsearchindex="Title|/record/title /record/translatedTitle /record/alternateTitle"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="dropDownLimit" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 dropDownLimits are specified as name|path|value tuples
	 dropDownLimit tuples are separated by ,
	 dropDownLimit name, path and value are separated by |
	 </xs:documentation>

	 <xs:documentation>
	 The name is the name of the limit that appears on the search interface. This name
	 will be automatically preceded by "Limit by " text in the interface. 
	 The name may include spaces.
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should be relative 
	 to the doctype - it should not include the doctype. TED will accept paths that start
	 with and without leading slashes. TED will accept paths with double 
	 leading slashes. Leading double slash queries are expensive to process and should
	 only be used where necessary - the preferred approach is to use the full path.
	 e.g. ted:dropDownList="Collection Method|record/collectionMethod|/autograph/copied/dictated/recorded"
	 or 
	 e.g. ted:dropDownList="Collection Method|/record/collectionMethod|/autograph/copied/dictated/recorded"
	 or
	 e.g. ted:dropDownList="Collection Method|//collectionMethod|/autograph/copied/dictated/recorded"
	 </xs:documentation>

	 <xs:documentation>
	 The value is the list of values that appears in the dropdown
	 in the user interface. A "No Limit" option gets added automatically to the top of the 
	 drop down list by TED so it is not necessary to specify "No Limit" in the list 
	 of values. These values are separated by /
	 e.g. ted:dropDownList="Collection Method|/record/collectionMethod|/autograph/copied/dictated/recorded"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="dropDownLimitLabel" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 The dropDownLimitLabel specifies text that is associated with a particular
	 limit. The text gets added immediately after the drop down limit list in the interface.
	 </xs:documentation>

	 <xs:documentation>
	 dropDownLimitLabels are specified as name|value pairs. 
	 dropDownLimitLabel pairs are separated by ,
	 </xs:documentation>

	 <xs:documentation>
	 The name must be equal to the dropDownLimit name specified in the dropDownLimit (see definition above). 
	 The value is free text.
	 e.g. ted:dropDownLimitLabel="Collection Method|Here is a collection method label, Collection|Here is a collection label"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="checkBoxLimit" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 checkBoxLimits are specified as name|path|value tuples or as name|path pairs
	 checkBoxLimit tuples or pairs are separated by ,
	 checkBoxLimit name, path and value are separated by |
	 </xs:documentation>

	 <xs:documentation>
	 The name is the name of the check box limit that appears on the search interface.
	 The name may include spaces.
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should be relative 
	 to the doctype - it should not include the doctype. TED will accept paths that start
	 with and without leading slashes. TED will accept paths with double 
	 leading slashes. Leading double slash queries are expensive to process and should
	 only be used where necessary - the preferred approach is to use the full path.
	 e.g. ted:checkBoxLimit="Digital Audio|/record/audio/digitalAudio
	 or
	 e.g. ted:checkBoxLimit="Digital Audio|record/audio/digitalAudio
	 or
	 e.g. ted:checkBoxLimit="Digital Audio|//digitalAudio
	 </xs:documentation>

	 <xs:documentation>
	 If the limit is limited to an element with a single value, this represents the value.
	 Example of a pair: ted:checkBoxLimit="Digital Audio|/record/audio/digitalAudio, Digital Text|/record/:text/digitalText"	
	 Example of a tuple: ted:checkBoxLimit="Digital Images|/@images|true"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="checkBoxLimitLabel" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 The checkBoxLimitLabel specifies text that is associated with a particular
	 limit. The text gets added immediately after the check box in the interface.
	 checkBoxLimitLabels are specified as name|value pairs. 
	 checkBoxLimitLabel pairs are separated by ,
	 </xs:documentation>

	 <xs:documentation>
	 The checkBoxLimitLabel name must be equal to a checkBoxLimit name specified in the checkBoxLimit (see definition above). 
	 The value is free text.
	 e.g. ted:dropDownLimitLabel="Digital Audio|Here is a digital audio label, Digital Text |Here is a digital text label"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="browseindex" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 browseindexes are specified as name|path pairs.
	 browse index pairs are separated by ,
	 browse index name and path are separated by |
	 </xs:documentation>

	 <xs:documentation>
	 The name is the name of the browse index. The name is displayed in 
	 the drop down list on the browse screen. The name may include spaces.
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should include
 	 the doctype and should have a leading slash.
	 e.g. ted:browseindex="Title|/Project//Title, Subject|/Project//Subject"
	 e.g. ted:browseindex="Common Name|/mczArtwork/specimen/commonName"
	 </xs:documentation>

	 <xs:documentation>
	 If the browse indexes map to more than one path in the schema, the multiple
	 paths should be separated by spaces.
	 e.g. ted:browseindex="Title|/parry/record/title /parry/record/alternateTitle /parry/record/translatedTitle
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="resultsdisplay" type="xs:string">
 <xs:annotation>
         <xs:documentation>
         resultsdisplay specifies the items displayed in the results display.
	 resultsdisplay are specified as name|path pairs.
	 result display pairs are separated by , 
	 result display name and path are separated by |
	 </xs:documentation>

	 <xs:documentation>
	 The name is the name of the element displayed. If there is no additional ted markup
	 adding a ted label to the element, a pretty print version of this name gets 
	 displayed in the results display.
	 </xs:documentation>
	
	 <xs:documentation>
	 The path is the path to the element in the schema. This path should include
 	 the doctype and should have a leading slash.
	 e.g. ted:resultsdisplay="Project|/Project/Project_Description/Title, Abstract|/Project/Project_Description/Abstract"
	 </xs:documentation>

	 <xs:documentation>
	 If any element in the path contains multiple values, use the subscript notation 
	 e.g. ted:resultsdisplay="ItemNumber|/parry/record/itemNumber[1], Singer|/parry/record/singer[1]/name"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="saverecord" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 saverecord specifies what elements can be saved from the full record display
	 saverecord is specified as one or more paths
	 saverecord paths are separated by ,
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should include
 	 the doctype and should have a leading slash.
	 e.g. ted:saverecord="/Project, /Project/Datasets//Image_Stack"
	 e.g. ted:saverecord="/parry/record"	 
	
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="defaultSave" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 defaultSave specifies what other parts of the record are saved by default 
	 when you save a component of the record in the clipboard. 
	 If the records are small this may not be necessary.
	 </xs:documentation>

	 <xs:documentation>
	 defaultSave is specified as one or more paths
	 defaultSave paths are separated by ,
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should include
 	 the doctype and should have a leading slash.
	 e.g. ted:defaultSave="/Project/Project_Description/Title, /Project/Project_Description/Abstract"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="instanceLabel" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 instanceLabel is the label attached to objects stored in the clipboard. 
	 </xs:documentation>

	 <xs:documentation>
	 instanceLabel is specified as one or more paths
	 instanceLabel paths are separated by ,
	 </xs:documentation>

	 <xs:documentation>
	 The path is the path to the element in the schema. This path should include
 	 the doctype and should have a leading slash.
	 e.g. ted:instanceLabel="/Project/Project_Description/Title"
	 e.g. ted:instanceLabel="/parry/record/title, /parry/record/itemNumber"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="resultsChoice" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 resultsChoice specifies operations available to refine a search. These options
	 are available from a dropdown list in the search interface. Currently the text associated 
	 with these operations is generic to TED and cannot be customized.
	 </xs:documentation>

	 <xs:documentation>
	 resultsChoice can be set to one of the following constants
	 1. addResults adds the results of the query to the existing result set
	 e.g. ted:resultsChoice="addResults"
	 </xs:documentation>

	 <xs:documentation>
	 2. withinResults searches within the existing result set
	 e.g. ted:resultsChoice="withinResults"
	 </xs:documentation>

	 <xs:documentation>
	 3. removeFromResults removes the results of the query from the existing result set
	 e.g. ted:resultsChoice="removeFromResults"
	 </xs:documentation>

	 <xs:documentation>
	 4. to include addResults, withinResults and removeFromResults specify all
	 e.g. ted:resultsChoice="all"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>


 <xs:attribute name="defaultRecordDisplay" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 defaultRecordDisplay specifies how results should be displayed in 
	 the full record display. If no value is selected, it will default to 
	 displayHits. 
	 </xs:documentation>

	 <xs:documentation>
	 defaultRecordDisplay can be set to one of the following constants
	 1. collapse mode displays a collapsed tree. The user will need to expand
	 parts of the tree to view the data.
	 e.g. ted:defaultRecordDisplay="collapse"
	 </xs:documentation>


	 <xs:documentation>
	 2. expand expands the tree completely so that the user can see all elements. 
	 If the expanded tree is very large, this option should be avoided as it may be slow.
	 e.g. ted:defaultRecordDisplay="expand"
	 </xs:documentation>

	 <xs:documentation>
	 3. displayHits expands the parts of the tree where the search terms are found
	 and highlights the search terms.
	 e.g. ted:defaultRecordDisplay="displayHits"
	 </xs:documentation>

	 <xs:documentation>
	 If defaultRecordDisplay markup is not specified, the record display
	 defaults to displayHits.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="dateSearch" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 Dates in TED collections can be represented as follows:
	 a. Using the xs:date schema construct in this format: YYYY-MM-DD (Milman Parry)
	 b. Using the xs:integer schema construct if only the year information is available - the integer
	 should be in YYYY notation. (VIA)
	 </xs:documentation>

	 <xs:documentation>
	 If the date uses the YYYY-MM-DD format, date search options 1-6 are available and are 
	 presented as follows in the search interface 
	 "Date(s) From: YYYY (Input box) MM (Input box) DD Through: YYYY (input box) MM (input box) DD (input box).
	 If the user only enters a From YYYY value, the Through YYYY will default to From YYYY + 1
	 All other values will default to 01.
	 </xs:documentation>

	 <xs:documentation>
	 If the date is represented as an integer, options 1 and 4 are available and are 
	 presented as follows in the search interface
	 "Date(s) From: YYYY (Input box) Through: YYYY (input box).
	 If the user only enters a From YYYY value, the Through YYYY will default to From YYYY + 1
	 </xs:documentation>

	 <xs:documentation>
	 Date options
	 1. fromDateYear
	 2. fromDateMonth
	 3. fromDateDay
	 4. throughDateYear
	 5. throughDateMonth
	 6. throughDateDay
	 </xs:documentation>

	 <xs:documentation>
	 For xs:date YYYY-MM-DD format
	 e.g. ted:dateSearch="fromDateYear, fromDateMonth, fromDateDay, throughDateYear, throughDateMonth, throughDateDay"
	 </xs:documentation>
	
	 <xs:documentation>
	 For xs:integer YYYY format
	 e.g ted:dateSearch="fromDateYear, throughDateYear"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="dateIndex" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 A date index specifies the path in which the date search will occur. 
	 dateindexes are specified as paths separated by ,
         </xs:documentation>
	 
         <xs:documentation>
	 The dateIndex can be in a single date or a date range, in which case the start and end date are 
	 separated by spaces.
         </xs:documentation>

         <xs:documentation>
	 Single dates contain the path to the date in the schema. 
	 A date range contains the path to the start date and end date in the schema. 
         </xs:documentation>

         <xs:documentation>
	 The paths should be relative to the doctype - they should not include the doctype. 
	 TED will accept paths that start with and without leading slashes. TED will accept paths with double 
	 leading slashes. Leading double slash queries are expensive to process and should
	 only be used where necessary - the preferred approach is to use the full path.
	 e.g. ted:dateIndex="/record/date/singleDate"
	 or
	 e.g. ted:dateIndex="/group/structuredDate/beginDate /group/structuredDate/endDate, group/subwork/structuredDate/beginDate /group/subwork/structuredDate/endDate"
         </xs:documentation>

         <xs:documentation>
	 This single date query gets transformed into 
	 /parry[((record/date/singleDate lt;= 1933-01-01 and record/date/singleDate >= 1932-01-01))]
         </xs:documentation>
	
         <xs:documentation>
	 The start and end date query gets transformed into
	 /viaRecord[((group/structuredDate/beginDate lt;= 1882 and group/structuredDate/endDate >= 1880) or (group/subwork/structuredDate/beginDate lt;= 1882 and group/subwork/structuredDate/endDate >= 1880))]
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="numberSort" type="xs:string">
 <xs:annotation>
         <xs:documentation>
         numberSort specifies the number of sorts that should be available in the user interface. 
	 If you do not want to include a sort option, omit the numberSort markup. Sorting
	 involves post processing, so it would be best to minimize the number of sort
	 options. 
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="sortIndex" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 sortIndexes are specified as name|path pairs. 
	 sortIndex pairs are separated by ,
	 sortIndex name and path are separated by |
	 The name is the name of the index. This name is displayed in the 
	 sort drop down list. This name may include spaces. 
         </xs:documentation>

         <xs:documentation>
	 The path is the path to the element in the schema. This path should be relative 
	 to the doctype - it should not include the doctype. TED will accept paths that start
	 with and without leading slashes. TED will accept paths with double 
	 leading slashes. Leading double slash queries are expensive to process and should
	 only be used where necessary - the preferred approach is to use the full path.
         </xs:documentation>

         <xs:documentation>
	 e.g. ted:sortIndex="Singer|record/singer[1]/name"
	 or 
	 e.g. ted:sortIndex="Singer|/record/singer[1]/name" 
	 or 
	 e.g. ted:sortIndex="Singer|//name"
         </xs:documentation>

         <xs:documentation>
	 The sort value needs to be unambiguous. 
	 If an element is repeatable, Tamino will detect a duplicate in the sort key and will 
	 be unable to perform the sort. In this case the subscript notation should be used 
	 e.g. ted:sortIndex="Singer|record/singer[1]/name, Title|record/title[1], Location|record/location[1]"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="defaultSort" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 A default sort indexed can be specified. Because sort involves post-processing,
	 adding a default sort may add extra processing time. However, for smaller collections
	 it can be a very useful tool. The default sort value is any name defined in the 
	 sortIndex. If the sortIndex = Singer|record/singer[1]/name, Title|record/title[1] then
	 ted:defaultSort="Singer" 
	 or 
	 ted:defaultSort="Title"
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="chunks">
 <xs:annotation>
         <xs:documentation>
	 Added specifically for via. Identifies the components of a record that can 
	 be independently displayed and saved. Note that when displaying or saving a 
	 chunk, information from up the tree is usually included as well.

	 e.g. ted:chunks="/viaRecord, /viaRecord//subWork, /viaRecord//surrogate, /viaRecord//image"
         </xs:documentation>
 </xs:annotation>
</xs:attribute>



 <xs:attribute name="action">
 <xs:annotation>
         <xs:documentation>
	 Allows specification of pre-defined actions for marked-up elements.
	 - replaceRef tells display to replace entityRefs with targets;
         </xs:documentation>
 </xs:annotation>
   <xs:simpleType>
    <xs:restriction base="xs:token">
     <xs:enumeration value="replaceRef"/>
    </xs:restriction>
   </xs:simpleType>
 </xs:attribute>

 <xs:attribute name="asynchAction">
 <xs:annotation>
         <xs:documentation>
	 The asynch deliverable requires the stated action rather than simple delivery.
         </xs:documentation>
 </xs:annotation>
   <xs:simpleType>
    <xs:restriction base="xs:token">
     <xs:enumeration value="mets"/>
    </xs:restriction>
   </xs:simpleType>
 </xs:attribute>

 <xs:attribute name="asynch">
 <xs:annotation>
         <xs:documentation>
	 The marked item is deliverable through the asynch; its form is
 specified as one of the enumerated types.
         </xs:documentation>
 </xs:annotation>
   <xs:simpleType>
    <xs:restriction base="xs:token">
     <xs:enumeration value="div"/>
     <xs:enumeration value="oid"/>
     <xs:enumeration value="urn"/>
    </xs:restriction>
   </xs:simpleType>
 </xs:attribute>

 <xs:attribute name="asynchDivName" type="xs:token">
 <xs:annotation>
         <xs:documentation>
	 Specifies the name to be used by the asynch when it builds the folder
 branch for this div. This markup is only meaningful for elements bearing
 asynch=div markup. Value must be the name of an attribute or direct child of
 the div element; the contents of this name element will be used as the div
 name. 
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="label" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	By default xdom uses the element name as the label; this can be
	overridden with the label attribute.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="page">
 <xs:annotation>
         <xs:documentation>
	 Controls pagination of the display; a value of "new" tells the
         editor/maintenance system to break to a new page on the marked-up
         element. No other values are currently recognized.
         </xs:documentation>
 </xs:annotation>
   <xs:simpleType>
    <xs:restriction base="xs:token">
     <xs:enumeration value="new"/>
    </xs:restriction>
   </xs:simpleType>
 </xs:attribute>


 <xs:attribute name="form" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 Used by the editor/maintenance system to plug in a custom class
         to handle the marked-up element or attribute. Use the java class name.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="view" type="xs:string">
 <xs:annotation>
         <xs:documentation>
 Used by the editor/maintenance system to plug in a custom view to handle
 the marked-up element or attribute (in terms of MVC pattern) -- typically used
 together with page="new". Use the java class name.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

  <xs:attribute name="visibility" default="user">
  <xs:annotation>
  <xs:documentation>
  Used by the editor/maintenance system to control which elements
  are displayed depending on role of the user. Default is
  "user". "System" role will see everything; "owner" role will see
  everything except system elements; "user" will see everything
  except system or owner elements.
  </xs:documentation>
  </xs:annotation>
    <xs:simpleType>
     <xs:restriction base="xs:token">
      <xs:enumeration value="user"/>
      <xs:enumeration value="owner"/>
      <xs:enumeration value="system"/>
     </xs:restriction>
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="textRows" type="xs:integer">
  <xs:annotation>
          <xs:documentation>
	      Use this tag to specify a custom value for the number of
          rows for the text input area for this marked-up
          element or attribute.(Used by the display/maintenance
          system.)
          </xs:documentation>
  </xs:annotation>
  </xs:attribute>

  <xs:attribute name="textColumns" type="xs:integer">
     <xs:annotation>
        <xs:documentation>
	      Use this tag to specify a custom value for the number of
          columns for the text input area for this marked-up
          element or attribute.(Used by the display/maintenance
          system.)
         </xs:documentation>
     </xs:annotation>
  </xs:attribute>

  <xs:attribute name="entityKey">
     <xs:annotation>
        <xs:documentation>

     Used together with "entityRef" by the display/maintenance
     system to manage primary key constraints within a
     document. See entity management section in xdom javadocs:
     http://ois.harvard.edu/developer-doc/javadoc/xdom/edu/harvard/hul/ois/xdom/package-summary.html#package_description 
         </xs:documentation>
     </xs:annotation>
    <xs:simpleType>
     <xs:restriction base="xs:token">
      <xs:enumeration value="primaryAuto"/>
      <xs:enumeration value="primaryRef"/>
      <xs:enumeration value="identifier"/>
      <xs:enumeration value="identifierRef"/>
     </xs:restriction>
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="entityRef" type="xs:string">
     <xs:annotation>
        <xs:documentation>
	      See documentation for entityKey.
         </xs:documentation>
     </xs:annotation>
  </xs:attribute>

  <xs:attribute name="helpText" type="xs:string">
     <xs:annotation>
        <xs:documentation>
	      Used by the editor/maintenance system to determine what
     help text should be displayed for the marked-up element or
     attribute. 
         </xs:documentation>
     </xs:annotation>
  </xs:attribute>

 <xs:attribute name="alternateView" type="xs:string">
 <xs:annotation>
         <xs:documentation>
 Like &quot;view&quot;, used by the editor/maintenance system to plug in a
 custom view for the marked-up element; this provides a facility for an
 alternate view, when multiple views are desired. Use the fully qualified java
 class name. 
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

 <xs:attribute name="alternateViewLabel" type="xs:string">
 <xs:annotation>
         <xs:documentation>
 Provides a presentation label used by the UI to provide access to this view.
         </xs:documentation>
 </xs:annotation>
 </xs:attribute>

  <xs:attribute name="cull" type="xs:string">
  <xs:annotation>
          <xs:documentation>
	      Use this tag to specify a schema substree that should be
	      culled when loading an instance document.  Currently, the
	      value of the attribute is arbitrary; culling is indicated
	      merely by the existence of the attribute.
          </xs:documentation>
  </xs:annotation>
  </xs:attribute>
  
  <xs:attribute name="fromHeadingSearch" type="xs:string">
 <xs:annotation>
         <xs:documentation>
	 fromHeadingSearches are specified as type|path(s) pairs. 
	 Types correspond to the element(s) from which the values to be searched are drawn, 
	 as expressed in programming for each DB (i.e., they are not schema-defined). For VIA, these types
	 (as of 5/18/2003) were Name and Place.
	 The path(s) is/are the location of the elements to be searched in the schema. 
	Type and path(s) are separated by | 
	Each fromHeadingSearch pair is separated by , 
	 
	 </xs:documentation>
</xs:annotation>
</xs:attribute>
  
</xs:schema>






