Hi,

I have a conceptual problem integrating btx into my xml workflow. There are too many files involved, so no minimal example, but a minimal description. Root of my xml document:

<document language="en">
...
</document>

I have two files with btx definitions:

publ-imp-deutsch.mkvi

publ-imp-english.mkvi

Loading one of these two should depend on the main language:

\doifelse {\currentlanguage} {en}
        {\usebtxdefinitions [english]}
        {\usebtxdefinitions [deutsch]}

My problem: the main language is set within the processing rules for the root of my xml document:

\startxmlsetups xml:document
   \mainlanguage[\xmlatt{#1}{language}]
\stopxmlsetups

However, this implies a \starttext. And the btxdefinitions need to be loaded before \starttext, or so it seems. Which means: the processing rules for \usebtxdefinitions need to be set outside of the xml setups. But at this moment, the main language is not set yet, and the \doifelse fails. Any hints how to get out of this conundrum?

Thanks, and all best

Thomas
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to