ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xml, language, btx problems
@ 2018-06-17 17:52 Thomas A. Schmitz
  2018-06-17 19:37 ` Pablo Rodriguez
  2018-06-17 22:58 ` Alan Braslau
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas A. Schmitz @ 2018-06-17 17:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-18 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-17 17:52 xml, language, btx problems Thomas A. Schmitz
2018-06-17 19:37 ` Pablo Rodriguez
2018-06-17 20:10   ` Thomas A. Schmitz
2018-06-17 20:36     ` Wolfgang Schuster
2018-06-18 16:36     ` Pablo Rodriguez
2018-06-17 22:58 ` Alan Braslau
2018-06-18 10:19   ` Thomas A. Schmitz
2018-06-18 10:53     ` Hans Hagen
2018-06-18 11:07       ` Thomas A. Schmitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).