Commit d49bd3f9 authored by david's avatar david

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

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Fri Feb  6 22:01:58 CET 2004
Standard-date: 2004-02-06 21:01:58 GMT
Modified-files: xml/dom-impl.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-76
Summary: implemented DOM:SPLIT-TEXT

implemented DOM:SPLIT-TEXT
parent e24b639b
......@@ -642,8 +642,20 @@
;;; TEXT
(defmethod dom:split-text ((text text) offset)
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))
#+(or)
(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))
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