|
From: David G. <go...@us...> - 2002-08-30 22:47:34
|
Dethe Elza wrote:
> While working my way towards understanding the internals of
> reStructured Text well enough to write directives, I've had some
> questions about the implementation decisions.
Always welcome.
> Disclaimer: Nothing in this is an attack or criticism of anyone, I'm
> just curious and working to understand it myself.
Understood.
> reStructuredText appears to create it's own XML DOM-like internal
> structures and tools, and can be serialized as XML or XHTML. Given
> all that, why not use one of the many XML DOMs that already exist
> for Python (at least one is distributed with the main Python distro)
> rather than recreating the wheel? This would simplify the code base
> and allow reST to work with other tools such as XPath and XSLT.
Yes and no. It would simplify the code in some ways, but make it much
more complicated in others. This question has been asked before; see
this 2001-10-24 Doc-SIG post for my reply (Docutils was called DPS back
then):
http://mail.python.org/pipermail/doc-sig/2001-October/002331.html
Of course, there's been a lot of progress since then, including the
addition of Visitor-pattern classes to nodes.py (briefly alluded to in
the above post).
BTW, I've been working on a reference for the DTD. Both the reference
and the DTD should be useful to you:
http://docutils.sf.net/spec/doctree.html
http://docutils.sf.net/spec/docutils.dtd
--
David Goodger <go...@us...> Open-source projects:
- Python Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)
- The Go Tools Project: http://gotools.sourceforge.net/
|