| 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 | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: process-node-list, select-eleme, Reynolds, Gregg | Thread | Re: process-node-list, select-eleme, Tony Graham | 
| Re: Possible to use just table part, Boris Goldowsky | Date | Re: process-node-list, select-eleme, Tony Graham | 
| Month |