[NTG-context] processing xml

2008-05-06 Thread Roger Mason
Hello, I have a document converted from rtf to xml that I'd like to attempt to typeset using Context. As a starting point I tried to follow the procedure in a document from the wiki: mag-0008-1.pdf "Dealing with XML". Having copied the first example document and stylesheet from that article and

Re: [NTG-context] processing xml

2008-05-06 Thread Wolfgang Schuster
On Tue, May 6, 2008 at 11:44 PM, Roger Mason <[EMAIL PROTECTED]> wrote: > Hello, > > I have a document converted from rtf to xml that I'd like to attempt > to typeset using Context. > > As a starting point I tried to follow the procedure in a document from > the wiki: mag-0008-1.pdf "Dealing with X

Re: [NTG-context] processing xml

2008-05-07 Thread Roger Mason
Hello Wolfgang, "Wolfgang Schuster" <[EMAIL PROTECTED]> writes: > take a look into the XML manual, the magazine is a little bit special and > not the best starting point. > > http://www.pragma-ade.com/show-man-15.htm Thank you _very_ much. That was just what I needed: to quote the example I jus

[NTG-context] processing xml in mkiv

2008-03-16 Thread Thomas A. Schmitz
Hi all, xml processing is about the last part of my ConTeXt stuff where I haven't been able to switch to mkiv; I just can't get my head around it... 2 questions: 1. When I try to process a xml-file with my old (mkii) environments, the output looks OK, but I always get a first page with the

[NTG-context] processing xml with lua

2013-02-26 Thread Schmitz Thomas A.
Hi all, one of my favorite topics… Here is a minimal example which shows something that I don't understand: when I process the subsection with the lua code, I want to get the value of the current section's "label" attribute in xml.attribute(r, "../../section", "label", "X"). So i was expecting

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Wolfgang Schuster
On Sun, 16 Mar 2008 11:29:49 +0100 "Thomas A. Schmitz" <[EMAIL PROTECTED]> wrote: > Hi all, > > xml processing is about the last part of my ConTeXt stuff where I > haven't been able to switch to mkiv; I just can't get my head around > it... 2 questions: > > 1. When I try to process a xml-fil

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Thomas A. Schmitz
On Mar 16, 2008, at 12:04 PM, Wolfgang Schuster wrote: > On Sun, 16 Mar 2008 11:29:49 +0100 > "Thomas A. Schmitz" <[EMAIL PROTECTED]> wrote: > >> Hi all, >> >> xml processing is about the last part of my ConTeXt stuff where I >> haven't been able to switch to mkiv; I just can't get my head around

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Wolfgang Schuster
> OK, here is a minimal example: > > file test.xml: > > > > > ]> > > > > This is an xml file. > > > > file testenvironment.tex > > \usemodule[xtag-ent] > > \defineXMLenvironment[document] > {\starttext} > {\stoptext} > > \defineX

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Thomas A. Schmitz
On Mar 16, 2008, at 1:51 PM, Wolfgang Schuster wrote: >> > This seems like a bug to me. This did only happen with the content in > the first line because I inserted a empty first line at the begin of > the line the xml header disappeared from the pdf, could be related to > a wrong catcode for the

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Wolfgang Schuster
> > This seems like a bug to me. This did only happen with the content in > > the first line because I inserted a empty first line at the begin of > > the line the xml header disappeared from the pdf, could be related to > > a wrong catcode for the "<" at the beginning of the line. > > > > OK, the

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Hans Hagen
Thomas A. Schmitz wrote: > On Mar 16, 2008, at 1:51 PM, Wolfgang Schuster wrote: > >> This seems like a bug to me. This did only happen with the content in >> the first line because I inserted a empty first line at the begin of >> the line the xml header disappeared from the pdf, could be related

Re: [NTG-context] processing xml in mkiv

2008-03-16 Thread Thomas A. Schmitz
On Mar 16, 2008, at 6:16 PM, Hans Hagen wrote: > indeed ther eis something weird, but it may as well be something in > lautex itself, so taco has to look into it too > > what happens is: > > \def\processXMLfilegrouped#1{{\enableXML\processfile{#1}\relax > \ifmmode\else\par\fi}} > > it looks like

Re: [NTG-context] processing xml in mkiv

2008-03-17 Thread Taco Hoekwater
Thomas A. Schmitz wrote: > On Mar 16, 2008, at 6:16 PM, Hans Hagen wrote: > >> indeed ther eis something weird, but it may as well be something in >> lautex itself, so taco has to look into it too >> >> what happens is: >> >> \def\processXMLfilegrouped#1{{\enableXML\processfile{#1}\relax >> \if

Re: [NTG-context] processing xml in mkiv

2008-03-18 Thread Thomas A. Schmitz
On Mar 17, 2008, at 2:04 PM, Taco Hoekwater wrote: > It is a bug in luatex, but not an easy one to fix. The simplest > workaround (for now) is to patch core-job.lua. > > Best wishes, > Taco > > > --- core-job.lua~ 2008-02-13 12:01:06.0 +0100 > +++ core-job.lua2008-03-17 14:0

Re: [NTG-context] processing xml with lua

2013-02-26 Thread Hans Hagen
On 2/26/2013 1:23 PM, Schmitz Thomas A. wrote: Hi all, one of my favorite topics… Here is a minimal example which shows something that I don't understand: when I process the subsection with the lua code, I want to get the value of the current section's "label" attribute in xml.attribute(r, "..

Re: [NTG-context] processing xml with lua

2013-02-26 Thread Schmitz Thomas A.
On Feb 26, 2013, at 1:54 PM, Hans Hagen wrote: > you go up to the parent of sections which to far up, try: > > section = xml.attribute(r, "..", "label", "X") > > or > > section = xml.filter(r, "../attribute(label)") > > Mojca, Hans, thanks, that is exactly right! I wasn't too sure about

Re: [NTG-context] processing xml with lua

2013-03-05 Thread Thomas A. Schmitz
Hi, may I ask another question about my new favorite topic? No? Anyway: here comes. While processing xml, I would like to store the content of a node in a lua table and retrieve it later. The example is silly, but demonstrates my problem. Is there a way to have ConTeXt process and typeset the

Re: [NTG-context] processing xml with lua

2013-03-05 Thread Hans Hagen
On 3/5/2013 9:47 AM, Thomas A. Schmitz wrote: Hi, may I ask another question about my new favorite topic? No? Anyway: here comes. While processing xml, I would like to store the content of a node in a lua table and retrieve it later. The example is silly, but demonstrates my problem. Is there a

Re: [NTG-context] processing xml with lua

2013-03-05 Thread Thomas A. Schmitz
On 03/05/2013 09:58 AM, Hans Hagen wrote: lookuptable[mytype] = mytype .. " = " .. myvalue inspect(lookuptable) the .. triggers a tostring on myvalue which in turn serializes the xml lookuptable[mytype] = { mytype = myvalue } would keep myvalue as xml node Hans, thanks a lot,

Re: [NTG-context] processing xml with lua

2013-03-05 Thread Hans Hagen
On 3/5/2013 10:16 AM, Thomas A. Schmitz wrote: On 03/05/2013 09:58 AM, Hans Hagen wrote: lookuptable[mytype] = mytype .. " = " .. myvalue inspect(lookuptable) the .. triggers a tostring on myvalue which in turn serializes the xml lookuptable[mytype] = { mytype = myvalue } would

Re: [NTG-context] processing xml with lua

2013-03-05 Thread Thomas A. Schmitz
On 03/05/2013 11:11 AM, Hans Hagen wrote: \startluacode local lookuptable = { } function xml.functions.lookup(t) local mytype = xml.text(t, "c") local myvalue = lookuptable[mytype] if not myvalue then myvalue = xml.first(t, "d") lookuptable[mytype] = myvalue

[NTG-context] Processing XML file inside a zip file

2019-01-10 Thread Aditya Mahajan
Hi, Is it possible to process an XML file inside a zip file without unzipping? In particular, I have a program that generates zip files which look like this: The file `filename.zip` contains: - filename.xml - file_hash1.png - file_hash2.png etc. Where `filename.xml` (the name matches the b

[NTG-context] Processing XML: Header and footer, data manipulation

2019-04-21 Thread Axel Kielhorn
Hello, Pablo Rodríguez wrote in „From pandoc to ConTeXt“: „So, if I was able to do this, probably anybody can do it.“ Well, I tried and indeed it isn’t as difficult as i thought. (Once I learned that an entity must not contain non-ASCII characters.) Some questions remain: I want to set page he

Re: [NTG-context] Processing XML file inside a zip file

2019-01-10 Thread Henri Menke
On 11/01/19 4:42 PM, Aditya Mahajan wrote: > Hi, > > Is it possible to process an XML file inside a zip file without unzipping? > > In particular, I have a program that generates zip files which look like > this: > > The file `filename.zip` contains: > - filename.xml - file_hash1.png > - file_ha

Re: [NTG-context] Processing XML file inside a zip file

2019-01-10 Thread Aditya Mahajan
On Fri, 11 Jan 2019, Henri Menke wrote: On 11/01/19 4:42 PM, Aditya Mahajan wrote: Hi, Is it possible to process an XML file inside a zip file without unzipping? In particular, I have a program that generates zip files which look like this: The file `filename.zip` contains: - filename.xml -

Re: [NTG-context] Processing XML: Header and footer, data manipulation

2019-04-22 Thread Pablo Rodriguez
On 4/22/19 7:57 AM, Axel Kielhorn wrote: > [...] > Some questions remain: Hi Axel, I have some questions about your source file: \startxmlsetups xml:prozess \mainlanguage[de] If this is hardcoded (I mean, you don’t read it from any XML code), I would avoid setting the \mainlanguage here.

Re: [NTG-context] Processing XML: Header and footer, data manipulation

2019-04-22 Thread Axel Kielhorn
> Am 22.04.2019 um 11:40 schrieb Pablo Rodriguez : > > I have some questions about your source file: > > \startxmlsetups xml:prozess > \mainlanguage[de] > > If this is hardcoded (I mean, you don’t read it from any XML code), I > would avoid setting the \mainlanguage here. > > And you alre