Re: [NTG-context] Xml filtering in Lua

2022-11-21 Thread Thomas A. Schmitz via ntg-context
this was fairly easy, should have seen it earlier): instead of loading the file "examples.xml," I simply include it via xmlinclude into the tree; this way the proper setups are applied. All best Thomas ___ I

Re: [NTG-context] \xmlfirst lookup over whole document

2019-05-17 Thread Hans Hagen
On 5/17/2019 10:55 AM, Denis Maier wrote: Does this work even if I don't have a buffer? I process chapters as standalone xml files and a master doc with \xmlprocessfile if you have a master doc you can use an \xmlinclude at the beginning of the setups chain to merge the standalone files

Re: [NTG-context] Help with xml & lua

2017-08-07 Thread Hans Hagen
ubtrees at the lua end there's lxm.include (there's also some some indexing going on) B) So, to process my tree further, I need to first serialize it -- save the modified tree xml.save(mainTree, "saved.xml") And then, I can reload the modified tree and work further with it (but i

Re: [NTG-context] XML inclusion

2017-04-12 Thread Meer, Hans van der
On 9 Apr 2017, at 16:42, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> wrote: On 4/7/2017 1:42 PM, Meer, Hans van der wrote: The command \xmlinclude{}{}{} includes the file specified by attribute IDENTIFIER of the element located by LPATH at NODE. What I would like to do

Re: [NTG-context] XML inclusion

2017-04-09 Thread Hans Hagen
On 4/7/2017 1:42 PM, Meer, Hans van der wrote: The command \xmlinclude{}{}{} includes the file specified by attribute IDENTIFIER of the element located by LPATH at NODE. What I would like to do is including a bunch of .xml files where the directory to load from is given. Is this a possibility

[NTG-context] XML inclusion

2017-04-07 Thread Meer, Hans van der
The command \xmlinclude{}{}{} includes the file specified by attribute IDENTIFIER of the element located by LPATH at NODE. What I would like to do is including a bunch of .xml files where the directory to load from is given. Is this a possibility or could this be a feature added to the ConTeXt

Re: [NTG-context] xml input

2016-04-23 Thread Meer, Hans van der
\startxmlsetups notes:setups \xmlinclude{#1}{include}{file} \xmlsetsetup{#1}{takenotes}{notes:*} \stopxmlsetups \xmlregisterdocumentsetup{demo}{notes:setups} \startxmlsetups notes:takenotes \xmlshow{\xmldocument} \stopxmlsetups \starttext \xmlprocessbuffer{demo}{test}{} \stoptext Hans van der Meer

Re: [NTG-context] xml input

2016-04-22 Thread Hans Hagen
ement (the *) to 'just ignore it' (the -). A + would... (2) followed by "this means that at this point we only handle" and I understood from this that because of the 'section' in statement (2) the node will get processed. Congruent with this example I wrote in my example: \startxmlsetup

Re: [NTG-context] xml input

2016-04-22 Thread Meer, Hans van der
would... (2) followed by "this means that at this point we only handle" and I understood from this that because of the 'section' in statement (2) the node will get processed. Congruent with this example I wrote in my example: \startxmlsetups notes:setups \xmlinclude{#1}{i

Re: [NTG-context] xml input

2016-04-21 Thread Mica Semrick
15 Apr 2016, at 00:47, Mica Semrick ><m...@silentumbrella.com<mailto:m...@silentumbrella.com>> wrote: > >I'm interested in this thread too... But I'm american, so English only. >I appreciate your understanding! > > >From reactions I understood that ot

Re: [NTG-context] xml input

2016-04-21 Thread Hans Hagen
fer \startxmlsetups notes:setups \xmlinclude{#1}{include}{file} \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{notes|foo|takenotes}{notes:*} \stopxmlsetups \xmlregistersetup{notes:setups} \startxmlsetups notes:notes \xmlshow{#1} ===> number of = \xmlcount{#1}{note} \stopxml

Re: [NTG-context] xml input

2016-04-21 Thread Meer, Hans van der
american, so English only. I appreciate your understanding! >From reactions I understood that other people are interested in this subject >of \xmlinclude too, but at that moment I could not produce a coherent story. After having produced some minimal (1) working, (2) not working and (3) cr

Re: [NTG-context] xml input

2016-04-14 Thread Mica Semrick
blo > > >On 04/14/2016 10:30 PM, Meer, Hans van der wrote: >>> On 14 Apr 2016, at 10:45, Hans Hagen wrote: >>> [...] >>> a clue: \xmlinclude >>> >> By the way: hoe laad ik de inhoud van een /buffer/ net als van een >file, >> is er een bu

Re: [NTG-context] xml input

2016-04-14 Thread Pablo Rodriguez
than with standard (or the other) ConTeXt. Pablo On 04/14/2016 10:30 PM, Meer, Hans van der wrote: >> On 14 Apr 2016, at 10:45, Hans Hagen wrote: >> [...] >> a clue: \xmlinclude >> > By the way: hoe laad ik de inhoud van een /buffer/ net als van een file, > i

Re: [NTG-context] xml input

2016-04-14 Thread luigi scarso
ce should be read into one tree to > be processed, but I cannot get this done. > How to amalgam this separate sources into one? > > > a clue: \xmlinclude > > By the way: hoe laad ik de inhoud van een *buffer* net als van een file, > is er een buffer equivalent van \xmlinclude? &g

Re: [NTG-context] xml input

2016-04-14 Thread Meer, Hans van der
aining: read from all sources given on -notes afterwards process all content at once Thus the content of the various source should be read into one tree to be processed, but I cannot get this done. How to amalgam this separate sources into one? a clue: \xmlinclude By the way: hoe laad ik de in

Re: [NTG-context] xml input

2016-04-14 Thread Hans Hagen
the content of the various source should be read into one tree to be processed, but I cannot get this done. How to amalgam this separate sources into one? a clue: \xmlinclude - Hans Hagen

Re: [NTG-context] here is ae

2012-12-17 Thread Hans Hagen
. There is actually an \xmlinclude command \xmlinclude{main}{include}{filename|href|name} this will include from elements with tags 'include' and one of the attributes mentioned. Do this as one of the first steps as it merges xml trees. Hans Hi Hans, thanks for your suggestion. Yes, I mean combining

[NTG-context] here is ae

2012-12-16 Thread Hans Hagen
projects here. There is actually an \xmlinclude command \xmlinclude{main}{include}{filename|href|name} this will include from elements with tags 'include' and one of the attributes mentioned. Do this as one of the first steps as it merges xml trees. Hans

Re: [NTG-context] here is ae

2012-12-16 Thread Schmitz Thomas A.
On Dec 16, 2012, at 2:46 PM, Hans Hagen pra...@wxs.nl wrote: Using xml sounds ok to me (esp as you know how to do it) ... with xinclude you mean combining multiple files into one? It's what we do in all xml related projects here. There is actually an \xmlinclude command \xmlinclude

Re: [NTG-context] here is ae

2012-12-16 Thread Sietse Brouwer
http://wiki.contextgarden.net/Command/xmlinclude Wikified, but sans example for now. Thomas, could I leave that to you? Writing about things I don't understand is one thing, but producing working code that I don't understand is something I am happy to leave to the experts. ;-) Cheers, Sietse

Re: [NTG-context] here is ae

2012-12-16 Thread Schmitz Thomas A.
On Dec 16, 2012, at 11:08 PM, Sietse Brouwer sbbrou...@gmail.com wrote: http://wiki.contextgarden.net/Command/xmlinclude Wikified, but sans example for now. Thomas, could I leave that to you? Writing about things I don't understand is one thing, but producing working code that I don't

[NTG-context] \xmlcontext inoperative?

2012-05-09 Thread Meer, H. van der
Loaded xml with: xmlinclude{problem}{include}{file} Then called up parts of its contents through a setup: \startxmlsetups xam:define:get % The definition is the one with content. \xmldoiftext{#1}{.}{ \foundtrue \xmlflush{#1} \xmlcontext{#1}{.} } \stopxmlsetups The strange thing

Re: [NTG-context] \xmlcontext inoperative?

2012-05-09 Thread Meer, H. van der
action put in somewhere or in such a way that \xmlflush and friends always succeed? I did not understand enough of the code to fully grasp what is is is not happening. On 9 mei 2012, at 14:53, Meer, H. van der wrote: Loaded xml with: xmlinclude{problem}{include}{file} Then called up parts of its

[NTG-context] \xmlinclude throws no error

2012-05-09 Thread Meer, H. van der
Why does \xmlinclude does not throw an error when the file to be read is missing? It causes a mssing file to go unnoticed. In contrast \xmlprocessfile does throw an error, as expected. Hans van der Meer

Re: [NTG-context] \xmlcontext inoperative?

2012-05-09 Thread Hans Hagen
On 9-5-2012 14:53, Meer, H. van der wrote: Loaded xml with: xmlinclude{problem}{include}{file} Then called up parts of its contents through a setup: \startxmlsetups xam:define:get % The definition is the one with content. \xmldoiftext{#1}{.}{ \foundtrue \xmlflush{#1} \xmlcontext{#1

[NTG-context] xmlinclude

2012-03-20 Thread Meer, H. van der
Can someone tell me what \xmlinclude is supposed to do? I have experimented a lot but didn't come further to an understanding. I have called it through: \startxmlsetups xam:include \xmlinclude{#1}{include}{file} \stopxmlsetups from a node include in: probleminclude file=functions.xml

[NTG-context] xml file inclusion

2012-01-04 Thread Hans van der Meer
I would like to include files with the following input xml-file root file location=.. other_attributes/file /root In the xmlsetup for file I thought to place a call to \xmlinclude: \startxmlsetups xml:file \xmlinclude{#1}{.}{location} \stopxmlsetups But this does not work and I get

Re: [NTG-context] xml file inclusion

2012-01-04 Thread Hans van der Meer
After a lot of experimenting I finally succeeded including a file with thw \xmlinclude macro. The next hurdle is how to extend the xml tree with its xml contents (if that is possibl, of course). Thus the main file being: ?xml version=1.0 encoding=UTF-8? main .. /main I would like to extend

Re: [NTG-context] including xml files

2010-03-08 Thread Hans Hagen
On 7-3-2010 18:29, Philipp Gesang wrote: So in this case, you would have \xmlinclude{test}{afile}{file}. Yes, that did it. I thoroughly confused the notion of “lpath” in xml-mkiv.pdf. it's not xpath but shares quite some properties with it To actually make use of inc.xml in the current

Re: [NTG-context] including xml files

2010-03-08 Thread Philipp Gesang
On 2010-03-08 10:57:00, Hans Hagen wrote: On 7-3-2010 18:29, Philipp Gesang wrote: So in this case, you would have \xmlinclude{test}{afile}{file}. Yes, that did it. I thoroughly confused the notion of “lpath” in xml-mkiv.pdf. it's not xpath but shares quite some properties with it Well

Re: [NTG-context] including xml files

2010-03-07 Thread Philipp Gesang
inc SYSTEM inc.xml) but they don't seem to work. My latest try was \xmlinclude but that didn't work either. When I have the following setups \startxmlsetups xml:afile \section{Filename \xmlatt{#1}{file}} %\xmlinclude{test} { } {\xmlatt{#1}{file}} %\xmlinclude{test

Re: [NTG-context] including xml files

2010-03-07 Thread Taco Hoekwater
entities (!ENTITY inc SYSTEM inc.xml) but they don't seem to work. My latest try was \xmlinclude but that didn't work either. When I have the following setups \startxmlsetups xml:afile \section{Filename \xmlatt{#1}{file}} %\xmlinclude{test} { } {\xmlatt{#1}{file

Re: [NTG-context] including xml files

2010-03-07 Thread Philipp Gesang
Good evening, On 2010-03-07 13:52:34, Taco Hoekwater wrote: \startxmlsetups xml:afile \section{Filename \xmlatt{#1}{file}} %\xmlinclude{test} { } {\xmlatt{#1}{file}} %\xmlinclude{test} {/*} {\xmlatt{#1}{file}} %\xmlinclude{test} {/sect} {\xmlatt{#1