| Subject: Modes From: Paul Prescod <papresco@xxxxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 24 Apr 1997 17:03:03 -0400 | 
Norm Walsh has shown me a difference between my understanding of the
DSSSL spec and Jade's behaviour. Is this a bug in Jade or my brain?
Basically, my understanding was that if a particular mode did not have a
construction rule for a particular element, the initial mode's
construction rule is used. Here is an example that seems to behave
differently:
in foo.dsl:
----
(root (make scroll))
(element chapter (sosofo-append (with-mode head-mode 
                           (process-first-descendant "TITLE"))
			 (process-first-descendant "TITLE")))
(element emphasis (make element gi: "i"))
(element TITLE
    (make element gi: "title" (process-children-trim)))
(mode head-mode
  (element TITLE
    (make element gi: "title" (process-children-trim))))
Note that emphasis element is not represented in the head-mode mode, soI
would expect it to have the same behaviour inside and outside. Now here
is the document:
foo.sgml
----
<!doctype chapter [
<!element chapter - - (title)>
<!element title - - (#pcdata|emphasis)*>
<!element emphasis - - (#PCDATA)>
]>
<chapter><title>Testing <emphasis>this</emphasis></title>
</chapter>
Finally, here is the output:
<title>
Testing this
</title><title>
Testing <i>
this
</i>
</title>
Why is the emphasis in treated different the first time the title is
processed (in the mode)?
 Paul Prescod
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| MIF backend for JADE, Carla Corkern | Thread | Modes, David Megginson | 
| MIF backend for JADE, Carla Corkern | Date | Re: Jade for HTML, Paul Prescod | 
| Month |