- From: Joshua Tauberer <tauberer@for.net>
- Date: Sat, 18 Jun 2005 08:00:43 -0400
- To: Petko Petkov <p.d.petkov@gmail.com>
- CC: semantic-web@w3.org
Petko Petkov wrote:
> However, searching for all the titles of http://www.w3.org with the
> accompanied descriptions is not possible, since we don't know which
> description belongs to which title.
Hi Petko. This is by design. The fact that some nodes are grouped
together in an item node must be ignored -- it's just an artifact of the
XML format. Your triples-style notation of the same information was the
right way to view the information, as just a list of statements.
But when you added writtenBy, you fell into a little trap:
> <item rdf:about="http://www.w3.org">
> <title>Some Title</title>
> <link>http://www.w3.org</link>
> <description>Description Here</description>
> <ns:writtenBy>Bob</ns: writtenBy >
> </item>
That says that <http://www.w3.org> was written by "Bob". What I think
you were trying to say instead was that the title and description were
written by Bob. So already you need to structure the information
differently. Note that it also says that <http://www.w3.org> is itself
an 'item'. The confusion, I think, is that you want to express
information about the item that Bob wrote, which happens to be about
<http://www.w3.org> -- that is, there are two entities to talk about here.
So to begin with, you need the post and the authorship info:
<item rdf:about="http://bobspage.com/post1234">
<ns:writtenBy>Bob</ns: writtenBy>
</item>
Then you need to include in there what Bob's post *claimed* is the title
and description of <http://www.w3.org>. I'm not sure if there's any
consensus on how to express that in RDF, so I'm hoping some others throw
in some suggestions. Here's a very low-tech way of doing it (and I'm
not saying it's a good idea, but it gets the idea across, I think):
<item rdf:about="http://bobspage.com/post1234">
<ns:writtenBy>Bob</ns: writtenBy>
<ex:asserts>
<rdf:Description rdf:about="http://www.w3.org">
<title>Some Title</title>
<description>Description Here</description>
</rdf:Description>
</ex:asserts>
</item>
What I've done is included a second RDF document as a literal value with
the original document -- so I've escaped all of the <'s and >'s, and
just threw it in there. This means that the outer RDF document doesn't
make any claims about the title and description of <http://www.w3.org>,
but it says that if you want to know what is asserted by Bob in his post
<http://bobspage.com/post1234>, then you can parse the inner RDF and see
what he has to say. And, you could have this repeated for any number of
people (Bob, Joe, etc.) and their posts, and 1) they wouldn't clash and
2) you've preserved the right information about who wrote what and
asserted what.
Not that this is any good for queries, however.
Other things to look into are reification in RDF/XML; named graphs (I
think) in Notation3 format; and 'contexts' in Redland [1].
[1] http://librdf.org/notes/contexts.html
--
- Joshua Tauberer
http://taubz.for.net
** Nothing Unreal Exists **
Received on Saturday, 18 June 2005 12:01:04 UTC