W3C home > Mailing lists > Public > www-rdf-comments@w3.org > July to September 2001

Re: WD-rdf-syntax-grammar-20010906 in RELAX NG

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Mon, 17 Sep 2001 09:52:39 +0100
To: www-rdf-comments <www-rdf-comments@w3.org>
CC: James Clark <jjc@jclark.com>
Message-ID: <17910.1000716759@tatooine.ilrt.bris.ac.uk>
>>>James Clark said:
> I translated the grammar in WD-rdf-syntax-grammar-20010906 into RELAX NG.
> Here it is in my RELAX NG non-XML syntax

Thanks a lot, this is just the kind of thing we were hoping to see.


> With typedNode, propertyElt and propAttr, the WD actually specifies any
> namespace URI is allowed.  I'm guessing that the intention is actually to
> allow any namespace URI other than the absent namespace URI and the RDF
> namespace URI. ...

Not quite.  The intention is that rdf:type as an attribute must be
handled using the typeAttr production, and all others use the
propAttr.   For any namespace, that does include the RDF namespace;
but non-namespaced attributes or elements are not allowed.  I assume
the -(local:*...) terms exclude non-namespaced attributes & elements.

Thanks for catching this - we need to be clearer.

> ...  Maybe this is supposed to be handled by the requirement in
> the spec that in A|B priority is given to A.  I would strongly suggest that
> this priority concept is not a good idea.  I think that making this rigorous
> would be hard and would require getting into procedural details of the
> parsing process, which it would be far better to avoid.

I felt awkward adding that priority, but I wanted to make it clear
that rdf:type matched only one grammar production.  The other
alternatives include -

  * specifying something like "rdf:type OR any other property that
     isn't  rdf:type"
  * removing the rdf:type special case from the grammar and
    adding the handling it needs in the mapping to the RDF model

- the latter looks more appealing now, given feed back from you and
Rick Jelliffe.  See thread starting:

> The grammar in the WD allows a typedNode to have an rdf:type attribute.  Is
> that intentional?

Yes, that is allowed; resources can have multiple rdf:type properties
and that would be one way of expressing it when there are exactly

Incidently, I see you defined the 'any well-formed XML' phrase more
  any = mixed { element * { attribute * { text }*, any }* }

which I wasn't sure how to express; so thanks again.

Received on Monday, 17 September 2001 04:52:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:15:15 UTC