From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82382 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: inclusion of tex code in xml context Date: Tue, 07 May 2013 19:41:53 +0200 Message-ID: <51893CE1.8080101@wxs.nl> References: <6F0C616B-48F5-4B7B-AB8F-F977243ED26C@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367948522 10189 80.91.229.3 (7 May 2013 17:42:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 May 2013 17:42:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue May 07 19:42:03 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UZlto-0007Kq-No for gctc-ntg-context-518@m.gmane.org; Tue, 07 May 2013 19:42:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55343101EA; Tue, 7 May 2013 19:42:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lSyHyTRdUfIf; Tue, 7 May 2013 19:41:58 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D1091101E6; Tue, 7 May 2013 19:41:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C6906101E6 for ; Tue, 7 May 2013 19:41:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aJTzuTtfLagC for ; Tue, 7 May 2013 19:41:56 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 83914101E0 for ; Tue, 7 May 2013 19:41:56 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r47Hfti1023063 for ; Tue, 7 May 2013 19:41:56 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 2462-1713362 for ; Tue, 07 May 2013 19:41:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <6F0C616B-48F5-4B7B-AB8F-F977243ED26C@uva.nl> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WJx5FTVI - 9de1d8ad301f - 20130507 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82382 Archived-At: On 5/7/2013 2:18 PM, Meer, H. van der wrote: > I have some difficulties understanding the intake of ConTeXt-code in an XML processing environment. > The setup is as follows. > > \startbuffer[buffername] > \startuseMPgraphic{graphicname}{} > ... > \stopuseMPgraphic > \stopbuffer > > Processing inside xmlsetup: > > \startxmlsetups xmlcommon:mpgraphic > Here I want to read the buffer and then call it up with > \useMPgraphic{graphicname}{} > \stopxmlsetups > > This works if I pack the graphic definition in the buffer inside a node and call > \xmlprocessbuffer{tex}{\xmlatt{#1}{buffer}}{} > where is a ConTeXt processing setup. > > This actuallty works, but has the drawback of putting the ConTeXt code inside thereby makeing it difficult to reuse the definition of the graphic in a non XML-context. I thus want to get rid of the enclosure. > > I tried things like > \xmlloadbuffer{tex}{\xmlatt{#1}{buffer}} > \xmlsetup{tex}{xmlcommon:tex} <== the tex processing xmlsetups > But this does not work. Because the graphic in this case is not found by \useMPgraphic. > Clearly I am misunderstanding some of the intricacies of the xmlloading macros and probably the solution is quite simple. But I cannot find the right way to do it. > Any help would be appreciated. you can look for \xmlcontext and \xmlflushcontext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________