Re: default element construction rule

Subject: Re: default element construction rule
From: Chris Maden <crism@xxxxxxx>
Date: Tue, 17 Mar 1998 10:58:53 -0500
[Gregg Reynolds]
> Paul Prescod wrote:
> > 
> > The default rule is invoked at *every level* in the absenseof anything
> > else that matches. 
> 
> Yes and no.  Below you'll find a very simple dtd, doc instance and
> stylesheet.  If you experiment with commenting out various lines
> you'll find that the only way to fire the H2 element-construction
> rule is to include a construction rule for its ancestors,

... or to use the easy way.

> **UNLESS** you omit the default-element-construction-rule.

There is always a default element construction rule.  For elements, it
is (process-children), and for data nodes, it's (make character).  See
clause 12.4.1 (near the bottom of p. 175 if you have the ISO
PostScript), the paragraph beginning, "In addition to
_construction-rule_s explicitly specified in _style-language-body_s,
there is an implicit _default construction-rule_."

The trick is to turn off the processing of data so that you only
process element children, and then provide an overriding construction
rule for what you want.  See
<URL:http://www.mulberrytech.com/dsssl/dssslist/archive/1947.html> for
how I do this.

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • RE: default element construction rule, (continued)
    • Reynolds, Gregg - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id PAA15897Mon, 16 Mar 1998 15:06:16 -0500 (EST)
    • stephenng - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id PAA16310Mon, 16 Mar 1998 15:23:46 -0500 (EST)
      • Paul Prescod - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id SAA19639Mon, 16 Mar 1998 18:43:29 -0500 (EST)
        • Gregg Reynolds - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id XAA23031Mon, 16 Mar 1998 23:14:03 -0500 (EST)
        • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id KAA07486Tue, 17 Mar 1998 10:58:20 -0500 (EST) <=