Re: [NTG-context] makeing xml-node
On 5/8/2013 9:18 AM, Meer, H. van der wrote: \startxmlsetups xmlcommon:mpgraphic \unprotect\input{\foundfilewithsuffix}\protect \stopxmlsetups unprotected regime: \starttexcode ... % e.g. \input \stoptexcode regular context regime: \startcontextcode ... % e.g.\input \stopcontextcode - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] makeing xml-node
Alas, this does not solve the problem, iff I am following your suggestion correctly. I did \xmlloadbuffer{thebuffer}{\xmlatt{#1}{buffer}} \xmlfilter{thebuffer}{*/context()} \useMPgraphic.. This works for a buffer content enclosed in any node: \startbuffer[ychannel] <= cannot be omitted \startuseMPgraphic{}{} .. \stopuseMPgraphic <= cannot be omitted \stopbuffer But it does not work when the content is not enclosed in a node, which is my input case: \startbuffer[ychannel] \startuseMPgraphic{}{} .. \stopuseMPgraphic \stopbuffer Now the xml is judged invalid by running it. In the case of a file there is a circumvention through directlua. There I can os.execute a chain of commands: echo "" >tmp;cat file >>tmp;echo "" >>tmp and then \xmlprocessfile the tmp. A bit of a kludge, I am ready to admit, but working. But I don't see how to do this with buffers. Hans van der Meer On 7 May 2013, at 7:39 PM, Hans Hagen mailto:pra...@wxs.nl>> wrote: On 5/7/2013 5:30 PM, Meer, H. van der wrote: With \xmlload{myroot}{file} I can load an xml file and the execute on its nodes. However what to do if the file is not of the form file-contents? In that case it would help if I could contruct a node with with some actions like: \input{fileconytents and then operate with xml commands on that node. Can this be accomplished? you can just filter the node .. \xmlfilter{#myroot}{/some/element . ___ 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 ___
Re: [NTG-context] makeing xml-node
On 5/7/2013 5:30 PM, Meer, H. van der wrote: With \xmlload{myroot}{file} I can load an xml file and the execute on its nodes. However what to do if the file is not of the form file-contents? In that case it would help if I could contruct a node with with some actions like: \input{fileconytents and then operate with xml commands on that node. Can this be accomplished? you can just filter the node .. \xmlfilter{#myroot}{/some/element . Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
[NTG-context] makeing xml-node
With \xmlload{myroot}{file} I can load an xml file and the execute on its nodes. However what to do if the file is not of the form file-contents? In that case it would help if I could contruct a node with with some actions like: \input{fileconytents and then operate with xml commands on that node. Can this be accomplished? Hans van der Meer ___ 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 ___