2.3 XML Schema 45
</element>
<element name=’Year’>
<complexType mixed=’true’>
</complexType>
</element>
<element name=’Month’>
<complexType mixed=’true’>
</complexType>
</element>
<element name=’Day’>
<complexType mixed=’true’>
</complexType>
</element>
The XML schema shown above has exactly the same meaning as the DTD.
Having translated this DTD to XSD, one can make use of features of XSD that
are not available in a DTD. Some examples of these features are shown in the
next section.
Abstract Syntax Notation One (ASN.1) is another mechanism for encoding
hierarchically structured data. The development of ASN.1 goes back to 1984,
and it was a mature standard by 1987. It is mainly used in telecommunica-
tions, but it is also being used in other areas, including biomedical databases.
ASN.1 and XSD have similar capabilities and semantics. The main difference
is that ASN.1 allows for much more efficient encoding than XML. XER is an
encoding of XSD using ASN.1 and thexsdasn1script translates from XSD
to ASN.1. Both XER andxsdasn1are available atasn1.elibel.tm.fr.
Summary
- XSD adds additional data-type and data-structuring features to XML.