background image
(2b) Namespace: Since element names in XML are
not fixed, name conflicts can occur when different
documents use the same names describing different
types of elements.To prevent such conflicts, a unique
namespace should be defined using a Uniform
Resource Identifier (URI). An XML namespace is a
collection of names that are used as element types
and attribute names (cf. http://www.w3.org/TR/
REC-xml-names/). Our default namespace in
the start tag of the root element is
xmlns:mi="http://www.m-i.org/images".
The namespace prefix mi (for medieval images)
functions as a placeholder for the namespace name. It
needs to show up in all element tags (e.g. <mi:type>
<mi:/type>).
(2c) image_id="image5kb78d38i":This is the id
attribute which contains the unique identifier of the
data source record.
(3-9) All other elements must be within the root
element, and can themselves have sub-elements (child
elements) which must be properly nested within
their parent element. Our elements do not have sub-
elements.
Other syntax rules are, for example: all start tags
must match end-tags; because XML tags are case
sensitive (i.e. the tag <mi:Creator> is different from
the tag <mi:creator>, they must also be written with
the same case; all elements must have a closing tag; all
attribute values must be within quotation marks (e.g.
"image5kb78d38i").
Syntactic Transformation /2:
The XML Schema
In order to allow for syntactic harmonisation, the
XML documents of the museums should conform to
the XML Schema of the FMS initiative.Therefore,
the museums use the initiative's XML Schema when
they create their XML documents for validating
them against the Schema. If the documents are valid,
the process can continue to the semantic level.
XML Schema
The XML Schema defines the building blocks of an
XML document, including:
| elements and attributes that can appear in a
document;
| which elements are child elements, as well as
their order and number;
| whether an element is empty or can include text;
| the data types for elements and attributes;
| as well as default and fixed values for elements
and attributes.
XML with an XML Schema is designed to be self-
descriptive. One of the greatest strengths of XML
Schema is that it allows for data typing.The most
common data types are xs:string, xs:decimal,
xs:integer, xs:boolean, xs:date, xs:time. In the example
below, which is the XML Schema for the XML
document (image 5kb78d38i.xml) shown in graphic
1, we only use the data type xs:string.This data type
is used for values that contain character strings.
Short explanations:
(1) The XML declaration, which states that the
document conforms to the 1.0 specification of XML.
(2a) Determines that the elements and data types that
are used to construct the schema come from the
W3C's XML Schema namespace. Consequently, each
DigiCULT 29
(1) <?xml version="1.0"?>
(2a) <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
(2b) targetNamespace="http://www.m-i.org/images"
(2c) xmlns="http://www.m-i.org/images"
(2d) elementFormDefault="qualified">
(3) <xs:element name="image">
(4) <xs:complexType>
(5) <xs:sequence>
(6) <xs:element name="type" type="xs:string"/>
(7) <xs:element name="subject" type="xs:string"/>
(8) <xs:element name="iconclass" type="xs:string"/>
(9) <xs:element name="creator" type="xs:string"/>
(10) <xs:element name="manuscript" type="xs:string"/>
(11) <xs:element name="place" type="xs:string"/>
(12) <xs:element name="year" type="xs:string"/>
(13) </xs:sequence>
(14) <xs:attribute name="image_id" type="xs:string"
use="required"/>
(15) </xs:complexType>
(16) </xs:element>
(17) </xs:schema>