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

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

<snip/>

> 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"
or
  * 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:
  http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0205.html

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

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

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

Dave

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