W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2001

Re: Another RDF Syntax Idea

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Tue, 13 Feb 2001 14:44:25 +0000
To: Aaron Swartz <aswartz@upclink.com>
cc: RDF Interest <www-rdf-interest@w3.org>
Message-ID: <22325.982075465@tatooine.ilrt.bris.ac.uk>
>>>Aaron Swartz said:
> Dave Beckett <dave.beckett@bristol.ac.uk> wrote:
> 
> > Well, we already have several dozen issues, why not add some more,
> > after all we all have plenty of free time.
> 
> Thanks for the sarcasm, Dave. Really feel welcomed to the group. Anyway,
> it's not another issue -- just a suggestion. Take it or leave it. I want to
> make things better and I always thought the W3C was designed to do that. If
> it's a matter of time, I'm offering to donate mine.

Sorry for excessive sarcasm, it's just that it isn't just your time
but all of ours, discussing, resolving things is time consuming and
we need to prioritise.


> ... [comments that existing syntax is staying] ..

> 
> Of course. But does this mean we throw out future development on RDF
> altogether? What about RDF 2.0 (or really even 1.5).

RDF 2.0 is kind of funny since it was designed to be extensible.
Most likely will just be layers.  For example I now see RDF M&S and
RDF Schemas as really one thing; it makes sense to recast both of
these in that way and in 2001 interpret them in the light of the XML
specifications that have emerged since RDF M&S in Feb 1999.


<snip>
Aaron said:
> OK, I couldn't think of an easier way to write it.
> 
> > [URIBeingDescribed] -> [price]   -> [anon1]
> > [anon1]             -> [format]  -> "dollar"
> > [anon1]             -> rdf:value -> "100"
> 
> Yes. This is what I meant. This is a rather common occurrence that is overly
> painful to represent with the current syntax, and an easy addition.

OK, just be aware that you are extending making the RDF/XML parsers
more complex and that's a bad thing.  Compare to how difficult it
was/is to get things added to HTML in browsers?  Hence XHTML.  RDF is
a way to provide extensible semantic modelling and has an XML syntax
(amongst others).


> ... [new parseTypes snipped] ...


Dave said:
> >> 3) The LI controversy.
> > Chucking out your N3 stuff and using the statement syntax from RDF
> > M&S
> 
> I don't see this syntax in the spec. What do you mean?

Actually you are right; that isn't in the spec., but it should have
been!  It uses in section 5:
   {predicate, subject, object}		(from Prolog and friends) and
   {predicate, [resource], "literal"}
but that is too difficult to chain which can be done with the form
I've been using, that I've seen on various slides:
   [subject]->predicate1->predicate2->predicate3->[object]


Aaron said:
>  <items rdf:content="list">
>    <rdf:li rdf:resource="#uri1" />
>    <rdf:li rdf:resource="#uri2" />
>  </items>
>
> Dave said:
> > it gives statements
> > [URIbeingDescribed] -> items    -> [anon#1]
> > [#anon1]            -> [rdf:_1] -> [#uri1]
> > [#anon1]            -> [rdf:_2] -> [#uri2]
> > 
> > so what is the benefit of that over:
> > [URIbeingDescribed] -> type     -> [rdf:Bag]

My mistake, should have been
    [URIbeingDescribed] -> [rdf:type] -> [rdf:Bag]

> > [URIbeingDescribed] -> [rdf:_1] -> [#uri1]
> > [URIbeingDescribed] -> [rdf:_2] -> [#uri2]
> > 
> > There may be one, but you don't explain.
> 
> I'm simply speaking of the case where you're referencing a Bag or Seq from
> another URI. Your thing is basically the same as mine, except you've
> replaced [anon#1] with [URIbeingDescribed]. Unless you mean something else.

I'm still unsure why you are proposing this - what does it add that
cannot be done with the existing syntax?  It changes the container
model or is it an alternative?

> 
> >> If another term is used instead of rdf:li then an rdf:type will be set for
> >> the resource.
> > So in that case, you are using this 'items' thing to tell it is a
> > container, or is it because rdf:_1 etc. are seen, or are you using
> > RDFS to check for subProperty of items...?
> 
> Exactly, since RDFS subclassing of container can be unknown at times (and
> result in different values) I'm providing a way to state that something is a
> contain subclass within the RDF itself, so that it is always properly
> parsed.


> 
> > The rdf:RDF root is optional, and so is rdf:Description.
> 
> Where is this stated? In the spec I see the BNF:
> 
> [6.1] RDF            ::= ['<rdf:RDF>'] obj* ['</rdf:RDF>']


You have to read the words that go along with the grammar to get all
the interpretations (I've missed this too).  In M&S section 2.2.1
Basic Serialization Syntax paragraph 3:

  The RDF element is a simple wrapper that marks the boundaries in an
  XML document between which the content is explicitly intended to be
  mappable into an RDF data model instance. The RDF element is
  optional if the content can be known to be RDF from the application
  context.

If the context is known, i.e. you know it is RDF, then you can skip
to grammar production obj*:

  [6.2] obj ::= description | container

which allows everything:

  [6.3] description ::= '<rdf:Description' idAboutAttr? bagIdAttr? propAttr* '/>'
                         | '<rdf:Description' idAboutAttr? bagIdAttr? propAttr* '>'
                                propertyElt* '</rdf:Description>'
                         | typedNode
  [6.4] container ::= sequence | bag | alternative

i.e. at the top level you can have:
   1) <rdf:Description>  [6.3 part 1, 2]
   2) typedNode [6.3 part 3]
   3) <rdf:Seq> [6.4 part 1]
   4) <rdf:Bag> [6.4 part 2]
   5  <rdf:Alt> [6.4 part 3]

or nothing since obj* means zero or more :-)

I've been reading the grammar for too long


Back to writing my KT2001[1] RDF talk and tidying the Redland[2]
paper for WWW10.

Dave
[1] http://www.gca.org/attend/2001_conferences/kt_2001/
[2] http://www.redland.opensource.ac.uk/
Received on Tuesday, 13 February 2001 09:44:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:48 GMT