RE: Getting the contents of an element

Subject: RE: Getting the contents of an element
From: "Reynolds, Gregg" <greynolds@xxxxxxxxxxxxxx>
Date: Tue, 21 Apr 1998 11:16:00 -0500
Have you tried (current-root)?  Sect. 10.1.  I don't know if it works
but (current-node) always has.

> -----Original Message-----
> From:	Georg Rehm [SMTP:georg@xxxxxxxxxxxxxxxxxxxxxxxxxxx]
> Sent:	Monday, April 20, 1998 3:54 AM
> To:	dssslist@xxxxxxxxxxxxxxxx
> Subject:	Getting the contents of an element
> 
> <!DOCTYPE text system "text.dtd"> 
> <TEXT> 
> 	<META> 
> 		<COPYRIGHT>Copyright [...]</COPYRIGHT>
> 		<TEXTID>T921116.10</TEXTID>
> 		<ZEITUNG>TAZ</ZEITUNG> 
> 		[...]
> 	</META>
> 
> 	<PARAGRAPH ID=P1 FKT=H1> <SATZ ID=P1S1 NUM=1>Deutschland, 
> 	deine T&auml;ter!</SATZ></PARAGRAPH>
> 	[...]
> </TEXT>
> 
> What I'm currently trying to do is to insert the contents of the
> <TEXTID>
> tag (a short string like the above, e.g. "T921116.10") into the
> <TITLE> 
> tag of the resulting HTML document. Furthermore, <TEXTID> has to be
> pro-
> cessed in another place in my DSSSL script (the latter works just
> fine).
> Oisin McGuinness suggested the following function (get-contents gi) in
> 
> an email which he sent to me after my initial posting to
> comp.text.sgml:
> 
> ; my top-level gi
> 
> (define *top-gi* "TEXT")
> 
> ; let's do anything with the textid element 
> 
> (element textid
>         (make element gi: "U")
> )
> 
> (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")))
>                         (make element gi: "BODY"
> 				[...]
>  
> This is a kind of lengthy excerpt from my DSSSL "style sheet". I call
> (get-contents gi) in the appropriate place, I think. Furthermore, the
> function definition looks really good to me. But, and that is the
> problem: _Nothing_ happens inside the <TITLE> tag.
> 
> Any help to the solution of this bug is really appreciated,
> 
> Greetings,
> 	Georg
> -- 
> Georg Rehm
> georg@xxxxxxxxxxxxxxxxxxxxxxx
> Institute for Semantic Information-Processing, University of
> Osnabrueck, FRG
> 
> 
>  DSSSList info and archive:
> http://www.mulberrytech.com/dsssl/dssslist


 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) <=