- From: Dave Beckett <dave.beckett@bristol.ac.uk>
- Date: Mon, 13 Jan 2003 11:55:12 +0000
- To: Garret Wilson <garret@globalmentor.com>
- cc: www-rdf-comments@w3.org
>>>Garret Wilson said: > > I earlier complained of having rdf:nodeID without a separate > rdf:nodeIDRef. I'm now trying to use rdf:nodeID with > rdf:parseType="Collection". I've replied to that separately. > The primer contains (I'll ignore rdf:resource versus rdf:about for > now---see my separate message): > > <rdf:Description rdf:about="http://example.edu/courses/6.001"> > <s:students rdf:parseType="Collection" > > <s:student rdf:resource="http://example.edu/students/Amy"/> > <s:student rdf:resource="http://example.edu/students/Tim"/> > <s:student rdf:resource="http://example.edu/students/John"/> > </s:students> > </rdf:Description> > > But what if the original description of each student is a blank node > identified by a nodeID? Can I do this? > > <rdf:Description rdf:about="http://example.edu/courses/6.001"> > <s:students rdf:parseType="Collection" > > <s:student rdf:nodeID="amy"/> > <s:student rdf:nodeID="tim"/> > <s:student rdf:nodeID="john"/> > </s:students> > </rdf:Description> Yes. The contents of an rdf:parseType are a sequence of Node Elements so that any legal use of them is fine there. The grammar details: http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#parseTypeCollectionPropertyElt but the key thing is that the content is an nodeElementList which is a list of nodeElement: http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#nodeElement and these are the familiar <rdf:Description> or typed version like in http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Syntax-typed-nodes > And then what if I don't want them typed? Can I do this? > > <rdf:Description rdf:about="http://example.edu/courses/6.001"> > <s:students rdf:parseType="Collection" > > <rdf:Description rdf:nodeID="amy"/> > <rdf:Description rdf:nodeID="tim"/> > <rdf:Description rdf:nodeID="john"/> > </s:students> > </rdf:Description> Yes. > My earlier question of whether this is rdf:about or rdf:resource brings > up my other earlier comment relating to the name of rdf:nodeID---I think > this should really be: > > <rdf:Description rdf:about="http://example.edu/courses/6.001"> > <s:students rdf:parseType="Collection" > > <rdf:Description rdf:nodeIDRef="amy"/> > <rdf:Description rdf:nodeIDRef="tim"/> > <rdf:Description rdf:nodeIDRef="john"/> > </s:students> > </rdf:Description> Already replied to that. I'm wondering if I should add explanation and examples of some of the things brought up here to the syntax WD. In particular it might help to have: 1. An empty node element (as used here) 2. An example of the triples from rdf:parseType="collection" in long-form rdf/xml For example, here is http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/example19.rdf written out. (The latest drafts have the N-Triples outputs by the way). ---------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/stuff/1.0/"> <rdf:Description rdf:about="http://example.org/basket"> <ex:hasFruit rdf:nodeID="genid1"/> </rdf:Description> <rdf:List rdf:nodeID="genid1"> <rdf:first rdf:resource="http://example.org/banana"/> <rdf:rest rdf:nodeID="genid2"/> </rdf:List> <rdf:List rdf:nodeID="genid2"> <rdf:first rdf:resource="http://example.org/apple"/> <rdf:rest rdf:nodeID="genid3"/> </rdf:List> <rdf:List rdf:nodeID="genid3"> <rdf:first rdf:resource="http://example.org/pear"/> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> </rdf:List> </rdf:RDF> ---------------------------------------------------------------------- If you think that would be useful, let me know. Cheers Dave
Received on Monday, 13 January 2003 06:57:09 UTC