test/data/seda_02_export.xsd
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'?>
<xsd:schema xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:6" xmlns:qdt="fr:gouv:ae:archive:draft:standard_echange_v0.2:QualifiedDataType:1" xmlns:clm60133="urn:un:unece:uncefact:codelist:standard:6:0133:40106" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:clmIANAMIMEMediaType="urn:un:unece:uncefact:codelist:standard:IANA:MIMEMediaType:2008-11-12" xmlns="fr:gouv:ae:archive:draft:standard_echange_v0.2" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="fr:gouv:ae:archive:draft:standard_echange_v0.2" version="1.1">
  <xsd:element name="ArchiveTransfer">
    <xsd:annotation>
      <xsd:documentation>my profile title &amp;&amp;</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element fixed="my profile description &amp;&amp;" name="Comment">
          <xsd:complexType>
            <xsd:simpleContent>
              <xsd:extension base="udt:TextType">
                <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
              </xsd:extension>
            </xsd:simpleContent>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="Date" type="udt:DateTimeType"/>
        <xsd:element name="TransferIdentifier">
          <xsd:complexType>
            <xsd:simpleContent>
              <xsd:extension base="qdt:ArchivesIDType">
                <xsd:attribute name="schemeID" type="xsd:token" use="optional"/>
                <xsd:attribute name="schemeName" type="xsd:string" use="optional"/>
                <xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional"/>
                <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/>
                <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/>
                <xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional"/>
              </xsd:extension>
            </xsd:simpleContent>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="TransferringAgency">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="Identification">
                <xsd:complexType>
                  <xsd:simpleContent>
                    <xsd:extension base="qdt:ArchivesIDType">
                      <xsd:attribute name="schemeID" type="xsd:token" use="optional"/>
                      <xsd:attribute name="schemeName" type="xsd:string" use="optional"/>
                      <xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional"/>
                      <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/>
                      <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/>
                      <xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional"/>
                    </xsd:extension>
                  </xsd:simpleContent>
                </xsd:complexType>
              </xsd:element>
              <xsd:element minOccurs="0" name="Name" type="udt:TextType"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="ArchivalAgency">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="Identification">
                <xsd:complexType>
                  <xsd:simpleContent>
                    <xsd:extension base="qdt:ArchivesIDType">
                      <xsd:attribute name="schemeID" type="xsd:token" use="optional"/>
                      <xsd:attribute name="schemeName" type="xsd:string" use="optional"/>
                      <xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional"/>
                      <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/>
                      <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/>
                      <xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional"/>
                    </xsd:extension>
                  </xsd:simpleContent>
                </xsd:complexType>
              </xsd:element>
              <xsd:element minOccurs="0" name="Name" type="udt:TextType"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element maxOccurs="unbounded" name="Contains">
          <xsd:annotation>
            <xsd:documentation>archive unit title</xsd:documentation>
          </xsd:annotation>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element fixed="fr" name="DescriptionLanguage">
                <xsd:complexType>
                  <xsd:simpleContent>
                    <xsd:extension base="qdt:CodeLanguageType">
                      <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                    </xsd:extension>
                  </xsd:simpleContent>
                </xsd:complexType>
              </xsd:element>
              <xsd:element fixed="file" name="DescriptionLevel">
                <xsd:complexType>
                  <xsd:simpleContent>
                    <xsd:extension base="qdt:CodeDescriptionLevelType">
                      <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                    </xsd:extension>
                  </xsd:simpleContent>
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="Name">
                <xsd:complexType>
                  <xsd:simpleContent>
                    <xsd:extension base="udt:TextType">
                      <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
                    </xsd:extension>
                  </xsd:simpleContent>
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="ContentDescription">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element minOccurs="0" name="CustodialHistory">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="udt:TextType">
                            <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="Language">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:CodeLanguageType">
                            <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="LatestDate" type="udt:DateType"/>
                    <xsd:element minOccurs="0" name="OldestDate" type="udt:DateType"/>
                    <xsd:element minOccurs="0" name="Description">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="udt:TextType">
                            <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="OriginatingAgency">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element fixed="%(agent-id)s" name="Identification">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:ArchivesIDType">
                                  <xsd:attribute name="schemeID" type="xsd:token" use="optional"/>
                                  <xsd:attribute name="schemeName" type="xsd:string" use="optional"/>
                                  <xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional"/>
                                  <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/>
                                  <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/>
                                  <xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element fixed="%(agent-name)s" minOccurs="0" name="Name" type="udt:TextType"/>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="ContentDescriptive">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element fixed="file" name="KeywordContent">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="udt:TextType">
                                  <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element fixed="%(concept-uri)s" name="KeywordReference">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:ArchivesIDType">
                                  <xsd:attribute name="schemeID" type="xsd:token" use="optional"/>
                                  <xsd:attribute fixed="seda_description_level/None vocabulary" name="schemeName" type="xsd:string" use="required"/>
                                  <xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional"/>
                                  <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/>
                                  <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/>
                                  <xsd:attribute fixed="%(scheme-uri)s" name="schemeURI" type="xsd:anyURI" use="required"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element minOccurs="0" name="KeywordType">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:CodeKeywordType">
                                  <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                  <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                </xsd:complexType>
              </xsd:element>
              <xsd:element minOccurs="0" name="Appraisal">
                <xsd:annotation>
                  <xsd:documentation>detruire le document</xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element fixed="detruire" name="Code">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:CodeAppraisalType">
                            <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element fixed="P10Y" name="Duration" type="qdt:ArchivesDurationType">
                      <xsd:annotation>
                        <xsd:documentation>C'est dans 10ans je m'en irai</xsd:documentation>
                      </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="StartDate" type="udt:DateType"/>
                  </xsd:sequence>
                  <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="AccessRestriction">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="Code">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:CodeAccessRestrictionType">
                            <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="StartDate" type="udt:DateType"/>
                  </xsd:sequence>
                  <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                </xsd:complexType>
              </xsd:element>
              <xsd:element maxOccurs="unbounded" name="Contains">
                <xsd:annotation>
                  <xsd:documentation>archive unit title</xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="DescriptionLevel">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:CodeDescriptionLevelType">
                            <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="Name">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="udt:TextType">
                            <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="Appraisal">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="Code">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:CodeAppraisalType">
                                  <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element name="Duration" type="qdt:ArchivesDurationType"/>
                          <xsd:element name="StartDate" type="udt:DateType"/>
                        </xsd:sequence>
                        <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="AccessRestriction">
                      <xsd:annotation>
                        <xsd:documentation>restrict</xsd:documentation>
                      </xsd:annotation>
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element fixed="AR038" name="Code">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:CodeAccessRestrictionType">
                                  <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element name="StartDate" type="udt:DateType"/>
                        </xsd:sequence>
                        <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                  <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                </xsd:complexType>
              </xsd:element>
              <xsd:element maxOccurs="unbounded" name="Contains">
                <xsd:annotation>
                  <xsd:documentation>archive unit title</xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="DescriptionLevel">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:CodeDescriptionLevelType">
                            <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="Name">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="udt:TextType">
                            <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="Appraisal">
                      <xsd:annotation>
                        <xsd:documentation>detruire le document</xsd:documentation>
                      </xsd:annotation>
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element fixed="detruire" name="Code">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:CodeAppraisalType">
                                  <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element fixed="P10Y" name="Duration" type="qdt:ArchivesDurationType">
                            <xsd:annotation>
                              <xsd:documentation>C'est dans 10ans je m'en irai</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element name="StartDate" type="udt:DateType"/>
                        </xsd:sequence>
                        <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="AccessRestriction">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="Code">
                            <xsd:complexType>
                              <xsd:simpleContent>
                                <xsd:extension base="qdt:CodeAccessRestrictionType">
                                  <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                                </xsd:extension>
                              </xsd:simpleContent>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element name="StartDate" type="udt:DateType"/>
                        </xsd:sequence>
                        <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                  <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                </xsd:complexType>
              </xsd:element>
              <xsd:element maxOccurs="unbounded" minOccurs="0" name="Document">
                <xsd:annotation>
                  <xsd:documentation>data object title</xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="Attachment">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:ArchivesBinaryObjectType">
                            <xsd:attribute fixed="fmt/123" name="format" type="clmDAFFileTypeCode:FileTypeCodeType" use="required"/>
                            <xsd:attribute fixed="6" name="encodingCode" type="clm60133:CharacterSetEncodingCodeContentType" use="required"/>
                            <xsd:attribute name="mimeCode" type="clmIANAMIMEMediaType:MIMEMediaTypeContentType" use="prohibited"/>
                            <xsd:attribute fixed="this_is_the_filename.pdf" name="filename" type="xsd:string" use="required"/>
                            <xsd:attribute name="characterSetCode" type="clmIANACharacterSetCode:CharacterSetCodeContentType" use="prohibited"/>
                            <xsd:attribute name="uri" type="xsd:anyURI" use="prohibited"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element fixed="CDO" name="Type">
                      <xsd:complexType>
                        <xsd:simpleContent>
                          <xsd:extension base="qdt:CodeDocumentType">
                            <xsd:attribute fixed="edition 2009" name="listVersionID" type="xsd:token" use="required"/>
                          </xsd:extension>
                        </xsd:simpleContent>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                  <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
            <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
      <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>