From: Dethe E. <de...@ma...> - 2002-09-06 17:14:47
|
Hi all, Has anyone seen or written a writer which produces reST from the document tree? I've had to pause in the include/raw/directive work while I convert some legacy documents into reST for maintenance. Some are arbitrary HTML and at least one is DocBook. It occurs to me that the simplest thing for handling XML formats would be to convert them into reST's XML format (canonicalization?) and then into reST for editing. Round tripping is a problem, especially for attributes and styles, but in some ways that's a Good Thing[tm] since it will enforce a certain style to the resulting documents. I realize that directives, in particular, will not round trip well, since they are not represented in the document tree. Are there any other Gotchas that folks can think of offhand? Does anyone else think there's value in round-tripping documents? Would it be worth adding a marker to the document tree (either an element or an attribute) to the effect that 'this is generated content from directive xyz with options foo, bar="ni", baz="blue, no, green"'. Does anyone have an alternative solution? --Dethe |