- From: Gregg Kellogg <gregg@kellogg-assoc.com>
- Date: Wed, 23 Nov 2011 10:39:24 -0500
- To: Paul Rogers <PaulRogers@smarttech.com>
- CC: "public-rdf-ruby@w3.org" <public-rdf-ruby@w3.org>
- Message-ID: <D5B1F1DB-C1D3-462E-B016-B5D98D060AAB@kellogg-assoc.com>
Paul, I usually author in Turtle and then distill to other formats to do this kind of stuff. The form your looking for for your example is the following: <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:foo="http://example.org/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base=""> <rdf:Description rdf:about="http://server/path/temppersonresource"> <rdf:type rdf:resource="http://server/path/Person"/> <foo:country-name>US</foo:country-name> </rdf:Description> </rdf:RDF> Much easier to write as Turtle: @prefix foo: <http://example.org/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://server/path/temppersonresource> a <http://server/path/Person>; foo:country-name "US" . You can use my online service to validate and transform between representations. It's at http://rdf.greggkellogg.net/distiller. Gregg Kellogg Sent from my iPad On Nov 23, 2011, at 1:14 AM, "Paul Rogers" <PaulRogers@smarttech.com<mailto:PaulRogers@smarttech.com>> wrote: Hello, Im a complete beginner with rdf. Im using the ruby rdf xml libraries ( rdf/rdfxml) How would I create a <rdf:type rdf:resource="http://server/path/Person"/> Entry as a child of rdf:description ? Ie like this sample <rdf:Description rdf:about="http://server/path/temppersonresource"> <j.3:country-name>US</j.3:country-name> <rdf:type rdf:resource="http://server/path/Person"/> </rdf:Description> I have created the rdf:description ok, as well as various statements, but am stumped on the type. Hope that is enough of an explanation. Thanks Paul
Received on Wednesday, 23 November 2011 15:40:36 UTC