[XML-SIG] DTD design: include categorization, or use RDF?

Andrew Kuchling akuchlin@mems-exchange.org
Tue, 27 Feb 2001 11:23:42 -0500


I'm revisiting and extending my quotation DTD this week, hence my
suddenly asking a bunch of questions here.  I'm wondering about
categorization.  A common application would be to group quotations
into categories.  I can add a category element or attribute, but then
someone comes along who wants to sort quotes by newsgroup, or by date,
or by some other wacky thing.  I can invent a general syntax, but
that's just reinventing RDF badly, so RDF seems like the obvious
course.

Question: is it better to embed RDF annotations in a single file, or
to encourage maintaining an RDF index in a separate file, as a gloss
on the original file.  In other words, I'm wondering about:

<quotation id="foo">
  <rdf:Description about="...#foo">
    <someschema:Author>Author's Name</someschema:Author>
  </rdf:Description>
   ...
</quotation>

   versus:

<quotation id="foo">
   ...
</quotation>

  and in some other file have:

  <rdf:Description about="...#foo">
    <someschema:Author>Author's Name</someschema:Author>
  </rdf:Description>

The first form has only one file, but I'm wondering if it will
complicate the task of modifying the file programmatically too much.
(I'd really like to write a Tkinter program for maintaining a
collection, which means that the data will have to be round-tripped
from XML to Python objects and back again.  Hopefully people here will
have application experience doing this sort of thing.)

--amk