syntactic restrictions on RDF graphs

From RDF M&S, section 5:

<P>To represent a collection <I>c</I>, create a triple {RDF:type,
<I>c</I>, <I>t</I>} where <I>t</I> is one of the three collection
types RDF:Seq, RDF:Bag, or RDF:Alt. The remaining triples
{RDF:_1, <I>c</I>, <I>r</I><SUB>1</SUB>},
..., {RDF:_n, <I>c</I>, <I>r</I><SUB>n</SUB>}, ... point to each of the
members <I>r</I><SUB>n</SUB> of the collection.
For a single collection resource there may be at most one triple
whose predicate is
any given element of <I>Ord</I>
and the elements of <I>Ord</I> must be used in sequence starting with RDF:_1.
For resources that are instances of the RDF:Alt collection type, there must
be exactly one triple whose predicate is RDF:_1 and that is the default
value for the Alternatives resource (that is, there must always be at least
one alternative).</P>


This looks extremely clear to me.  RDF M&S states that not all RDF graphs
(as defined by the new RDF model theory) are valid RDF.

In other words, the following RDF should be rejected by RDF implementations
is syntactically ill-formed.

<rdf:Bag>
  <rdf:_1 rdf:resource="ex:first" />
  <rdf:_2 rdf:resource="ex:second" />
  <rdf:_1 rdf:resource="ex:other-first" />
</rdf:Bag>


Of course, this paragraph goes against some later decisions, as it
explicitly forbids holes in collections, which are now explicitly allowed.

peter

Received on Thursday, 2 May 2002 13:35:55 UTC