Hello,

thanks Hans, this works perfectly...

Lukas


\startbuffer[demo]
<a>
   <aa number="--">--</aa>
   <aa number="a1">A1</aa>
   <ax number="x1">X1</ab>
   <ab number="b1">B1</ab>
   <aa number="--">--</aa>
   <aa number="a2">A2</aa>
   <ax number="x2">X2</ab>
   <ab number="b2">B2</ab>
   <aa number="--">--</aa>
   <aa number="a3">A3</aa>
   <ax number="x3">X3</ab>
   <ab number="b3">B3</ab>
</a>
\stopbuffer

\startxmlsetups xml:initialize
     \xmlsetsetup{#1}{*}{xml:*}
\stopxmlsetups

\startxmlsetups xml:a
     \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:aa
     \par
     <aa>\xmlflush{#1}</aa>
     \par
\stopxmlsetups

\startxmlsetups xml:ax
     \par
     <ax>\xmlflush{#1}</ax>
     \par
\stopxmlsetups

\startxmlsetups xml:ab
     \par
     <ab>
     \xmlflush{#1}:\space
     aa: \xmlfilter{#1}{reverse-sibling::[tag() ==
'aa']/attribute('number')}\space
     ax: \xmlfilter{#1}{reverse-sibling::[tag() ==
'ax']/attribute('number')}\space
     </ab>
     \par
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\starttext
   \xmlprocessbuffer{main}{demo}{}
\stoptext


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.      | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to