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

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

From: James Clark <jjc@jclark.com>
Date: Mon, 17 Sep 2001 16:30:25 +0700
Message-ID: <00a001c13f5b$6196c850$0e00a8c0@bkk.thaiopensource.com>
To: "www-rdf-comments" <www-rdf-comments@w3.org>, "Dave Beckett" <dave.beckett@bristol.ac.uk>

> > With typedNode, propertyElt and propAttr, the WD actually specifies any
> > namespace URI is allowed.  I'm guessing that the intention is actually
> > 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.

So propAttr is supposed to match anything other than

+ a non-namespace attribute
+ rdf:type

? Don't you also need to exclude rdf:ID, rdf:about, rdf:aboutEach?
Otherwise an element could have both an rdf:ID and, say, an rdf:about
attribute, even though the syntax has a choice of rdf:ID and rdf:about,
because one of them would match propAttr.

What exactly is the list of RDF attribute names that propAttr cannot match?
Probably rdf:bagID, rdf:parseType, rdf:resource need to be excluded in
addition to rdf:ID, rdf:about, rdf:aboutEach. rdf:type.

What about propertyElt and typedNode? Can they match element names from the
rdf namespace?

> 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
> > this priority concept is not a good idea.  I think that making this
> > 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"

Specifying "anything other than rdf:type" is easy in RELAX NG and has a
clean, precise semantics.  In the non-XML syntax it would be just

attribute * - rdf:type { ... }

Received on Monday, 17 September 2001 05:30:31 UTC

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