Re: Nodes and counting

Subject: Re: Nodes and counting
From: Chris Maden <crism@xxxxxxx>
Date: Wed, 1 Oct 1997 11:50:38 -0400
[David Pawson]
> What I _think_ should happen is that the 
> (with-mode toc
>   (element (body article title)
>    (make paragraph   .....
> _should_ produce the contents of the title _only_
> what it actually does is dump the whole article !!

The implicit default element rule for any element is
(process-children).  Without a rule for the other elements, you are
applying that implicit rule to every element in the processed list,
which is the entire body.

You need a default rule:

(mode toc ; not with-mode

      (element body

      (element (body article)

      (element (body article title)
	       (make paragraph ...)))

You need to explicitly override the default rule for the parents of
the element you want to process.

My tagged MIF converter has to do this for the tables and footnotes,
which MIF places at the beginning of the document.

<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL> <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>

 DSSSList info and archive:

Current Thread