| Friday 12th January 2001 1:00MST | → 0 Comments |
I had what I thought was a cool idea today. I was considering the problem of document generation and the eternal “content first, formatting afterwards” stuggle. For some time I’ve been fighting with TeX, and lately LyX, but found it too inflexible and far too complicated to configure my own documentclass for my OU essays, the driving reason behind such nerdiness.
Suddenly it came to me. Why not create my own XML DTD for these essays? Given that all my essays will have to be formatted in exactly the same way I could create tags for the title, paragraphs, quotations and the like (as its an essay I wouldn’t need to worry about section headings). Then formatting, especially of margins and headers/footers (which will always be fixed), will be taken care of through XSL. All I need to do is write an XSL transformation to convert it into postscript, PDF or whatever.
Of course this is still theoretical. My knowledge of XML is minimal and of XSLT even less but I believe it isn’t technically infeasible (not yet anyway - see any later diary entries). I know Python has some XML parsing facilities and there are utilities to handle XSLT. It all sounds very exciting - watch this space!