Re: Copy a SGML structure and datas

Subject: Re: Copy a SGML structure and datas
From: Holger Klawitter <holger.klawitter@xxxxxx>
Date: Fri, 16 Jul 1999 12:32:17 +0200
>         Are there any short way to copy exactly the same structure and datas?
>         Is there same command?, Wich is it?

In jadedoc/transformation.htm you can find an example how a whole
SGML file is being copied:

(declare-flow-object-class element
  "UNREGISTERED::James Clark//Flow Object Class::element")

(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
              (cons (list name value)
                    (loop (cdr atts)))
              (loop (cdr atts)))))))

(default (make element
               attributes: (copy-attributes)))

Choosing the right default rule and a function to copy the attributes
already does most of the trick. 

Hope this Helps
	Holger Klawitter
-- 
Holger Klawitter                                       +49 (0)251 848 0637
holger.klawitter@xxxxxx            http://wwwmath.uni-muenster.de/u/holger


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


Current Thread