11-08-2012, 03:59 PM
THE SEMANTIC WEB: The Roles of XML and RDF
The Roles of XML and RDF.pdf (Size: 225.34 KB / Downloads: 21)
A well-formed XML document creates a balanced
tree of nested sets of open and close tags, each of
which can include several attribute-value pairs. There
is no fixed tag vocabulary or set of allowable combinations,
so these can be defined for each application.
In XML 1.0 this is done using a document type definition
to enforce constraints on which tags to use and
how they should be nested within a document. A
DTD defines a grammar to specify allowable combinations
and nestings of tag names, attribute names,
and so on. Developments are well underway at W3C
to replace DTDs with XML-schema definitions.4,5
Although XML schema offer several advantages over
DTDs, their role is essentially the same: to define a
grammar for XML documents.
Figure 2 shows an example serialization of part
of the ontology from Figure 1. The basic XML data
model is a labeled tree, where each tag corresponds
to a labeled node in the model, and each nested
subtag is a child in the tree. Of course, this example
shows just one possible XML-based syntax for
the ontology. XML is foremost a means for defining
grammars, and because different grammars can
be used to describe the same content, XML allows
multiple serializations.
RDF Schema
Just as XML schema provides a vocabulary-definition
facility, RDF schema lets developers define a particular
vocabulary for RDF data (such as authorOf) and
specify the kinds of object to which these attributes
can be applied.9 In other words, the RDF schema
mechanism provides a basic type system for RDF
models. This type system uses some predefined terms,
such as Class, subPropertyOf, and subClassOf, for
application-specific schema. RDF schema expressions
are also valid RDF expressions (just as XML schema
expressions are valid XML).
Using XML
XML fulfills the universal expressive power requirement
because anything for which a grammar can be
defined can be encoded in XML. It also fulfills the
syntactic interoperability requirement because an
XML parser can parse any XML data, and is usually
a reusable component. When it comes to semantic
interoperability, however, XML has disadvantages.
Using RDF
RDF’s nested object-attribute-value structure satisfies
our universal expressive power requirement
for an exchange format, although this is not easy to
see. Application-independent RDF parsers are also
available, so RDF fulfills our syntactic interoperability
requirement as well.
When it comes to semantic interoperability,
RDF has significant advantages over XML: