On the Relationship between RDF and the XML family of Technologies

The relational model [@@ref] on which relational databases are based is a conceptual model for organising and processing information. In effect, RDF defines an alternative conceptual model for representing information. The RDF model represents information as a directed graph in which arcs are labelled with URI's and nodes represent either resources or literals.

XML [@@ref] [@@namespace ref] [@@infoset ref] defines another conceptual model, called the XML infoset, for representing information. The XML model represents information as a tree structure with unlabeled arcs and nodes labelled with XML QNames. XML defines a serialization syntax for writing information represented in the form of its conceptual model.

Uncomfortable as it may be, one relationship betwen RDF and XML is that they both define alternative conceptual models for representing information. This is not the place to discuss the relative merits of each.

The RDFCore WG has defined [@@ref rdf/xml syntax] a reversible translation from the RDF conceptual model to the XML conceptual model, XML Infoset. Thus RDF can be read and written using the XML syntax. This translation however, is not simple, nor is it one to one, which has major implications for the use of XML tools, such as XML Schema [@@ref], XSLT [@@ref] and XML Query [@@ref] to process RDF.

The relationship between an XML infoset and its XML serialization is pretty much one to one. To perform an operation on an XML infoset a directly equivalent operation can be performed on its XML serialization, e.g. to delete a node from the infoset, delete the equivalent element from the seriazation. Tools, such as XSLT, are designed to perform such operations.

Information represented in the RDF conceptual model has many equivalent representations in the XML infoset. This significantly complicates the task of using XML tools such as XML Schema, XSLT and XML Query for processing RDF. Since there are many equivalent representations of the same RDF conceptual model as an XML infoset, XML tools have to be programmed to perform an operation on the all the different equivalent representations. This effectively rules out the use of such tools for the general manipulation of RDF data.

XML Schema, XSLT and XML Query are not well suited to general manipulation of unrestricted RDF data.

It is possible to restrict the set of possible representations of RDF conceptual models as XML infosets. Some RDF applications such as RSS 1.0 and Prism have done this. In such cases it may be feasible to translate manipulation of the RDF conceptual model into simple manipulations of the infoset and thus use XML tools. Doing so however, will limit the processing done to just that application domain, giving up on one of RDF's strengths, which is its ability to integrate data from different sources, different applications and different vocabularies.

The RDFCore WG has adopted the XML Schema datatyping model [@@ref] into RDF and, whilst not ruling out the use of other datatypes, has given a "first amongst equals" status to XML Schema datatypes, in that whilst they are given no special treatment, it is recommended that they be used on the grounds they are most likely to be supported by datatype aware generic RDF tools.

There are several possible approaches to improving interoperability between RDF and XML.

These however are future possibilities.