From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: xmlpos values doubled
Date: Wed, 22 Nov 2023 10:21:15 +0100 [thread overview]
Message-ID: <1794bbcf-e441-4e50-aca4-ad138f14dbc3@xs4all.nl> (raw)
In-Reply-To: <8CFD1B9D-27E6-4D80-80C8-B9C6DBDEA954@gmail.com>
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
___________________________________________________________________________________
prev parent reply other threads:[~2023-11-22 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 1:30 Benjamin Buchmuller
2023-11-22 9:21 ` Hans Hagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1794bbcf-e441-4e50-aca4-ad138f14dbc3@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).