On Mon, 21 Mar 2011, R. Ermers wrote:
Thanks, Aditya, The first problem is adequately solved by adding []. I'll prepare an example for the second problem.
A related problem is referring to sections and other blocks.
<section id="sec:cows"><title>Cows</title> <para>cows cows cows. As I told in <xref linkend="sec:cows"/></para></section>
The title is mapped as follows (lpath): \xmlsetsetup{#1}{section/title}{xml:section/title}
\startxmlsetups xml:section:title \section{\xmlflush{#1}} \stopxmlsetups
The section is not mapped: \startxmlsetups xml:section \xmlflush{#1} \stopxmlsetups
Adding [\xmlatt{#1}{id}] to xml:section:title does not work of course. Using [\xmlatt{#1}{id}] with xml:section puts the id before the \section command. I think one of the other commands has to be used in such a way that the id is flushed forward after the \section command.
Map section to include both id and title. (Untested) \startxmlsetups xml:section \section[\xmlatt{#1}{id}]{\xmlfirst{#1}{/title}} % or slightly better % \section[\xmlattdef{#1}{id}{+}]{\xmlfirst{#1}{/title}} % Then flush para separately % \xmlall{#1}{/para} % or % \xmlconcat {#1} {/para} {\par} % or better, add a contents tag around the contents % <section> <title> ... </title> % <contents> ... </contents> % </section> % and then use % \xmlfirst{#1}{/contents} \stopxmlsetups Aditya