66 4 The Semantic Web and Bioinformatics Applications
being represented. Recall that semantics is concerned with the abstraction
that emerges from syntactic variation. Tim Berners-Lee claims that RDF is
much better at abstracting semantics from syntax than ordinary XML.
RDF differs from ordinary XML in several important ways:
- Explicit relationships. In XML there is only one relationship between el-
ements: the unlabeled parent-child relationship (i.e., the relationship be-
tween an element and the elements it directly contains). In RDF a resource
can participate in many different relationships. RDF relationships are ex-
pressed by adding intermediate layers (stripes) or by using attributes that
refer to another resource. - Order does not matter.The order of the child elements is semantically sig-
nificant in an XML document. In RDF, on the other hand, one can choose
whether order matters or not. By default, the order in which RDF state-
ments are asserted does not affect the meaning. - Many-to-many relationships. An XML element can have many child ele-
ments, but each child element can only be contained in one parent ele-
ment. In RDF a resource can be related to any number of other resources,
in either direction. In other words, all RDF relationships are many-to-
many, whereas XML relationships can only be one-to-many. - Syntactic flexibility.RDF allows a larger variety of ways to express facts
than XML. For example, a relationship can be specified using either an
XML attribute or a child element. As another example, one can specify
facts about a resource in several places in the same document or even in
documents anywhere on the web. One can mention a URI in an XML
document, but this is just another piece of data, and it is has no semantic
significance for XML. - Inference.RDF has a number of built-in rules that define important notions
such as inheritance. These built-in rules are part of the semantics of RDF. - Uniform notation.An important distinction between XML DTDs and XSD
is that DTDs use a different language than the one used for XML docu-
ments. XSD, on the other hand, uses XML for both the schemas and the
documents. RDF also uses the same language for both ontologies and
data, but it goes even further than XSD in erasing all distinctions between
ontologies and data. One can freely intermix RDF ontological and data
statements. By contrast, in XSD the schemas are distinct from any XML
data conforming to the schemas.