I am using TEI Lite, and trying to typeset with ConTeXt. TEI Lite defines <divGen type='toc' /> to signal the Table of Contents, which in ConTeXt is \completecontents

Now I am trying this:

\startxmlsetups xml:divGen[@type='toc']

but it's not working.

How do I map this self-closing tag to the ConTeXt Table of Contents command?

1 Answer 1


Do not put the XML path selector in the setup name: the \startxmlsetups ... \stopxmlsetups is just defining a command, not actually selecting items from the XML file.

It is \xmlsetsetup that does the XML object selection.

I am not a heavy user of ConTeXt's xml support myself, but I think you need something like this:

\startxmlsetups xml:divgen:toc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .