Re: not-id-and-resource-attr

On Thu, 10 Jan 2002, Brian McBride wrote:

> You had an action:
>
> 2001-12-14#8  Jan Grant  look at #rdfms-not-id-and-resource-attr closely

Right, this issue is tied up in the most complicated rules in Dave's
production, which attempt to do not "the right thing", but "what the RDF
spec has pretty much claimed was the case in this production".

I'll set out the changes that would have to be made to incorporate this
"fix" into Dave's document; this fix, however, is an extension (not a
correction) of the RDF grammar.


OK, here I'm going to refer you to Dave's WD:

http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20011218/#emptyPropertyElt

(that is, section 5.14)

Currently, the production looks like this:

start_element(URI=anyURI,
  attributes=set((idAttr | resourceAttr)?, bagIdAttr?, propertyAttr*))
end_element()

The production needs to become

start_element(URI=anyURI,
  attributes=set(idAttr?, resourceAttr?, bagIdAttr?, propertyAttr*))
end_element()

(with the proviso that all of idAddr, resourceAttr and bagIdAttr are not
present at the same time. These alternatives can be enumerated)



The "uniform" resolution of this issue would look as follows:

first bullet point: unchanged


second bullet point: CHANGE from

- If there is an rdf:resource attribute a and no other attributes then
add the following statement to the model:

to

- If there is an rdf:resource attribute a, and no other attributes
except for the optional rdf:ID attribute i then add the following
statement to the model:

and add the same clause concerning _i_ from the first bullet point.



Third bullet point: CHANGE from

- If there is one or more propertyAttr; an rdf:ID attribute, an
rdf:resource attribute or neither; and optionally an rdf:bagID attribute
b, then:

- If there is one or more propertyAttr; an rdf:ID attribute, an
rdf:resource attribute or neither (but not both); and optionally an
rdf:bagID attribute b, then:




Add the fourth bullet point as follows:

- if there is one or more propertyAttr; an rdf:ID attribute i; and an
rdf:resource attribute r

then add the following statement to the model:

  e.parent.subject.string-value <e.URI> r.string-value

  and reify the above statement with
identifier(identifier=concat(base-uri, "#", i.string-value), identifier-type="URI")
 using the reification rules in section 5.26



Note that I've explicitly not covered idAttr, resourceAttr, propertyAttr
and bagIdAttr all being present at the same time since that would
arguably involve two levels of reification.

This resolution of this issue is _slightly_ more regular, possibly, than
what we currently have; however, it still suffers from the problem that
rdf:ID is overloaded in meaning - "generally" indicating reification,
but in one case (the clause in the third bullet point) indicating the
URI of a node.


The alternative is to stick with what we've got, if the (odd) behaviour
of rdf:ID as it currently stands is enshrined for the sake of
backwards-compatibility.


In my opinion there is no way to simplify or make any more regular the
expression of this rule; we can add the fourth production if it is
considered a show-stopper, although RDF using this new version of the
production has never been a legal consequence of the old version of the
rdfms productions (not that that means much(!))

A test case for this production is trivial to produce, although it
relies on the base-URI-mangling rules (so I'm not going to attempt to
attach one to this email).

To be honest, I would be inclined to resolve to close this issue as
follows:

- NO changes to the current syntax document or productions are required
- we recognise the current irregularity in the RDF syntax with regards
to this production; however, the current production reflects accurately
the letter of the RDF M+S. Removing the irregularity from this
production completely would require a change in the interpretation of
rdf:ID which (since it would certainly break the meaning of existing RDF
documents*) is beyond the scope of the RDF Core efforts in this regard.


Cheers,
jan

* as asserted numerous times by various RDF core members

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk
HP-unix: Open Sauce product, available in 57 distributions.

Received on Thursday, 10 January 2002 09:57:40 UTC