[Doc-SIG] Output writers and XSLT

Paul Moore gustav@morpheus.demon.co.uk
Wed, 24 Oct 2001 22:31:12 +0100

On Tue, 23 Oct 2001 22:07:14 -0400, David Goodger
<goodger@users.sourceforge.net> wrote:

>>    Can it be avoided? In "plain" text, I *really* prefer the look
>>    of lists when they are indented.
>A transform could be written that looks for a block quote containing
>only a list, and extracts the list from within the block quote. The
>spec could be changed to specify that this will happen. But what if we
>*want* a list inside a block quote? How else would we write it?

You just said "transform". That made me think - we can *already* get XML
out of reStructuredText. Given that, can we not use XSLT to generate
whatever output formats we need? (You can tell I don't know much about
XML, but I've read the brochures, can't you :-)

Seriously, what little I know of XSLT implies that it might be possible
to do this. I know someone (can't recall the reference just now) posted
that they have reST->HTML code which goes via XML and XSLT. Is that a
viable general approach? Does Python include XSLT processing modules? In
the PyXML package, maybe?

I dunno. Part of me feels that this is the way XML always works - lots
of concepts which help people to think about problems, and lots of
technology which never actually gets used to do the job, but which
provides ideas to allow people to re-implement bits of it as needed.

Cynically y'rs