From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64413 Path: news.gmane.org!not-for-mail From: "Thomas Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: TEI - conTeXt Date: Fri, 10 Dec 2010 21:40:19 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1292013646 8788 80.91.229.12 (10 Dec 2010 20:40:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 20:40:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 10 21:40:38 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PR9ld-0006Li-UR for gctc-ntg-context-518@m.gmane.org; Fri, 10 Dec 2010 21:40:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13744CA8B1; Fri, 10 Dec 2010 21:40:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FJGyT-X96x49; Fri, 10 Dec 2010 21:40:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5B292CA8AA; Fri, 10 Dec 2010 21:40:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C17C1CA8AA for ; Fri, 10 Dec 2010 21:40:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id U2l3IS0Ytcme for ; Fri, 10 Dec 2010 21:40:21 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id E93C7CA8A6 for ; Fri, 10 Dec 2010 21:40:20 +0100 (CET) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBAKeJiJ017707 for ; Fri, 10 Dec 2010 21:40:20 +0100 Original-Received: from [87.178.52.167] (account tschmit1@uni-bonn.de) by be1.uni-bonn.de (CommuniGate Pro WEBUSER 5.2.12) with HTTP id 5946889 for ntg-context@ntg.nl; Fri, 10 Dec 2010 21:40:19 +0100 X-Mailer: CommuniGate Pro WebUser v5.2.12 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.113; country=DE; region=07; city=Bonn; latitude=50.7333; longitude=7.1000; http://maps.google.com/maps?q=50.7333,7.1000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eDFwEkgz - f997fcb16320 - 20101210 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:64413 Archived-At: On Fri, 10 Dec 2010 12:00:59 -0800 Jon Crump wrote: Jon, OK, good to know. I'll need a bit more leisure to look at your example; here are just a few points: processing an attribute with the 'xml:' namespace has been fixed by Hans very recently (last weekend), so if you haven't updated to the latest beta version, please do and try again; your syntax \xmlsetsetup{#1}{div[@xml:id='a']} is basically right. Addressing content that has been set in xml anchors is possible, but not quite easy. I wouldn't have been able to figure it out without Hans. Just to show you an example: here's code that in my TEI document will fetch the content of a witness list: \xmlfirst{#1}{root::/TEI/text/front/div[@type=='sigla']/listWit/witness[@xml:id==string.sub('\xmlatt{#1}{wit}',2)]} The (for you) relevant part is "root::/": this is the topmost level of your TEI xml document. You then traverse all the elements and drill down to a element whose xml:id attribute is identical to the "wit" attribute of your current element. So will pick up the content of bar and print "bar." This should get you going. Last point: I don't want to sound negative, but what you're attempting is not straightforward and certainly not easy stuff. I am currently planning on doing a long-term project on editing texts in this manner, and I'm quite optimistic that all problems can eventually be solved. But if you need short-term solutions, a perfectly typeset edition within a matter of weeks, this may not be possible right away. E.g., I don't think we really have a solid framework yet for a bilingual edition as you envisage it. It is possible, but not easy, Hans needs the time and many test cases to make the code work. There is a research group here in Germany (with public funding) who are currently working on xml printing of material of exactly this type. I can assure you that for the time being, there's nothing out there which comes even close to ConTeXt in this area, but we're still at the beginning. So: if you want to help and test and be part of this, you are more than welcome, but none of us has a magic bullet; this is work in progress, not drop-in solutions. All best Thomas ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________