Structure data schema – XSD

Copy

                <MadCap:concept term="3D" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" /><?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<xs:schema version="1.0"
           xmlns:tns="http://www.tsystems.com/ima9/archive3d/201707/"
           targetNamespace="http://www.tsystems.com/ima9/archive3d/201707/"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
>

  <xs:element name="structure" type="tns:tStructure"/>

  <xs:complexType name="tEmpty">
    <xs:annotation>
      <xs:documentation>An empty type to improve the XML's readability
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="tAttribute">
    <xs:annotation>
      <xs:documentation>A name-value-pair that defines the value for a specific attribute or parameter</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="name" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The name of the attribute/parameter</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="tKeyAttributes">
    <xs:annotation>
      <xs:documentation>Mandatory key attributes for part identification</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="attribute" type="tns:tAttribute" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="tVersionLink">
    <xs:annotation>
      <xs:documentation>Mandatory foreign version for part identification. This is either a specific version or the latest version</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="version-to-version" type="xs:string"/>
      <xs:element name="latest-version" type="tns:tEmpty"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="tAttributes">
    <xs:annotation>
      <xs:documentation>Optional attributes for part identification</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="attribute" type="tns:tAttribute" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="tArchiveLink">
    <xs:annotation>
      <xs:documentation>Element to define that a part will be archived in a specific document type
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <!-- document type -->
      <xs:element name="documentType" type="xs:string">
        <xs:annotation>
          <xs:documentation>Defines the document type where the referenced part will be archived.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:all>
  </xs:complexType>

  <xs:complexType name="tArchiveType">
    <xs:annotation>
      <xs:documentation>A type how a specific part is or will be archived</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="never" type="tns:tEmpty"/>
      <xs:element name="complete" type="tns:tArchiveLink"/>
    </xs:choice>
  </xs:complexType>


  <xs:complexType name="tStructure">
    <xs:all>
      <!-- Identification of the part itself -->
      <xs:element name="part" minOccurs="0">
        <xs:complexType>
          <xs:all>
            <!-- primary key attributes -->
            <xs:element name="primaryKeyAttributes" type="tns:tKeyAttributes">
              <xs:annotation>
                <xs:documentation>All attributes forming the part's primary key</xs:documentation>
              </xs:annotation>
            </xs:element>
            <!-- foreign version -->
            <xs:element name="foreignVersion" type="xs:string">
              <xs:annotation>
                <xs:documentation>The part's foreign version key</xs:documentation>
              </xs:annotation>
            </xs:element>
            <!-- additional metdata attributes -->
            <xs:element name="metadataAttributes" type="tns:tAttributes">
              <xs:annotation>
                <xs:documentation>Further metadata, describing the part</xs:documentation>
              </xs:annotation>
            </xs:element>
            <!-- validation date -->
            <xs:element name="validationDate" type="xs:dateTime" minOccurs = "0">
              <xs:annotation>
                <xs:documentation>Optional field to define a validation date</xs:documentation>
              </xs:annotation>
            </xs:element>
            <!-- document type -->
            <xs:element name="documentType" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Optional parameter to define the document type where to archive the part. Actually this is also set in the archive request but can be used for validation here
                </xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:all>
        </xs:complexType>
      </xs:element>    
      <!-- Definition of the child structure  -->
      <xs:element name="relations" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="reference" maxOccurs="unbounded">
              <xs:complexType>
                <xs:all>
                  <!-- primary key attribute links -->
                  <xs:element name="primaryKeyReference" type="tns:tKeyAttributes">
                    <xs:annotation>
                      <xs:documentation>All attributes forming the referenced part's primary key</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <!-- foreign version link -->
                  <xs:element name="foreignVersionReference" type="tns:tVersionLink">
                    <xs:annotation>
                      <xs:documentation>All attributes forming the referenced part's foreign version key</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <!-- archive type -->
                  <xs:element name="archiveType" type="tns:tArchiveType">
                    <xs:annotation>
                      <xs:documentation>Identifies if the part is only archived as a stub (metadata only) or with 3D attachments. This settings may be important when creating the download assembly.
                      </xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <!-- neutral file name -->
                  <xs:element name="neutralFileName" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>Defines the base file name that is used to create possible dummy elements</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:all>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <!-- Further information that could be stored for related atatchments -->
      <xs:element name="attachments" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="file" maxOccurs="unbounded">
              <xs:complexType>
                <xs:all>
                  <xs:element name="name" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of the file with extension as it was passed in the archive/update request
                      </xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="properties" type="tns:tAttributes">
                    <xs:annotation>
                      <xs:documentation>Additional properties that could be helpful in attachment identification, like type, originator, etc.
                      </xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:all>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:all>
  </xs:complexType>

</xs:schema>