[closure-cvs] CVS update: cxml/dom/dom-impl.lisp
David Lichteblau
dlichteblau at common-lisp.net
Wed Apr 6 19:23:20 UTC 2005
Update of /project/cxml/cvsroot/cxml/dom
In directory common-lisp.net:/tmp/cvs-serv9153/dom
Modified Files:
dom-impl.lisp
Log Message:
documents returned by (dom:create-document) don't a have dtd, so don't try to
default attribute values
Date: Wed Apr 6 21:23:18 2005
Author: dlichteblau
Index: cxml/dom/dom-impl.lisp
diff -u cxml/dom/dom-impl.lisp:1.2 cxml/dom/dom-impl.lisp:1.3
--- cxml/dom/dom-impl.lisp:1.2 Fri Mar 25 19:16:30 2005
+++ cxml/dom/dom-impl.lisp Wed Apr 6 21:23:18 2005
@@ -781,14 +781,14 @@
(defun maybe-add-default-attribute (element name)
(let* ((dtd (dtd (slot-value element 'owner)))
- (e (cxml::find-element (dom:tag-name element) dtd))
+ (e (when dtd (cxml::find-element (dom:tag-name element) dtd)))
(a (when e (cxml::find-attribute e name))))
(when (and a (listp (cxml::attdef-default a)))
(add-default-attribute element a))))
(defun add-default-attributes (element)
(let* ((dtd (dtd (slot-value element 'owner)))
- (e (cxml::find-element (dom:tag-name element) dtd)))
+ (e (when dtd (cxml::find-element (dom:tag-name element) dtd))))
(when e
(dolist (a (cxml::elmdef-attributes e))
(when (and a (listp (cxml::attdef-default a)))
More information about the Closure-cvs
mailing list