(1) How does one retrieve an attribute from an element collected with \xmlindex{node{lpath}{n}?

(2) I don't understand in xml:test \xmlcount{#1}{} giving 1 for an answer,
whereas \xmlcount{#1}{*} and \xmlcount{#1}{/abc} yield 2 as is expected.

(3) With the code below \xmlindex starts looping on an empty lpath, whereas like \xmltext{} react without problem.
Problem is showed by \xmlindex, \xmlfirst, \xmllast, \xmlall, \xmlconcat
Behaviour is not shown by \xmltext{node}{}, \xmlstripped, \xmlstrip
Is this a bug in \xmlindex's underlying lua?

! TeX capacity exceeded, sorry [text input levels=127].
\xmlindex ...ua {lxml.index("#1","#2",\number #3)}                                                
\@@su:xml:test #1->test:\xmlindex {#1}{}{1}
                                           \par 
l.7 }    
\xmlindex ...ua {lxml.index("#1","#2",\number #3)}                                                 
\@@su:xml:test #1->test:\xmlindex {#1}{}{1}
                                           \par 

\startxmlsetups xml:testsetups
\xmlsetsetup{test}{test|abc}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:test
test:\xmlindex{#1}{}{1}\par % << empty lpath fails
\stopxmlsetups

\startxmlsetups xml:abc
abc:\xmlflush{#1}\par
\stopxmlsetups

\starttext
\xmlprocessfile{test}{test.xml}{}
\stoptext

<test>
<abc>ABC-1</abc>
<abc>ABC-2</abc>
</test>



Hans van der Meer