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

Subject: Re: process-node-list, select-element, etc.....
From: Frank Pursel <cc001987@xxxxxxxxxxxxxx>
Date: Tue, 19 May 1998 02:57:01 -0400
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.  


<!doctype test [
<!element test - - (header,act+)>
<!element header - o EMPTY>
<!element act - - (note | step)+>
<!element step - - (#PCDATA)>
<!element note - - (#PCDATA)>
]>
<test>
<header>
<act>
<step>First step</step>
<note>1 important note</note>
</act>
<act>
<step>First step again</step>
<note>note 2</note>
<step>act 2 step 2</step>
</act>
<act>
<note>note 3</note>
</act>
</test>

-----Here is the dsssl stuff-------

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

(root (make simple-page-sequence
         (make rule)
         (process-children)))

(element header (make sequence
    (make rule)
    (process-node-list
      (select-elements (descendants (ancestor "TEST" (current-node))) 'NOTE))))

(element act (make sequence (make rule) (process-children)))
(element step (make paragraph))
(element note (make paragraph))
-- 
------------------------------------------------------------------------------
Frank Pursel  	           It does not take much strength to do things, but it 
cc001987@xxxxxxxxxxxxxx	   requires great strength to decide on what to do. 
				-- Elbert Hubbard
------------------------------------------------------------------------------ 


 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)