- From: Graham Klyne <GK@NineByNine.org>
- Date: Mon, 10 Mar 2003 20:06:56 +0000
- To: Dave Beckett <dave.beckett@bristol.ac.uk>, RDF Core <w3c-rdfcore-wg@w3.org>
I'm inclined to agree, and part of my reason is that by trying to fix just this problem I think we might miss a bigger opportunity. What follows is NOT a proposal, but an explanation of the above comment. Note that the formal semantics is now clear that all literal values can also be resources (i.e. are in IR). If we had a syntactic form that described a resource with the same value as a given literal, it would provide a solution to both this problem and the literals-as-subjects problem. E.g. <rdf:LiteralValue [rdf:datatype='...'] [xml:lang='...']>literalText</rdf:Literal> would be an alternative form of the production that includes <rdf:Description ...> and typed elements. (The choice of name is just an illustration.) (Note there is no provision for indicating a URI -- maybe there should be.) A variant of this might be to define a new property which identifies its subject with its object; e.g. rdf:sameAs. Then one could write: <rdf:Description><rdf:sameAs>literalText</rdf:sameAs></rdf:Description> or <rdf:Description rdf:sameAs='literalText' /> This requires no change to the syntax, just a new vocabulary element with predefined semantics. I think I've illustrated there may be enough ways to solve this problem, and some others, that it is probably best deferred to a new working group with more time to consider the options here. And, as Dave says, the current shortcoming is an inconvenience rather than an unavoidable shortcoming. #g -- At 13:17 10/03/2003 +0000, Dave Beckett wrote: >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 ------------------- Graham Klyne <GK@NineByNine.org> PGP: 0FAA 69FF C083 000B A2E9 A131 01B9 1C7A DBCA CB5E
Received on Tuesday, 11 March 2003 04:55:03 UTC