Skip to content

Update to DCC Schema V3.2

Jan Loewe requested to merge feat-dcc-v-3-2 into master

Related to #9 (closed)

TODO list:

Bugfixes

Improvements

List of Changes

Bugfixes

dcc:list can contain a combination of dcc:quantity and dcc:list.

With the release it is possible to use dcc:quantity and dcc:list elements mixed in one dcc:list element. This was already possible in dcc:data.

    <xs:complexType name="listType">
        <xs:annotation>
            <xs:documentation>
                The 'list' element allows to define a collection of measurement results
                which are subject to structures with integrity. Basic structures are
                vector quantities. A recursive usage of 'list' allows the creation of
                matrix and tensor structures as well as structures of higher dimension. The 'list'
                may also be used to give measurement results in combination with some
                ambient conditions at the measurement.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="dcc:textType" minOccurs="0"/>
            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:choice>
                <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
                <xs:element name="dateTimeXMLList" type="dcc:dateTimeXMLListType" minOccurs="0"/>
            </xs:choice>
+           <xs:choice maxOccurs="unbounded">
+               <xs:element name="list" type="dcc:listType"/>
+               <xs:element name="quantity" type="dcc:quantityType"/>
-                <xs:element name="list" type="dcc:listType" maxOccurs="unbounded"/>
-                <xs:element name="quantity" type="dcc:quantityType" maxOccurs="unbounded"/>
            </xs:choice>
            <xs:element name="usedMethods" type="dcc:usedMethodListType" minOccurs="0"/>
            <xs:element name="usedSoftware" type="dcc:softwareListType" minOccurs="0"/>
            <xs:element name="measuringEquipments" type="dcc:measuringEquipmentListType" minOccurs="0"/>
            <xs:element name="influenceConditions" type="dcc:influenceConditionListType" minOccurs="0"/>
            <xs:element name="measurementMetaData" type="dcc:measurementMetaDataListType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
        <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
        <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
    </xs:complexType>

dcc:comment can now be used without specifying a schema.

In dcc:comment, it is now possible to specify further elements without specifying a subordinate XML schema. The attribute processContents="lax" was introduced for this purpose.

    <xs:complexType name="digitalCalibrationCertificateType">
        <xs:sequence>
            <xs:element name="administrativeData" type="dcc:administrativeDataType"/>
            <xs:element name="measurementResults" type="dcc:measurementResultListType"/>
            <xs:element name="comment" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
+                        <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>

            <xs:element name="document" type="dcc:byteDataType" minOccurs="0"/>
        </xs:sequence>

Empty elements are prevented with a regular expression.

Introduction of the type dcc:notEmptyStringType for elements that previously used xs:string.
The content of an element, that is using this type, is also not allowed to start and end with a whitespace.

+    <xs:simpleType name="notEmptyStringType">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[^\s]+(\s+[^\s]+)*"/>
+        </xs:restriction>
+    </xs:simpleType>

This Type is used for the following Elements.

Improvements

Email no longer a mandatory field in dcc:contactType

The obligation to enter an email address in the DCC has been abolished. Since it is not required for a company to use an email address, this was also made optional in the DCC.

    <xs:complexType name="contactType">
        <xs:sequence>
            <xs:element name="name" type="dcc:textType"/>
+           <xs:element name="eMail" type="xs:string" minOccurs="0"/>
            <xs:element name="phone" type="xs:string" minOccurs="0"/>
            <xs:element name="fax" type="xs:string" minOccurs="0"/>
            <xs:element name="location" type="dcc:locationType"/>
            <xs:element name="descriptionData" type="dcc:byteDataType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
    </xs:complexType>

Introduction of the element dcc:issueDate

Due to the decision that the issuing of the DCC must be possible without a signature, an alternative was created in order to be able to indicate the date of issue required in ISO 17025.

    <xs:complexType name="coreDataType">
        <xs:sequence>
            <xs:element name="countryCodeISO3166_1" type="dcc:stringISO3166Type"/>
            <xs:element name="usedLangCodeISO639_1" type="dcc:stringISO639Type" maxOccurs="unbounded"/>
            <xs:element name="mandatoryLangCodeISO639_1" type="dcc:stringISO639Type" maxOccurs="unbounded"/>
            <xs:element name="uniqueIdentifier" type="xs:string"/>
            <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
            <xs:element name="receiptDate" type="xs:date" minOccurs="0"/>
            <xs:element name="beginPerformanceDate" type="xs:date"/>
            <xs:element name="endPerformanceDate" type="xs:date"/>
            <xs:element name="performanceLocation" type="dcc:performanceLocationType"/>
+            <xs:element name="issueDate" type="xs:date" minOccurs="0"/>            
            <xs:element name="previousReport" type="dcc:hashType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

Introduction of the element dcc:itemQuantities in dcc:item

The element dcc:itemQuantity was introduced to specify machine-readable physical properties. It is used exclusively to specify unchangeable values which originate, for example, from the manufacturer's data sheet. This field is not used to reproduce the entire data sheet. For this purpose, the dcc:measuringEquipmentType was renamed to the dcc:primitiveQuantityType.

+    <xs:complexType name="itemQuantityListType">
+        <xs:sequence>
+            <xs:element name="itemQuantity" type="dcc:primitiveQuantityType" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+   <xs:complexType name="primitiveQuantityType">
-    <xs:complexType name="measuringEquipmentQuantityType">
        <xs:sequence>
            <xs:element name="name" type="dcc:textType" minOccurs="0"/>
            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:choice>
                <xs:element name="noQuantity" type="dcc:richContentType"/>
                <xs:element name="charsXMLList" type="dcc:charsXMLListType"/>
                <xs:element ref="si:real"/>
                <xs:element ref="si:hybrid"/>
                <xs:element ref="si:complex"/>
                <xs:element ref="si:constant"/>
                <xs:element ref="si:realListXMLList"/>
            </xs:choice>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
        <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
        <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
    </xs:complexType>
    <xs:complexType name="itemType">
        <xs:annotation>
            <xs:documentation>
                An item that is calibrated in this DCC.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="dcc:textType"/>
            <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:element name="installedSoftwares" type="dcc:softwareListType" minOccurs="0" />
            <xs:element name="manufacturer" type="dcc:contactNotStrictType"/>
            <xs:element name="model" type="dcc:notEmptyStringType" minOccurs="0"/>
            <xs:element name="identifications" type="dcc:identificationListType"/>
+           <xs:element name="itemQuantities" type="dcc:itemQuantityListType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
    </xs:complexType>

Introduction of the element dcc:refTypeDefinitions in dcc:administrativeData.

In this element, additional information should be stored that has nothing to do with the direct DCC content which is related to the calibtation itself. The element dcc:refTypeDefinitions can have multiple dcc:refTypeDefinition elements. Each dcc:refTypeDefinition attaches a link or a file with the corresponding namespace, which is used with the refType attributes of the DCC.

    <xs:complexType name="administrativeDataType">
        <xs:all>
            <xs:element name="dccSoftware" type="dcc:softwareListType"/>
+            <xs:element name="refTypeDefinitions" type="dcc:refTypeDefinitionListType" minOccurs="0"/>
            <xs:element name="coreData" type="dcc:coreDataType"/>
            <xs:element name="items" type="dcc:itemListType"/>
            <xs:element name="calibrationLaboratory" type="dcc:calibrationLaboratoryType"/>
            <xs:element name="respPersons" type="dcc:respPersonListType"/>
            <xs:element name="customer" type="dcc:contactType"/>
            <xs:element name="statements" type="dcc:statementListType" minOccurs="0"/>
        </xs:all>
    </xs:complexType>
+    <xs:complexType name="refTypeDefinitionListType">
+        <xs:annotation>
+            <xs:documentation>
+                This type allows the give information about the used refTypes in a DCC.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="refTypeDefinition" type="dcc:refTypeDefinitionType"
+                maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>


+
+    <xs:complexType name="refTypeDefinitionType">
+        <xs:annotation>
+            <xs:documentation>
+                This type contains the information about the wording of the refTypes used in a DCC.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="name" type="dcc:textType"/>
+            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
+            <xs:element name="namespace" type="dcc:notEmptyStringType"/>
+            <xs:element name="link" type="dcc:notEmptyStringType"/>
+            <xs:element name="release" type="dcc:notEmptyStringType" minOccurs="0"/>
+            <xs:element name="value" type="dcc:notEmptyStringType" minOccurs="0"/>
+            <xs:element name="procedure" type="dcc:notEmptyStringType" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
+    </xs:complexType>

Extension of the dcc:hash Type for the specification of certificates

The dcc:hashType, which is intended for linking further DCCs, for example at dcc:measuringEquipment, has been extended by the following elements.

dcc:description: Additional information about this certificate can be entered here.
dcc:inValidityRange: A Boolean can be used here to indicate whether the equipment was valid at the time of calibration.
dcc:traceable: A Boolean can be used here to specify whether the linked certificate is traceable.

    <xs:complexType name="hashType">
        <xs:sequence>
            <xs:element name="referral" type="dcc:textType"/>
            <xs:element name="referralID" type="dcc:notEmptyStringType"/>
            <xs:element name="procedure" type="dcc:notEmptyStringType"/>
            <xs:element name="value" type="dcc:notEmptyStringType"/>
+            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
+            <xs:element name="inValidityRange" type="xs:boolean" minOccurs="0"/>
+            <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
            <xs:element name="linkedReport" type="dcc:hashType" minOccurs="0"/>            
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
    </xs:complexType>

Extension to dcc:calibrationLaboratory

The dcc:calibrationLaboratory element gets 3 new child elements, dcc:cryptElectronicSeal, dcc:cryptElectronicSignature and dcc:cryptElectronicTimeStamp to be able to communicate information about cryptographic measures. (see also dcc:respPerson)

    <xs:complexType name="calibrationLaboratoryType">
        <xs:sequence>
            <xs:element name="calibrationLaboratoryCode" type="dcc:notEmptyStringType" minOccurs="0"/>
            <xs:element name="contact" type="dcc:contactType"/>		
+            <xs:element name="cryptElectronicSeal" type="xs:boolean" minOccurs="0"/>
+            <xs:element name="cryptElectronicSignature" type="xs:boolean" minOccurs="0"/>
+            <xs:element name="cryptElectronicTimeStamp" type="xs:boolean" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

Introduction of XML signatures in the DCC schema

The optional element ds:Signature is added under the root element. A signature schema is imported for this. This change does not result in mandatory XML signatures, rather it allows single or multiple signatures in a DCC.

+<xs:import
+        namespace="http://www.w3.org/2000/09/xmldsig#"
+        schemaLocation="https://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
    <xs:complexType name="digitalCalibrationCertificateType">
        <xs:sequence>
            <xs:element name="administrativeData" type="dcc:administrativeDataType"/>
            <xs:element name="measurementResults" type="dcc:measurementResultListType"/>
            <xs:element name="comment" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="document" type="dcc:byteDataType" minOccurs="0"/>
+            <xs:element ref="ds:Signature" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>

Introduction of dcc:validXMLList in dcc:statementMetaDataType

The validXMLList can be used to add a metaData element to each entry of an XMLList. This function was lost with the introduction of the XMLList and is now implemented again.

    <xs:complexType name="statementMetaDataType">
        <xs:sequence>
            <xs:element name="countryCodeISO3166_1" type="dcc:stringISO3166Type" minOccurs="0"
                        maxOccurs="unbounded"/>
            <xs:element name="convention" type="xs:string" minOccurs="0"/>
            <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
            <xs:element name="norm" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="declaration" type="dcc:richContentType" minOccurs="0"/>
+            <xs:choice minOccurs="0">
                <xs:element name="valid" type="xs:boolean"/>
+                <xs:element name="validXMLList" type="dcc:booleanXMLListType"/>
+            </xs:choice>
            <xs:element name="date" type="xs:date" minOccurs="0"/>
            <xs:element name="period" type="xs:duration" minOccurs="0"/>
            <xs:element name="respAuthority" type="dcc:contactType" minOccurs="0"/>
            <xs:choice minOccurs="0">
                <xs:element name="conformity" type="dcc:stringConformityStatementStatusType"/>
                <xs:element name="conformityXMLList" type="dcc:stringConformityStatementStatusXMLListType"/>
            </xs:choice>
            <xs:element name="data" type="dcc:dataType" minOccurs="0"/>
            <xs:element name="nonSIDefinition" type="xs:string" minOccurs="0"/>
            <xs:element name="nonSIUnit" type="xs:string" minOccurs="0"/>
            <xs:element name="location" type="dcc:locationType" minOccurs="0"/>
		</xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
        <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
        <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
    </xs:complexType>
+    <xs:simpleType name="booleanXMLListType">
+        <xs:list itemType="xs:boolean"/>
+    </xs:simpleType>

Introduction of the dcc:charsXMLList in dcc:quantity

This list makes it possible to specify a list of strings exactly as in other ...XMLList elements.

With the introduction of the XMLList elements, a very popular and data-saving possibility has been created when a particularly large number of measurement results are to be specified. Unfortunately, until now there was no possibility to use the noQuantity in this context. Therefore, it is necessary to introduce the charsXMLList.

+    <xs:simpleType  name="charsXMLListType">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">
+                        Type providing listing of strings (xs:string)
+                        with separation by blank spaces.
+                </xs:documentation>
+        </xs:annotation>
+        <xs:list itemType="xs:string"/>
+    </xs:simpleType >

This xs:choise is used in the dcc:quantity, dcc:itemQuantity and dcc:measuringEquipmentQuantity.

            <xs:choice>
                <xs:element name="noQuantity" type="dcc:richContentType"/>
+                <xs:element name="charsXMLList" type="dcc:charsXMLListType"/>
                <xs:element ref="si:real"/>
                <xs:element ref="si:list"/>
                <xs:element ref="si:hybrid"/>
                <xs:element ref="si:complex"/>
                <xs:element ref="si:constant"/>
                <xs:element ref="si:realListXMLList"/>
            </xs:choice>

Multiple use of the element dcc:equipmentClass

When creating GP examples, it has been noticed that dcc:equipmentClass cannot be used multiple times. For the equipments that can belong to several classes, this leads to inconsistencies.

    <xs:complexType name="itemListType">
        <xs:sequence>
            <xs:element name="name" type="dcc:textType" minOccurs="0"/>
+            <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:element name="owner" type="dcc:contactType" minOccurs="0"/>
            <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>

            <xs:element name="item" type="dcc:itemType" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    
    <xs:complexType name="itemType">
        <xs:sequence>
            <xs:element name="name" type="dcc:textType"/>
+            <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:element name="installedSoftwares" type="dcc:softwareListType" minOccurs="0" />
            <xs:element name="manufacturer" type="dcc:contactNotStrictType"/>
            <xs:element name="model" type="dcc:notEmptyStringType" minOccurs="0"/>
            <xs:element name="identifications" type="dcc:identificationListType"/>
            <xs:element name="itemQuantities" type="dcc:itemQuantityListType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
    </xs:complexType>



    <xs:complexType name="measuringEquipmentListType">
        <xs:sequence>
            <xs:element name="name" type="dcc:textType" minOccurs="0"/>
+                <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
                <xs:element name="owner" type="dcc:contactType" minOccurs="0"/>
                <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
            <xs:element name="measuringEquipment" type="dcc:measuringEquipmentType" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>


    <xs:complexType name="measuringEquipmentType">
        <xs:sequence>
            <xs:element name="name" type="dcc:textType"/>
+            <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:element name="certificate" type="dcc:hashType" minOccurs="0"/>
            <xs:element name="manufacturer" type="dcc:contactNotStrictType" minOccurs="0"/>
            <xs:element name="model" type="dcc:notEmptyStringType" minOccurs="0"/>
            <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
            <xs:element name="measuringEquipmentQuantities" type="dcc:measuringEquipmentQuantityListType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
        <xs:attribute name="refType" type="

Introduction of dcc:name and dcc:description in dcc:statementMetaDataType

The DCC should also be readable and understandable for a human without refTypes. This was not yet possible in the element statement because dcc:name and dcc:description were not available before this change.

    <xs:complexType name="statementMetaDataType">
        <xs:sequence>
+            <xs:element name="name" type="dcc:textType" minOccurs="0"/>
+            <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
            <xs:element name="countryCodeISO3166_1" type="dcc:stringISO3166Type" minOccurs="0"
                        maxOccurs="unbounded"/>
            <xs:element name="convention" type="xs:string" minOccurs="0"/>
            <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
            <xs:element name="norm" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="declaration" type="dcc:richContentType" minOccurs="0"/>
            <xs:element name="valid" type="xs:boolean" minOccurs="0"/>
            <xs:element name="date" type="xs:date" minOccurs="0"/>
            <xs:element name="period" type="xs:duration" minOccurs="0"/>
            <xs:element name="respAuthority" type="dcc:contactType" minOccurs="0"/>
            <xs:choice minOccurs="0">
                <xs:element name="conformity" type="dcc:stringConformityStatementStatusType"/>
                <xs:element name="conformityXMLList" type="dcc:stringConformityStatementStatusXMLListType"/>
            </xs:choice>
            <xs:element name="data" type="dcc:dataType" minOccurs="0"/>
            <xs:element name="nonSIDefinition" type="xs:string" minOccurs="0"/>
            <xs:element name="nonSIUnit" type="xs:string" minOccurs="0"/>
            <xs:element name="location" type="dcc:locationType" minOccurs="0"/>
		</xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="optional"/>
        <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
        <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
    </xs:complexType>

Attaching further attributes

refType

  • equipmentClassType
  • byteDataType
  • hashType
  • respPersonType
  • itemType

refId

  • byteDataType
Edited by Jan Loewe

Merge request reports

Loading