From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63440 Path: news.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: Re: Separate layout and content XML files? Date: Fri, 12 Nov 2010 14:39:49 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/mixed; boundary="===============0056345185==" X-Trace: dough.gmane.org 1289569213 30925 80.91.229.12 (12 Nov 2010 13:40:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2010 13:40:13 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 12 14:40:08 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PGtrL-0005EF-OY for gctc-ntg-context-518@m.gmane.org; Fri, 12 Nov 2010 14:40:07 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 78650CA814; Fri, 12 Nov 2010 14:40:06 +0100 (CET) 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 D386MwcX1zKG; Fri, 12 Nov 2010 14:40:03 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5F755CA828; Fri, 12 Nov 2010 14:40:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 81F54CA828 for ; Fri, 12 Nov 2010 14:40:01 +0100 (CET) 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 4ynOgp2frEAP for ; Fri, 12 Nov 2010 14:39:59 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 3BC7CCA814 for ; Fri, 12 Nov 2010 14:39:59 +0100 (CET) Original-Received: from paard.ic.uva.nl (paard.ic.uva.nl [145.18.40.182]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oACDdpXB022708 for ; Fri, 12 Nov 2010 14:39:51 +0100 Original-Received: from [192.168.178.22] (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by paard.ic.uva.nl (8.13.1/8.13.1) with ESMTP id oACDdnZk019043 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 12 Nov 2010 14:39:50 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1082) X-CanIt-Geo: ip=145.18.40.182; 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: 0BDudDP4z - 1e5deed06312 - 20101112 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 X-Scanned-By: CanIt (www . roaringpenguin . com) on 145.18.40.182 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) 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:63440 Archived-At: --===============0056345185== Content-Type: multipart/alternative; boundary=Apple-Mail-2--123139605 --Apple-Mail-2--123139605 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 12 nov 2010, at 14:17, Peter Davis wrote: >=20 > On Fri, Nov 12, 2010 at 7:55 AM, Martin Schr=F6der = wrote: > 2010/11/12 Peter Davis : > > Is that clear? >=20 > It's called database publishing. :-) >=20 > Exactly. (Or sometimes variable data printing ... VDP.) >=20 > I guess the "layout" XML file would basically be used to construct a = macro that draws the page, and the "content" XML would basically invoke = that macro with different arguments for each recipient. >=20 > Does that seem like the most effective way to do this? Any examples = of anything like this, or of using an XML to define a macro? >=20 > Thank you. >=20 On tlcontrib.metatex.or I placed a series of ConTeXt modules under title = "hvdm". Perhaps these are useful as a working example of how to separate various = elements of xml-typesetting. Hope this helps. Hans van der Meer One xml-definition file (hvdm-xml.tex) in the package is used for = general constructs, another (hvdm-dvd.tex) for typesetting = "database"-entries in xml. As an example of data input: = _TITLE_ _DATE_ _DATE_ etc. simply called by a minimal header: \usemodule[hvdm-dvd] % xml conversions \DataLocation{/Volumes/Qrecordings/DVD/D026-D050/D050 Aux temps des = croisades} \starttext \setupCase[DVD][state=3Ddraft] \xmlprocessfile{dvd}{\DATALOCATION data.xml}{} % start at the dvd root = node \stoptext \endinput --Apple-Mail-2--123139605 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1

On Fri, Nov 12, 2010 at 7:55 AM, Martin Schr=F6der = <martin@oneiros.de> = wrote:
2010/11/12 Peter Davis <pfd@pfdstudio.com>:
> Is that clear?

It's called database publishing. = :-)

Exactly.  (Or sometimes = variable data printing ... VDP.)

I guess the = "layout" XML file would basically be used to construct a macro that = draws the page, and the "content" XML would basically invoke that macro = with different arguments for each recipient.

Does that seem like the most effective way to do = this?  Any examples of anything like this, or of using an XML to = define a macro?

Thank = you.


On = tlcontrib.metatex.or I placed a series of ConTeXt modules under title = "hvdm".
Perhaps these are useful as a working example of how = to separate various elements of xml-typesetting.
Hope this = helps.

Hans van der = Meer


One xml-definition file = (hvdm-xml.tex) in the package is used for general constructs, another = (hvdm-dvd.tex) for typesetting "database"-entries in xml. As an = example of data input:

<!-- TEMPLATE = FOR DVD-COVER DATA
     $Revision:: 43   =       $
     $Date:: 2010-10-29 = 19:#$
-->
<?xml version=3D"1.0" = encoding=3D"UTF-8"?>
<dvd filenumber=3D"_FILENUMBER_" = genre=3D"_GENRE_">
<setup name=3D"pdfcase" = chaptername=3D"off" left=3D"" right=3D""/>
= <titles>
= <title>_TITLE_</title>
= </titles>
<frontfigure commonsize=3D"" = maxwidth=3D"" maxheight=3D"" frame=3D"">
= <img src=3D"" width=3D"" height=3D"" frame=3D"" = option=3D""/>
= </frontfigure>
<recording>
= <recorded>_DATE_</recorded>
= <burned>_DATE_</burned>
= </recording>
etc.

si= mply called by a minimal = header:
\usemodule[hvdm-dvd] % xml = conversions
\DataLocation{/Volumes/Qrecordings/DVD/D026-D050/D05= 0 Aux temps des = croisades}
\starttext
\setupCase[DVD][state=3Ddraft]
\xmlprocessfile{dvd}{\DATALOCATION data.xml}{} % start = at the dvd root = node
\stoptext
\endinput


= --Apple-Mail-2--123139605-- --===============0056345185== 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 ___________________________________________________________________________________ --===============0056345185==--