Subject: Re: 3 questions From: J-P Theberge <yesod@xxxxxxx> Date: 10 Dec 1998 11:03:27 -0500 |
Norman Walsh <ndw@xxxxxxxxxx> writes: > (define (include-file fileref) > ;; REFENTRY lib-include-file > ;; PURP Return the literal content of fileref > ;; DESC > ;; Opens and loads fileref with (read-entity); returns the content > ;; of fileref as a (literal). Trims the last trailing newline off > ;; the file so that "the right thing" happens in asis environments. > ;; /DESC > ;; /REFENTRY > (let* ((newline #\U-000D) > (file-content (read-entity fileref)) > (file-length (string-length file-content)) > ;; If the last char is a newline, drop it, otherwise print it... > (content (if (equal? newline (string-ref file-content > (- file-length 1))) > (substring file-content 0 (- file-length 1)) > file-content))) > (literal content))) > > (element include > (include-file (attribute-string "file"))) Is there something I must declare first? To avoid: jade:compress.dsl:22:18:E: reference to undefined variable "read-entity" Thanks! -- JP Theberge tech@xxxxxxxxxxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: 3 questions, Norman Walsh | Thread | Re: 3 questions, Norman Walsh |
Re: transferring attributes, Tony Graham | Date | returning a nodelist, Mike Sosteric |
Month |