From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104289 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Denis Maier Newsgroups: gmane.comp.tex.context Subject: Re: XML roundtripping Date: Wed, 15 May 2019 22:31:28 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6511534706805645655==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="71710"; mail-complaints-to="usenet@blaine.gmane.org" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Wed May 15 22:31:59 2019 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 esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hR0ZD-000IMj-5z for gctc-ntg-context-518@m.gmane.org; Wed, 15 May 2019 22:31:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B57B0138F46; Wed, 15 May 2019 22:31:46 +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 7Va1bW5pB42W; Wed, 15 May 2019 22:31:45 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C7C80138F3D; Wed, 15 May 2019 22:31:45 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 48CBD138F3C for ; Wed, 15 May 2019 22:31:45 +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 yRYu0Zr9emqa for ; Wed, 15 May 2019 22:31:44 +0200 (CEST) Original-Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (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 14AAD138F3B for ; Wed, 15 May 2019 22:31:44 +0200 (CEST) Original-Received: by mail-pf1-f178.google.com with SMTP id n19so572088pfa.1 for ; Wed, 15 May 2019 13:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VEBaM4VzFicqZgXM6rASSCpAWqa8oqWhktPbWNncN80=; b=XGseLG/9oEylaJeu5dPEV0ZIQurIFjrF0UYYlATi2sbT6dsG8zj/YyZlEvIod3vkMr xoBIHIUgoyGpegryOXnZK2lu3z7/MPSEWXbwEVsmVv+xHOAQ32oJJv6jfr841ekL5ij3 IMmpRi4WvCSkEN2M7ti32Jkl4z1cK/4Cm24r5qqF9PZKOYGGjrxXJu+uSXCTYWue8v/t eYq6KEi1w/rn768oDnKNSCr498oVE0q1Y77Papf9zEiHNkHSCgKVkg2OUX2gq6ITwCnS h579IWfjzYo1i6aTnKPFewZNv9JihMrQdCNnsf3t8kLBve+VLVd62gpTIJirb0Y7N7DW msbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VEBaM4VzFicqZgXM6rASSCpAWqa8oqWhktPbWNncN80=; b=jkxdji7RIV3TkU0si19LNprgbc3jrgUNtUdVP0aRAsBImPbTNZXrf1+WYqHJHWVivN kusEEHrWA4kaE6QnNVEv3bCNe1TxBV/C+RhoV+qA9RLqxjL69M6wJY37WOYPXRAU3XJl 0HXmdDuBnmeS/6NPZGGQ/+dKCh/uLD6dzjwmZMgB2Qp9RJD7soSk6CjjnbKUj0s8fPI3 mPAZUMCGIjkbP+JiC95cIXtwl1+isO8pDVWi4mzQnX2kLu3dKAF/IFhDcapL21b5KjRI 1MXg8bQvU+4rXXPA58DyaYCOZ25hKXbtWvgmymMOCSQOW3n5GHLxexExGfuyyAhAHjG3 09bA== X-Gm-Message-State: APjAAAXiciK6XFkvEukbwHCZc2g6wKulQSR6idLrDYarX8bfiSv35/SI clIbuy6q2bnODeN9R+oYgk5+ePpkdGjxESONSOE= X-Google-Smtp-Source: APXvYqwLKOvawZsDIAEDLSaFLabRHBJ9n/6J+H4UAUEtp2t9LT218FG60kXxE2bZWvkFMVr2DS5kzfG+Po0L14HscAM= X-Received: by 2002:a65:6449:: with SMTP id s9mr44755469pgv.90.1557952300324; Wed, 15 May 2019 13:31:40 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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:104289 Archived-At: --===============6511534706805645655== Content-Type: multipart/alternative; boundary="000000000000701ca70588f30979" --000000000000701ca70588f30979 Content-Type: text/plain; charset="UTF-8" Hans Hagen schrieb am Mi., 15. Mai 2019, 18:32: > On 5/15/2019 4:35 PM, Denis Maier wrote: > > Our workflow is not settled yet; we're still discussing options. All > > depends upon what is possible ... > > > > That being said, for the purpose of displaying the articles online we'll > > need every article in a separate XML file. The question is if and how we > > will produce a PDF version containing a whole volume (we'll probably > > need one PDF for the whole volume and also PDFs for each article). > > > > One option would be: > > - merge the articles into a single XML, > > - typeset from there > > - split the PDF > > (Hence my question here, > > https://mailman.ntg.nl/pipermail/ntg-context/2019/095011.html). > > you can create a master xml file with includes and process the lots in > one go ... this is quite convenient when you assemble for instance books > from chapters that are split into sections ... you can make a xml file > per chapter that includes the sections and then a book file that loads > them all ... files can have a processing instruction telling what styel > to load and you can run individual files or assemblies ... all the stuff > needed to do that is there (and probably also documented someplace) > Ok. Sounds good. How can I call the style in the xml files? I know that I can process a file with \xmlprocessfile or call it from the command line with --env=, and in a normal tex-file I could obviously use \environment for this, but how does this work with xml? > anyway, you can always save '\lastpage' during a run ... or you can have > some shared lua file with chapters/pagenumbers that gets updated by the > current run > > all this is workflow dependent but all can be done without too much hassle > > (fwiw: we have some cases where for one projects hundreds of xml files > get merged runtime and then processed ... the overhead is neglectable to > the run) > > > Another option could be: > > - Typeset each article individually. > > - Get the last page number => in the next article, set the first page > > number to this + 1 > > (So, we do not necessarily need to write the page numbers back to the > > XML, but we'll somehow need to pass the page number to the next article > > in the chain.) > > > > > > Am Mi., 15. Mai 2019 um 14:46 Uhr schrieb Hans Hagen > >: > > > > On 5/15/2019 12:57 PM, Denis Maier wrote: > > > Hmm, getting the page number back from the tuc file sound > > feasible. I'll > > > have to look into this. > > > > > > But how would I write the information back to the XML? Is this > > explained > > > somewhere? > > all depends on the workflow ... why does it need to be written back? > > > > > > ----------------------------------------------------------------- > > Hans Hagen | PRAGMA ADE > > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > > tel: 038 477 53 69 | www.pragma-ade.nl > > | www.pragma-pod.nl > > > > ----------------------------------------------------------------- > > > > > -- > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > --000000000000701ca70588f30979 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Hans Hagen <j.= hagen@xs4all.nl> schrieb am Mi., 15. Mai 2019, 18:32:
On 5/15/2019 4:35 PM, Denis Maier wrote:
> Our workflow is not settled yet; we're still discussing options. A= ll
> depends upon what is possible ...
>
> That being said, for the purpose of displaying the articles online we&= #39;ll
> need every article in a separate XML file. The question is if and how = we
> will produce a PDF version containing a whole volume (we'll probab= ly
> need one PDF for the whole volume and also PDFs for each article).
>
> One option would be:
> - merge the articles into a single XML,
> - typeset from there
> - split the PDF
> (Hence my question here,
> https://mailman.ntg.nl/= pipermail/ntg-context/2019/095011.html).

you can create a master xml file with includes and process the lots in
one go ... this is quite convenient when you assemble for instance books from chapters that are split into sections ... you can make a xml file
per chapter that includes the sections and then a book file that loads
them all ... files can have a processing instruction telling what styel to load and you can run individual files or assemblies ... all the stuff needed to do that is there (and probably also documented someplace)

Ok. Soun= ds good. How can I call the style in the xml files? I know that I can proce= ss a file with \xmlprocessfile or call it from the command line with --env= =3D, and in a normal tex-file I could obviously use \environment for this,= =C2=A0 but how does this work with xml?



anyway, you can always save '\lastpage' during a run ... or you can= have
some shared lua file with chapters/pagenumbers that gets updated by the current run

all this is workflow dependent but all can be done without too much hassle<= br>
(fwiw: we have some cases where for one projects hundreds of xml files
get merged runtime and then processed ... the overhead is neglectable to the run)

> Another option could be:
> - Typeset each article individually.
> - Get the last page number =3D> in the next article, set the first = page
> number to this + 1
> (So, we do not necessarily need to write the page numbers back to the =
> XML, but we'll somehow need to pass the page number to the next ar= ticle
> in the chain.)
>
>
> Am Mi., 15. Mai 2019 um 14:46=C2=A0Uhr schrieb Hans Hagen <j.hagen@= xs4all.nl
> <mailto:j.hagen@xs4all.nl>>:
>
>=C2=A0 =C2=A0 =C2=A0On 5/15/2019 12:57 PM, Denis Maier wrote:
>=C2=A0 =C2=A0 =C2=A0 > Hmm, getting the page number back from the tu= c file sound
>=C2=A0 =C2=A0 =C2=A0feasible. I'll
>=C2=A0 =C2=A0 =C2=A0 > have to look into this.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > But how would I write the information back to= the XML? Is this
>=C2=A0 =C2=A0 =C2=A0explained
>=C2=A0 =C2=A0 =C2=A0 > somewhere?
>=C2=A0 =C2=A0 =C2=A0all depends on the workflow ... why does it need to= be written back?
>
>
>=C2=A0 =C2=A0 =C2=A0---------------------------------------------------= --------------
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hans Hagen | PRAGMA ADE
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | <= a href=3D"http://www.pragma-ade.nl" rel=3D"noreferrer noreferrer" target=3D= "_blank">www.pragma-ade.nl
>=C2=A0 =C2=A0 =C2=A0<http://www.pragma-ade.nl> | www.pragma-pod.nl
>=C2=A0 =C2=A0 =C2=A0<http://www.pragma-pod.nl>
>=C2=A0 =C2=A0 =C2=A0---------------------------------------------------= --------------
>


--

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.n= l | www.pragma-pod.nl
-----------------------------------------------------------------
--000000000000701ca70588f30979-- --===============6511534706805645655== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6511534706805645655==--