The element type dcc:byteDataType is used to enter any information that is available as electronic data.
The rough tree structure of the element type byteDataType has the following appearance:
<xs:complexType name="byteDataType">
<xs:sequence>
<xs:element name="name" type="dcc:textType" minOccurs="0"/>
<xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
<xs:element name="fileName" type="dcc:notEmptyStringType"/>
<xs:element name="mimeType" type="dcc:notEmptyStringType"/>
<xs:element name="dataBase64" type="xs:base64Binary"/>
</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>
If an element of type dcc:byteDataBlock is used, it contains mandatory fields identified as follows.
See the list of abbreviations here
| Element Element type |
Use | Description |
|---|---|---|
| dcc:name dcc:textType |
[M] | Statement of the subject of the file attached. |
| dcc:description dcc:richContentType |
[M] | Statement of the content of the attached file. |
| dcc:fileName dcc:notEmptyStringType |
[M] | Name of the attached file. |
| dcc:mimeType dcc:notEmptyStringType |
[M] | Indication of the MIME type of the attached file e.g., image/png [1]. |
| dcc:dataBase64 xs:base64Binary |
[M] | This element is used to store the data after it has been encoded [2] using the base64 method. |
The byteDataBlock defines a type that allows binary encoded files to be added. It is a best practice to use the Base64 Data Encodings Standard, RFC 4648 [2:1].
Examples of content are image files or ZIP archives. The element fileName specifies the name of the original file. The element mimeType is the underlying file type (e.g. zip, jpeg, png). Element data contains the base64Binary encoded file.
| Attribute Attribute type |
Use | Description |
|---|---|---|
| id xs:ID |
[O] | This standard XML data type is used to represent a unique ID. It is used to clearly identify the object in the DCC. The data type xs:ID is deliberately used here, as this enables validation in various tools without any add-ons. |
| refId xs:IDREF |
[O] | IDREF represents the IDREF attribute type from [XML 1.0 (Second Edition)]. The value space of IDREF is the set of all strings that match the NCName production in [Namespaces in XML]. The lexical space of IDREF is the set of strings that match the NCName production in [Namespaces in XML]. The base type of IDREF is NCName. |
| refType dcc:refTypesType |
[O] | A list of refTypes in XML. |
MimeTypes see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types ↩︎
Base64 Data Encodings standard, see RFC 4648: https://tools.ietf.org/html/rfc4648 ↩︎ ↩︎