From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64412 Path: news.gmane.org!not-for-mail From: Jon Crump Newsgroups: gmane.comp.tex.context Subject: Re: TEI - conTeXt Date: Fri, 10 Dec 2010 12:00:59 -0800 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1292011279 30139 80.91.229.12 (10 Dec 2010 20:01:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 20:01:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 10 21:01:15 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 1PR99V-00038p-BA for gctc-ntg-context-518@m.gmane.org; Fri, 10 Dec 2010 21:01:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9603ACA8B9; Fri, 10 Dec 2010 21:01:12 +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 dlDX3UB8uIPB; Fri, 10 Dec 2010 21:01:07 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E0986CA8AE; Fri, 10 Dec 2010 21:01:07 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1DCA5CA8AE for ; Fri, 10 Dec 2010 21:01:06 +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 Fcb6CoMtG2rU for ; Fri, 10 Dec 2010 21:01:03 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id E0EA9CA8A6 for ; Fri, 10 Dec 2010 21:01:02 +0100 (CET) Original-Received: from mail-vw0-f41.google.com (mail-vw0-f41.google.com [209.85.212.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBAK10V8017883 for ; Fri, 10 Dec 2010 21:01:01 +0100 Original-Received: by vws10 with SMTP id 10so2455284vws.14 for ; Fri, 10 Dec 2010 12:01:00 -0800 (PST) Original-Received: by 10.229.215.213 with SMTP id hf21mr1002080qcb.189.1292011259916; Fri, 10 Dec 2010 12:00:59 -0800 (PST) Original-Received: by 10.229.239.11 with HTTP; Fri, 10 Dec 2010 12:00:59 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.212.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rDFw11Cm - 9a6d646f4180 - 20101210 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:64412 Archived-At: Thomas, Thanks for responding. Yes, thanks to some help from Idris, Khaled, et alia, I've got an ara-sty.tex environment file that sets up the Scheherezade font and am getting very nice looking arabic text. I'm now trying to get my arms around some basic elements of the conTeXt system for dealing with xml. Thanks to your TEI tutorial, I've got some good results for flushing elements identified by tag name and by named attribute like this: \xmlsetsetup{#1}{head[@type=3D'chapter']}{xml:head:chapter} \xmlsetsetup{#1}{p}{xml:p} and the like. I'm now trying to figure out how to address elements in the tei more precisely, like how to address the content nodes in the
, like , in order to use their contents while setting elements like with a \footnote command (though we may, in fact, need to put these elsewhere in an 'endnotes' section.). I've sought in vain for the answers to simple questions like how to address nodes identified by xml:id. In setting up a minimal example, I've tried to do this: with the xml:
foo
bar
set foo and not bar. This, for example, does not work: \startxmlsetups xml:minimalsetups \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{body|text|div}{xml:*} \xmlsetsetup{#1}{div[@xml:id=3D'a']}{xml:div} \stopxmlsetups context complaining that xml:id=3D'a' is not a valid lpath expression. As you can see, I'm not getting some basic things about how to specify and traverse the xml, much less applying the correct context commands to get the content and formatting I need. Another thing I'm going to need to do is to parse the text of certain element attributes. For example, divs to be set in arabic are distinguished from divs to be set in latin only by their xml:lang attributes. I will need to be able to distinguish between ar-Arab, en-Latn, and possibly also ar-Latn and more complex subtags like "az-Arab-IR" as specified in Any clues you might care to offer, or examples that you know of, would be gratefully received. I hesitate to attach the xml and tex files I'm working with here, being unfamiliar with the protocols of the list, but if it would help to see what I'm trying to work with, I could certainly do that. More than this, I will certainly post on the wiki some documentation and examples from this current project once I have something to contribute that works. I'd like to extend your tutorial for others who have TEI texts that they would like to typeset; indeed, making public such documentation in their appropriate fora is part of the remit of our project. All at sea in Seattle, Jon On Fri, Dec 10, 2010 at 9:57 AM, Thomas Schmitz wrot= e: > On Thu, 9 Dec 2010 15:20:06 -0800 > =A0Jon Crump wrote: >> >> All, >> >> More naive questions about xml and context. I'm finding this slow >> going and documentation opaque or just thin on the ground. > > Before I try and help you with your question: you posted another problem = on > Nov 24 and got replies. Has this issue been solved? > >> More practical examples of TEI (or other xml texts)-> ConTeXt -> PDF >> would sure come in handy. >> > You're more than welcome to contribute such examples. Remember, this is a > volunteer effort. > > Thomas ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________