Issue http://www.w3.org/2000/03/rdf-tracking/#rdfms-not-id-and-resource-attr

[Admin: URI of 'raised' message in this Issue is wrong, should be:
  http://lists.w3.org/Archives/Public/www-rdf-interest/1999Dec/0153.html 
]


In RDF's XML syntax, there are ways to express statements and to give
IDs to the resources modelling the statements (reified statements).

However when using the form in the first attachment to this message
[cloaked as text/html until archive bug is fixed] - a statement
generated by a property which points at an object using the
rdf:resource attribute, it generates a statement (s,p,o form)

  (http://blah/, http://somewhere/bar , http://foobar)

and should identify a resource modelling the statement with ID foobar
(URI [attached example URI]foobar)


However, at present propertyElt production 6.12 forbids both ID and
rdf:resource attributes:

  [6.12] propertyElt ::=  <... other alternatives ...> 
                         | '<' propName idRefAttr? bagIdAttr? propAttr* '/>'

idRefAttr? means: (zero or more of ((ID attribute) OR (resource attribute)))


Proposed Fix #1
Change the last production term of 6.12 being changed to:
           | '<' propName idAttr? resourceAttr? bagIdAttr? propAttr* '/>'

(ignoring any future changes to the way the grammar may be expressed
and changes to add rdf: prefixes)



A related change also required is the wording near the end of section
6 in item #3 of the list:

   [[Specifically; each propertyElt start tag containing attribute
   specifications other than ID, resource, bagID, xml:lang, or any
   attribute starting with the characters xmlns results in the
   creation of the triples {p,r1,r2}, {pa1,r2,va1}, ..., {pan,r2,van}
   where

   1. p is the expansion of the namespace-qualified tag name.
   2. r1 is the resource being referred to by the element containing
      this propertyElt expression. 
   3. r2 is the resource named by the resource attribute if present
      or a new resource. If the ID attribute is given it is the
      identifier of this new resource.
   4. pa1 ... pan are the expansion of the namespace-qualified
      attribute names.
   5. va1 ... van are the corresponding attribute values.
   ]]
   end of section 6, http://www.w3.org/TR/REC-rdf-syntax/

The phrase [[If the ID attribute is given it is the identifier of
this new resource.]] needs to change for three reasons:

  1. Earlier on in section 6, RDF M&S says

     [[Within propertyElt (production [6.12]), the URI used in a
     resource attribute identifies (after resolution) the resource
     that is the object of the statement (i.e., the value of this
     property).  The value of the ID attribute, if specified, is the
     identifier for the resource that represents the reification of
     the statement. ]]
     middle of section 6, http://www.w3.org/TR/REC-rdf-syntax/

     So this is inconsistent.

  2. Everywhere else, the ID attribute names the reified statement -
     so this is inconsistent again.

  3. The rdf:resource attribute is the identifer of the new resource
     (when using the form described here); otherwise it is the
     enclosed resource provided by the other alternatives in the 6.12
     production.

Proposed Fix #2

Change the sentence at the end of section 6 item #3 with the last
sentence quoted above from earlier on in section 6
OR removed the sentence.


Impact on Applications

Removes an ambiguity, makes the grammar more regular, probably
minimal.  I suspect most parsers do 


Dave, who spent far too much time reading RDF M&S grammars.

Received on Thursday, 10 May 2001 12:32:32 UTC