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
test001.pdf
Description: Adobe PDF document
___________________________________________________________________________________ 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 ___________________________________________________________________________________
