TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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