<?xml version="1.0" encoding="utf-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
   <!-- The ISO RelaxNG schema against which to validate is located here: http://www.schematron.com/iso/iso-schematron.rnc -->
   <sch:title>EAD Finding Aids</sch:title>
   <sch:p>This schematron tests IU Center for the Study of History and Memory (CSHM) EAD files, with
      locally-developed rules that are largely based on the RLG's Best Practice Guide for
      EAD.</sch:p>
   <sch:pattern id="p1" see="">
      <sch:p>This pattern tests elements in the EAD root element.</sch:p>
      <sch:rule id="r81" context="/ead">
         <sch:assert role="M" icon="#dLevel-Error" test="count(attribute::*) > 0" diagnostics="d1"
            >The root ead element must have the attributes specified in the template, in order to
            validate against the W3C XML Schema instead of the older DTD.</sch:assert>
      </sch:rule>
   </sch:pattern>
   <sch:pattern id="p2" see="">
      <sch:p>This pattern tests elements in the EAD header.</sch:p>
      <sch:rule id="r1" context="/ead/eadheader">
         <sch:assert role="M" icon="#dLevel-Error" test="@dateencoding='iso8601'" diagnostics="d1"
            >The eadheader dateencoding attribute must be set to "iso8601".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@findaidstatus">The eadheader must have a
            findaidstatus attribute.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@relatedencoding='dublincore'"
            diagnostics="d1">The eadheader relatedencoding attribute must be set to
            "dublincore".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@audience='external'" diagnostics="d1">The
            eadheader audience attribute must be set to "external".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@langencoding='iso639-2b'" diagnostics="d1"
            >The eadheader langencoding attribute must be set to "iso639-2b".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@scriptencoding='iso15924'"
            diagnostics="d1">The eadheader scriptencoding attribute must be set to
            "iso15924".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@repositoryencoding='iso15511'"
            diagnostics="d1">The eadheader repositoryencoding attribute must be set to
            "iso15511".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@countryencoding='iso3166-1'"
            diagnostics="d1">The eadheader countryencoding attribute must be set to
            "iso3166-1".</sch:assert>
      </sch:rule>
      <sch:rule id="r2" context="/ead/eadheader/eadid">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='identifier'">The eadid
            encodinganalog attribute must be set to "identifier".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@countrycode='US'">The eadid countrycode
            attribute must be set to "US".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@mainagencycode='US-InU'">For CSHM finding
            aids, the eadid mainagencycode attribute must be set to "US-InU".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@identifier,'ohrc')">For CSHM
            finding aids, the eadid identifier attribute must begin with "ohrc".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test=". = @identifier">The value in the eadid
            element must match the value in the eadid identifier attribute.</sch:assert>
      </sch:rule>
      <!--      <sch:rule id="r3" context="/ead/eadheader/filedesc"/> -->
      <sch:rule id="r4" context="/ead/eadheader/filedesc/titlestmt">
         <sch:assert role="M" icon="#dLevel-Error" test="titleproper">The titlestmt element must
            contain a titleproper element.</sch:assert>
         <sch:assert role="O" icon="#dLevel-Warning" test="subtitle">If the finding aid has a
            subtitle, it should be encoded in a subtitle element.</sch:assert>
         <sch:assert role="O" icon="#dLevel-Warning" test="titleproper/date|subtitle/date">When
            applicable, the titlestmt element should contain a date nested within either the
            titleproper or subtitle elements.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="author">The titlestmt element must contain
            an author element.</sch:assert>
      </sch:rule>
      <sch:rule id="r5" context="/ead/eadheader/filedesc/titlestmt/titleproper">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='title'">The titleproper
            encodinganalog attribute must be set to "title".</sch:assert>
      </sch:rule>
      <sch:rule id="r6" context="/ead/eadheader/filedesc/titlestmt/author">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='creator'">The author
            element must contain an encodinganalog element with the value "creator".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error"
            test="starts-with(normalize-space(.),'Finding aid prepared by the staff of the Center for the Study of History and Memory')"
            >The author element must begin with the text "Finding aid prepared by the staff of the
            Center for the Study of History and Memory".</sch:assert>
      </sch:rule>
      <sch:rule id="r7" context="/ead/eadheader/filedesc/publicationstmt">
         <sch:assert role="M" icon="#dLevel-Error" test="publisher">The publicationstmt element must
            contain a publisher element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="date">The publicationstmt element must
            contain a date element.</sch:assert>
      </sch:rule>
      <sch:rule id="r8" context="/ead/eadheader/filedesc/publicationstmt/publisher">
         <sch:assert role="M" icon="#dLevel-Error"
            test="normalize-space(.)='Indiana University Digital Library Program'">The publisher
            element must have the value "Indiana University Digital Library Program".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='publisher'">The publisher
            encodinganalog attribute must be set to "publisher".</sch:assert>
      </sch:rule>
      <sch:rule id="r9" context="/ead/eadheader/filedesc/publicationstmt/date">
         <sch:assert role="M" icon="#dLevel-Error" test="@normal">The date element must contain a
            normal attribute.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='date'">The date
            encodinganalog attribute must be set to "date".</sch:assert>
      </sch:rule>
      <sch:rule id="r10" context="/ead/eadheader/filedesc/notestmt">
         <sch:assert role="M" icon="#dLevel-Error" test="note/@encodinganalog='rights'">A note
            element must exist with the encodinganalog attribute "rights".</sch:assert>
      </sch:rule>
      <sch:rule id="r11" context="/ead/eadheader/profiledesc">
         <sch:assert role="M" icon="#dLevel-Error" test="creation">The profiledesc must contain a
            creation element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="langusage">The profiledesc must contain a
            langusage element.</sch:assert>
      </sch:rule>
      <sch:rule id="r12" context="/ead/eadheader/profiledesc/creation">
         <sch:assert role="M" icon="#dLevel-Error" test="date">The creation element must contain at
            least one date element.</sch:assert>
      </sch:rule>
      <sch:rule id="r13" context="/ead/eadheader/profiledesc/creation/date">
         <sch:assert role="M" icon="#dLevel-Error" test="@normal">The date element must contain a
            normal attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r14" context="/ead/eadheader/profiledesc/langusage">
         <sch:assert role="M" icon="#dLevel-Error" test="language">The langusage element must
            contain a language element.</sch:assert>
      </sch:rule>
      <sch:rule id="r15" context="/ead/eadheader/profiledesc/langusage/language">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='language'">The language
            encodinganalog attribute must be set to "language".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@langcode">The language element must have a
            @langcode attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r16" context="/ead/eadheader/revisiondesc">
         <sch:assert role="M" icon="#dLevel-Error" test="change">The revisiondesc element must
            contain at least one change element.</sch:assert>
      </sch:rule>
      <sch:rule id="r17" context="/ead/eadheader/revisiondesc/change">
         <sch:assert role="M" icon="#dLevel-Error" test="date">The change element must contain a
            date element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="item">The change element must contain an
            item element.</sch:assert>
      </sch:rule>
      <sch:rule id="r18" context="/ead/eadheader/revisiondesc/change/date">
         <sch:assert role="M" icon="#dLevel-Error" test="@normal">The date element must contain a
            normal attribute.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="not(contains(.,'xxx'))">Change xxx to the
            date the change was made.</sch:assert>
      </sch:rule>
   </sch:pattern>
   <sch:pattern id="p3" see="">
      <sch:p>This pattern tests elements in the &lt;archdesc&gt;.</sch:p>
      <sch:rule id="r19" context="/ead/archdesc">
         <sch:assert role="M" icon="#dLevel-Error" test="@level='collection'">The archdesc element
            should contain an @level attribute with the value "collection."</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@audience='external'">The archdesc element
            should contain an @audience attribute with the value "external."</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@type" diagnostics="d2">The archdesc
            element should contain a @type attribute.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@relatedencoding='marc21'" diagnostics="d2"
            >The archdesc element should contain a @relatedencoding attribute with the value
            "marc21".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="scopecontent">A scopecontent element is
            required in the archdesc.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="descgrp" diagnostics="d4">A descgrp element
            must appear in the archdesc to wrap administrative information together.</sch:assert>
      </sch:rule>
      <sch:rule id="r20" context="/ead/archdesc/did">
         <sch:assert role="M" icon="#dLevel-Error" test="head">The archdesc/did must contain a head
            element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="repository">The archdesc/did must contain a
            repository element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="origination" diagnostics="d3">The
            archdesc/did/origination element is required.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="unittitle">A unittitle for the collection
            must be provided.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="unitdate">A unitdate for the collection
            must be provided.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="unitid">A unitid for the collection must be
            provided</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="physdesc">The archdesc/did must contain a
            physdesc element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="physloc">The archdesc/did must contain a
            physloc element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="langmaterial">The archdesc/did must contain
            a langmaterial element.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="abstract">The archdesc/did must contain an
            abstract element.</sch:assert>
      </sch:rule>
      <sch:rule id="r72" context="/ead/archdesc/did/head">
         <sch:assert role="M" icon="#dLevel-Error"
            test="normalize-space(.) = 'Overview of the Collection'">The archdesc/did/head must
            contain the value "Overview of the Collection".</sch:assert>
         <sch:assert role="O " icon="#dLevel-Warning" test="not(contains(.,':'))">The
            archdesc/did/head should not contain a colon (:).</sch:assert>
      </sch:rule>
      <sch:rule id="r21" context="/ead/archdesc/did/repository">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='852'">The repository
            element must have an encodinganalog attribute with the value "852"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Repository'">The repository element
            must have a label attribute with the value "Repository".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@id='cshm'">The repository element must
            have an id attribute with the value "cshm"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="corpname">The repository element should
            contain an corpname element</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="address">The repository element should
            contain an address element</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="extref">The repository element should
            contain an extref element</sch:assert>
      </sch:rule>
      <sch:rule id="r22" context="/ead/archdesc/did/repository/corpname">
         <sch:assert role="M" icon="#dLevel-Error"
            test="normalize-space(.) = 'Indiana University Center for the Study of History and Memory'"
            >The repository element must contain a corpname element with the value "Indiana
            University Center for the Study of History and Memory"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@source='lcnaf'">The repository/corpname
            element must have a @source attribute with the value "lcnaf".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error"
            test="@normal = 'Indiana University, Bloomington. Center for the Study of History and Memory'"
            >The corpname element must contain a normal attribute with the value "Indiana
            University, Bloomington. Center for the Study of History and Memory"</sch:assert>
      </sch:rule>
      <sch:rule id="r73" context="/ead/archdesc/did/origination">
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Creator'">The origination element
            should contain a label attribute with the value "Creator".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="corpname">The origination element should
            contain a corpname subelement.</sch:assert>
      </sch:rule>
      <sch:rule id="r24" context="/ead/archdesc/did/origination/corpname">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'110')">The
            origination/corpname element must have an encodinganalog attribute that starts with
            "110".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@source='lcnaf'">The origination/corpname
            element must have a @source attribute with the value "lcnaf".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error"
            test="normalize-space(.)='Indiana University Center for the Study of History and Memory'"
            >The origination/corpname element must have the value "Indiana University Center for the
            Study of History and Memory"</sch:assert>
      </sch:rule>
      <sch:rule id="r25" context="/ead/archdesc/did/unittitle">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='245$a'">The unittitle
            element must have an encodinganalog attribute with the value "245$a"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Title'">The unittitle element must
            have a label attribute with the value "Title".</sch:assert>
      </sch:rule>
      <sch:rule id="r26" context="/ead/archdesc/did/unitdate">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'245') ">The
            unitdate element must have an encodinganalog attribute that starts with the value
            "245"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@normal">The unitdate element must have a
            normal attribute.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@type">The unitdate element must have a
            type attribute.</sch:assert>
         <sch:assert role="O" icon="#dLevel-Warning"
            test="(contains(., '-') and @type) or not(contains(., '-'))">Unitdates that are not
            single dates should have a type attribute with the appropriate value.</sch:assert>
      </sch:rule>
      <sch:rule id="r27" context="/ead/archdesc/did/unitid">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='099'">The unitid element
            must have an encodinganalog attribute with the value "099"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Project No.'">The unitid must have
            a label attribute with the value "Project No.".</sch:assert>
      </sch:rule>
      <sch:rule id="r28" context="/ead/archdesc/did/physdesc">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'300') ">The
            physdesc element must have an encodinganalog attribute that starts with
            "300"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Interviews'">The physdesc element
            must have a label attribute with the value "Interviews".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="extent">A physdesc element must contain at
            least one extent element.</sch:assert>
      </sch:rule>
      <sch:rule id="r83" context="/ead/archdesc/did/physloc">
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Physical Location'">The physdesc
            element must have a label attribute with the value "Physical Location"</sch:assert>
      </sch:rule>
      <sch:rule id="r29" context="/ead/archdesc/did/langmaterial">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='546'">The langmaterial
            element must have an encodinganalog attribute with the value "546"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Language'">The langmaterial element
            must have a label attribute with the value "Language".</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="language">At least one language subelement
            must appear within langmaterial.</sch:assert>
      </sch:rule>
      <sch:rule id="r30" context="/ead/archdesc/did/langmaterial/language">
         <sch:assert role="M" icon="#dLevel-Error" test="@langcode">The language element must have a
            @langcode attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r31" context="/ead/archdesc/did/abstract">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'520')">The
            abstract element must have an encodinganalog attribute that starts with
            "520"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="@label='Abstract'">The abstract element
            must have a label attribute with the value "Abstract".</sch:assert>
      </sch:rule>

      <sch:rule id="r33" context="/ead/archdesc/scopecontent">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'520')">The
            scopecontent element must have an encodinganalog attribute that starts with
            "520"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="head">The scopecontent element must include
            a head element.</sch:assert>
      </sch:rule>



      <sch:rule id="r34" context="/ead/archdesc/arrangement">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'351')">The
            arrangement element must have an encodinganalog attribute that starts with
            "351"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="head">The arrangement element must include
            a &lt;head&gt; element.</sch:assert>
      </sch:rule>
      <sch:rule id="r76" context="/ead/archdesc/arrangement/head">
         <sch:assert role="O " icon="#dLevel-Warning" test="not(contains(.,':'))">The
            arrangement/head should not contain a colon (:).</sch:assert>
      </sch:rule>
      <sch:rule id="r77" context="/ead/archdesc/scopecontent/head">
         <sch:assert role="O " icon="#dLevel-Warning" test="not(contains(.,':'))">The
            scopecontent/head should not contain a colon (:).</sch:assert>
      </sch:rule>
      <sch:rule id="r46" context="/ead/archdesc/relatedmaterial">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='544 1'">The
            relatedmaterial element must have an encodinganalog attribute with the value "544
            1"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="head">The relatedmaterial element must
            contain a head element.</sch:assert>
      </sch:rule>
      <sch:rule id="r79" context="/ead/archdesc/relatedmaterial/head">
         <sch:assert role="O " icon="#dLevel-Warning" test="not(contains(.,':'))">The
            relatedmaterial/head should not contain a colon (:).</sch:assert>
      </sch:rule>

      <sch:rule id="r47" context="/ead/archdesc/descgrp">
         <sch:assert role="M" icon="#dLevel-Error" test="head/text()='Administrative Information'"
            >The descgrp element must include a &lt;head&gt;Administrative
            Information&lt;/head&gt;</sch:assert>
         <sch:assert role="O" icon="#dLevel-Error" test="acqinfo">The acqinfo element is optional.
            Use it if this feature is applicable to the collection.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="userestrict">The userestrict element is
            required, even if the collection is unrestricted.</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="prefercite">The prefercite element is
            required</sch:assert>
      </sch:rule>
      <sch:rule id="r80" context="/ead/archdesc/descgrp/head">
         <sch:assert role="O " icon="#dLevel-Warning" test="not(contains(.,':'))">The descgrp/head
            should not contain a colon (:).</sch:assert>
      </sch:rule>

      <sch:rule id="r50" context="/ead/archdesc/descgrp/acqinfo">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='541'">The acqinfo element
            must have an encodinganalog attribute with the value "541"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="head">The acqinfo element must include a
            head element.</sch:assert>
      </sch:rule>
      <sch:rule id="r51" context="/ead/archdesc/descgrp/userestrict">
         <sch:assert role="M" icon="#dLevel-Error" test="@encodinganalog='540'">The userrestrict
            element must have an encodinganalog attribute with the value "540"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="head">The userestrict element must include
            a head element.</sch:assert>
      </sch:rule>
      <sch:rule id="r52" context="/ead/archdesc/descgrp/prefercite">
         <sch:assert role="M" icon="#dLevel-Error" test="starts-with(@encodinganalog,'524')">The
            prefercite element must have an encodinganalog attribute that starts with
            "524"</sch:assert>
         <sch:assert role="M" icon="#dLevel-Error" test="head">The prefercite element must include a
            head element.</sch:assert>
      </sch:rule>

      <sch:rule id="r56" context="/ead/archdesc/dsc//container">
         <sch:assert role="O " icon="#dLevel-Warning" test="@label">The label attribute on the
            container element is displayed together with the contents of the container element. Most
            containers will need a label attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r57" context="/ead/archdesc/dsc/c01">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c01&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r58" context="/ead/archdesc/dsc/c01/did">
         <sch:assert role="M" icon="#dLevel-Error" test="unittitle">A unittitle is required in
            &lt;c01&gt;.</sch:assert>
      </sch:rule>
      <sch:rule id="r59" context="/ead/archdesc/dsc/c01/did/unittitle">
         <sch:assert role="O " icon="#dLevel-Warning" test="unitdate">If the unittitle contains a
            date, the unitdate attribute should be nested inside the unittitle.</sch:assert>
      </sch:rule>
      <sch:rule id="r60" context="/ead/archdesc/dsc/c01//unitdate">
         <sch:assert role="M" icon="#dLevel-Error" test="@normal">The unitdate element must have a
            normal attribute.</sch:assert>
         <sch:assert role="O" icon="#dLevel-Warning"
            test="(contains(., '-') and @type) or not(contains(., '-'))">Unitdates that are not
            single dates should have a type attribute with the appropriate value.</sch:assert>
      </sch:rule>
      <sch:rule id="r61" context="/ead/archdesc/dsc/c01/c02">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c02&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r62" context="/ead/archdesc/dsc/c01/c02/c03">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c03&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r63" context="/ead/archdesc/dsc/c01/c02/c03/c04">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c04&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r64" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c05&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r65" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c06&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r66" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06/c07">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c07&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r67" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06/c07/c08">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c08&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r68" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06/c07/c08/c09">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c09&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r69" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06/c07/c08/c09/c10">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c10&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r70" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06/c07/c08/c09/c10/c11">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c11&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
      <sch:rule id="r71" context="/ead/archdesc/dsc/c01/c02/c03/c04/c05/c06/c07/c08/c09/c10/c11/c12">
         <sch:assert role="M" icon="#dLevel-Error" test="@level" diagnostics="d5">All
            &lt;c12&gt; elements must contain a level attribute.</sch:assert>
      </sch:rule>
   </sch:pattern>
   <sch:diagnostics>
      <sch:diagnostic id="dLevel-Error">error.gif</sch:diagnostic>
      <sch:diagnostic id="dLevel-Warning">warning.gif</sch:diagnostic>
      <sch:diagnostic id="dLevel-Tip">tip.gif</sch:diagnostic>

      <sch:diagnostic id="d1">The value "iso8601" in the dateencoding attribute indicates the format
         of all normalized dates in the EAD document.</sch:diagnostic>
      <sch:diagnostic id="d2">The TYPE attribute can be used to categorize the finding aid as an
         inventory, register, or other format.</sch:diagnostic>
      <sch:diagnostic id="d3">The origination element should appear, with a persname, corpname,
         famname, or generic name, if there is an "individual or organization responsible for the
         creation, accumulation, or assembly of the described materials before their incorporation
         into an archival repository."</sch:diagnostic>
      <sch:diagnostic id="d4">See the IU EAD template for the EAD elements that should appear within
         descgrp, and which should appear directly in archdesc.</sch:diagnostic>
      <sch:diagnostic id="d5">Allowed level attribute values are class, collection, file, fonds,
         item, otherlevel, recordgrp, series, subfonds, subgrp, subseries.</sch:diagnostic>
   </sch:diagnostics>
</sch:schema>
