Commit da0ff41c authored by david's avatar david

Revision: cxml--devel--1.0--patch-54

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Thu Feb  5 17:31:01 CET 2004
Standard-date: 2004-02-05 16:31:01 GMT
Modified-files: xml/dom-builder.lisp xml/xml-parse.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-54
Summary: call sax:comment; create comment nodes

call sax:comment; create comment nodes
parent 8f41033c
......@@ -45,3 +45,8 @@
(with-slots (document element-stack) handler
(let ((node (cdom:create-processing-instruction document target data)))
(push node (slot-value (car element-stack) 'dom-impl::children)))))
(defmethod sax:comment ((handler dom-builder) data)
(with-slots (document element-stack) handler
(let ((node (cdom:create-comment document data)))
(push node (slot-value (car element-stack) 'dom-impl::children)))))
......@@ -1912,12 +1912,15 @@
(defun p/misc*-2 (input)
;; Misc*
(while (member (peek-token input) '(:COMMENT :PI :S))
(when (eq (peek-token input) :PI)
(sax:processing-instruction
*handler*
(car (nth-value 1 (peek-token input)))
(cdr (nth-value 1 (peek-token input)))))
(consume-token input)))
(case (peek-token input)
(:COMMENT
(sax:comment *handler* (nth-value 1 (peek-token input))))
(:PI
(sax:processing-instruction
*handler*
(car (nth-value 1 (peek-token input)))
(cdr (nth-value 1 (peek-token input))))))
(consume-token input)))
(defvar *handler*)
......@@ -2063,8 +2066,9 @@
(consume-token input)
(sax:processing-instruction *handler* (car sem) (cdr sem))
(p/content input))
((:COMMENT) ;; FIXME: should call sax:comment. How does this work?
((:COMMENT)
(consume-token input)
(sax:comment *handler* sem)
(p/content input))
(otherwise
nil))))
......
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