|
From: Tony J I. (Tibs) <to...@ls...> - 2002-05-31 09:28:58
|
David Goodger wrote: > I'd just be wary of converting to standard Docutils > nodes too early, because then you're locking in one style. > This comes back to a discussion we had some time ago, about > "stylist" components... and went on to explain how this could be used in a Pysource context to allow the "initial" docutils nodes tree to be more closely related to the Python data, so that it could be transformed into differing *specific* docutils node trees. Sort of an "aha!" moment for me, in fact. (and, of course, my summary is a lot less cogent than what he said) Thanks, David - that makes a lot of sense to me. I think that what you describe is indeed the correct way to go - something like (excuse the imprecision):: Python source --> ||reader|| --> internal representation internal rep --> ||transform|| --> abstract docutils tree abstract tree --> ||stylists|| --> specific docutils tree where the "abstract" tree contains Python specific nodes. I'll look more at all of this when I get back from holiday - some interesting restructuring of pysource needs to be done (and some learning of what docutils is now capable of), but you're clearly right that it will lead to a better tool. > Enjoy the sun! Thanks Tibs -- Tony J Ibbs (Tibs) http://www.tibsnjoan.co.uk/ "I'm a little monster, short and stout Here's my horns and here's my snout When you come a calling, hear me shout I will ROAR and chase you out" My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.) |