Re: [NTG-context] \xmlload not understood

2017-05-15 Thread Hans Hagen

On 5/12/2017 6:00 PM, dr. Hans van der Meer wrote:

I did load an xml data file containing
  ...
with:
  \xmlload{Data}{data.xml}

Then correctly find the number of data from \xmlcount{Data}{subnode}
however \xmlflush{Data} is not giving me the processed nodes from
  \startxmlsetups do:subnode
doing something with xmlflysh{#1}
  \stopxmlsetups
but only the raw input ...

Do I err in my understanding? And if so, how to do it better?

Below a minimal example and its output.


\startxmlsetups load:setups
  \xmlsetsetup{#1}{root|nodes|subnode}{load:*}
\stopxmlsetups
\xmlregistersetup{load:setups}

\startxmlsetups load:root
  \xmlloadbuffer{Data}{dataset}
  Number of  = \xmlcount{Data}{subnode}\blank
  \xmlflush{Data}


you need to apply document setups

\xmlregistereddocumentsetups{Data}{Data}
\xmlmain{Data}



\stopxmlsetups

\startxmlsetups load:subnode
  Content  \xmlflush{#1}\par
\stopxmlsetups

\startbuffer[test]


\stopbuffer

\startbuffer[dataset]


  this is subnode-1
  this is subnode-2
  this is subnode-3

\stopbuffer

\starttext
\xmlprocessbuffer{root}{test}{}
\hairline
\stoptext



___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] \xmlload not understood

2017-05-12 Thread dr. Hans van der Meer
I did load an xml data file containing
  ...
with:
  \xmlload{Data}{data.xml}

Then correctly find the number of data from \xmlcount{Data}{subnode}
however \xmlflush{Data} is not giving me the processed nodes from
  \startxmlsetups do:subnode
doing something with xmlflysh{#1}
  \stopxmlsetups
but only the raw input ...

Do I err in my understanding? And if so, how to do it better?

Below a minimal example and its output.



\startxmlsetups load:setups
  \xmlsetsetup{#1}{root|nodes|subnode}{load:*}
\stopxmlsetups
\xmlregistersetup{load:setups}

\startxmlsetups load:root
  \xmlloadbuffer{Data}{dataset}
  Number of  = \xmlcount{Data}{subnode}\blank
  \xmlflush{Data}
\stopxmlsetups

\startxmlsetups load:subnode
  Content  \xmlflush{#1}\par
\stopxmlsetups

\startbuffer[test]


\stopbuffer

\startbuffer[dataset]


  this is subnode-1
  this is subnode-2
  this is subnode-3

\stopbuffer

\starttext
\xmlprocessbuffer{root}{test}{}
\hairline
\stoptext

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___