Annex C: Extensible Markup Language (XML)
291
A mixed content model allows a mixture of text and specific child elements:

Here we can mix text and Road elements. E6 See!
The ANY keyword specifies that the content model of an XML element can be
anything:

Anything goes E6here!


If an XML element is declared to be empty it shall not have a closing tag. This is
indicated by a slash at the end of the start tag.


An XML element can have attributes. The attributes are declared in an XML attribute list statement. XML has three groups of attribute types: character data, tokenised types and enumerated types. A #REQUIRED statement associated with the
name of an attribute in the list means that it is mandatory; a #IMPLIED statement
implies that it is optional. It is also possible to give default values for attributes. An
attribute is declared in an attribute list construct:

id
ID
#REQUIRED
dim
(oneD I twoD I threeD) #IMPLIED "twoD"
x
CDATA
#REQUIRED
y
z
CDATA
CDATA
#IMPLIED
#IMPLlED>
Here we have defined an XML element named point. The point has an attribute
list of five attributes. The attribute called id has a tokenised type ID and it is required. The dirn attribute has an enumerated type that takes one out of three valid
values. This attribute is implied, but it has adefault value of"twoD". The x, y and z
attributes all are of type "CDATA", which is short for character data. Since XML
does not have any data types for numeric values the coordinate values must be converted to strings. Notice that only x is required. Two instances of this XML element
are:

Précédent

- 299/331

Suivant