288
Annexes
Route 66
Here we see that "" is the start tag, "Route 66" is the content of the element, and " " is the closing tag of the element. A more complex XML element is an element with attributes and two elements as content:
John
Smith
Here we have an XML element called Person with an attribute id with value
"convenerl". The content of the Person element is two XML elements called
FirstName and LastName, which have plain text as their content.
An XML element can refer to another element within the XML document or to
extemal resources by using special purpose XML attributes. These XML elements
are called linking elements. Linking elements point to a target resource through a
Uniform Resource Identificator (URI) reference. Declaring XML elements with
these special purpose XML attributes indicates their behaviour for the XML processor. See the next clause for an overview of some of the special purpose XML attributes. Here is an example of an XML element that points to another XML document:
See
Annex A
Here the special purpose attribute xml:link indicates that this is a linking element
and the value ofthe attribute href is a URI pointing to another XML document.
XML Schema
The DTD mechanism of XML has been criticised for lack of semantic expressiveness. The heavy uses of parameterised entities have made many DTDs difficult
to read. XML Schema has been developed to solve that problem. An XML Schema
is an XML document that defines the allowed elements and structures of XML
documents. XML Schema enhances the type system of XML significantly. A type
can be used to define the content model of an element. A type is declared using the
type element:
Elements ofthis type will have text content model. Instead ofhaving to use #PCDATA, we
now can chose from a much richer set of types. This new type can then be used to declare an
element:
An element with a rich content model can be defined by a type with no name:
Annexes
Here we see that "
Here we have an XML element called Person with an attribute id with value
"convenerl". The content of the Person element is two XML elements called
FirstName and LastName, which have plain text as their content.
An XML element can refer to another element within the XML document or to
extemal resources by using special purpose XML attributes. These XML elements
are called linking elements. Linking elements point to a target resource through a
Uniform Resource Identificator (URI) reference. Declaring XML elements with
these special purpose XML attributes indicates their behaviour for the XML processor. See the next clause for an overview of some of the special purpose XML attributes. Here is an example of an XML element that points to another XML document:
Annex A
Here the special purpose attribute xml:link indicates that this is a linking element
and the value ofthe attribute href is a URI pointing to another XML document.
XML Schema
The DTD mechanism of XML has been criticised for lack of semantic expressiveness. The heavy uses of parameterised entities have made many DTDs difficult
to read. XML Schema has been developed to solve that problem. An XML Schema
is an XML document that defines the allowed elements and structures of XML
documents. XML Schema enhances the type system of XML significantly. A type
can be used to define the content model of an element. A type is declared using the
type element:
Elements ofthis type will have text content model. Instead ofhaving to use #PCDATA, we
now can chose from a much richer set of types. This new type can then be used to declare an
element:
An element with a rich content model can be defined by a type with no name:
