
Dear list, I have the following way to get text from the current XML node: \xmltext{#1}{.} I would like to have the same results matching the same element. I thought the command should read, but I don‘t get the right results: \xmltext{#1}{../*[match()==lxml.match("#1")]} Minimal sample here: \startbuffer[demo] <root> <div id="one"> <p>first</p> <p>second</p> <p>third</p> </div> <div id="two"> <p>First</p> <p>Second</p> <p>Third</p> </div> </root> \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1} {root|div|p} {xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:root \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:div \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlmatch{#1}: \xmltext{#1}{.}\\ \xmltext{#1}{../*[match()==lxml.match("#1")]} \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext How could I match only the current n-th child? Many thanks for your help, Pablo