[Store xml namespaces and local names as symbols clinton@unknownlamer.org**20090505072835 Ignore-this: e053f4b5fbe872def0ae6ddb327441f6 * xmlns uris are interned in xmlisp2.ns with a few core namespaces being exported * lnames are interned in xmlisp2.lname to allow methods on `parse-instance' to override parsing using eql methods `xml-name->symbol' should probably be a generic in the protocol as well ] hunk ./src/packages.lisp 70 +(defpackage :xmlisp2.ns + (:export + #:|http://www.w3.org/XML/1998/namespace| + #:|http://www.w3.org/2000/xmlns/| + #:|http://www.w3.org/2001/XMLSchema| + #:|http://www.w3.org/2001/XMLSchema-datatypes|)) + +(defpackage :xmlisp2.lname) + hunk ./src/parse.lisp 3 +(defun make-xmlns (xmlns-string) + (when xmlns-string + (intern xmlns-string :xmlisp2.ns))) + +(defun make-lname (lname-string) + (intern lname-string :xmlisp2.lname)) + hunk ./src/parse.lisp 11 - (cdr (assoc xmlns *xmlns-to-package* :test #'string=))) + (cdr (assoc xmlns *xmlns-to-package*))) hunk ./src/parse.lisp 42 - #+nil(break "MAP-ATTRIBUTES (~A ~A)=~A" uri lname value) - (unless (string= uri "http://www.w3.org/2000/xmlns/") - (handle-attribute-value instance - (xml-name->symbol uri lname) - value))) + (let ((uri (make-xmlns uri)) + (lname (make-xmlns lname))) + #+nil(break "MAP-ATTRIBUTES (~A ~A)=~A" uri lname value) + (unless (eq uri + 'xmlisp2.ns:|http://www.w3.org/2000/xmlns/|) + (handle-attribute-value instance + (xml-name->symbol uri lname) + value)))) hunk ./src/parse.lisp 61 - #+nil(break "subobject: (~A ~A) / ev ~A" uri lname key) - (finished-parsing (parse-instance source instance uri lname)))) + (let ((uri (make-xmlns uri)) + (lname (make-xmlns lname))) + #+nil(break "subobject: (~A ~A) / ev ~A" uri lname key) + (finished-parsing + (parse-instance source instance uri lname))))) hunk ./src/vars.lisp 5 - (cons "http://www.w3.org/XML/1998/namespace" + (cons 'xmlisp2.ns:|http://www.w3.org/XML/1998/namespace| hunk ./src/vars.lisp 7 - (cons "http://www.w3.org/2001/XMLSchema" + (cons 'xmlisp2.ns:|http://www.w3.org/2001/XMLSchema| hunk ./src/vars.lisp 9 - (cons "http://www.w3.org/2001/XMLSchema-datatypes" + (cons 'xmlisp2.ns:|http://www.w3.org/2001/XMLSchema-datatypes|