Subject: Re: update a global variable in a procedure ? From: Reyes <reyes.garcia@xxxxxxxxxx> Date: Wed, 10 Nov 1999 11:27:34 +0100 |
At 12:17 08.11.99 -0500, you wrote: >In general, you will either bind a local environment to a >new procedure with (lambda) or use a (let) to determine a >value by calling a common procedure to do context-specific >query. > >The former is more effective when you can pass the value >down as an argument. The latter is an alternative when you >can't alter the argument list (such as in an element construction >rule), and the arguments are derived from some other part >of the document. > I think, that I must explain. I have a node-list from a (sgml-parse address) call. In this new SGML I must replace all the attributes "ANKER=X" by "ANKER=path#X". I have this string "path" only in the procedure that I call (sgml-parse), path is similar to address. I have think to read the new SGML complet and rewrite it but with the new value of the attribute. So: (define (call-sgml address) (let ((nl (node-property 'document-element (sgml-parse address))) (process-new-nl nl address) ) ) (define (process-new-nl nl path) (let loop ((result (empty-node-list)) (rest-nl nl)) (if (node-list-emty? rest-nl) result (let ((att-list (copy-attribute path (node-list-first rest-nl)))) (loop (node-list result ????????) (node-list-rest rest-nl)) ) ) ) ) But, I don't Know how can I make a node-list with new attributes. (See ???????? :-) ) Can anybody help me? Thanks, Reyes Reyes Garcia-Rosado STAR GmbH Tel. +49 7735 939801 Westendstrasse 1 e-Mail. rgr@xxxxxxxxxx D-78337 Oehningen http://www.star-ag.ch DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: update a global variable in a p, Mitch C. Amiano | Thread | Re: update a global variable in a p, amiamc |
Re: OpenJade 1.3pre won't compile, Carlos Villegas | Date | Re: Varables and values... ¿?, amiamc |
Month |