Re: Finding the root element

Subject: Re: Finding the root element
From: Daniel Speck <dspeck@xxxxxxx>
Date: Thu, 29 Oct 1998 08:45:19 -0500
W. Eliot Kimber wrote:

> At 07:38 AM 10/29/98 -0500, Norman Walsh wrote:
> >Apologies if I asked this once before...
> >
> >Is it possible to find the node of the document element outside
> >the context of another element?  Specifically, can I find it in
> >a function called from (root)?
> This should work from any node in the grove:
> (define (docelem node)
>   (node-propety 'document-element
>     (node-property 'grove-root node)))

So with what argument what do you call this function in the (root ...)
construction rule? (current-node) isn't defined in the root construction
rule. (process-children) is defined in the standard such that it behaves
differently (or the definition of "children" is different, I'm not sure
which) in the (root ...) construction rule. I've had this problem myself
and I usually just end up looking for the document element while processing
some element. Any ideas?


Daniel Speck
Bureau of National Affairs, Inc.               Voice: +1 202.452.6596
1231 25th Street, NW                             Fax: +1 202.331.5178
Washington, DC 20037                          e-mail:  dspeck@xxxxxxx

 DSSSList info and archive:

Current Thread