untitled

(ff) #1

2.2 Infosets 41


Figure 2.6 XML data model for a Medline citation in which the status and owner
attributes are in the opposite order.


The infoset for the nitrous oxide document in figure 2.3 is shown in fig-
ure 2.7. If the first two atom elements were reversed the infoset would be
as in figure 2.8. These two infosets aredifferent. However, from a chemical
point of view, the molecules are the same. This is another example of a clash
between the semantics of XML and the semantics of the domain. Unlike the
previous example, there is no mechanism in XML for dealing with this ex-
ample because all of the child elements have the same name (i.e., they are
all atom elements). So one cannot specify in the DTD that they must be in a
particular order. One also cannot specify that the order does not matter.


Summary



  • An XML DTD can be regarded as an ontology language.

  • The formal semantics of an XML document is defined by its infoset.

  • The order of attributes does not matter.

  • The order of elements does matter.

Free download pdf