[bknr-cvs] hans changed trunk/bknr/web/src/web/template-handler.lisp

BKNR Commits bknr at bknr.net
Mon Sep 1 16:17:30 UTC 2008


Revision: 3764
Author: hans
URL: http://bknr.net/trac/changeset/3764

Another attempt to fix the template handler.  Not yet done, will work on it later.

U   trunk/bknr/web/src/web/template-handler.lisp

Modified: trunk/bknr/web/src/web/template-handler.lisp
===================================================================
--- trunk/bknr/web/src/web/template-handler.lisp	2008-09-01 16:08:50 UTC (rev 3763)
+++ trunk/bknr/web/src/web/template-handler.lisp	2008-09-01 16:17:30 UTC (rev 3764)
@@ -148,13 +148,15 @@
          (nsuri-alias-map (make-hash-table :test #'equal)))
     (setf (gethash "http://www.w3.org/XML/1998/namespace" nsuri-alias-map) "xml")
     (dolist (attribute (cxml-xmls:node-attrs dom))
-      (destructuring-bind ((alias . namespace-url) value) attribute
-        (cond
-          ((equal namespace-url "http://www.w3.org/2000/xmlns/")
-           (setf (gethash value nsuri-alias-map) alias)
-           (push attribute namespace-declarations))
-          (t
-           (push attribute real-attributes)))))
+      (if (consp (car attribute))
+          (destructuring-bind ((alias . namespace-url) value) attribute
+            (cond
+              ((equal namespace-url "http://www.w3.org/2000/xmlns/")
+               (setf (gethash value nsuri-alias-map) alias)
+               (push attribute namespace-declarations))
+              (t
+               (push attribute real-attributes))))
+          (push attribute real-attributes)))
     (setf (cxml-xmls:node-attrs dom) real-attributes)
     (make-parsed-template
      :namespace-attrs (cxml-xmls::compute-attributes/lnames (cxml-xmls:make-node :attrs namespace-declarations) t)




More information about the Bknr-cvs mailing list