Hi Thomas,

Thanks for your advice.

I would like to have a system with which I can send letters to people in my database.

It would be nice to be able to make selections according to labels (probably with xmlatt), but that can be done later.

I am not a programmer - when I read the documentation, I do not understand enough of it to the extent to port it to a new program, but I can adapt and try existing code.

Thusfar I have been trying to use the letter module with the xmltext and xmlflush commands. What can be done to make this work?




  <contact class='participant' label='Hendriks'>
    <coursedate>1 june 2017</coursedate>  
      <p>Mr. K. Hendriks</p>
      <p>Grotestraat 5</p>
      <p>1234 Arnhem</p>

  <contact class='participant' label='Janssen'>
    <coursedate>1 june 2017</coursedate>  
     <p>Mr. P. Janssen</p>
     <p>Kortestraat 8</p>
     <p>1234 Nijmegen</p>


\startxmlsetups xml:setups


\startxmlsetups xml:contacts

\startxmlsetups xml:contact

%  name={Sender},
%  email={},
%  signature={X}]

  [opening={Dear \xmltext{#1}{/prefix} \xmltext{#1}{/formalname},},
   closing={Kind regards,},
   subject={Interesting offer}]

\input knuth

%Without the letter instructions, the code yields the names in informalname.



tex error on line 17 in file /Users/mac/Documents/doc/moperspectief/brieven/brieven2mkiv.tex: ! Use of \correspondence_start_parameters doesn't match its definition

\doifelsenextoptional ...\def \m_syst_action_yes {
                                                  #1}\def \m_syst_action_nop...
\setupletter ...bleargument \correspondence_setup 
                                                  [\v!letter ]
\14>:xml:contact #1->\setupletter 
l.17 }
\14>:xml:contacts #1->\xmlflush {#1}
l.7 }

Op 15 jun. 2017, om 19:02 heeft Thomas A. Schmitz <thomas.schmitz@uni-bonn.de> het volgende geschreven:

On 06/15/2017 10:51 AM, r.ermers@hccnet.nl wrote:
I still cannot generate letters from my xml database

So what are you missing? Make a complete minimal example (you can pack the xml part into a buffer and then use \xmlprocessbuffer), then people will try to help you. Right now, we can't even guess where your problems lie. And writing "I'm not a programmer, so I can't read documentation" is not very motivating - you've been told where to begin, and you appear to be making some progress, so show us what you have.