Re: Varables and values... ¿?

Subject: Re: Varables and values... ¿?
From: Reyes <reyes.garcia@xxxxxxxxxx>
Date: Tue, 09 Nov 1999 10:58:24 +0100
At 12:03 08.11.99 -0500, you wrote:
>You are, in effect, asking how you can bind a new environment
>(path) to a new procedure, and have the new procedure be called
>by the default element rule for just those elements 
>parsed as a result of a corresponding call to sgml-parse.
>For this, you may be able to recurse over the element nodes
>explicitly, instead of using the default element construction rule.
>Use a lambda procedure which is bound to a specific "path"...
>something involving (apply-map) and (sosofo-append), perhaps.

	I have tried to make this, I have a procedure (GetAnchor) where I know the
variabe "path" and I have the node list where is the att "ANKER".
I have make this:

(define (GetAnchor node att son complet)
   (let* ((anker (attribute-string att node))
	   (path (take-path anker))
	   (nl (sgml-parse path))
	   (new (select-elements (descendants (node-property 'document-element
								      nl)) son))
	   (list-att (list (take-anker anker)))
	  (let loop ((n new))
		(if (node-list-empty? n)
		    (make sequence (empty-sosofo))
		    (if (member (attribute-string "ANKER" (node-list-first n))
			 (make element attributes: (c-a anker (node-list-first n))
				(make sequence (sosofo-append (process-node-list 
			 (loop (node-list-rest n))

But (c-a) works with the current node, and not with the new node.

Where c-a is:

(define (c-a path nd)
  (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 path)
					  (loop (cdr atts)))
			  (cons (list name value)
					  (loop (cdr atts)))
		  (loop (cdr atts))

What have I made wrong?


Reyes Garcia-Rosado						
STAR GmbH	          Tel.     +49 7735 939801	
Westendstrasse 1        e-Mail.  rgr@xxxxxxxxxx	
D-78337  Oehningen	

 DSSSList info and archive:

Current Thread