From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110805 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Duncan Hothersall Newsgroups: gmane.comp.tex.context Subject: Re: arbitrary context commands in xml file Date: Mon, 8 Mar 2021 13:05:50 +0000 Message-ID: References: <4589b684d40e4e4c9ce7634187c310f4@ub.unibe.ch> <425d284dcd0e414aaec4a8ef72d928a2@ub.unibe.ch> <9c7c4e6468f0457b8dddcfc491971e9c@ub.unibe.ch> <98438acc-41a9-7159-fc83-fdae27cf473c@xs4all.nl> <1331e059-d397-ae66-b556-33554d28bd45@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8288347460771828634==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17744"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 08 14:06:38 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJFao-0004T2-0G for gctc-ntg-context-518@m.gmane-mx.org; Mon, 08 Mar 2021 14:06:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9B46E2814A9; Mon, 8 Mar 2021 14:06:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IYZ1-w_8PFtW; Mon, 8 Mar 2021 14:06:11 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 56B7B2814AA; Mon, 8 Mar 2021 14:06:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B2EE92814A7 for ; Mon, 8 Mar 2021 14:06:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 66zZjkDTWVCA for ; Mon, 8 Mar 2021 14:06:08 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.181; helo=mail-lj1-f181.google.com; envelope-from=dh@capdm.com; receiver= Original-Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 122C628147D for ; Mon, 8 Mar 2021 14:06:07 +0100 (CET) Original-Received: by mail-lj1-f181.google.com with SMTP id p15so15930698ljc.13 for ; Mon, 08 Mar 2021 05:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=capdm.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zTHlKlH0RC5QoJxUW/RrjqkF2+jOJMBd7QJdZzzPg7o=; b=S6oUy811AvXZPIqMXZHATW66w1WxZJDRaBwfnLhBIBKd/G3qVdYRTg/tS1QDLY9m/w 2JlCGLQsAqWEyk2WjnMzIFL7Ezd7VZglOYSlGYoX0VY5gFxdkGxw5sfwSjQT15LLcOXI pSdq1D/wOGdcdCCWaGuuwntO/O0DiNY871XMU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zTHlKlH0RC5QoJxUW/RrjqkF2+jOJMBd7QJdZzzPg7o=; b=aRSk+QdSsVaZWDM1FITjDnZzT8g+/+F9Uh6G9+j6AKgQJY5lUCobuquRMbSegguoiS kRxGTIO4RWWpyccFlFvOE1kZ5nEEmH6YSlml8BzVo0lLJj+NbA16cNKv5GN1FyqLmtww wpl2qwno4DpGmEQceJBDEwIZ0PJHm7o35hlxfm124mtqlGkXPhM2DyR0AHAYYhPimnZq WIPlIN8WGaTMsGuzwCDMjxS8kn0aCehfboDmB7zA/xLyGFkVuW8pIE0bQZjszNqcs3+m E8BopwFkf98gV3A85ap5ate2yKwoAtlOJXX6EjlJqlvXW2F0mCt9LOHgNz6xJEpWw9vn ZCjg== X-Gm-Message-State: AOAM531OaDnKE0KsCp+AxfejmIqVRvAF61S89wKJmKjOdAZ68TJbfUbY Z+4kTCs7mCWmN7e8p08EefEpxf3qHL7bxNEoceX44A== X-Google-Smtp-Source: ABdhPJz2/HAhz4OH76tYB9YqvshotZtfK+LcVsoO0Cj/fIqXji7XFifRErYA7dqXNqQmKAiOsGQc+1eIvTcTaCRzTNY= X-Received: by 2002:a2e:9e18:: with SMTP id e24mr10638321ljk.101.1615208767282; Mon, 08 Mar 2021 05:06:07 -0800 (PST) In-Reply-To: <1331e059-d397-ae66-b556-33554d28bd45@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:110805 Archived-At: --===============8288347460771828634== Content-Type: multipart/alternative; boundary="000000000000cff0cf05bd061826" --000000000000cff0cf05bd061826 Content-Type: text/plain; charset="UTF-8" On Mon, 8 Mar 2021 at 12:46, Hans Hagen wrote: > > I'd like to second Denis' request for support for XML processing > > instructions to execute ConTeXt code, rather than elements which can > > cause big problems if one is working to a fixed schema. It would be a > > boon to be able to drop in in an XML source. > one of the things that can already be done ... > > \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} > > \xmlinstalldirective{tex}{xmltexdirective} > > > > > (the #2 is something without spaces btu one can work around that) > Aha. Useful, thanks! --000000000000cff0cf05bd061826 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, 8 Mar 2021 at 12:46, Hans Hag= en <j.hagen@xs4all.nl> wrote= :
> I'd l= ike to second Denis' request for support for XML processing
> instructions to execute ConTeXt code, rather than elements which can <= br> > cause big problems if one is working to a fixed schema. It would be a =
> boon to be able to drop in <?context \whatever{fdfd}?> in an XML= source.
one of the things that can already be done ...

\def\xmltexdirective#1#2{\doif{#1}{command}{#2}}

\xmlinstalldirective{tex}{xmltexdirective}

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<?context-directive tex command \infra= med{xxx} ?>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<?context-directive tex command \page = ?>

(the #2 is something without spaces btu one can work around that)

Aha. Useful, thanks!
--000000000000cff0cf05bd061826-- --===============8288347460771828634== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8288347460771828634==--