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

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

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

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 { ... }

James

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