ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: Michal Kvasnicka <qasar@econ.muni.cz>, Context <ntg-context@ntg.nl>
Subject: Re: New \setup... / sgml processing
Date: Wed, 30 Aug 2000 00:04:17 +0200	[thread overview]
Message-ID: <3.0.6.32.20000830000417.00b60380@pop.wxs.nl> (raw)
In-Reply-To: <39ABF1B1.335EC29@pobox.com>

At 07:24 PM 8/29/00 +0200, Berend de Boer wrote:
>Hans Hagen wrote:
>
>> if there is enoigh interest for this, we may consider starting a discussion
>> on this.
>
>That's for sure. I think we're not far of that people will code entirely
>in XML instead of plain TeX. But perhaps live would be a lot easier if
>we had a tex that could read XML natively...

There are several conflicting demands and situations in processing XML
which are complicated by inpropriate usage of HTML tags (abusing tags for
makeup). 

To mention a few complications: 

(1) entities: when using tex to parse the document, one can do without a
dtd, but when using xsl the dtd should be available; rather annoying when
you are not permanently on line and xt wants to look on the net. So,
concerning entitities, direct processing is great. 

(2) nesting: if you use macros that use delimiters, this can be coded in
macros, but nesting is a problem since there is no way that tex can smuggle
{} in the stream so that <x> <x> ... </x> </x> will be mapped onto \beginx
{\beginx .. \endx} \endx; imagine that we have macros like
\def\beginx#1\endx{...}.  

I can process files directly using tex (several implementations) or xsl
(with entity problems) or a combination (with the nesting problem,
especially painful in nested tables). [rather funny is defining
transformations in tex, writing a xsl file, calling xsl using write18 and
then reading the resulting file.]

Actually what would be needed is a pure internal mapping, like <abc>
replaced by an stream of tokens in the input, before further expansion.
Sort of what omega does with its input filters.

Although xslt has its advantages, it is primarily focussed on going from
xml to xml/html. So far I have not seen any solid transformation engine
that looks at documents in the way tex likes it. Handling the simple cases
is not so much the trouble, but my mind is already spoiled by too much
thinking of potential problems (knowing a bit what i want to do), which is
why i still have no best way to handle things, 

It may be interesting to think of a good xml to tex preprocessor that can
be fed with simple transformation tables as well as entity mappers. It
should not be that hard, since there are some five kind of mappings we want
to do: command, argument, environment, ignore, delimited, some with
optional pre/post space stripping, outer level grouping, and a few more. It
could be interesting to have this ready for next generation tex's. 

Hans 

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  reply	other threads:[~2000-08-29 22:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-28 15:42 New \setup Michal Kvasnicka
2000-08-28 19:13 ` Berend de Boer
2000-08-29 11:31   ` New \setup... / sgml processing Hans Hagen
2000-08-29 17:24     ` Berend de Boer
2000-08-29 22:04       ` Hans Hagen [this message]
2000-08-30 10:23       ` Michal Kvasnicka
2000-08-30 12:16         ` Hans Hagen
2000-08-30 13:37     ` Johannes Huesing
2000-08-31 11:03       ` Radhakrishnan C V

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=3.0.6.32.20000830000417.00b60380@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    --cc=qasar@econ.muni.cz \
    /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).