Dear list, I have the following sample: \startbuffer[test] <document> <div id="section-i17a" class="section level1 hidden"> <p id="par-i17"><a href="par-i17">1</a></p> </div> <div id="section-i18a" class="section level1 hidden"> <p id="par-i18"><a href="par-i17">2</a></p> </div> <div id="section-i19a" class="section level1 hidden"> <p id="par-i19"><a href="par-i17">3</a></p> </div> </document> \stopbuffer \startxmlsetups xml:testsetups \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{document|div|p|a}{xml:flushing} \xmlsetsetup{#1}{a}{xml:*} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:flushing \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:a \xmlattribute{#1}{ancestor::div[@class='section level1 hidden']}{id}\\ \xmlrefatt{#1}{href}:\ \doifelse {\xmlrefatt{#1}{href}} {\xmlattribute{#1}{ancestor::div[@class='section level1 hidden']}{id}} {yes}{no}\blank \stopxmlsetups \starttext \xmlprocessbuffer{main}{test}{} \stoptext I need to check whether the link is inside the same div or not. I know how to obtain the destination identifier (\xmlreffatt{#1}{href} and I know how to obtain the identifier of the contaning div (\xmlattribute{#1}{ancestor::div[@class='section level1 hidden']}{id}}). But I don’t know how to ge the identifier of the div which contains the destination idetifier. How could I get that? Many thanks for your help, Pablo -- http://www.ousia.tk
participants (1)
-
Pablo Rodriguez