[cxml-cvs] CVS update: cxml/dom/dom-builder.lisp cxml/dom/dom-impl.lisp
David Lichteblau
dlichteblau at common-lisp.net
Sun Dec 4 23:20:27 UTC 2005
Update of /project/cxml/cvsroot/cxml/dom
In directory common-lisp.net:/tmp/cvs-serv13237/dom
Modified Files:
dom-builder.lisp dom-impl.lisp
Log Message:
auch qname "xmlns" hat einen namespace, falls sax:*sowieso* an ist.
und im dom-builder nicht den namen des doctypes pruefen
Date: Mon Dec 5 00:20:25 2005
Author: dlichteblau
Index: cxml/dom/dom-builder.lisp
diff -u cxml/dom/dom-builder.lisp:1.6 cxml/dom/dom-builder.lisp:1.7
--- cxml/dom/dom-builder.lisp:1.6 Sun Dec 4 23:18:34 2005
+++ cxml/dom/dom-builder.lisp Mon Dec 5 00:20:25 2005
@@ -45,8 +45,7 @@
(defmethod sax:start-dtd ((handler dom-builder) name publicid systemid)
(let* ((document (document handler))
- (doctype
- (dom:create-document-type 'implementation name publicid systemid)))
+ (doctype (%create-document-type name publicid systemid)))
(setf (slot-value doctype 'dom-impl::owner) document
(slot-value (dom:notations doctype) 'dom-impl::owner) document
(slot-value (dom:entities doctype) 'dom-impl::owner) document
Index: cxml/dom/dom-impl.lisp
diff -u cxml/dom/dom-impl.lisp:1.15 cxml/dom/dom-impl.lisp:1.16
--- cxml/dom/dom-impl.lisp:1.15 Sun Dec 4 23:57:30 2005
+++ cxml/dom/dom-impl.lisp Mon Dec 5 00:20:25 2005
@@ -217,9 +217,7 @@
(or (string-equal (rod-string version) "1.0")
(string-equal (rod-string version) "2.0"))))
-(defmethod dom:create-document-type
- ((factory (eql 'implementation)) name publicid systemid)
- (safe-split-qname name #"")
+(defun %create-document-type (name publicid systemid)
(make-instance 'dom-impl::document-type
:name name
:notations (make-instance 'dom-impl::named-node-map
@@ -231,6 +229,11 @@
:public-id publicid
:system-id systemid))
+(defmethod dom:create-document-type
+ ((factory (eql 'implementation)) name publicid systemid)
+ (safe-split-qname name #"")
+ (%create-document-type name publicid systemid))
+
(defmethod dom:create-document
((factory (eql 'implementation)) uri qname doctype)
(let ((document (make-instance 'dom-impl::document)))
@@ -363,6 +366,9 @@
(defmethod dom:create-attribute-ns ((document document) uri qname)
(setf uri (%rod uri))
(setf qname (%rod qname))
+ (when (and (rod= qname #"xmlns")
+ (not (rod= uri #"http://www.w3.org/2000/xmlns/")))
+ (dom-error :NAMESPACE_ERR "invalid uri for qname `xmlns'"))
(multiple-value-bind (prefix local-name)
(safe-split-qname qname uri)
(make-instance 'attribute
More information about the Cxml-cvs
mailing list