Re: #rdf-containers-syntax-ambiguity, #rdf-containers-syntax-vs-schema

Brian McBride wrote:
> 
> With respect to action:
> 
>   AP: 2001-06-08#3: Brian McBride: pick up on the syntax issues now the
>         model details have been clarified.
> 
> from last weeks teleconference, I would like to propose the attached
> McBride/Beckett proposal for parsing containers.  This proposal was circulated
> on RDF Interest in December 2000

With respect to that proposal, I realised that it suffers from a similar problem
to the one that Dan Connolly pointed out in:

  http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Jun/0017.html

The proposal specifically allows for representing partial descriptions of
containers using the rdf:li syntax.  For example:

  <rdf:Bag>
    <rdf:li>1</rdf:li>
    <rdf:_10>10</rdf:li>
    <rdf:li>11</rdf:li>
  </rdf:Bag>

will generate (please excuse the abbreviation):

  _:genid <rdf:type> <rdf:Bag>.
  _:genid <rdf:_1>   "1" .
  _:genid <rdf:_10>  "10" .
  _:genid <rdf:_11>  "11" .

In essence, rdf:li translates to rdf:_nnn where nnn is one more than the last
rdf:_mmm encountered in the element.

Now consider property foo:ten which is a subproperty of rdf:_10.

  <rdf:Bag>
    <rdf:li>1</rdf:li>
    <foo:ten>10</rdf:li>
    <rdf:li>11</rdf:li>
  </rdf:Bag>

What triples does the above example generate.  Either the parser has to process
subPropertyOf relations, or it will generate a different set of triples from the
first example.

An argument can be made that reseting the count in this way is an example
of feature creep and would be best avoided.  It provides more syntactic sugar
than the language described in M&S.  It adds little value, creates
more work for implementors and creates confusion, as in the case outlined above.

I think therefore there is a case to be made for simplifying this aspect of
the proposal so that rdf:li elements within a description are translated to
rdf:_nnn where nnn starts at 1 and is incremented by one for each rdf:li
encountered.

This the example given above:

  <rdf:Bag>
    <rdf:li>1</rdf:li>
    <rdf:_10>10</rdf:li>
    <rdf:li>11</rdf:li>
  </rdf:Bag>

would generate:

  _:genid <rdf:type> <rdf:Bag>.
  _:genid <rdf:_1>   "1" .
  _:genid <rdf:_10>  "10" .
  _:genid <rdf:_11>  "2" .

This solution also neatly ducks the issue of what do to with:

  <rdf:Bag rdf:_1="1" rdf:_2="2">
    <rdf:li>?</rdf:li>
  </rdf:Bag>

I'd welcome feedback from the WG on which way they would like me to proceed
as I write up the test cases.

Brian

Received on Wednesday, 13 June 2001 11:39:29 UTC