RDF has no single syntax; RDF is just a standard way of modeling ideas. That said, it's gotta be expressed.

RDF Serializations

(Trying to make this list as comprehensive as possible. If you know of one I've missed, link to it here.)

Various forms are:


(This doesn't need to be quite as comprehensive.)

Syntax Basis Named Graphs Rules Status
RDF/XML XML no no W3C Rec
TriX XML yes no proposal
SPOG XML, SPARQL Results yes no SPARQL result format is a W3C Rec
Notation3 - yes yes W3C Team Submission
Turtle Notation3 no no W3C Team Submission
N-Triples Notation3 no no W3C Rec (sort of)
TriG Notation3 yes no proposal
RDF/JSON JSON no no proposal on Talis wiki
RDF/POST HTTP no no proposal
eRDF (X)HTML no no proposal on Talis wiki
XHTML+RDFa XHTML no, but proposed no W3C Rec
Microdata (X)HTML no no W3C WD

Limited Syntaxes

Some serializations are only capable of representing a subset of the RDF data model.

  • RDF/XML requires property URIs to be encoded as XML QNames. Some URIs cannot be abbreviated this way. In practice, vocabulary designers tend to take this into account, so it's not much of a problem.
  • Microdata cannot represent datatypes for literals, and cannot handle cyclical relationships between blank nodes.
  • BSWL doesn't support blank nodes.
  • Certain unicode control characters are forbidden by XML, even when escaped as numeric character references. Unless an XML-based RDF serialisation provides an additional escaping mechanism, literals containing these characters cannot be serialised.
Last modified on 27 January 2011, at 03:44