|
Subject: Re: Varables and values... ¿? From: amiamc@xxxxxxxxxxxxxxx Date: Mon, 08 Nov 1999 12:03:18 -0500 |
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.
Reyes wrote:
>
> 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 "/" varGe
n
> "/" 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
-- --
Mitch C. Amiano Mitch.C.Amiano@xxxxxxxxxxxxxxx
Software Development Engineer
Engineering Tools and Process Engineering
Engineering Services
Raleigh Design Center
Alcatel USA
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
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 -> |
|---|---|---|
| Re: Varables and values... ¿?, amiamc | Thread | Re: Varables and values... ¿?, amiamc |
| Re: update a global variable in a p, amiamc | Date | Re: QuarkXpress backend for jade, adam |
| Month |