El sáb., 21 de febrero de 2026 4:38 a. m., Denis Maier via ntg-context <
[email protected]> escribió:

> Can't test right now, but you could test for text nodes with the parent
> (not ancestor) attribution. Or you search for text nodes under attribution
> but exclude those with a parent citetitle.
> Or you could use xmlfilter: send citetitle to a setup that does nothing ...
>

Using a dummy setup for citetitle works. Thank you very much!

Jairo A. del Rio <[email protected]> hat am 21.02.2026 01:02 CET
> geschrieben:
>
>
> Hi. I'm trying to process XML files in ConTeXt and I'm struggling with
> Docbook quotes and verses. I want to print attributions at the end of each
> text, but I don't know how to extract text not inside a tag. MWE and output
> attached:
>
> \startbuffer[xmltest]
> <blockquote>
>   <attribution>
>   Bertolt Brecht
>   <citetitle>Questions From a Worker Who Reads</citetitle>
>   </attribution>
>   <simpara>
>   Every page a victory.
>   Who cooked the feast for the victors?
>
>   Every 10 years a great man.
>   Who paid the bill?
>   </simpara>
> </blockquote>
> \stopbuffer
>
> \startxmlsetups xml:blockquote
>   \startblockquote
>   \xmlall{#1}{/!attribution}
>   \blank
>   \xmldoiftext{#1}{/attribution}{
>     \xmlall{#1}{/attribution/!citetitle}{
>       % Braces and parentheses just for testing
>       [\xmltext{#1}{/attribution/!citetitle}] % It must be "Bertolt
> Brecht"
>     }
>     \xmldoiftext{#1}{/attribution/citetitle}{
>       (\xmltext{#1}{/attribution/citetitle})
>     }
>   }
>   \stopblockquote
> \stopxmlsetups
>
> \startxmlsetups xml:mysetups
>   \xmlsetsetup{#1}{blockquote}{xml:*}
> \stopxmlsetups
>
> \xmlregistersetup{xml:mysetups}
>
> \starttext
>   \xmlprocessbuffer{main}{xmltest}{}
> \stoptext
>
> Best regards,
> Jairo
> ___________________________________________________________________________________
>
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : [email protected] /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________can
>
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : [email protected] /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to