From: Martin Blais <blais@fu...> - 2006-07-13 05:52:12
Just an idea I had tonight after our discussion of microformats:
Nabu has these "extractor" objects that can guess the appearance of
addresses, books, bookmarks, etc. from the document tree. We could
consider making a set of these extractors more generic, and include
them with docutils, to be processed optionally (e.g. --semantic option
or something). The docutils implementation would simply
1. place appropriate information around the discovered informations to
allow the HTML4CSS1 writer to render the appropriate microformats in
HTML. Make the HTML4CSS1 writer render microformats optionally.
2. call an abstract method whenever an object is encountered, so that
derived classes could do something specific for each of those. Nabu's
specific extractors implementation would do that, derive from the
docutils classes and store the objects into the Nabu database tables.
Of course, this would necessitate never-ending debates about the best
approved single syntax for each of the object types, and I won't get
involved in that because I just don't have the time, but this is
definitely an area that could benefit everybody, that is, sanctioned
ways to enter some kinds of data within a docutils document, and code
included to beautify and extract those informations, and mark them up
with microformats. I suppose you could then say that "docutils
automatically implements microformats", if you know how to specify the
requested data (and I'm not thinking about markup, but rather just
conventions, like Nabu does it).
Just an idea.