documents returned by (dom:create-document) don't a have dtd, so don't try to
default attribute values
This commit is contained in:
@ -781,14 +781,14 @@
|
|||||||
|
|
||||||
(defun maybe-add-default-attribute (element name)
|
(defun maybe-add-default-attribute (element name)
|
||||||
(let* ((dtd (dtd (slot-value element 'owner)))
|
(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))))
|
(a (when e (cxml::find-attribute e name))))
|
||||||
(when (and a (listp (cxml::attdef-default a)))
|
(when (and a (listp (cxml::attdef-default a)))
|
||||||
(add-default-attribute element a))))
|
(add-default-attribute element a))))
|
||||||
|
|
||||||
(defun add-default-attributes (element)
|
(defun add-default-attributes (element)
|
||||||
(let* ((dtd (dtd (slot-value element 'owner)))
|
(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
|
(when e
|
||||||
(dolist (a (cxml::elmdef-attributes e))
|
(dolist (a (cxml::elmdef-attributes e))
|
||||||
(when (and a (listp (cxml::attdef-default a)))
|
(when (and a (listp (cxml::attdef-default a)))
|
||||||
|
|||||||
Reference in New Issue
Block a user