From RDF Working Group Wiki
Jump to: navigation, search

Issues and Proposals around rdf:Seq and rdf:Lists


RDF "Containers" refers to the Alt/Bag/Seq constructs. RDF "Collections" refers to the rdf:List constructs. RDF "Graph Containers" is our new name for g-boxes. The term "Collection" is hard-coded into rdf/xml as a parsetype. Still:

PROPOSED: we'll downplay the terms "containers" and "collections" for Seq and lists, and instead just call them Seq and list.

Seq Semantics

(background discussion)

PROPOSED: Remove the (infinite) container semantics from the RDF formal semantics.

Well-Formed Lists

The term 'well-formed' is used in both RDF Semantics 3.3 and RDF Primer 4.2, but is not formally defined in either one. See also RDF/XML parsetype=Collection rules.

It has been suggested that properly structured lists can be implemented using native list structures for greater efficiency, and the proper structuring is the same as Turtle collection syntax allows. (This is different from RDF/XML collection syntax which does not allow literals in lists).

The restriction defined without reference to Turtle is:

  • The list nodes are all blank nodes
  • Each list node has exactly two outbound arcs, an rdf:first one and an rdf:rest one.
  • Each list node has exactly one inbound arc; for all but the first node, it's an rdf:rest arc from the previous node.
  • There must be a finite sequence of list nodes from the first to the last, following rdf:rest arcs, with the last have rdf:rest linked to rdf:nil

(Perhaps there is a clearer definition using more math.)

PROPOSED: We'll formally define "well-formed" lists, equivalent to the structure that can be losslessly conveyed using Turtle's collection syntax.


There is considerable unhappiness with rdf:Seq and RDF lists, but both are widely used. rdf:Seq is used in Adobe XMP and in RSS. RDF lists are used by OWL's syntax.

PROPOSAL-1: We will not mark rdf:Seq or RDF lists as archaic, but will give some guidance as to how to use them well.

PROPOSAL-2: We will mark rdf:Seq as archaic (possibly calling it something neutral like a "Compatibility Feature", and moving its documentation to an appendix), guiding people toward using well-formed lists instead.