Subject: Re: (dsssl) read-entity From: "Paul Tyson" <ptyso@xxxxxxxxxxxxx> Date: Tue, 28 Aug 2001 07:31:39 -0700 |
David, Indeed it is a jade extension. From the openjade 1.3 documentation: ================================== External entity access (read-entity string) This returns a string containing the contents of the external entity with system identifier string. This should be used only for textual entities (CDATA and SDATA), and not for binary entities (NDATA). ================================== You'll have to define it as a procedure in your stylesheet like this: (define read-entity (external-procedure "UNREGISTERED::James Clark//Procedure::read-entity")) Later, Paul Tyson paul@xxxxxxxxxxxxxxxxxxxxxx ----- Original Message ----- From: Maltby, David G <david.g.maltby@xxxxxxxx> To: DSSSList (E-mail) <dssslist@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, August 28, 2001 6:54 AM Subject: (dsssl) read-entity > 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 DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
(dsssl) read-entity, Maltby, David G | Thread | Re: (dsssl) read-entity, Tony Graham |
(dsssl) read-entity, Maltby, David G | Date | Re: (dsssl) read-entity, Tony Graham |
Month |