ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Meer, H. van der" <H.vanderMeer@uva.nl>
To: ConTeXt NTG <ntg-context@ntg.nl>
Subject: howto execute loaded xml?
Date: Wed, 21 Mar 2012 09:27:44 +0000	[thread overview]
Message-ID: <FB28AD66-2128-4E31-B472-D2D79498EAA1@uva.nl> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1179 bytes --]

I made a minimal example showing that load'ed xml is not typeset. In contrast to the first <text>-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]
<?xml version="1.0" encoding="UTF-8"?>
<myroot>
  <include buffer="load-2"/>
  <text>buffer[load-1] contents</text>
</myroot>
\stopbuffer

\startbuffer[load-2]
<includes>
  <text>Included buffer[load-2] contents &amp; ampersand.</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



[-- Attachment #1.2: Type: text/html, Size: 3373 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2012-03-21  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21  9:27 Meer, H. van der [this message]
     [not found] ` <44AA50A3-C414-4F6F-A213-B035AAE185FC@uva.nl>
2012-03-22 12:04   ` Meer, H. van der

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FB28AD66-2128-4E31-B472-D2D79498EAA1@uva.nl \
    --to=h.vandermeer@uva.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).