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ä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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Getting the contents of an elem, Russell Steven Shawn | Thread | Tutorial., Daniel M. German |
Tutorial., Daniel M. German | Date | Getting a NewLine, Chuck Darney |
Month |