test/data/seda_1_export.rng
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 07 Nov 2017 14:40:09 +0100
changeset 2872 1e715baea780
parent 2871 20d1509fb15a
child 2873 9a89315814f7
permissions -rw-r--r--
[profile gen] In SEDA 1.0, archival agency should occurs before transferring agency Related to #17113836

<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rng:grammar
    xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
    xmlns:clm60133="urn:un:unece:uncefact:codelist:standard:6:0133:40106"
    xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:standard:IANA:MIMEMediaType:2008-11-12"
    xmlns:clmIANACharacterSetCode="urn:un:unece:uncefact:codelist:standard:IANA:CharacterSetCode:2007-05-14"
    xmlns:clmDAFFileTypeCode="urn:un:unece:uncefact:codelist:draft:DAF:fileTypeCode:2009-08-18"
    xmlns:qdt="fr:gouv:culture:archivesdefrance:seda:v1.0:QualifiedDataType:1"
    xmlns:rng="http://relaxng.org/ns/structure/1.0"
    xmlns:seda="fr:gouv:culture:archivesdefrance:seda:v2.0"
    xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:10"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="fr:gouv:culture:archivesdefrance:seda:v1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
    ns="fr:gouv:culture:archivesdefrance:seda:v1.0"
    seda:warnings="">
  <rng:start>
    <rng:element name="ArchiveTransfer">
      <xsd:annotation>
        <xsd:documentation>my profile title &amp;&amp;</xsd:documentation>
      </xsd:annotation>
      <rng:optional>
        <rng:attribute name="Id">
          <rng:data type="ID"/>
        </rng:attribute>
      </rng:optional>
      <rng:element name="Comment">
        <rng:optional>
          <rng:attribute name="languageID">
            <rng:data type="language"/>
          </rng:attribute>
        </rng:optional>
        <rng:value type="string">my profile description &amp;&amp;</rng:value>
      </rng:element>
      <rng:element name="Date">
        <rng:data type="string"/>
      </rng:element>
      <rng:element name="TransferIdentifier">
        <rng:optional>
          <rng:attribute name="schemeID">
            <rng:data type="token"/>
          </rng:attribute>
        </rng:optional>
        <rng:optional>
          <rng:attribute name="schemeName">
            <rng:data type="string"/>
          </rng:attribute>
        </rng:optional>
        <rng:optional>
          <rng:attribute name="schemeAgencyName">
            <rng:data type="string"/>
          </rng:attribute>
        </rng:optional>
        <rng:optional>
          <rng:attribute name="schemeVersionID">
            <rng:data type="token"/>
          </rng:attribute>
        </rng:optional>
        <rng:optional>
          <rng:attribute name="schemeDataURI">
            <rng:data type="anyURI"/>
          </rng:attribute>
        </rng:optional>
        <rng:optional>
          <rng:attribute name="schemeURI">
            <rng:data type="anyURI"/>
          </rng:attribute>
        </rng:optional>
        <rng:data type="string"/>
      </rng:element>
      <rng:element name="ArchivalAgency">
        <rng:element name="Identification">
          <rng:optional>
            <rng:attribute name="schemeID">
              <rng:data type="token"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeName">
              <rng:data type="string"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeAgencyName">
              <rng:data type="string"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeVersionID">
              <rng:data type="token"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeDataURI">
              <rng:data type="anyURI"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeURI">
              <rng:data type="anyURI"/>
            </rng:attribute>
          </rng:optional>
          <rng:data type="string"/>
        </rng:element>
        <rng:optional>
          <rng:element name="Name">
            <rng:data type="string"/>
          </rng:element>
        </rng:optional>
      </rng:element>
      <rng:element name="TransferringAgency">
        <rng:element name="Identification">
          <rng:optional>
            <rng:attribute name="schemeID">
              <rng:data type="token"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeName">
              <rng:data type="string"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeAgencyName">
              <rng:data type="string"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeVersionID">
              <rng:data type="token"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeDataURI">
              <rng:data type="anyURI"/>
            </rng:attribute>
          </rng:optional>
          <rng:optional>
            <rng:attribute name="schemeURI">
              <rng:data type="anyURI"/>
            </rng:attribute>
          </rng:optional>
          <rng:data type="string"/>
        </rng:element>
        <rng:optional>
          <rng:element name="Name">
            <rng:data type="string"/>
          </rng:element>
        </rng:optional>
      </rng:element>
      <rng:oneOrMore>
        <rng:element name="Archive" xml:id="id%(unit-eid)s">
          <xsd:annotation>
            <xsd:documentation>archive unit title</xsd:documentation>
          </xsd:annotation>
          <rng:optional>
            <rng:attribute name="Id">
              <rng:data type="ID"/>
            </rng:attribute>
          </rng:optional>
          <rng:element name="DescriptionLanguage">
            <rng:attribute name="listVersionID">
              <rng:value type="token">edition 2011</rng:value>
            </rng:attribute>
            <rng:value type="string">fra</rng:value>
          </rng:element>
          <rng:element name="Name">
            <rng:optional>
              <rng:attribute name="languageID">
                <rng:data type="language"/>
              </rng:attribute>
            </rng:optional>
            <rng:data type="string"/>
          </rng:element>
          <rng:element name="ContentDescription">
            <rng:optional>
              <rng:attribute name="Id">
                <rng:data type="ID"/>
              </rng:attribute>
            </rng:optional>
            <rng:optional>
              <rng:element name="Description">
                <rng:optional>
                  <rng:attribute name="languageID">
                    <rng:data type="language"/>
                  </rng:attribute>
                </rng:optional>
                <rng:data type="string"/>
              </rng:element>
            </rng:optional>
            <rng:element name="DescriptionLevel">
              <rng:attribute name="listVersionID">
                <rng:value type="token">edition 2009</rng:value>
              </rng:attribute>
              <rng:value type="string">file</rng:value>
            </rng:element>
            <rng:element name="Language">
              <rng:attribute name="listVersionID">
                <rng:value type="token">edition 2009</rng:value>
              </rng:attribute>
              <rng:data type="string"/>
            </rng:element>
            <rng:optional>
              <rng:element name="LatestDate">
                <rng:data type="string"/>
              </rng:element>
            </rng:optional>
            <rng:optional>
              <rng:element name="OldestDate">
                <rng:data type="string"/>
              </rng:element>
            </rng:optional>
            <rng:optional>
              <rng:element name="CustodialHistory">
                <rng:optional>
                  <rng:element name="CustodialHistoryItem" xml:id="id%(chi-eid)s">
                    <rng:optional>
                      <rng:attribute name="when">
                        <rng:data type="string"/>
                      </rng:attribute>
                    </rng:optional>
                    <rng:optional>
                      <rng:attribute name="languageID">
                        <rng:data type="language"/>
                      </rng:attribute>
                    </rng:optional>
                    <rng:data type="string"/>
                  </rng:element>
                </rng:optional>
              </rng:element>
            </rng:optional>
            <rng:zeroOrMore>
              <rng:element name="Keyword" xml:id="id%(kw-eid)s">
                <rng:optional>
                  <rng:attribute name="Id">
                    <rng:data type="ID"/>
                  </rng:attribute>
                </rng:optional>
                <rng:element name="KeywordContent">
                  <rng:optional>
                    <rng:attribute name="role">
                      <rng:data type="token"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="languageID">
                      <rng:data type="language"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:value type="string">file</rng:value>
                </rng:element>
                <rng:element name="KeywordReference">
                  <rng:optional>
                    <rng:attribute name="schemeID">
                      <rng:data type="token"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:attribute name="schemeName">
                    <rng:value type="string">seda_description_level/None vocabulary</rng:value>
                  </rng:attribute>
                  <rng:optional>
                    <rng:attribute name="schemeAgencyName">
                      <rng:data type="string"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeVersionID">
                      <rng:data type="token"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeDataURI">
                      <rng:data type="anyURI"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:attribute name="schemeURI">
                    <rng:value type="anyURI">%(scheme-uri)s</rng:value>
                  </rng:attribute>
                  <rng:value type="string">%(concept-uri)s</rng:value>
                </rng:element>
                <rng:optional>
                  <rng:element name="KeywordType">
                    <rng:attribute name="listVersionID">
                      <rng:value type="token">edition 2009</rng:value>
                    </rng:attribute>
                    <rng:data type="string"/>
                  </rng:element>
                </rng:optional>
              </rng:element>
            </rng:zeroOrMore>
            <rng:optional>
              <rng:element name="OriginatingAgency">
                <rng:element name="Identification">
                  <rng:optional>
                    <rng:attribute name="schemeID">
                      <rng:data type="token"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeName">
                      <rng:data type="string"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeAgencyName">
                      <rng:data type="string"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeVersionID">
                      <rng:data type="token"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeDataURI">
                      <rng:data type="anyURI"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:optional>
                    <rng:attribute name="schemeURI">
                      <rng:data type="anyURI"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:value type="string">%(agent-id)s</rng:value>
                </rng:element>
                <rng:optional>
                  <rng:element name="Name">
                    <rng:value type="string">%(agent-name)s</rng:value>
                  </rng:element>
                </rng:optional>
              </rng:element>
            </rng:optional>
          </rng:element>
          <rng:element name="AccessRestrictionRule">
            <rng:optional>
              <rng:attribute name="Id">
                <rng:data type="ID"/>
              </rng:attribute>
            </rng:optional>
            <rng:element name="Code">
              <rng:attribute name="listVersionID">
                <rng:value type="token">edition 2009</rng:value>
              </rng:attribute>
              <rng:data type="string"/>
            </rng:element>
            <rng:element name="StartDate">
              <rng:data type="string"/>
            </rng:element>
          </rng:element>
          <rng:optional>
            <rng:element name="Appraisal">
              <xsd:annotation>
                <xsd:documentation>detruire le document</xsd:documentation>
              </xsd:annotation>
              <rng:optional>
                <rng:attribute name="Id">
                  <rng:data type="ID"/>
                </rng:attribute>
              </rng:optional>
              <rng:element name="Code">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:value type="string">detruire</rng:value>
              </rng:element>
              <rng:element name="Duration">
                <xsd:annotation>
                  <xsd:documentation>C'est dans 10ans je m'en irai</xsd:documentation>
                </xsd:annotation>
                <rng:value type="string">P10Y</rng:value>
              </rng:element>
              <rng:element name="StartDate">
                <rng:data type="string"/>
              </rng:element>
            </rng:element>
          </rng:optional>
          <rng:element name="ArchiveObject" xml:id="id%(subunit2-eid)s">
            <xsd:annotation>
              <xsd:documentation>archive unit title</xsd:documentation>
            </xsd:annotation>
            <rng:optional>
              <rng:attribute name="Id">
                <rng:data type="ID"/>
              </rng:attribute>
            </rng:optional>
            <rng:element name="Name">
              <rng:optional>
                <rng:attribute name="languageID">
                  <rng:data type="language"/>
                </rng:attribute>
              </rng:optional>
              <rng:data type="string"/>
            </rng:element>
            <rng:element name="ContentDescription">
              <rng:optional>
                <rng:attribute name="Id">
                  <rng:data type="ID"/>
                </rng:attribute>
              </rng:optional>
              <rng:element name="DescriptionLevel">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:value type="string">file</rng:value>
              </rng:element>
              <rng:element name="Language">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:data type="string"/>
              </rng:element>
            </rng:element>
            <rng:element name="AccessRestrictionRule">
              <rng:optional>
                <rng:attribute name="Id">
                  <rng:data type="ID"/>
                </rng:attribute>
              </rng:optional>
              <rng:element name="Code">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:data type="string"/>
              </rng:element>
              <rng:element name="StartDate">
                <rng:data type="string"/>
              </rng:element>
            </rng:element>
            <rng:optional>
              <rng:element name="Appraisal">
                <xsd:annotation>
                  <xsd:documentation>detruire le document</xsd:documentation>
                </xsd:annotation>
                <rng:optional>
                  <rng:attribute name="Id">
                    <rng:data type="ID"/>
                  </rng:attribute>
                </rng:optional>
                <rng:element name="Code">
                  <rng:attribute name="listVersionID">
                    <rng:value type="token">edition 2009</rng:value>
                  </rng:attribute>
                  <rng:value type="string">detruire</rng:value>
                </rng:element>
                <rng:element name="Duration">
                  <xsd:annotation>
                    <xsd:documentation>C'est dans 10ans je m'en irai</xsd:documentation>
                  </xsd:annotation>
                  <rng:value type="string">P10Y</rng:value>
                </rng:element>
                <rng:element name="StartDate">
                  <rng:data type="string"/>
                </rng:element>
              </rng:element>
            </rng:optional>
          </rng:element>
          <rng:oneOrMore>
            <rng:element name="ArchiveObject" xml:id="id%(subunit1-eid)s">
              <xsd:annotation>
                <xsd:documentation>archive unit title</xsd:documentation>
              </xsd:annotation>
              <rng:optional>
                <rng:attribute name="Id">
                  <rng:data type="ID"/>
                </rng:attribute>
              </rng:optional>
              <rng:element name="Name">
                <rng:optional>
                  <rng:attribute name="languageID">
                    <rng:data type="language"/>
                  </rng:attribute>
                </rng:optional>
                <rng:data type="string"/>
              </rng:element>
              <rng:element name="ContentDescription">
                <rng:optional>
                  <rng:attribute name="Id">
                    <rng:data type="ID"/>
                  </rng:attribute>
                </rng:optional>
                <rng:element name="DescriptionLevel">
                  <rng:attribute name="listVersionID">
                    <rng:value type="token">edition 2009</rng:value>
                  </rng:attribute>
                  <rng:value type="string">file</rng:value>
                </rng:element>
                <rng:element name="Language">
                  <rng:attribute name="listVersionID">
                    <rng:value type="token">edition 2009</rng:value>
                  </rng:attribute>
                  <rng:data type="string"/>
                </rng:element>
              </rng:element>
              <rng:element name="AccessRestrictionRule">
                <xsd:annotation>
                  <xsd:documentation>restrict</xsd:documentation>
                </xsd:annotation>
                <rng:optional>
                  <rng:attribute name="Id">
                    <rng:data type="ID"/>
                  </rng:attribute>
                </rng:optional>
                <rng:element name="Code">
                  <rng:attribute name="listVersionID">
                    <rng:value type="token">edition 2009</rng:value>
                  </rng:attribute>
                  <rng:value type="string">AR038</rng:value>
                </rng:element>
                <rng:element name="StartDate">
                  <rng:data type="string"/>
                </rng:element>
              </rng:element>
              <rng:optional>
                <rng:element name="Appraisal">
                  <rng:optional>
                    <rng:attribute name="Id">
                      <rng:data type="ID"/>
                    </rng:attribute>
                  </rng:optional>
                  <rng:element name="Code">
                    <rng:attribute name="listVersionID">
                      <rng:value type="token">edition 2009</rng:value>
                    </rng:attribute>
                    <rng:data type="string"/>
                  </rng:element>
                  <rng:element name="Duration">
                    <rng:data type="string"/>
                  </rng:element>
                  <rng:element name="StartDate">
                    <rng:data type="string"/>
                  </rng:element>
                </rng:element>
              </rng:optional>
            </rng:element>
          </rng:oneOrMore>
          <rng:zeroOrMore>
            <rng:element name="Document" xml:id="id%(bdo-eid)s">
              <xsd:annotation>
                <xsd:documentation>data object title</xsd:documentation>
              </xsd:annotation>
              <rng:optional>
                <rng:attribute name="Id">
                  <rng:data type="ID"/>
                </rng:attribute>
              </rng:optional>
              <rng:element name="Attachment">
                <rng:attribute name="format">
                  <rng:choice>
                    <rng:value type="string">fmt/123</rng:value>
                    <rng:value type="string">fmt/987</rng:value>
                  </rng:choice>
                </rng:attribute>
                <rng:attribute name="encodingCode">
                  <rng:value type="string">6</rng:value>
                </rng:attribute>
                <rng:optional>
                  <rng:attribute name="mimeCode">
                    <rng:data type="string"/>
                  </rng:attribute>
                </rng:optional>
                <rng:attribute name="filename">
                  <rng:value type="string">this_is_the_filename.pdf</rng:value>
                </rng:attribute>
                <rng:data type="string"/>
              </rng:element>
              <rng:optional>
                <rng:element name="Integrity">
                  <rng:attribute name="algorithme">
                    <rng:value type="string">md5</rng:value>
                  </rng:attribute>
                  <rng:data type="string"/>
                </rng:element>
              </rng:optional>
              <rng:element name="Type">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:value type="string">CDO</rng:value>
              </rng:element>
            </rng:element>
          </rng:zeroOrMore>
        </rng:element>
      </rng:oneOrMore>
    </rng:element>
  </rng:start>
</rng:grammar>