On 11/22/2023 2:30 AM, Benjamin Buchmuller wrote:
Hi list,
I came across this old thread as I was trying to use \xmlpos{#1} to
"dynamically" create references such as \item[mystep:\xmlpos{#1}] to be
referenced when other elements of this node are parsed at a later point.
In fact, it seems that \xmlpos{#1} returns duplicate values. This might indeed
be the intended meaning of \xmlpos{#1} as it seems related to the XML query
foo/bar/index() which only looks up the position in the parent node. (I noticed
that if I run this repeatedly, I get somehow different values from times to
times. I can't say why.)
Anyways, I was wondering if there is a TeX command to access the absolute
position of an element in the tree? Similar to foo/bar[rootposition()] (or
foo/bar[order()]? – Can't make sense of the entry in the XML manual.)
normally elements are unique, and within n xml instance #1 itself is
rather unique (but the same even over runs i.e. when it goes via the tuc
file)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________