![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Fri, May 9, 2008 at 11:56 AM, Jelle Huisman
Wolfgang Schuster wrote:
Did this come closer to what you want.
Almost, however I added "xlanguagetag=>\let\FormatSpan\bold" to get to the nested span element and that didn't work. Any suggestions?
\defineXMLenvironment [span] [class=] {\bgroup \processaction [\XMLpar{span}{class}{}] [word=>\let\FormatSpan\bold, defenition=>\let\FormatSpan\mono]%
xlanguagetag=>\let\FormatSpan\bold % <- this does not work (because it is nested?)
\FormatSpan} {\egroup}
\defineXMLenvironment [span] [class=] {\bgroup \processaction [\XMLpar{span}{class}{}] [word=>\let\FormatSpan\bold, defenition=>\let\FormatSpan\mono, xlanguagetag=>\let\FormatSpan\italic]% \FormatSpan} {\egroup}
\starttext
\startXMLdata <span class="word" lang="nld">papa</span> <span class="defenition" lang="en"> <span class="xlanguagetag" lang="en">Eng</span> daddy </span> \stopXMLdata
\stoptext
You should give us more information too help you, how is \Mywordstyle defined because \defineXMLargument can't be nested.
\Mywordstyle is a font switch: \def\Mywordstyle #1{\switchtobodyfont[GentiumItalics] #1\switchtobodyfont[Gentium]}
Do you really want a font switch, isn't a style switch enough in your case from roman to italic and back. Wolfgang