[NTG-context] ConTeXt and DocBook - beginner's questions

Adam Lindsay atl at comp.lancs.ac.uk
Fri Feb 25 15:48:36 CET 2005

phthenry at iglou.com said this at Fri, 25 Feb 2005 09:17:29 -0500:

>As the author of the second page concedes, you need somewhat complicated 
>syntax to directly map XML to ConTeXt. Many of the examples mix XML and 
>non XML. 

You guys are aware of foXet, right? That's ConTeXt's XSL-FO processor module.

As part of writing that module, Hans really streamlined the XML mapping
to TeX commands. As a result, I'm becoming more and more of a fan of a
streamlined XML markup that works in parallel with the ConTeXt idiom.

Hans began that with ContML, a simplified XML structure for basic
documents, mirroring familiar ConTeXt commands (take a look at the x-
contml.tex source). He enabled a lot more with the tricks features in
This Way #9 (the magazine link).

I extended ContML a little more using those foXet tricks with my t-oo-03
module. It was primarily intended to process XSLT-mediated output from a
GUI Outline editor, but the underlying format seems like a good jumping-
off point for other formats as well.


(I didn't put too much effort into making my code readable, but I hope it
gives an idea of how easily XML parameters can be changed into ConTeXt
parameters. I can provide sample documents to interested people to show
the general XML format.)
I plan on documenting the ConTeXt/XML side (rather than the user side) of
it a bit more, but I'm a bit over-committed, at the moment!

>There is a solution that I personally think is simpler, TeXML. In this 
>method, you convert TEI (or other forms of XML) to TeXML, a specialized 
>form of XML. You then run the TeXML processor, which converts this to a 
>plain old ConTeXt document. The advantage of this method is that you are 
>converting from an XML tree to an XML tree, which is always easier than 
>converting from XML to text. 

That's nice. I wasn't aware of that project before. The format looks
superficially similar to Hans's foXet extensions.

>I am working on a document that explains how to convert XML to ConTeXt. 
>The document will explain how to one would do something in FO and then 
>how you would do the same in ConTeXt. It will be a rough document 
>because I am just learning myself, but it will be a start.

Oh, nice... I look forward to seeing that. Sounds like a good My Way
candidate at some point.


>-----Original Message-----
>From: Radoslaw Moszczynski <rm at banita.pl>
>To: ntg-context at ntg.nl
>Date: Fri, 25 Feb 2005 11:34:41 +0100
>Subject: [NTG-context] ConTeXt and DocBook - beginner's questions
>> Hello everyone,
>> I am new to ConTeXt (I've been tempted to try it out because of a
>> message by
>> Sebastian Rahtz, posted on TEI-L). I admit that so far I have been
>> able to get through only the main manual, but I am very curious about
>> some things and therefore I would really appreciate it if you could
>> answer my questions:
>> 1. I am interested in authoring in XML and than typesetting in
>> ConTeXt. Are there any preferences towards using some particular
>> markup language for typesetting in ConTeXt? Is e.g. using DocBook more
>> preferable that using TEI--from the point of view of typesetting in
>> ConTeXt, of course. 
>> 2. Are there any generic tools available (stylesheets etc.) for
>> typesetting
>> DocBook/TEI or does one have to come up with his own stylesheets? I
>> assume that the latter is necessary if one wants to get exactly the
>> layout he wants, but maybe there are some basic stylesheets that one
>> can use as a base for his own ones?
>> 3. Also, I have a more general question -- for some (short) period of
>> time I have been reading both TEI-L and NTG-CONTEXT, all the issues
>> related to typesetting documents marked up in XML are very
>> confusing. Do you know any good manual/tutorial concerned with these
>> issues that I could use a starting point for my studies on the
>> subject? 
>> Thank you in advance-
>> 	-Radek Moszczynski
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context at ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>ntg-context mailing list
>ntg-context at ntg.nl

 Adam T. Lindsay, Computing Dept.     atl at comp.lancs.ac.uk
 Lancaster University, InfoLab21        +44(0)1524/510.514
 Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492

More information about the ntg-context mailing list