Editors:
Jonathan Borden jonathan@openhealth.org
Pat Hayes phayes@ai.uwf.edu
Drew McDermott drew.mcdermott@yale.edu
This version: June 14, 2001
Previous version: June 11, 2001
This document defines an Abstract Syntax or Infoset for RDF [1]. RDF Statements are commonly refered to as triples of {predicate,subject,object}. In practice it is useful to group triples into sets of statements termed: Bundles.
This document has no official status.
A Bundle is represented by an URIreference. A bundle is a list (ordered bag) of Statement triples <predicate,subject,object>. For each bundle the statement quadruple: <predicate,subject,object,bundle> is equivalent to the triple <predicate,subject,object>, i.e. the bundle identifier serves to collate the set of quadruples into a set of triples for each bundle identifier.
Graph := (bundle)*
A Statement is represented by the 4-tuple: <predicate,subject,object,bundle> or consider a Bundle a list of Statements represented as triples <predicate,subject,object>
statement := (predicate,subject,object)
bundle := (statement|bundle)*
An atom represents either a QName according to XML Namespaces, a variable, or a statement, matching the EBNF:
atom := (QName | quantifiedVariable| rowVariable | Statement)
quantifiedVariable := ('?' Name) Name as defined in XML 1.0
rowVariable := ('...' Name)
A predicate is a QName.
A subject is an atom.
An object is an atom. Note that literal strings may be represented by the
data:
URI scheme.
A bundle is represented by a QName. A bundle containts a list of statements.
The bundle allows separation of statements into lists which can be asserted as a group. Bundles allow 'coloring' of subgraphs. The document from which a set of statements arises forms a bundle (represented by its URI). Bundles can 'contain' other bundles.
For each URIreference U, Q = QName(U) and U = URIreference(Q)
Converting a URI reference to a QName
A URI reference may be separated into a namespace URI part which is the substring of the URI reference up until the last non alphanumeric character. The localname part is the part subsequent to this last alphanumeric character. If the localname part is null, the special name "_" is used as the localname part of the QName.
Converting a QName to a URIreference
If the namespace name ends in a non alphanumeric character, the namespace URI and localname are concatenated to form a URI reference. If the namespace name ends in an alphanumeric the namespace URI, '#' and localname are concatenated.
A compond expression is a statement that contains a statement as its predicate or object. This recursive definition of a statement may be skolemized by assuming a skolem function which labels statements with an identifier e.g.:
stmt1 = statementId(color,sky,blue)
The statement:
(not (says jon (color sky blue))
is represented by the Expression:
[not [says jon [color sky blue]]]
using the statementId function:
One can similarly obtain the statement from the id using predicate,subject and object functions:
[color,sky,blue] = [predicate(stmt1),subject(stmt1),object(stmt1)]
The Squish [2] query: (dc:creator, foo, ?x)(foaf:mbox, ?x, mailto:jonathan@openhealth.org)
is represented as:
where ctx-query represents the bundle in which the query is defined.
This is equivalent to:
(exists ?x (and (dc:creator(foo,?x),foaf:mbox(?x,mailto:jonathan@openhealth.org))))
Expressions are collections of statements within a common context. An expression is a subgraph. The root or top level expression within a particular context are those statements which are not referred as the subject or object of any other statement within the context.
Is there a formal expression of this?