|
Subject: (dsssl) read-entity From: "Maltby, David G" <david.g.maltby@xxxxxxxx> Date: Tue, 28 Aug 2001 09:54:41 -0400 |
Hello all -
I have the need to read a file, other then the one I am processing with Jade
(v1.2, SP 1.3.2), to use the information as part of the processing. Norm
Walsh, in the Modular DocBook Stylesheet Library $Id: dblib.dsl,v 1.42
1999/04/20 12:51:11 nwalsh Exp $, uses a procedure called (read-entity) to
handle this task. More specifically:
(define (include-file fileref)
;; REFENTRY 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)))
However after adding the (include-file) procedure to my DSSSL library and
calling it in an element rule, Jade complains 'reference to undefined
variable "read-entity"'. I do not find (read-entity) defined anywhere in
the Modular DocBook Stylesheet Library, the DSSSL Documentation Project
Procedures Library, nor the DSSSL Standard. I was hoping that this was a
Jade extension. Does anyone know how this is being done? I am not using
DocBook.
Regards, David Maltby
Cocoa Beach, FL
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: (dsssl) OT: parsed vs event mod, Joerg F.Wittenberger | Thread | Re: (dsssl) read-entity, Paul Tyson |
| Re: (dsssl) wraparound, roconnor | Date | Re: (dsssl) read-entity, Paul Tyson |
| Month |