Re: syntactic restrictions on RDF graphs

www-rdf-comments, please consider this as an interpretation question.
i.e. please add it to the RDF Core test suite, and ask the WG
to approve it, either as an error or as a positive test.

On Thu, 2002-05-02 at 12:35, Peter F. Patel-Schneider wrote:
> >From RDF M&S, section 5:

Ironcially, section 5 is not about RDF syntax; it's
called "5. Formal Model for RDF:
http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#model

> <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>

Well, I'm not aware of any implementations that do that, so that's
not how the text above was understood by implementors.

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

Right; it seems to me that we've decided to allow this.
But perhaps unconsciously.



-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 2 May 2002 14:02:25 UTC