From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96455 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: buffering inside xmlsetups Date: Tue, 11 Oct 2016 14:47:16 +0200 Message-ID: <57FCDF54.3010002@gmail.com> References: <1DAAD88F-E59E-44C7-BA56-F86EEB59608B@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1055628847175643293==" X-Trace: blaine.gmane.org 1476190149 23778 195.159.176.226 (11 Oct 2016 12:49:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2016 12:49:09 +0000 (UTC) User-Agent: Postbox 5.0.4 (Macintosh/20161007) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 11 14:49:03 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btwUQ-00058n-8b for gctc-ntg-context-518@m.gmane.org; Tue, 11 Oct 2016 14:49:02 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6F58C1AB7B; Tue, 11 Oct 2016 14:47:36 +0200 (CEST) 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 fGY3u5NSlVUm; Tue, 11 Oct 2016 14:47:33 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 1EBBA1AB7D; Tue, 11 Oct 2016 14:47:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E9FDC1AB7A for ; Tue, 11 Oct 2016 14:47:32 +0200 (CEST) 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 wQMkZVoLdVcr for ; Tue, 11 Oct 2016 14:47:31 +0200 (CEST) Original-Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 0B4451AB73 for ; Tue, 11 Oct 2016 14:47:20 +0200 (CEST) Original-Received: by mail-lf0-f45.google.com with SMTP id b75so39392013lfg.3 for ; Tue, 11 Oct 2016 05:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=dGnmTTBZrCzovGPUOqMG4JWi+J43WwD279h1EqIO0MM=; b=kML8xKJ7AIF1DarunlaTwRcDqwm+E8xuBlkWiwq8a5WXgcgNEJDs/cv+/RjlJkwqnw zd6/IKEIxT1vvqs8dUIgws2iA65DPWPbSjM5Y65MJFa56hMVHp8GxgFdK+wsiP58oqwx HRik5wZ+jTgCeZAVYK8jxt3btwGSNWL9HCmV6K5+RjeSQgyRZInB+4h1Q9PTbsQ2aJy5 s6GOFppejnnPnyYomeUykpG1KsnrHCrNkdX+PPqdp3Lmtk1X+hphX7jhqusbb0qGho+x Cavyr4NSxWqehJBt32mYucsl5isHg7wvZaBZiEaN2piQDCg0+chAbRgwAzH5ARPY6De1 xraA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=dGnmTTBZrCzovGPUOqMG4JWi+J43WwD279h1EqIO0MM=; b=SuIKUGtf0wsNDoV4e1WtGK4lxniubhhS6wcVcYNIjPJG1b2ZptyoKuz46IPAvaQ249 Q3S2el2dfCHVCgWuedpaZQ4c+3RqsHUlD8A1T0ExGkIt+mlxTGmxsKNtw6SZ6pOrGS2p KgAJwVxZwffQfs9JgTttulXZcXd+0Hu5mJWg1VFftx+Ht4PE4t1LF4618cxRKkF/QVPC 0CynDejXJ+ohY2mUVbhCd+6gzSQWXkgMTaFa09pR+t0sHFf7F494p4s+zQAkt43jTL6v hceOlijwVM0yOqzEs2RXKPuXypycJ2W/tElXR4z9LWpNZVcAtMbSJYev3gU1NJ5jvZUi AAgA== X-Gm-Message-State: AA6/9RnUUs9xsBo1kkgoEYhQxFrc7S152DUhvvbw9QzFJAHUP/rJmjDy5G8V8MXAmWqgqQ== X-Received: by 10.25.26.72 with SMTP id a69mr2526907lfa.0.1476190039535; Tue, 11 Oct 2016 05:47:19 -0700 (PDT) Original-Received: from keima.localdomain (x2f22162.dyn.telefonica.de. [2.242.33.98]) by smtp.gmail.com with ESMTPSA id j4sm934243lfg.20.2016.10.11.05.47.18 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Oct 2016 05:47:18 -0700 (PDT) In-Reply-To: <1DAAD88F-E59E-44C7-BA56-F86EEB59608B@uva.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:96455 Archived-At: This is a multi-part message in MIME format. --===============1055628847175643293== Content-Type: multipart/alternative; boundary="------------030203070002080404070107" This is a multi-part message in MIME format. --------------030203070002080404070107 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > Meer, Hans van der > 11. Oktober 2016 um 14:43 > A problem I am obviously not able to solve. > It can be described as follows. > > I have an xmlsetup .. that typesets texcode embedded in an > xml document. Now it is needed to embed initializing a buffer and > typesetting lateron with \getbuffer. Alas, doing the following does > not woek: > > \startbuffer[name] > bufferdata > \stopbuffer > > because the TeX input hangs. My guess being that the \stopbuffer fails > to terminate the data intake. > > I then tried to split off the buffer filling with a separate xmlsetup. > But here too, the TeX input halts: > > % Usage: > \startxmlsetups xmlcommon:buffer > \startbuffer[name=\xmlatt{#1}{name}] > \xmlflush{#1} > \stopbuffer > \stopxmlsetups > % Usage: > \startxmlsetups xmlcommon:getbuffer > \xmlflushcontext{\getbuffer[name=\xmlatt{#1}{name}]} > \stopxmlsetups > > and as input: inputdata followed by . > The getbuffer setup is not even reached, as is obvious. > > I tried \xmltofile to put the data into an intermediate file, but to > no avail because it produces the following, leading at best to > recursion when processed by \xmlprocessfile. > > > > > bufferdata > > > Is there a solution to this? \setbuffer[]...\endbuffer Wolfgang --------------030203070002080404070107 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
11. Oktober 2016 um 14:43
A problem I am obviously not able to solve.
It can be described as follows.

I have an xmlsetup <tex>..</tex> that typesets texcode embedded in an xml document. Now it is needed to embed initializing a buffer and typesetting lateron with \getbuffer. Alas, doing the following does not woek:
<tex>
\startbuffer[name]
bufferdata
\stopbuffer
</tex>
because the TeX input hangs. My guess being that the \stopbuffer fails to terminate the data intake.

I then tried to split off the buffer filling with a separate xmlsetup. But here too, the TeX input halts:

% Usage: <buffer name="name">
\startxmlsetups xmlcommon:buffer
\startbuffer[name=\xmlatt{#1}{name}]
\xmlflush{#1}
\stopbuffer
\stopxmlsetups
% Usage: <getbuffer name="name">
\startxmlsetups xmlcommon:getbuffer
\xmlflushcontext{\getbuffer[name=\xmlatt{#1}{name}]}
\stopxmlsetups

and as input: <buffer name="name">inputdata</buffer> followed by .
The getbuffer setup is not even reached, as is obvious.

I tried \xmltofile to put the data into an intermediate file, but to no avail because it produces the following, leading at best to recursion when processed by \xmlprocessfile.

<?xml version="1.0" ?>
<!-- exported fragment -->
<buffer>
bufferdata
</buffer>

Is there a solution to this?
\setbuffer[<BUFFERNAME>]...\endbuffer

Wolfgang
--------------030203070002080404070107-- --===============1055628847175643293== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwOi8vZm91bmRyeS5zdXBl bGVjLmZyL3Byb2plY3RzL2NvbnRleHRyZXYvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRnYXJk ZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============1055628847175643293==--