|
From: Aahz <aa...@py...> - 2002-09-21 14:26:44
|
On Fri, Sep 20, 2002, David Goodger wrote: > Richard Jones wrote: >> >> See PEP 258 for a description of the processing framework itself. >> That works along the basic lines of: >> >> 1. read from a source document, parsing the structure out of it and >> creating a DOM tree >> (http://docutils.sourceforge.net/spec/doctree.html) >> 2. optionally do some transforms on the tree (NOOP for current ReST >> reader) > > Not precisely true. In fact, there are several transforms that are > done before the doc tree is handed off to the writer: doc title, > docinfo, references, footnotes, substitutions, etc. > > However, please note that the present method of applying transforms is > due for an overhaul. I'm thinking of moving the responsibility for > running the transforms away from the Reader & Writer and into a new > intermediate class, perhaps just a super-Transform. Readers, Writers, > and other objects will register the transforms they want applied, into > a list sorted by priority. The transforms will be applied to the doc > tree in order. Transforms may insert further transforms into the list > dynamically (which would be re-sorted). Transforms that are now > associated with the Reader will simply have higher ("to be run > earlier") priority. !!! Ah, now the lightbulb strikes about why I was having such difficulty understanding things earlier -- I kept looking for the transformer and couldn't find it. Is there any place all this stuff is documented like this? (Now I understand how better how my index entries need to be handled.) -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ Project Vote Smart: http://www.vote-smart.org/ |