%starttext \setups [letter:place] \stoptext \endinput
\setupoutput[pdftex]
%\tracelayerstrue
%\usemodule[xtag-ini]

\defineXMLsingular
   [c]
   [n=unknowncharacter]
   {\executeifdefined {\XMLop{n}} \unknowncharacter}
 %let op, dit is de juiste code, niet die van Hans H.  
   
\usemodule[corres]
\usemodule[m][letter]

%set your language
\mainlanguage[nl]

\usetypescriptfile[type-chelt]
\usetypescript[cheltenham]
\setupbodyfont[cheltenham, 12pt]

%\setupbodyfont[ss]

\definelayer
  [letternext]
  [state=next,
   width=\paperwidth,
   height=\paperheight]

\setvariables
  [letter:reference]
  [line=0,
   noflines-min=2,
   noflines-max=5,
   noflines=\getvariable{letter:reference}{noflines-max}
  ]

\setvariables
[letter:style]
[opening=formal,
closing=formal]
%appendices=diverse]
%\setvariables
%  [letter:data]
%  [opening=,
%   initials=,
%   prefix=,
%   suffix=,
%   informalname=,
%   formalname=]
%   noflines=10]

\setvariables[letter:address][line=6, hoffset=100mm,width=70mm]

\setvariables
[letter:data]
[address=\XMLflush{address},
prefix=\XMLflush{prefix},
initials=\XMLflush{initials},
formalname=\XMLflush{formalname},
%informalname=\XMLflush{informalname}
%content={\getbuffer[texletter]},
%,content=\getbuffer
concerns=, subject=, date=\date, author=Nasrettin Hoca\crlf {\tfx bla}\crlf {\tfx bla}]

\startsetups[contact:handle]
\setups[letter:place]
\stopsetups

\startsetups[letter:content]

This is my letter

you can also 

\stopsetups

\startsetups[letter:place:content]
  \bgroup \disableXML \endgraf \setups[letter:content] \endgraf \egroup
\stopsetups

\setvariables[contacts][selection=refs20-up]
%\setvariables[contacts][selection=refs1-19]
\XMLprocesscontacts[adresses-sample.xml]

%MY EXPERIENCE IS THAT YOU HAVE TO MENTION THE SELECTION CRITERION BEFORE THE ADDRESS DATABASE!

\starttext
%\setups[letter:place]
\stoptext 
