anchor.diff:  ;;;;; TRE environment
  -;;;;; Copyright (C) 2006-2007 Sven Klose <pixel@copei.de>
  +;;;;; Copyright (C) 2006-2008 Sven Klose <pixel@copei.de>
   ;;;;;
   ;;;;; LML function library
   
  
positive.code: (defmacro with-lml-expr ((name attrs childs) expr &body body)
    (with-gensym g
      `(with (,g ,expr
  	    ,name (first ,g))
        (multiple-value-bind (,attrs ,childs) (lml-attrs-and-childs ,g)
  	,@body))))
  
  ;;;; LML to XML conversion
  
negative.code:   "Evaluuate LML template element with its attributes assigned to variables
     of the same names. Variable !childs will contain the unevaluated list
     of child elements."
    (when tpl
      (if (consp tpl.)
  	    (mapcar #'eval-lml-template tpl.)
  	    (with-lml-expr (name attrs childs) tpl
  	      (eval `(let (,@(append (map-attrs-to-vars attrs)
  				                 `(!childs (eval-lml-template ,childs))))
  		           ,tpl))))))
  