Commit 73761966 authored by david's avatar david
Browse files

Revision: cxml--devel--1.0--patch-97

Creator: David Lichteblau <>
Date: Mon Feb  9 17:07:58 CET 2004
Standard-date: 2004-02-09 16:07:58 GMT
Modified-files: xml/dom-builder.lisp
Summary: CDATA sections bauen

CDATA sections bauen
parent d43d9996
......@@ -65,10 +65,24 @@
(defmethod sax:characters ((handler dom-builder) data)
(with-slots (document element-stack) handler
(let ((node (cdom:create-text-node document data))
(let ((parent (car element-stack)))
(if (eq (dom:node-type parent) :cdata-section)
(setf (dom:data parent) data)
(let ((node (cdom:create-text-node document data)))
(setf (slot-value node 'dom-impl::parent) parent)
(push node (slot-value (car element-stack) 'dom-impl::children)))))))
(defmethod sax:start-cdata ((handler dom-builder))
(with-slots (document element-stack) handler
(let ((node (cdom:create-cdata-section document #()))
(parent (car element-stack)))
(setf (slot-value node 'dom-impl::parent) parent)
(push node (slot-value (car element-stack) 'dom-impl::children)))))
(push node (slot-value parent 'dom-impl::children))
(push node element-stack))))
(defmethod sax:end-cdata ((handler dom-builder))
(let ((node (pop (slot-value handler 'element-stack))))
(assert (eq (dom:node-type node) :cdata-section))))
(defmethod sax:processing-instruction ((handler dom-builder) target data)
(with-slots (document element-stack) handler
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment