untitled

(ff) #1

40 2 XML Semantics


The corresponding infoset is shown in figure 2.5 and differs from that in
figure 2.4 in only one way: the MedlineID and PMID child nodes have been
reversed. These two infosets aredifferent.
By contrast, the attribute links can be in any order. For example suppose
that the attributes of the MedlineCitation were reversed as follows:

<MedlineCitation Status="Completed" Owner="NLM">

The corresponding infoset is shown in figure 2.6 and differs from that in
figure 2.4 in only one way: the owner and status links have been reversed.
These two infosets arethe same.

Figure 2.5 XML data model for a Medline citation in which the MedlineID and
PMID nodes are in the opposite order.

This example illustrates that the semantics of XML does not always cor-
rectly capture the semantics of the domain. In this case, the XML documents
in which the PMID and MedlineID elements have been reversed have a dif-
ferent meaning in XML but are obviously conveying the same information
from the point of view of a bibliographic citation. One can deal with this
problem by specifying in the DTD that these two elements must always ap-
pear in one order. In this case, the MedlineID element must occur before the
PMID element.
Free download pdf