Re: Getting the contents of an element

Subject: Re: Getting the contents of an element
From: Chris Maden <crism@xxxxxxx>
Date: Tue, 21 Apr 1998 10:36:03 -0400 (EDT)
[Georg Rehm]
> (define (get-contents gi)
>         (process-node-list 
>                 (node-list-first 
>                         (select-elements 
>                                 (descendants (ancestor *top-gi*)) gi))))
> 
> ; Top-Level Element
> 
> (element text
>         (make sequence
>                 (make document-type [...]
>                 (make element gi: "HTML"
>                         (make element gi: "HEAD"
>                                 (make element gi: "TITLE"
>                                         (get-contents "TEXTID")))

(get-contents) looks for an ancestor of the current node called
"TEXT".  From <text> itself, you won't find any such ancestor, and so
this all falls apart.

Instead of (ancestor *top-gi*), try (grove-root (current-node)).

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


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


Current Thread
  • Getting the contents of an element
    • Georg Rehm - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id CAA08461Tue, 21 Apr 1998 02:07:30 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA19021Tue, 21 Apr 1998 10:41:41 -0400 (EDT) <=
        • Georg Rehm - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA19474Tue, 21 Apr 1998 11:02:33 -0400 (EDT)
        • Russell Steven Shawn O'Connor - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA19689Tue, 21 Apr 1998 11:08:35 -0400 (EDT)
      • <Possible follow-ups>
      • Reynolds, Gregg - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA21435Tue, 21 Apr 1998 12:19:38 -0400 (EDT)