Commit d49bd3f9 authored by david's avatar david

Revision: cxml--devel--1.0--patch-76

Creator: David Lichteblau <>
Date: Fri Feb  6 22:01:58 CET 2004
Standard-date: 2004-02-06 21:01:58 GMT
Modified-files: xml/dom-impl.lisp
Summary: implemented DOM:SPLIT-TEXT

implemented DOM:SPLIT-TEXT
parent e24b639b
......@@ -642,8 +642,20 @@
;;; TEXT
(defmethod dom:split-text ((text text) offset)
(error "Not implemented."))
(assert-writeable text)
(assert (dom:parent-node text))
(with-slots (owner parent value) text
(unless (<= 0 offset (length value))
(dom-error :INDEX_SIZE_ERR "offset is invalid"))
(setf value (subseq value 0 offset))
(dom:insert-before parent
(dom:create-text-node owner (subseq value offset))
(dom:next-sibling text))
(let ((new-sibling (dom:create-text-node owner (subseq value offset))))
(dom:insert-before parent new-sibling (dom:next-sibling text))
(assert (dom:parent-node new-sibling))
;;; COMMENT -- nix
;;; CDATA-SECTION -- nix
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