On Fri, May 9, 2008 at 10:59 AM, Jelle Huisman
<span class="word" lang="nld">papa</span>
Thanks Hans, but for this bit of data: this code:
\defineXMLargument [span] [class=word] {\Mywordstyle{\XMLpar{span}{class}{default-value}}}
consider switching to context mkiv which gives access to the xml tree I consider doing this for a future project, but I can't do that for this
applies the \Mywordstyle to the class attribute "word", whereas I'm looking for a solution that applies the style to the word included in the span element, nl. "papa", and it shouldn't print the attribute 'word' at all... (maybe my question wasn't clear the first time.) project since I need to use XeTeX for Graphite enabled fonts.
Did this come closer to what you want. \defineXMLenvironment [span] [class=] {\bgroup \processaction [\XMLpar{span}{class}{}] [word=>\let\FormatSpan\bold, defenition=>\let\FormatSpan\mono]% \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. Wolfgang