auch qname "xmlns" hat einen namespace, falls sax:*sowieso* an ist.
und im dom-builder nicht den namen des doctypes pruefen
This commit is contained in:
9
DOMTEST
9
DOMTEST
@ -586,7 +586,6 @@ implementationAttribute signed not supported, skipping test
|
|||||||
556/808 documentcreateattributeNS05.xml
|
556/808 documentcreateattributeNS05.xml
|
||||||
557/808 documentcreateattributeNS06.xml
|
557/808 documentcreateattributeNS06.xml
|
||||||
558/808 documentcreateattributeNS07.xml
|
558/808 documentcreateattributeNS07.xml
|
||||||
TEST FAILED: expected exception NAMESPACE_ERR
|
|
||||||
559/808 documentcreateelementNS01.xml
|
559/808 documentcreateelementNS01.xml
|
||||||
560/808 documentcreateelementNS02.xml
|
560/808 documentcreateelementNS02.xml
|
||||||
561/808 documentcreateelementNS05.xml
|
561/808 documentcreateelementNS05.xml
|
||||||
@ -671,7 +670,6 @@ TEST FAILED: The assertion DOMTEST-TESTS::|success| failed.
|
|||||||
613/808 elementhasattribute03.xml
|
613/808 elementhasattribute03.xml
|
||||||
614/808 elementhasattribute04.xml
|
614/808 elementhasattribute04.xml
|
||||||
615/808 elementhasattributens01.xml
|
615/808 elementhasattributens01.xml
|
||||||
TEST FAILED: The assertion DOMTEST-TESTS::|state| failed.
|
|
||||||
616/808 elementhasattributens02.xml
|
616/808 elementhasattributens02.xml
|
||||||
617/808 elementhasattributens03.xml
|
617/808 elementhasattributens03.xml
|
||||||
618/808 elementremoveattributens01.xml
|
618/808 elementremoveattributens01.xml
|
||||||
@ -690,7 +688,6 @@ implementationAttribute expandEntityReferences not supported, skipping test
|
|||||||
628/808 elementsetattributens04.xml
|
628/808 elementsetattributens04.xml
|
||||||
629/808 elementsetattributens05.xml
|
629/808 elementsetattributens05.xml
|
||||||
630/808 elementsetattributens08.xml
|
630/808 elementsetattributens08.xml
|
||||||
TEST FAILED: expected exception NAMESPACE_ERR
|
|
||||||
631/808 elementsetattributensurinull.xml
|
631/808 elementsetattributensurinull.xml
|
||||||
632/808 getAttributeNS01.xml
|
632/808 getAttributeNS01.xml
|
||||||
633/808 getAttributeNS02.xml
|
633/808 getAttributeNS02.xml
|
||||||
@ -807,8 +804,6 @@ TEST FAILED: There is no applicable method for the generic function
|
|||||||
(NIL).
|
(NIL).
|
||||||
719/808 namednodemapremovenameditemns03.xml
|
719/808 namednodemapremovenameditemns03.xml
|
||||||
720/808 namednodemapremovenameditemns04.xml
|
720/808 namednodemapremovenameditemns04.xml
|
||||||
TEST FAILED: NOT_FOUND_ERR (8):
|
|
||||||
#(120 109 108 110 115) not found in #<ATTRIBUTE-NODE-MAP {xxxxxxxx}>
|
|
||||||
721/808 namednodemapremovenameditemns05.xml
|
721/808 namednodemapremovenameditemns05.xml
|
||||||
722/808 namednodemapremovenameditemns06.xml
|
722/808 namednodemapremovenameditemns06.xml
|
||||||
723/808 namednodemapremovenameditemns07.xml
|
723/808 namednodemapremovenameditemns07.xml
|
||||||
@ -885,6 +880,7 @@ TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|newAttrName|
|
|||||||
775/808 prefix07.xml
|
775/808 prefix07.xml
|
||||||
776/808 prefix08.xml
|
776/808 prefix08.xml
|
||||||
777/808 prefix09.xml
|
777/808 prefix09.xml
|
||||||
|
TEST FAILED: expected exception NAMESPACE_ERR
|
||||||
778/808 prefix10.xml
|
778/808 prefix10.xml
|
||||||
779/808 prefix11.xml
|
779/808 prefix11.xml
|
||||||
780/808 publicId01.xml
|
780/808 publicId01.xml
|
||||||
@ -904,7 +900,6 @@ TEST FAILED: There is no applicable method for the generic function
|
|||||||
790/808 setAttributeNS05.xml
|
790/808 setAttributeNS05.xml
|
||||||
791/808 setAttributeNS06.xml
|
791/808 setAttributeNS06.xml
|
||||||
792/808 setAttributeNS07.xml
|
792/808 setAttributeNS07.xml
|
||||||
TEST FAILED: expected exception NAMESPACE_ERR
|
|
||||||
793/808 setAttributeNS09.xml
|
793/808 setAttributeNS09.xml
|
||||||
794/808 setAttributeNS10.xml
|
794/808 setAttributeNS10.xml
|
||||||
795/808 setAttributeNodeNS01.xml
|
795/808 setAttributeNodeNS01.xml
|
||||||
@ -920,4 +915,4 @@ TEST FAILED: expected exception INUSE_ATTRIBUTE_ERR
|
|||||||
803/808 setNamedItemNS04.xml
|
803/808 setNamedItemNS04.xml
|
||||||
804/808 setNamedItemNS05.xml
|
804/808 setNamedItemNS05.xml
|
||||||
805/808 systemId01.xml
|
805/808 systemId01.xml
|
||||||
38/763 tests failed; 45 tests were skipped
|
34/763 tests failed; 45 tests were skipped
|
||||||
@ -45,8 +45,7 @@
|
|||||||
|
|
||||||
(defmethod sax:start-dtd ((handler dom-builder) name publicid systemid)
|
(defmethod sax:start-dtd ((handler dom-builder) name publicid systemid)
|
||||||
(let* ((document (document handler))
|
(let* ((document (document handler))
|
||||||
(doctype
|
(doctype (%create-document-type name publicid systemid)))
|
||||||
(dom:create-document-type 'implementation name publicid systemid)))
|
|
||||||
(setf (slot-value doctype 'dom-impl::owner) document
|
(setf (slot-value doctype 'dom-impl::owner) document
|
||||||
(slot-value (dom:notations doctype) 'dom-impl::owner) document
|
(slot-value (dom:notations doctype) 'dom-impl::owner) document
|
||||||
(slot-value (dom:entities doctype) 'dom-impl::owner) document
|
(slot-value (dom:entities doctype) 'dom-impl::owner) document
|
||||||
|
|||||||
@ -217,9 +217,7 @@
|
|||||||
(or (string-equal (rod-string version) "1.0")
|
(or (string-equal (rod-string version) "1.0")
|
||||||
(string-equal (rod-string version) "2.0"))))
|
(string-equal (rod-string version) "2.0"))))
|
||||||
|
|
||||||
(defmethod dom:create-document-type
|
(defun %create-document-type (name publicid systemid)
|
||||||
((factory (eql 'implementation)) name publicid systemid)
|
|
||||||
(safe-split-qname name #"")
|
|
||||||
(make-instance 'dom-impl::document-type
|
(make-instance 'dom-impl::document-type
|
||||||
:name name
|
:name name
|
||||||
:notations (make-instance 'dom-impl::named-node-map
|
:notations (make-instance 'dom-impl::named-node-map
|
||||||
@ -231,6 +229,11 @@
|
|||||||
:public-id publicid
|
:public-id publicid
|
||||||
:system-id systemid))
|
: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
|
(defmethod dom:create-document
|
||||||
((factory (eql 'implementation)) uri qname doctype)
|
((factory (eql 'implementation)) uri qname doctype)
|
||||||
(let ((document (make-instance 'dom-impl::document)))
|
(let ((document (make-instance 'dom-impl::document)))
|
||||||
@ -363,6 +366,9 @@
|
|||||||
(defmethod dom:create-attribute-ns ((document document) uri qname)
|
(defmethod dom:create-attribute-ns ((document document) uri qname)
|
||||||
(setf uri (%rod uri))
|
(setf uri (%rod uri))
|
||||||
(setf qname (%rod qname))
|
(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)
|
(multiple-value-bind (prefix local-name)
|
||||||
(safe-split-qname qname uri)
|
(safe-split-qname qname uri)
|
||||||
(make-instance 'attribute
|
(make-instance 'attribute
|
||||||
|
|||||||
@ -3466,15 +3466,19 @@
|
|||||||
|
|
||||||
(defun set-attribute-namespace (attribute)
|
(defun set-attribute-namespace (attribute)
|
||||||
(let ((qname (sax:attribute-qname attribute)))
|
(let ((qname (sax:attribute-qname attribute)))
|
||||||
(multiple-value-bind (prefix local-name) (split-qname qname)
|
(if (and sax:*use-xmlns-namespace* (rod= qname #"xmlns"))
|
||||||
(declare (ignorable local-name))
|
(setf (sax:attribute-namespace-uri attribute)
|
||||||
(when (and prefix ;; default namespace doesn't apply to attributes
|
#"http://www.w3.org/2000/xmlns/")
|
||||||
(or (not (rod= #"xmlns" prefix)) sax:*use-xmlns-namespace*))
|
(multiple-value-bind (prefix local-name) (split-qname qname)
|
||||||
(multiple-value-bind (uri prefix local-name)
|
(declare (ignorable local-name))
|
||||||
(decode-qname qname)
|
(when (and prefix ;; default namespace doesn't apply to attributes
|
||||||
(declare (ignore prefix))
|
(or (not (rod= #"xmlns" prefix))
|
||||||
(setf (sax:attribute-namespace-uri attribute) uri)
|
sax:*use-xmlns-namespace*))
|
||||||
(setf (sax:attribute-local-name attribute) local-name))))))
|
(multiple-value-bind (uri prefix local-name)
|
||||||
|
(decode-qname qname)
|
||||||
|
(declare (ignore prefix))
|
||||||
|
(setf (sax:attribute-namespace-uri attribute) uri)
|
||||||
|
(setf (sax:attribute-local-name attribute) local-name)))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user