Is there a repository of styles for typesetting XML, specifically TEI XML markup, using ConTeXt?

I've been googling now for a week or so trying to dig up as much information as possible about typesetting XML using ConTeXt, and I've read several old (from 2005) articles about building such a repository. I can't seem to find anything concrete, though.

Can anyone point me in the right direction?

2 Answers 2


The problem with this question is that you are essentially asking for an XSLT transformation straight to your desired layout. There cannot be a clean solution to that, as the 'your desired layout' part is specific to you. TEI only defines structure, not visual appearance, so the appearance part has to come from somewhere else.

If you want to make full use of ConTeXt as a typesetting engine, then you will have to write your own module. But, on the other hand, if you are OK in loosing some of the power of ConTeXt, you could search for an external XSLT transformation to convert the TEI to XSL-FO. ConTeXt does come with built-in support modules for XML Formatting Objects, no need to install anything special (although it only works under pdftex at the moment, nobody has updated the subsystem for luatex yet).

See this wiki page for a pointer into the XML support in ConTeXt.

  • Thanks Taco! I am using TEI-L, and I don't even really use that many elements from TEI-L. I am trying to map TEI tags onto context commands using \defineXMLenvironment and the like. Since we only use a handful of elements, I figured this was the easiest way... or can you point me to an easier way? I am still generally new to ConTeXt, so forgive my newbish-ness, please.
    – Mica
    Sep 21, 2010 at 16:41

AFAIK, such a XML mapping does not exist. The dblatex project (which, in spite of its name, also supports context) provides some mappings for DocBook. However, even that has not been updated in almost a year, during which time ConTeXt has added a completely new and much more efficient way of typesetting XML. See this My Way for an environment for XHTML. You may also want to ask at the context mailing list to check if someone has already written such a converter for TEI.

EDIT: There is a wiki page on TEI now

  • That's a good link, Aditya, and I hadn't stumbled across it yet, thanks!
    – Mica
    Sep 21, 2010 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.