Re: How to find a procedure given a symbol or string

Subject: Re: How to find a procedure given a symbol or string
From: Boris Goldowsky <boris@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Jul 1999 13:21:58 -0400 (EDT)
>> To paraphrase Mitch C. Amiano <amiamc@xxxxxxxxxxxxxxx> question:
>> given tags like
>>   <jediknight   name="obiwan" func="apprentice">
>> and DSSSL functions
>>   (define (apprentice name) (string-append name " is an apprentice" ))
>> I want to use the value of "func" to call the correct DSSSL function...

Something like the following ought to work:

(element JEDIKNIGHT
  (let ((func (string->symbol (attribute-string "FUNC"))))
    (apply func (attribute-string "NAME"))))

Bng


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread