UK TeX FAQ -- question label readML

### Using TeX to read SGML or XML directly

ConTeXt (mark IV) can process some *ML, to produce typeset output directly. Details of what can (and can not) be done, are discussed in The ConTeXt WIKI. ConTeXt is probably the system of choice for (La)TeX users who also need to work in XML (and friends). (Note that ConTeXt mark IV requires LuaTeX, and should therefore be regarded as experimental, though many people do use it successfully).

Older systems also manage, using no more than (La)TeX macro programming, to process XML and the like. David Carlisle’s xmltex is the prime example; it offers a solution for typesetting XML files, and is still in active (though not very widespread) use.

One use of a TeX that can typeset XML files is as a backend processor for XSL formatting objects, serialized as XML. Sebastian Rahtz’s PassiveTeX uses xmltex to achieve this end.

However, modern usage would proceed via XSL or XSLT2 to produce a formattable version.

`Context`
  macros/context/current (or browse the directory); catalogue entry
`xmltex`
  macros/xmltex/base (or browse the directory); catalogue entry
`passivetex`
  macros/xmltex/contrib/passivetex (or browse the directory); catalogue entry

This answer last edited: 2013-04-11

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=readML