ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas Schmitz" <tschmit1@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: TEI - conTeXt
Date: Fri, 10 Dec 2010 21:40:19 +0100	[thread overview]
Message-ID: <web-5946890@be1.uni-bonn.de> (raw)
In-Reply-To: <AANLkTikauo+XUUJ9yJcve3DC9dLTCSdk8Kj-OPMgDgYU@mail.gmail.com>

On Fri, 10 Dec 2010 12:00:59 -0800
  Jon Crump <jjcrump@uw.edu> 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 <witness> element 
whose xml:id attribute is identical to the "wit" attribute 
of your current element. So <element wit="#foo"> will pick 
up the content of <witness xml:id="foo">bar</witness> 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
___________________________________________________________________________________


  reply	other threads:[~2010-12-10 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 23:20 Jon Crump
2010-12-10 17:57 ` Thomas Schmitz
2010-12-10 20:00   ` Jon Crump
2010-12-10 20:40     ` Thomas Schmitz [this message]
2010-12-11 19:56       ` Jon Crump
2010-12-16  7:34         ` Thomas A. Schmitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=web-5946890@be1.uni-bonn.de \
    --to=tschmit1@uni-bonn.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).