[cxml-cvs] CVS update: cxml/dom/dom-builder.lisp cxml/dom/dom-impl.lisp cxml/dom/dom-sax.lisp
David Lichteblau
dlichteblau at common-lisp.net
Tue Dec 27 01:35:18 UTC 2005
Update of /project/cxml/cvsroot/cxml/dom
In directory common-lisp.net:/tmp/cvs-serv17375/dom
Modified Files:
dom-builder.lisp dom-impl.lisp dom-sax.lisp
Log Message:
utf8-dom fixes.
recoding nach utf-8 jetzt der default.
Date: Tue Dec 27 02:35:15 2005
Author: dlichteblau
Index: cxml/dom/dom-builder.lisp
diff -u cxml/dom/dom-builder.lisp:1.9 cxml/dom/dom-builder.lisp:1.10
--- cxml/dom/dom-builder.lisp:1.9 Tue Dec 27 01:21:31 2005
+++ cxml/dom/dom-builder.lisp Tue Dec 27 02:35:14 2005
@@ -83,7 +83,7 @@
(defmethod sax:start-element
((handler dom-builder) namespace-uri local-name qname attributes)
- (check-type qname rod)
+ (check-type qname rod) ;catch recoder/builder mismatch
(with-slots (document element-stack) handler
(let* ((nsp sax:*namespace-processing*)
(element (make-instance 'element
Index: cxml/dom/dom-impl.lisp
diff -u cxml/dom/dom-impl.lisp:1.33 cxml/dom/dom-impl.lisp:1.34
--- cxml/dom/dom-impl.lisp:1.33 Tue Dec 27 01:21:31 2005
+++ cxml/dom/dom-impl.lisp Tue Dec 27 02:35:14 2005
@@ -1228,7 +1228,9 @@
(when resolver
(setf (document handler) owner)
(push instance (element-stack handler))
- (funcall resolver (dom:name instance) handler)))
+ #+cxml-system::utf8dom-file
+ (setf handler (cxml:make-recoder handler #'cxml:rod-to-utf8-string))
+ (funcall resolver (real-rod (dom:name instance)) handler)))
(labels ((walk (n)
(setf (slot-value n 'read-only-p) t)
(when (dom:element-p n)
Index: cxml/dom/dom-sax.lisp
diff -u cxml/dom/dom-sax.lisp:1.4 cxml/dom/dom-sax.lisp:1.5
--- cxml/dom/dom-sax.lisp:1.4 Tue Dec 27 01:21:31 2005
+++ cxml/dom/dom-sax.lisp Tue Dec 27 02:35:14 2005
@@ -12,7 +12,11 @@
(handler document
&key (include-xmlns-attributes sax:*include-xmlns-attributes*)
include-doctype
- include-default-values)
+ include-default-values
+ (recode (typep document 'utf8-dom::node)))
+ #+rune-is-integer
+ (when recode
+ (setf handler (make-recoder handler #'utf8-string-to-rod)))
(sax:start-document handler)
(when include-doctype
(let ((doctype (dom:doctype document)))
More information about the Cxml-cvs
mailing list