![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Thu, May 15, 2008 at 3:27 PM, Jelle Huisman
Wolfgang Schuster wrote:
You're misusing the div element for something it is not meant, could you use h1 ... elements in your html and map them to ConTeXt's own header commands.
Yes, I know that the xhtml is not very nice (if only I could write my own xml...) The situation is that I get this file from a customer and I want to avoid having to reformat it (for compatibility reasons). That's why I try to make it work, but it seems I'm out of luck here... :-(
It's not impossible but a pain to achive with MkII, I made a example but it did not really woth because the XML-Environment for div is overloaded with the first chapter and you will loose the selection dependent on the value for class. \defineXMLenvironment [div] [class=] {%\bgroup \processaction [\XMLpar{div}{class}{}] [letHead=>\def\next{\defineXMLargument[div]{\chapter}}]% \next} {%\egroup } \starttext \startXMLdata <body class="dicBody"> <div class="letHead"> <div class="letter">A a</div> </div> </body> \stopXMLdata \stoptext If you want to do this project you should consider switching to MkIV with it's XML setups, they are more powerfull in this case and sometimes easier to write. Wolfgang