test/data/seda_02_export.rng
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 20 Jan 2017 14:53:52 +0100
changeset 2316 f54a06d45f49
parent 2265 aac19cc4a92e
child 2470 cce71e0d5639
permissions -rw-r--r--
Set default cardinality of keyword reference to 1 Now that we have a different ui for simple vs reference keyword, cardinality on keyword reference is no more meaningful and hidden in the UI, since we would like to always have cardinality=1 for reference keyword when generating profiles. The easiest way to do so is to set proper default value, else by removing the attribute we would have to do extra customization to the SEDA 2 profile generator to consider that it shouldn't use the cardinality in the SEDA 2 XSD (0..1). Closes #16070921

<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:clmIANACharacterSetCode="urn:un:unece:uncefact:codelist:standard:IANA:CharacterSetCode:2007-05-14" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:10" xmlns:clmDAFFileTypeCode="urn:un:unece:uncefact:codelist:draft:DAF:fileTypeCode:2009-08-18" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:qdt="fr:gouv:culture:archivesdefrance:seda:v1.0:QualifiedDataType:1" xmlns:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:standard:IANA:MIMEMediaType:2008-11-12" xmlns:clm60133="urn:un:unece:uncefact:codelist:standard:6:0133:40106" xmlns="fr:gouv:culture:archivesdefrance:seda:v1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="fr:gouv:ae:archive:draft:standard_echange_v0.2">
  <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="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: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:oneOrMore>
        <rng:element name="Contains">
          <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 2009</rng:value>
            </rng:attribute>
            <rng:value type="string">fr</rng:value>
          </rng:element>
          <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="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="CustodialHistory">
                <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="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="Description">
                <rng:optional>
                  <rng:attribute name="languageID">
                    <rng:data type="language"/>
                  </rng:attribute>
                </rng:optional>
                <rng:data type="string"/>
              </rng:element>
            </rng:optional>
            <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:zeroOrMore>
              <rng:element name="ContentDescriptive">
                <rng:optional>
                  <rng:attribute name="Id">
                    <rng:data type="ID"/>
                  </rng:attribute>
                </rng:optional>
                <rng:element name="KeywordContent">
                  <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: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="AccessRestriction">
            <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:oneOrMore>
            <rng:element name="Contains">
              <rng:element name="DescriptionLevel">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:data type="string"/>
              </rng:element>
              <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: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 name="AccessRestriction">
                <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:element>
          </rng:oneOrMore>
          <rng:oneOrMore>
            <rng:element name="Contains">
              <rng:element name="DescriptionLevel">
                <rng:attribute name="listVersionID">
                  <rng:value type="token">edition 2009</rng:value>
                </rng:attribute>
                <rng:data type="string"/>
              </rng:element>
              <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: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="AccessRestriction">
                <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:element>
          </rng:oneOrMore>
          <rng:zeroOrMore>
            <rng:element name="Document">
              <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:value type="string">fmt/123</rng:value>
                </rng:attribute>
                <rng:attribute name="encodingCode">
                  <rng:value type="string">6</rng:value>
                </rng:attribute>
                <rng:attribute name="filename">
                  <rng:value type="string">this_is_the_filename.pdf</rng:value>
                </rng:attribute>
                <rng:data type="string"/>
              </rng:element>
              <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>