Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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']
                \completecontents
\stopxmlsetups

but it's not working.

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

share|improve this question

1 Answer 1

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:

\xmlsetsetup{}{xml:divGen[@type='toc']}{xml:divgen:toc}
\startxmlsetups xml:divgen:toc
     \completecontents
\stopxmlsetups
share|improve this answer

Your Answer

 
discard

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.