From 99546f169ee331a2c7e95dd18c45f1fd351a629d Mon Sep 17 00:00:00 2001 From: dlichteblau Date: Wed, 6 Apr 2005 19:23:18 +0000 Subject: [PATCH] documents returned by (dom:create-document) don't a have dtd, so don't try to default attribute values --- dom/dom-impl.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/dom-impl.lisp b/dom/dom-impl.lisp index 08edd83..e06e1d5 100644 --- a/dom/dom-impl.lisp +++ b/dom/dom-impl.lisp @@ -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)))