Varables and values... ¿?

Subject: Varables and values... ¿?
From: Reyes <reyes.garcia@xxxxxxxxxx>
Date: Mon, 08 Nov 1999 14:52:46 +0100
Hello,

I have two procedures, and I need that when the variable "path" in
copy-attributes is call, it has the value gave in GetGen. So, they must be
the same.
How can I make this? 

The procedures are:

;---------------------------------------------------------------------------
---
;   This macro takes the adress given, makes a new adress wich depends of 
;   "type" and  copies in the new SGML the dates stored in the new address.
;---------------------------------------------------------------------------
---
(define (GetGen address type)
   (let ((Rootpart (take-rootpart address))
	  (Infopart (take-infopart address))
	  (HWpart   (take-HWpart   address))
	  (Varpart  (take-varpart  address))
	  (Sprpart  (take-sprpart  address))
	 )
	 (if (string=? type IT)
	     (let ((path (string-append Rootpart "/" Infopart "/" 
					    varGen "/" varGen "/" Sprpart)))
		   (process-node-list (sgml-parse path))
	     )
	     (if (string=? type HW)
		  (let ((path (string-append Rootpart "/" varGen "/" 
						 HWpart "/" varGen "/" Sprpart)))
		  	(process-node-list (sgml-parse path))
		  )
		  (if (string=? type V)
		      (let ((path (string-append Rootpart "/" varGen "/" varGen
						      "/" Varpart "/" Sprpart)))
			    (process-node-list (sgml-parse path))
		      )
		      (if (string=? type L)
			   (let ((path (string-append Rootpart "/" varGen "/" 							  varGen
"/" varGen "/" 							  Sprpart)))
				 (process-node-list (sgml-parse path))
			   )
			   (process-node-list (sgml-parse address))
		      )
		  )
	     )
	 )
   )		
)

;---------------------------------------------------------------------------
---
;   This macro copies the actual node, soons, structure and datas in the new
;   instance.
;---------------------------------------------------------------------------
---
(define (copy-attributes #!optional (nd (current-node)))
  (let loop ((atts (named-node-list-names (attributes nd))))
    (if (null? atts)
        '()
        (let* ((name (car atts))
               (value (attribute-string name nd)))
          (if value
		  (if (string=? "ANKER" name)
		      (cons (list name (string-append path value))
					  (loop (cdr atts)))
		      (cons (list name value)
					  (loop (cdr atts)))
		  )
		  (loop (cdr atts))
	   )
	 )
    )
  )
)

;---------------------------------------------------------------------------
---
;   Allows that all the tag not defined but necesaries are copy in the new
;   instance by defect.
;---------------------------------------------------------------------------
---
(default (make element attributes: (copy-attributes)))





 
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