Thanks again Max.

> Untested and fairly ugly, but I would expect for something like the
> following to work:
>
>     \startxmlsetups xml:div
>         % Capture attributes as variables.
>         \setvariable{div}{\xmlatt{#1}{class}}{#1}
>         \doifelsesamestring{\xmlatt{#1}{class}}{header}{
>             \xmltobuffer{#1}{.}{headercontents}
>             \getbuffer[header]
>         }{
>             \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop{}
>         }
>     \stopxmlsetups
>
>
The XML setups support many themes. Adding a conditional inside of the XML
setups for a specific theme would blur architectural lines. Presently, the
XML setups have no knowledge of any theme:

https://gitlab.com/DaveJarvis/keenwrite-themes
https://gitlab.com/DaveJarvis/keenwrite-themes/-/tree/main/xhtml

A "header" can mean different things to different themes (e.g., a baseball
"header"). Overriding the xml:div inside of a theme would also blur the
architecture; no theme currently knows about XML. That is: Markdown -> XML
-> ConTeXt + Theme -> PDF.

Your insights are much appreciated!
___________________________________________________________________________________
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