From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/1919 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt + TEI (an SGML derivate) Date: Thu, 27 Apr 2000 11:29:44 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20000427112944.01ec5720@pop.wxs.nl> References: <3904538F.F9515876@gmx.de> <3904538F.F9515876@gmx.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035392722 4356 80.91.224.250 (23 Oct 2002 17:05:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:05:22 +0000 (UTC) Cc: NTG-ConTeXt Original-To: johannes.huesing@uni-essen.de In-Reply-To: <20000425160918.05300@uni-essen.de> Xref: main.gmane.org gmane.comp.tex.context:1919 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:1919 Hi Tobias and Johannes, >> I would like to typeset some TEI documents (see >> http://etext.lib.virginia.edu/TEI.html and >> http://www.uic.edu:80/orgs/tei/ and http://www.tei-c.org/). What's the >> best way to proceed? (Ok I could try to write a PERL phraser which >> translates everything into ConTeXt constructs, but this doesn't seem to >> be the best way.) > >I currently see two options, both of which take quite some work: > >- Convert the TEI source with some style sheet into visual markup which > is parsed by ConTeXt. > >- Re-write the original file, retaining the original structure, but in a > ConTeXt syntax. That means: Replace "foo bar" by > "\startmytag foo bar\stopmytag". Next, write a module which does the > TeX formatting. > >I would opt for the second version if a stylesheet does not exist. If a >stylesheet exists, I would rather go for plain TeX than ConTeXt as the >output of the style sheet is rather visual than content related. The last few months I've done quite some experiments with using xsl as well as perl for going from xml to context (and pdf). I looked at a lot of dtd's and also at tei. Both methods work ok. One way of doing it is to use a simple xslt style sheet that maps elements onto context commands. In most cases one can ignore attributes, since they are handled at the style level. Things like: whatever are mapped by \chapter{} to \chapter{whatever} Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl -----------------------------------------------------------------