Commit 685e0bd8 authored by david's avatar david

Revision: cxml--devel--1.0--patch-67

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Fri Feb  6 17:50:01 CET 2004
Standard-date: 2004-02-06 16:50:01 GMT
Modified-files: xml/dom-impl.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-67
Summary: more NAME syntax checks: CREATE-ELEMENT, SET-ATTRIBUTE

more NAME syntax checks: CREATE-ELEMENT, SET-ATTRIBUTE
parent 1ace60cb
......@@ -128,6 +128,8 @@
(defmethod dom:create-element ((document document) tag-name)
(setf tag-name (rod tag-name))
(unless (xml::valid-name-p tag-name)
(dom-error :INVALID_CHARACTER_ERR "not a name: ~A" (rod-string tag-name)))
(make-instance 'element
:tag-name tag-name
:owner document))
......@@ -157,6 +159,8 @@
(defmethod dom:create-processing-instruction ((document document) target data)
(setf target (rod target))
(setf data (rod data))
(unless (xml::valid-name-p target)
(dom-error :INVALID_CHARACTER_ERR "not a name: ~A" (rod-string target)))
(make-instance 'processing-instruction
:owner document
:target target
......@@ -555,12 +559,9 @@
(defmethod dom:set-attribute ((element element) name value)
(assert-writeable element)
(with-slots (owner) element
(dom:set-attribute-node
element (make-instance 'attribute
:owner owner
:name name
:value value
:specified-p t))
(let ((attr (dom:create-attribute owner name)))
(setf (dom:value attr) value)
(dom:set-attribute-node element attr))
(values)))
(defmethod dom:remove-attribute ((element element) name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment