Simplified XML Syntax for RDF

Jonathan Borden Tufts University School of Medicine, The Open Healthcare Group This version: June 17, 2001

Latest version

A simplified XML syntax for RDF is proposed. Its major differences with RDF 1.0 are:

  1. namespace =
  2. defined as tree regular expression
  3. attribute aboutQ="ex:name" accepts QName as value indicating subject
  4. attribute resourceQ="ex:value" accepts QName as value indicating object
  5. rdf:parseType="Resource" is default
  6. The subject or object of a statement may be either a URI reference, a qualified name, a quantified variable, another statement or a collection of statements.
  7. ?x defines a quantified variable

XML Syntax

The XML syntax for RDF 1.0 can be described in terms of a tree regular expression. This form can be thought of as expressing constraints on the XML Infoset which arises when parsing an RDF document. The advantage of expressing the syntax in this form over EBNF, is that a tree regular expression (e.g RELAXNG/TREX schema ) already takes into account the rules of XML syntax + XML namespaces, e.g. correctly handles namespace prefixes, empty elements, mixed content, whitespace, attribute ordering etc. Such schemata are also described as "hedge regular expressions" or "hedge automata"

The tree regular expression schema for RDF 1.0 is available here. This schema handles several proposed updates such as the requirement that the "rdf:about" and "rdf:ID" attributes be prefixed/qualified.

A tree regular expression for the proposed syntax is available here.

The obj pattern is described thus:

<define name="obj">
  <ref name="description"/>
  <ref name="container"/>

The description, container, idAboutAttr, idAttr patterns are described thus:

<define name="description">
   <element name="Description">
         <ref name="idAboutAttr"/>
         <ref name="bagIdAttr"/>
         <ref name="propAttr"/>
   <ref name="typedNode"/>

 <define name="container">
     <ref name="sequence"/>
     <ref name="bag"/>
     <ref name="alternative"/>

<define name="idAboutAttr">
     <ref name="idAttr"/>
     <ref name="aboutAttr"/>
     <ref name="aboutQAttr"/>

<define name="idAttr">
  <attribute name="rdf:ID">
     <data type="ID"/>

An example:

         <r:RDF xmlns:r=""
           <r:Description r:aboutQ="ex:Jon">
             <ex:color r:aboutQ="ex:sky" r:resourceQ= "ex:blue"/>




An XSLT parser is available here which transforms an RDF document into Statement form.

Jonathan Borden ENS ENI