On Sun, Dec 08, 2002 at 08:54:29PM +0100, Gour wrote:
I'd like something like:
dic* DocBook -------> ConTeXt ----> output
*dic = DocBookInConTeXt module
It is like you say at the top, but the context document is built on the fly, i.e., it only exists in memory, and it never exists in its entirety. It may be better to think of the XML file as the input file for context. This is possible because the < is an active character that invokes macro processing. Context's XML layer enables the conversion author to write a mapping from XML tag to context commands: when that tag is read, the corresponding context commands are invoked. As Hans replies in a later email in this thread, the best strategy is to map to existing context environments. I have done this as much as possible. Then you can customize that environment after reading the docbook module but before the XML file is input. For example, docbook tables are typeset using context's 'natural table' environment. So, if you would set \setupTABLE[background=color,backgroundcolor=red], you would get that (according to theory, I still have to test that). I test the docbook module with a tex file containing the following lines after inputing the docbook module: \setupinteraction[state=start,color=blue] \setupindenting[medium] \setupheadertexts[section][pagenumber] \setupheader[leftwidth=.7\hsize,style=slanted] \setuppagenumbering[location=] \setupitemize[each][packed][before=,after=,indentnext=no] The table element also shows that you cannot arbitrarily customize the output. The docbook module reads the colspec and col- and rowsep settings from the table in the XML file, and applies the appropriate settings, thus overwriting your settings. In this case that is appropriate, because the XML file has priority over your settings. I will try to document the customization options for the docbook module somewhere after Christmas.
which is similar to XSL toolchain:
xslt fop DocBook ------> XSL-FO -----> output
with the exception that ConTeXt format is more user-friendly & capable than xsl-fo format, and produces best quality output.
I am not sure that this is a good parallel. FO's are not customizable; the XSLT stylesheets may be. And context could serve as the FO processor, by the same mechanism of a mapping of FO's to context, if someone would write it. That is what PassiveTeX does for latex.
With time, one can also expect that DocBookInConText module will get more users' input and be able to map more DocBook elements.
That would be welcome. Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl