From: Kate F <kate@elide.org>
To: ntg-context@ntg.nl
Subject: MkIV XML and |c|c|c|
Date: Sun, 19 Jan 2014 11:53:11 +0100 [thread overview]
Message-ID: <CAA36g0U0kh23zpT3xdCuqaGJVgRq2QH9stgi2HBmt==YxD0hmg@mail.gmail.com> (raw)
Hi,
I'm trying to glue MkIV XML handling to ConTeXt's tabulation. My
markup has a HTML-style table model, with an arbitary number of <col>
elements.
My problem is to produce the |c|c|c|c| format based on the number of
<col> elements I have, rather than hardcoding a specific number of
columns.
I thought I could do something like this, but unfortunately the string
produced by \xmlconcat{#1}{col}{\|} seems to be ignored:
% in practice this would produce various alignments, not just "c"
\startxmlsetups xml:col
c
\stopxmlsetups
\startxmlsetups xml:table
\starttabulate[\|\xmlconcat{#1}{col}{\|}\|]
\xmlall{#1}{thead|tbody}
\stoptabulate
\stopxmlsetups
Whereas this works fine, as I'd expect: \starttabulate[|c|c|c|c|]
(I'm also confused about the escaping for \| there. I guess the [] is
a special environment, with | being given a different catcode,
perhaps?)
Is there a way to do this, with the number of columns and their
alignment generated from the input XML?
Thanks,
--
Kate
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2014-01-19 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-19 10:53 Kate F [this message]
2014-01-20 8:28 ` H. van der Meer
2014-01-20 17:46 ` Hans Hagen
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='CAA36g0U0kh23zpT3xdCuqaGJVgRq2QH9stgi2HBmt==YxD0hmg@mail.gmail.com' \
--to=kate@elide.org \
--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).