[NTG-context] question about \xmlconcat

Pablo Rodriguez oinos at gmx.es
Sun May 10 17:36:36 CEST 2015


On 05/10/2015 01:24 PM, Hans Hagen wrote:
> [...]
> \startbuffer[demo]
> <doc>
>      <h1 id="#myspecialid">Document Title</h1>
>      <h2 class="author">John Doe</h2>
>      <h2 class="author">James Doe</h2>
>      <h2 class="author">Jane Doe</h2>
>      <p>whatever</p>
> </doc>
> \stopbuffer
> 
> \startxmlsetups xml:initialize
>       \xmlsetsetup{#1}{doc|h1}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:initialize}
> 
> \startxmlsetups xml:doc
>      \title{\xmltext{#1}{/h1}}
>      \xmlconcat{#1}{/h2[@class='author']}{\\}
>      \blank
>      \xmlall{#1}{/!(h1|h2)}
> \stopxmlsetups
> 
> \starttext
>      \xmlprocessbuffer{main}{demo}{}
> \stoptext

Many thanks for your reply, Hans.

It works perfectly now.

What I think I understand now is that it is impossible (it doesn’t make
sense) to concatenate elements (pardon my inaccuracy) inside one of
these elements.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk


More information about the ntg-context mailing list