LC Issue hendler-01 (substantive) discussion

Proposal to close hendler-01
  http://www.w3.org/2001/sw/RDFCore/20030123-issues/#hendler-01

Summary: rejected

  This request would require substantial changes to the RDF/XML
  grammar, make it more complex, introduce further tricky
  implementation work and require another last call WD.  The
  resulting RDF graph can be generated from the existing RDF/XML
  albeit in a long form.


NOTE * * * This is not yet a response to the issue raiser  * * *

Rationale [LONG - with examples]

This request would require a substantial change to the RDF/XML
syntax, so that 
   http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeCollectionPropertyElt
would allow not only a list of node elements, but a list 
of what would might be called 'literal node elements'.

This change would require another last call WD.


Grammar Change Choices

1. The grammar would be changed to:

  start-element(URI == propertyElementURIs ),
      attributes == set(idAttr?, parseCollection))
  (nodeElementList | literalNodeElementList)
  end-element()

and new grammar productions
  literalNodeElementList ::= literalNodeElement*

  literalNode ::= start-element(URI == ???, 
                                attributes == set(datatypeAttr?, parseLiteral?))
                    literal
                  end-element()

The latter would need new careful rules to handle both datatypes and
parseType="Literal" forms (or the latter could be ruled out).

This would mean inventing a new rdf term for ??? that would allow
literals to be used where nodes were expected.  I will use rdf:abc
for this example rather than pick one.

2. Alternatively only http://www.w3.org/TR/rdf-syntax-grammar/#nodeElement
could be changed to be handle the functionality above, but it is one of
the most complex parts of the grammar and it would be difficult.

  Aside: If nodeElement was changed in this way, it *would* also
  allow literals to be given as subjects of triples. However this is a
  postponed RDF Core Issue:
    http://www.w3.org/2000/03/rdf-tracking/#rdfms-literalsubjects
  and if this choice was made, there would be temptation to
  change all the other working drafts in order to allow it in the
  semantics and abstract syntax, explain in the primer, etc.

Examples of this new syntax

So given rdf:abc and either of the above choices, you could then use:

  <rdf:Description rdf:about="http://example.org/node">
    <ex:propertyElement rdf:parseType="Collection">
      <rdf:abc>a</rdf:abc>
      <rdf:abc>b</rdf:abc>
    </ex:propertyElement>
  </rdf:Description>

giving N-Triples:

<http://example.org/node> <http://www.example.org/ns#propertyElement> _:genid1 .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

and all the usual literal datatypes

  <rdf:Description rdf:about="http://example.org/node">
    <ex:propertyElement rdf:parseType="Collection">
      <rdf:abc rdf:parseType="Literal"><a:b xmlns:a="http://example.org/a">Some XML</a:b></rdf:abc>
      <rdf:abc rdf:datatype="&xsd;decimal">10</rdf:abc>
      <rdf:abc xml:lang="fr">chat</rdf:abc>
    </ex:propertyElement>
  </rdf:Description>

giving N-Triples
<http://example.org/node> <http://www.example.org/ns#propertyElement> _:genid1 .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "<a:b xmlns:a="http://example.org/a">Some XML</a:b>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>  "10"^^<http://www.w3.org/2000/10/XMLSchema#decimal> .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid3 .
_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "chat"@fr .
_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .


Working with the Existing RDF/XML

All the triples given above can be generated from the existing
grammar, with the triples written out in long form.  This would be
true for all potential mappings and although inconvenient for
hand-writing, would be possible.

The first set of triples written out in longhand RDF/XML

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
         xmlns:ex="http://www.example.org/ns#" >
  <rdf:Description rdf:about="http://example.org/node">
    <ex:propertyElement rdf:nodeID="genid1" />
  </rdf:Description>

  <rdf:Description rdf:nodeID="genid1">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
    <rdf:rest rdf:nodeID="genid2" />
    <rdf:first>a</rdf:first>
  </rdf:Description>

  <rdf:Description rdf:nodeID="genid2">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
    <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" />
    <rdf:first>b</rdf:first>
  </rdf:Description>
</rdf:RDF>

The second set:

<?xml version='1.0' encoding='utf8'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
         xmlns:ex="http://www.example.org/ns#" >
  <rdf:Description rdf:about="http://example.org/node">
    <ex:propertyElement rdf:nodeID="genid1" />
  </rdf:Description>

  <rdf:Description rdf:nodeID="genid3">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
    <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" />
    <rdf:first xml:lang="fr">chat</rdf:first>
  </rdf:Description>

  <rdf:Description rdf:nodeID="genid1">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
    <rdf:rest rdf:nodeID="genid2" />
    <rdf:first rdf:parseType="Literal"><a:b xmlns:a="http://example.org/a">Some XML</a:b></rdf:first>
  </rdf:Description>

  <rdf:Description rdf:nodeID="genid2">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
    <rdf:rest rdf:nodeID="genid3" />
    <rdf:first rdf:datatype="http://www.w3.org/2000/10/XMLSchema#decimal">10</rdf:first>
  </rdf:Description>

</rdf:RDF>


Both of the latter two rdf/xml examples are legal and work in parsers
conformant with the Jan 23 2003 drafts.


Summary of adding this form:

Pros (changing to add this new form)
  Adds a shorthand for a triples form that Hendler and Webont call 
    "very important" (Hendler)
    -- http://lists.w3.org/Archives/Public/www-rdf-comments/2003JanMar/0322.html
    and "prefered .. to be allowed" ,"would permit some constructs in
        OWL that are difficult under the current design." (WebOnt)
    -- http://lists.w3.org/Archives/Public/www-rdf-comments/2003JanMar/0335.html
  With grammar choice 2, allows a way to do literal triple subjects.
  Using the current RDF/XML is very long and "extremely ugly" (Hendler)

Cons (not changing)
  Is creating another new piece of RDF/XML syntax.
  Requires a new last call RDF/XML syntax WD.
  Tricky grammar choices and changes, wordings.
  New implementation burden.
  Adds yet another alternate way to use RDF/XML - already too many options.
  Requires new description in RDF/XML syntax section 2 and in the RDF primer.
  With grammar choice 2, would tempt changes to be made to most all other WDs.

---

My personal summary is: sorry, too late for such a large change.

Dave

Received on Monday, 10 March 2003 08:19:59 UTC