On Mon, Aug 20, 2007 at 12:29:08PM -0700, Meg McRoberts wrote: > I am rapidly getting in over my head here, but one thought is that, > since Eric Raymond's groff-to-xml converter is open source, it wouldn't > be too tough to make a version that then converts XML back to groff. > You might be able to modify the source to eliminate any coding that is > not converting well so that it's a clean conversion in both directions.
This is non-trivial. I've tried to do it using XSLT[0], and produced a really nasty set of output that only a computer could love. I'm also trying to do it with a program that I've written called thwack[1], which will convert between formats such as troff and XSL-FO. I have some questions about groff compatibility which I might ask later. The only difference which might make this task easier is that doclifter (ESR's program) and the hypothetical XML-to-groff converter use things that are more semantically meaningful; for example, paragraphs instead of indentations. No need to CC, thanks. I'm subscribed. bmc [0] http://crustytoothpaste.ath.cx/cgi-bin/gitweb.cgi?p=bmc/repo/xsl-sheets.git;a=blob;f=fo/fo2troff.xsl;h=c6ef9b0002bd9e551ca339a0dd88d24618eb822f;hb=HEAD [1] http://crustytoothpaste.ath.cx/~bmc/code/projects#thwack -- brian m. carlson / brian with sandals: Houston, Texas, US +1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187