From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75265 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: howto execute loaded xml? Date: Wed, 21 Mar 2012 09:27:44 +0000 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0418858661==" X-Trace: dough.gmane.org 1332322073 31699 80.91.229.3 (21 Mar 2012 09:27:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2012 09:27:53 +0000 (UTC) To: ConTeXt NTG Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 21 10:27:52 2012 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 1SAHpe-0007g3-Vx for gctc-ntg-context-518@m.gmane.org; Wed, 21 Mar 2012 10:27:51 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7C548101EC; Wed, 21 Mar 2012 10:27:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ESHeyu5n800f; Wed, 21 Mar 2012 10:27:49 +0100 (CET) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EB37A101E3; Wed, 21 Mar 2012 10:27:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1A0AB101E3 for ; Wed, 21 Mar 2012 10:27:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NbuTen6UBRuw for ; Wed, 21 Mar 2012 10:27:46 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 744AB10194 for ; Wed, 21 Mar 2012 10:27:46 +0100 (CET) Original-Received: from jansen.uva.nl (jansen.uva.nl [146.50.108.229]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q2L9RjNC029320 for ; Wed, 21 Mar 2012 10:27:45 +0100 Original-Received: from ketelaar.uva.nl ([fe80::cc61:4c73:c438:df97]) by jansen.uva.nl ([146.50.108.229]) with mapi id 14.01.0355.002; Wed, 21 Mar 2012 10:27:45 +0100 Thread-Topic: howto execute loaded xml? Thread-Index: AQHNB0TfvRtL4L2H+kiVB67wTh5/sg== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.229; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RGM9rJzu - b2eb1107e2c3 - 20120321 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:75265 Archived-At: --===============0418858661== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_FB28AD6621284E31B472D2D79498EAA1uvanl_" --_000_FB28AD6621284E31B472D2D79498EAA1uvanl_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I made a minimal example showing that load'ed xml is not typeset. In contra= st to the first -node the second comes out as xml and not as typeset = text. What has to be done to change that? Thanks in advance. Hans van der Meer \startbuffer[load-1] buffer[load-1] contents \stopbuffer \startbuffer[load-2] Included buffer[load-2] contents & ampersand. \stopbuffer \startxmlsetups load:setups \xmlsetsetup{\xmldocument}{myroot|text|include}{load:*} \stopxmlsetups\xmlregistersetup{load:setups} \startxmlsetups load:myroot \writestatus{TEST-LOAD}{loading myroot} \xmlall{#1}{include} \xmlall{#1}{text} \xmlall{includes}{text} \stopxmlsetups \startxmlsetups load:text *** \xmlflush{#1} ***\par \stopxmlsetups \startxmlsetups load:include \writestatus{TEST-LOAD}{loading include} \xmlloadbuffer{includes}{load-2} \stopxmlsetups \enabletrackers[lxml.loading] \setuppapersize[S5][S5] \starttext \hairline \xmlprocessbuffer{myroot}{load-1}{} \hairline \stoptext --_000_FB28AD6621284E31B472D2D79498EAA1uvanl_ Content-Type: text/html; charset="us-ascii" Content-ID: <95EB50ABB8B1944FBDA38FA45D15AB0B@uva.nl> Content-Transfer-Encoding: quoted-printable I made a minimal example showing that load'ed xml is not typeset. In contra= st to the first <text>-node the second comes out as xml and not as ty= peset text.

What has to be done to change that?
Thanks in advance.

Hans van der Meer


\startbuffer[load-1]
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<myroot>
  <include buffer=3D"load-2"/>
  <text>buffer[load-1] contents</text>
</myroot>
\stopbuffer

\startbuffer[load-2]
<includes>
  <text>Included buffer[load-2] contents &amp; ampersan= d.</text>
</includes>
\stopbuffer

\startxmlsetups load:setups
  \xmlsetsetup{\xmldocument}{myroot|text|include}{load:*}
\stopxmlsetups\xmlregistersetup{load:setups}

\startxmlsetups load:myroot
  \writestatus{TEST-LOAD}{loading myroot}
  \xmlall{#1}{include}
  \xmlall{#1}{text}
  \xmlall{includes}{text}
\stopxmlsetups

\startxmlsetups load:text
  *** \xmlflush{#1} ***\par
\stopxmlsetups

\startxmlsetups load:include
  \writestatus{TEST-LOAD}{loading include}
  \xmlloadbuffer{includes}{load-2}
\stopxmlsetups

\enabletrackers[lxml.loading]
\setuppapersize[S5][S5]
\starttext
\hairline
\xmlprocessbuffer{myroot}{load-1}{}
\hairline
\stoptext


--_000_FB28AD6621284E31B472D2D79498EAA1uvanl_-- --===============0418858661== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0418858661==--