I do not understand the behaviour of \xmlindex in the code below. The
goal is to extract the contents of node <abc>-number 1. The strange
things is that \xmltext returns the contents of both the <abc> nodes,
but \xmlindex returns nothing.
The returns of the \writestatus calls:
>>1>> ab-2 : ::
>>2>> ab-2 : :ABC-1ABC-2:
\startxmlsetups xml:testsetups
\xmlsetsetup{test}{test|ab|abc}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:test
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:ab
\writestatus{>>1>> \xmltag{#1}-\xmlcount{#1}{/abc}}{:\xmlindex{#1}{/
abc}{1}:}
\writestatus{>>2>> \xmltag{#1}-\xmlcount{#1}{/abc}}{:\xmltext{#1}{/
abc}:}
\stopxmlsetups
\starttext
\xmlprocessfile{test}{test.xml}{}
\stoptext
Input is:
<test>
<ab>
<abc>ABC-1</abc>
<abc>ABC-2</abc>
</ab>
</test>
Hans van der Meer
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________