From: Simon Pepping <spepping@scaprea.hobby.nl>
Subject: Re: Some XML typesetting questions
Date: Mon, 8 Oct 2001 22:33:50 +0200 [thread overview]
Message-ID: <20011008223350.A763@scaprea> (raw)
In-Reply-To: <5.1.0.14.1.20011008112132.031f8528@server-1>; from pragma@wxs.nl on Mon, Oct 08, 2001 at 11:25:50AM +0200
Hans,
Interesting, this looks like your API for XML programming. How do I go
about to understand this? Is there documentation, or should I just
work my way through the expansions produced by \tracingcommands=1? Or
should I not try to understand this?
Simon
On Mon, Oct 08, 2001 at 11:25:50AM +0200, Hans Hagen wrote:
> \unprotect
>
> \def\@@XMLescape {\@@XML esc}
>
> \def\defineXMLescape[#1]#2{\long\setvalue{\@@XMLescape:#1}{#2}}
>
> \defineXMLescape [--] {\gobbleuntil{-->}}
> \defineXMLescape [CDATA] {\skipfirstverbatimlinefalse
> \processtaggeddisplayverbatim{]]>}}
> \defineXMLescape [\s!default] {\gobbleuntil{>}}
>
> \def\executeXMLescape#1%
> {\executeifdefined{\@@XMLescape:#1}{\getvalue{\@@XMLescape:\s!default}}}
>
> \protect
>
> \long\def\xdoXMLelement !#1 % !-- --> or !xyz >
> {\endgroup\executeXMLescape{#1}}
>
> Now, given that you have a </hello/> <world/> file, and a ! handler like:
>
> \defineXMLescape [DOCTYPE] {\handleXMLescapeDOCTYPE}
> \defineXMLescape [ENTITY] {\handleXMLescapeENTITY}
>
> \def\handleXMLescapeDOCTYPE#1[#2]>%
> {#2}
>
> \def\handleXMLescapeENTITY#1 #2 "#3"#4>%
> {\doif{#2}{SYSTEM}{\defineXMLentity[#1]{\readfile{#3}{}{}}}}
>
> then:
>
> \defineXMLsingular [test] {WHOW}
> \defineXMLsingular [hello] {Hello}
> \defineXMLsingular [world] {World}
>
--
Simon Pepping
email: spepping@scaprea.hobby.nl
next prev parent reply other threads:[~2001-10-08 20:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-07 21:05 Jaroslav Snajdr
2001-10-08 7:07 ` Berend de Boer
2001-10-08 7:10 ` Berend de Boer
2001-10-08 9:25 ` Hans Hagen
2001-10-08 10:00 ` Berend de Boer
2001-10-08 16:15 ` Hans Hagen
2001-10-08 17:16 ` Berend de Boer
2001-10-09 7:24 ` Hans Hagen
2001-10-09 9:53 ` Berend de Boer
2001-10-09 15:38 ` Hans Hagen
2001-10-09 19:10 ` Simon Pepping
2001-10-08 20:33 ` Simon Pepping [this message]
2001-10-09 7:40 ` Hans Hagen
[not found] ` <87lmiksq01.fsf@dellius.nederware.nl>
2001-10-10 8:21 ` Hans Hagen
2001-10-23 11:08 ` 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=20011008223350.A763@scaprea \
--to=spepping@scaprea.hobby.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).