Re: process-node-list, select-element, etc.....

Subject: Re: process-node-list, select-element, etc.....
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Tue, 19 May 1998 11:25:08 -0400 (EDT)
At 19 May 1998 02:57 -0400, Frank Pursel wrote:
 > On Mon, May 18, 1998 at 05:29:59PM -0500, Reynolds, Gregg wrote:
 > > I don't think (descendants (current-node) will work in a
 > > root-construction-rule.  Try moving your construction rule to the test
 > > element.  You could actually put it anywhere and then select on
 > > (descendants (ancestor "test" (current-node))); at least I think that's
 > > the syntax, it's been a while since I looked.
 > 
 > Wow.  This is exactly what I needed.  I modified my document only
 > slightly, per your clue, and it works!  I just had to add one
 > empty element 'header' to make things work.  I honestly don't
 > understand what the benefit of all the complexity is though.  Why
 > can't all elements in a document just be treated equally?  The
 > code that works is here.  

You could also omit the <header> element and put the
simple-page-sequence specification and the process-node-list, etc. on
an element construction rule for the root element of the document:

------------------------------------------------------------
<!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

(element test
	 (make simple-page-sequence
	       (make rule)
	       (process-node-list
		(select-elements
		 (descendants (current-node))
		 'NOTE))
	       (make rule)
	       (process-children)))

(element act (make sequence (make rule) (process-children)))
(element step (make paragraph))
(element note (make paragraph))
------------------------------------------------------------

Regards,


Tony Graham
=======================================================================
Tony Graham
Mulberry Technologies, Inc.                         Phone: 301-315-9632
17 West Jefferson Street, Suite 207                 Fax:   301-315-8285
Rockville, MD USA 20850                 email: tgraham@xxxxxxxxxxxxxxxx
=======================================================================


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


Current Thread
  • process-node-list, select-element, etc.....
    • Pursel, Frank - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA12860Mon, 18 May 1998 16:51:55 -0400 (EDT)
      • <Possible follow-ups>
      • Reynolds, Gregg - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id SAA15030Mon, 18 May 1998 18:34:38 -0400 (EDT)
        • Frank Pursel - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id IAA29846Tue, 19 May 1998 08:43:48 -0400 (EDT)
          • Tony Graham - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA02911Tue, 19 May 1998 11:32:04 -0400 (EDT) <=
          • Paul Prescod - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id NAA04875Tue, 19 May 1998 13:13:31 -0400 (EDT)