diff --git a/DOMTEST b/DOMTEST index 03aada6..75bd0ba 100644 --- a/DOMTEST +++ b/DOMTEST @@ -557,14 +557,12 @@ TEST FAILED: There is no applicable method for the generic function when called with arguments (NIL). 525/808 attrgetownerelement02.xml -TEST FAILED: The slot DOM-IMPL::OWNER-ELEMENT is unbound in the object #. 526/808 attrgetownerelement03.xml -TEST FAILED: Argument Y is not a NUMBER: #\x 527/808 attrgetownerelement04.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL T). + (# NIL T). 528/808 attrgetownerelement05.xml TEST FAILED: There is no applicable method for the generic function # @@ -586,37 +584,37 @@ TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|attrName| TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 536/808 createDocument02.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 537/808 createDocument03.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 538/808 createDocument04.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 539/808 createDocument05.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 540/808 createDocument06.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 541/808 createDocument07.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 542/808 createDocument08.xml TEST FAILED: There is no applicable method for the generic function # @@ -652,7 +650,6 @@ TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|nodeName| #(116 101 115 116) 'DOMTEST::%EQUAL) failed. 553/808 documentcreateattributeNS02.xml -TEST FAILED: Argument Y is not a NUMBER: #\x 554/808 documentcreateattributeNS03.xml 555/808 documentcreateattributeNS04.xml TEST FAILED: The variable CXML::*CTX* is unbound. @@ -661,13 +658,13 @@ TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 557/808 documentcreateattributeNS06.xml TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 558/808 documentcreateattributeNS07.xml TEST FAILED: expected exception NAMESPACE_ERR 559/808 documentcreateelementNS01.xml @@ -683,13 +680,13 @@ TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 563/808 documentgetelementbyid01.xml 564/808 documentgetelementsbytagnameNS01.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 565/808 documentgetelementsbytagnameNS02.xml TEST FAILED: The assertion (EQL (LENGTH DOMTEST::COLLECTION) 6) failed. 566/808 documentgetelementsbytagnameNS03.xml @@ -700,34 +697,34 @@ TEST FAILED: The assertion (EQL (LENGTH DOMTEST::COLLECTION) 6) failed. TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL NIL). + (# NIL NIL). 571/808 documentimportnode03.xml 572/808 documentimportnode04.xml TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 573/808 documentimportnode05.xml -TEST FAILED: The slot DOM-IMPL::NAMESPACE-URI is unbound in the object #. +TEST FAILED: The slot DOM-IMPL::NAMESPACE-URI is unbound in the object #. 574/808 documentimportnode06.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# - # NIL). + (# + # NIL). 575/808 documentimportnode07.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# - # T). + (# + # T). 576/808 documentimportnode08.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# - # T). + (# + # T). 577/808 documentimportnode09.xml 578/808 documentimportnode10.xml 579/808 documentimportnode11.xml @@ -746,7 +743,7 @@ TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 587/808 documentimportnode20.xml implementationAttribute expandEntityReferences not supported, skipping test 588/808 documentimportnode21.xml @@ -756,7 +753,7 @@ TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 590/808 documenttypeinternalSubset01.xml 591/808 documenttypepublicid01.xml 592/808 documenttypesystemid01.xml @@ -764,22 +761,22 @@ TEST FAILED: When attempting to TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 594/808 domimplementationcreatedocument04.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 595/808 domimplementationcreatedocument05.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 596/808 domimplementationcreatedocument07.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 597/808 domimplementationcreatedocumenttype01.xml 598/808 domimplementationcreatedocumenttype02.xml 599/808 domimplementationcreatedocumenttype04.xml @@ -813,7 +810,7 @@ TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|attrValue| 'DOMTEST::%EQUAL) failed. 608/808 elementgetelementsbytagnamens02.xml 609/808 elementgetelementsbytagnamens04.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: The assertion (EQL (LENGTH DOMTEST::COLLECTION) 1) failed. 610/808 elementgetelementsbytagnamens05.xml 611/808 elementhasattribute01.xml 612/808 elementhasattribute02.xml @@ -829,9 +826,12 @@ TEST FAILED: The assertion DOMTEST-TESTS::|state| failed. TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL). + (# NIL). 619/808 elementsetattributenodens01.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: There is no applicable method for the generic function + # + when called with arguments + (NIL). 620/808 elementsetattributenodens02.xml TEST FAILED: There is no applicable method for the generic function # @@ -841,13 +841,16 @@ TEST FAILED: There is no applicable method for the generic function TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL). + (# NIL). 622/808 elementsetattributenodens04.xml 623/808 elementsetattributenodens05.xml 624/808 elementsetattributenodens06.xml implementationAttribute expandEntityReferences not supported, skipping test 625/808 elementsetattributens01.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: There is no applicable method for the generic function + # + when called with arguments + (NIL). 626/808 elementsetattributens02.xml TEST FAILED: There is no applicable method for the generic function # @@ -864,11 +867,10 @@ TEST FAILED: There is no applicable method for the generic function when called with arguments (NIL). 628/808 elementsetattributens04.xml -TEST FAILED: Argument Y is not a NUMBER: #\x 629/808 elementsetattributens05.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: expected exception NAMESPACE_ERR 630/808 elementsetattributens08.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: expected exception NAMESPACE_ERR 631/808 elementsetattributensurinull.xml TEST FAILED: expected exception NAMESPACE_ERR 632/808 getAttributeNS01.xml @@ -880,7 +882,7 @@ TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|attrValue| TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL). + (# NIL). 635/808 getAttributeNS04.xml TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|attrValue| #(78 101 119 86 97 108 117 101) @@ -969,14 +971,14 @@ not implemented TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# - # NIL). + (# + # NIL). 693/808 importNode17.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# - # NIL). + (# + # NIL). 694/808 internalSubset01.xml TEST FAILED: The assertion (NULL DOMTEST-TESTS::|internal|) failed. 695/808 isSupported01.xml @@ -995,9 +997,6 @@ TEST FAILED: The assertion DOMTEST-TESTS::|state| failed. 706/808 isSupported14.xml TEST FAILED: The assertion DOMTEST-TESTS::|state| failed. 707/808 localName01.xml -TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|localName| - #(100 111 109 101 115 116 105 99) - 'DOMTEST::%EQUAL) failed. 708/808 localName02.xml 709/808 localName03.xml 710/808 localName04.xml @@ -1024,12 +1023,11 @@ TEST FAILED: There is no applicable method for the generic function when called with arguments (NIL). 717/808 namednodemapremovenameditemns01.xml -TEST FAILED: NOT_FOUND_ERR (8): -#(100 111 109 101 115 116 105 99) not found in # 718/808 namednodemapremovenameditemns02.xml -TEST FAILED: NOT_FOUND_ERR (8): -#(100 101 102 97 117 108 116 65 116 116 - 114) not found in # +TEST FAILED: There is no applicable method for the generic function + # + when called with arguments + (NIL). 719/808 namednodemapremovenameditemns03.xml TEST FAILED: There is no applicable method for the generic function # @@ -1037,7 +1035,7 @@ TEST FAILED: There is no applicable method for the generic function (NIL). 720/808 namednodemapremovenameditemns04.xml TEST FAILED: NOT_FOUND_ERR (8): -#(120 109 108 110 115) not found in # +#(120 109 108 110 115) not found in # 721/808 namednodemapremovenameditemns05.xml 722/808 namednodemapremovenameditemns06.xml 723/808 namednodemapremovenameditemns07.xml @@ -1045,10 +1043,8 @@ TEST FAILED: NOT_FOUND_ERR (8): TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL). + (# NIL). 725/808 namednodemapremovenameditemns09.xml -TEST FAILED: NOT_FOUND_ERR (8): -#(100 111 109 101 115 116 105 99) not found in # 726/808 namednodemapsetnameditemns01.xml TEST FAILED: There is no applicable method for the generic function # @@ -1060,13 +1056,15 @@ TEST FAILED: There is no applicable method for the generic function when called with arguments (NIL). 728/808 namednodemapsetnameditemns03.xml -TEST FAILED: NOT_FOUND_ERR (8): -#(115 116 114 101 101 116) not found in # +TEST FAILED: There is no applicable method for the generic function + # + when called with arguments + (NIL). 729/808 namednodemapsetnameditemns04.xml TEST FAILED: When attempting to set the slot's value to NIL (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 730/808 namednodemapsetnameditemns05.xml 731/808 namednodemapsetnameditemns06.xml TEST FAILED: There is no applicable method for the generic function @@ -1107,21 +1105,21 @@ TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 745/808 nodegetprefix03.xml 746/808 nodehasattributes01.xml 747/808 nodehasattributes02.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (#). + (#). 748/808 nodehasattributes03.xml 749/808 nodehasattributes04.xml TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 750/808 nodeissupported01.xml TEST FAILED: The assertion DOMTEST-TESTS::|success| failed. 751/808 nodeissupported02.xml @@ -1134,62 +1132,68 @@ TEST FAILED: When attempting to set the slot's value to #(104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 68 79 77 47 84 101 115 116) (SETF of SLOT-VALUE), the slot DOM-IMPL::NAMESPACE-URI is missing from the object - #. + #. 756/808 nodesetprefix01.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|elementTagName| + #(100 109 115 116 99 58 97 100 100 + 114 101 115 115) + 'DOMTEST::%EQUAL) failed. 757/808 nodesetprefix02.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: There is no applicable method for the generic function + # + when called with arguments + (NIL). 758/808 nodesetprefix03.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 759/808 nodesetprefix04.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: There is no applicable method for the generic function + # + when called with arguments + (#(116 101 115 116) NIL). 760/808 nodesetprefix05.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: expected exception NAMESPACE_ERR 761/808 nodesetprefix06.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: expected exception NAMESPACE_ERR 762/808 nodesetprefix07.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: expected exception NAMESPACE_ERR 763/808 nodesetprefix08.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 764/808 nodesetprefix09.xml -TEST FAILED: Argument Y is not a NUMBER: #\x +TEST FAILED: expected exception INVALID_CHARACTER_ERR 765/808 normalize01.xml 766/808 ownerDocument01.xml 767/808 ownerElement01.xml 768/808 ownerElement02.xml -TEST FAILED: The slot DOM-IMPL::OWNER-ELEMENT is unbound in the object #. 769/808 prefix01.xml 770/808 prefix02.xml 771/808 prefix03.xml 772/808 prefix04.xml 773/808 prefix05.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 774/808 prefix06.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception INVALID_CHARACTER_ERR 775/808 prefix07.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 776/808 prefix08.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NO_MODIFICATION_ALLOWED_ERR 777/808 prefix09.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 778/808 prefix10.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 779/808 prefix11.xml -TEST FAILED: The function (SETF DOM:PREFIX) is undefined. +TEST FAILED: expected exception NAMESPACE_ERR 780/808 publicId01.xml 781/808 removeAttributeNS01.xml 782/808 removeAttributeNS02.xml TEST FAILED: There is no applicable method for the generic function # when called with arguments - (# NIL). + (# NIL). 783/808 removeNamedItemNS01.xml -TEST FAILED: NOT_FOUND_ERR (8): -#(100 111 109 101 115 116 105 99) not found in # 784/808 removeNamedItemNS02.xml 785/808 removeNamedItemNS03.xml TEST FAILED: NOT_FOUND_ERR (8): -#(78 73 76) not found in # +#(78 73 76) not found in # 786/808 setAttributeNS01.xml TEST FAILED: expected exception INVALID_CHARACTER_ERR 787/808 setAttributeNS02.xml @@ -1218,7 +1222,6 @@ TEST FAILED: The assertion (DOMTEST::EQUALSP DOMTEST-TESTS::|resultAttr| implementationAttribute expandEntityReferences not supported, skipping test 797/808 setAttributeNodeNS03.xml 798/808 setAttributeNodeNS04.xml -TEST FAILED: Argument Y is not a NUMBER: #\x 799/808 setAttributeNodeNS05.xml 800/808 setNamedItemNS01.xml TEST FAILED: There is no applicable method for the generic function @@ -1242,4 +1245,4 @@ TEST FAILED: There is no applicable method for the generic function when called with arguments (NIL). 805/808 systemId01.xml -153/763 tests failed; 45 tests were skipped \ No newline at end of file +143/763 tests failed; 45 tests were skipped \ No newline at end of file diff --git a/dom/dom-builder.lisp b/dom/dom-builder.lisp index 8f5d9f6..2d0d73a 100644 --- a/dom/dom-builder.lisp +++ b/dom/dom-builder.lisp @@ -22,6 +22,10 @@ (vector-push-extend new-element vector (max 1 (array-dimension vector 0)))) (defmethod sax:start-document ((handler dom-builder)) + (when (and sax:*namespace-processing* + (not (and sax:*include-xmlns-attributes* + sax:*use-xmlns-namespace*))) + (error "SAX configuration is incompatible with DOM: *namespace-processing* is activated, but *include-xmlns-attributes* or *use-xmlns-namespace* are not")) (let ((document (make-instance 'dom-impl::document))) (setf (slot-value document 'dom-impl::owner) nil (slot-value document 'dom-impl::doc-type) nil) @@ -86,7 +90,9 @@ (anodes '())) (dolist (attr attributes) (let ((anode - (dom:create-attribute document (sax:attribute-qname attr))) + (dom:create-attribute-ns document + (sax:attribute-namespace-uri attr) + (sax:attribute-qname attr))) (text (dom:create-text-node document (sax:attribute-value attr)))) (setf (slot-value anode 'dom-impl::specified-p) diff --git a/dom/dom-impl.lisp b/dom/dom-impl.lisp index 7e0a6bf..915caaf 100644 --- a/dom/dom-impl.lisp +++ b/dom/dom-impl.lisp @@ -39,7 +39,7 @@ (defmethod dom:namespace-uri ((node node)) nil) (defclass namespace-mixin () - ((prefix :initarg :prefix :reader dom:prefix) + ((prefix :initarg :prefix :accessor dom:prefix) (local-name :initarg :local-name :reader dom:local-name) (namespace-uri :initarg :namespace-uri :reader dom:namespace-uri))) @@ -267,11 +267,11 @@ (cxml:well-formedness-violation (c) (dom-error :NAMESPACE_ERR "~A" c))) (when prefix - (when (and (rod= prefix "xml") - (not (rod= uri "http://www.w3.org/XML/1998/namespace"))) + (when (and (rod= prefix #"xml") + (not (rod= uri #"http://www.w3.org/XML/1998/namespace"))) (dom-error :NAMESPACE_ERR "invalid uri for prefix `xml'")) - (when (and (rod= prefix "xmlns") - (not (rod= uri "http://www.w3.org/2000/xmlns/"))) + (when (and (rod= prefix #"xmlns") + (not (rod= uri #"http://www.w3.org/2000/xmlns/"))) (dom-error :NAMESPACE_ERR "invalid uri for prefix `xmlns'"))) (values prefix local-name))) @@ -335,6 +335,7 @@ :prefix nil :namespace-uri nil :specified-p t + :owner-element nil :owner document)) (defmethod dom:create-attribute-ns ((document document) uri qname) @@ -348,6 +349,7 @@ :local-name local-name :prefix prefix :specified-p t + :owner-element nil :owner document))) (defmethod dom:create-entity-reference ((document document) name) @@ -361,7 +363,7 @@ (defmethod get-elements-by-tag-name-internal (node tag-name) (setf tag-name (rod tag-name)) (let ((result (make-node-list)) - (wild-p (rod= tag-name '#.(string-rod "*")))) + (wild-p (rod= tag-name #"*"))) (labels ((walk (n) (dovector (c (dom:child-nodes n)) (when (dom:element-p c) @@ -375,8 +377,8 @@ (setf uri (rod uri)) (setf lname (rod lname)) (let ((result (make-node-list)) - (wild-uri-p (rod= uri '#.(string-rod "*"))) - (wild-lname-p (rod= lname '#.(string-rod "*")))) + (wild-uri-p (rod= uri #"*")) + (wild-lname-p (rod= lname #"*"))) (labels ((walk (n) (dovector (c (dom:child-nodes n)) (when (dom:element-p c) @@ -1030,6 +1032,12 @@ (defmethod dom:remove-named-item :after ((self attribute-node-map) name) (maybe-add-default-attribute (slot-value self 'element) name)) +(defmethod dom:remove-named-item-ns + ((self attribute-node-map) uri lname) + (let ((k (call-next-method))) + (maybe-add-default-attribute (slot-value self 'element) (dom:node-name k)) + k)) + (defmethod dom:get-elements-by-tag-name ((element element) name) (assert-writeable element) (get-elements-by-tag-name-internal element name)) @@ -1042,6 +1050,10 @@ (setf (slot-value arg 'owner-element) (slot-value self 'element))) +(defmethod dom:set-named-item-ns :after ((self attribute-node-map) arg) + (setf (slot-value arg 'owner-element) + (slot-value self 'element))) + (defmethod dom:normalize ((node node)) (assert-writeable node) (labels ((walk (n) diff --git a/test/domtest.lisp b/test/domtest.lisp index c793581..753f85f 100644 --- a/test/domtest.lisp +++ b/test/domtest.lisp @@ -689,9 +689,13 @@ (format t "~&~D/~D tests failed; ~D test~:P were skipped" nfailed ntried (- n ntried)))) -(defun run-test (*directory* href) - (let* ((test-directory (merge-pathnames "tests/level1/core/" *directory*)) - (lisp (slurp-test (merge-pathnames href test-directory))) +(defun run-test (*directory* level href) + (let* ((test-directory + (ecase level + (1 (merge-pathnames "tests/level1/core/" *directory*)) + (2 (merge-pathnames "tests/level2/core/" *directory*)))) + (lisp (slurp-test (merge-pathnames href test-directory))) + (*files-directory* (merge-pathnames "files/" test-directory)) (cxml::*validate* nil)) (print lisp) (when lisp diff --git a/xml/sax-handler.lisp b/xml/sax-handler.lisp index 83f86e0..faec86c 100644 --- a/xml/sax-handler.lisp +++ b/xml/sax-handler.lisp @@ -94,7 +94,7 @@ of the consequences of modifying this variable, and related options.") ;; The http://xml.org/sax/features/namespace-prefixes property. -(defvar *include-xmlns-attributes* nil +(defvar *include-xmlns-attributes* t "If non-nil, namespace declarations are reported as normal attributes. @@ -104,7 +104,7 @@ non-nil. See also `*use-xmlns-namespace*', and `start-element' for a detailed description of the consequences of setting this variable.") -(defvar *use-xmlns-namespace* nil +(defvar *use-xmlns-namespace* t "If this variable is nil (the default), attributes with a name like 'xmlns:x' are not considered to be in a namespace, following the 'Namespaces in XML' specification.