From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2557 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: New \setup... / sgml processing Date: Tue, 29 Aug 2000 13:31:38 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20000829133138.017ab350@pop.wxs.nl> References: <39AA8876.7F8993E@econ.muni.cz> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035393343 9847 80.91.224.250 (23 Oct 2002 17:15:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:15:43 +0000 (UTC) Cc: Michal Kvasnicka , Context Original-To: Berend de Boer In-Reply-To: <39AAB9F1.48A5D847@pobox.com> Xref: main.gmane.org gmane.comp.tex.context:2557 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2557 Hi Michal and Berend, Concerning sgml or more general ml processing, I can say that for some years now I've tried several approached to this. Basically, there are the following alternatives, all of which I've implemented with more or less success: 1 convert the <> things into \begML[command][args] \endML[command] things and provide ways to handle the command 2 directly let tex interpret <> things and map those to tex commands 3 use an xsl processor (xt, perl) and an xsl style sheet to convert the file to one with tex commands None of these methos is complicated to implement. There should be methods for handling and mapping sttributes, picking up arguments, either delimited or not, and most complicated of all, handle nested delimited commands, [needed for nested tables]. Now, if one has complete control over the input, it's not so much a problem, but take for instance html, where one find all kind of strange usages (think of dl's with one dt and many dd's) you should really have access to all kind of trickery. The best way so far seems to be (1) convert the input into a more robust intermediate format (2) process the resulting data directly which is why I'm currently playing with something (1) define basic transformation in the tex style [<> => tex] (2) generate xsl style sheets that handle the transformation into tex (3) if needed convert documents at runtime, which can then even be done under different regimes (4) provide methods to handle delimited and grouped commands if there is enoigh interest for this, we may consider starting a discussion on this. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------