[NTG-context] \xmlpos and \xmldepth misbehave? (again)
Pablo Rodriguez
oinos at gmx.es
Fri May 6 18:20:45 CEST 2022
Dear list,
I have the folloing sample:
\startbuffer[text]
<doc>first level
<s>second level
<ss>third level</ss>
<ss>third level</ss>
</s>
<s>second level
<ss>third level</ss>
<ss>third level</ss>
</s>
<s>second level
<ss>third level</ss>
<ss>third level</ss>
</s>
</doc>
\stopbuffer
\startxmlsetups xml:text
\xmlsetsetup{#1}{doc|s|ss}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:text}
\startxmlsetups xml:doc
\chapter{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
\stopxmlsetups
\startxmlsetups xml:s
\section{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
\stopxmlsetups
\startxmlsetups xml:ss
\subsection{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
\stopxmlsetups
\setuphead[chapter,section,subsection][before=,after=,]
\setuppapersize[A7]
\setuplayout[width=middle, header=0cm]
\starttext
\xmlprocessbuffer{main}{text}{}
\stoptext
All \xmldepth values are +1 that I think they should be (starting from 2
[instead of 1] up to 4 [instead of 3]).
\xmlpos values seem to count 2, 4, 6… (instead of 1, 2, 3…).
This is with current latest from 2022.05.02 16:19.
Sorry, but could anyone confirm whether I’m missing something or whether
this issue is a bug?
Many thanks for your help,
Pablo
More information about the ntg-context
mailing list