kleine anpassungen fuer cl-xmpp
neu: do-node-map, map-node-map
This commit is contained in:
@ -82,7 +82,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
CXML currently implements a <a
|
CXML implements a <a
|
||||||
href="http://www.w3.org/TR/REC-xml-names/">namespace-aware</a>,
|
href="http://www.w3.org/TR/REC-xml-names/">namespace-aware</a>,
|
||||||
validating SAX-like <a
|
validating SAX-like <a
|
||||||
href="http://www.w3.org/TR/2000/REC-xml-20001006">XML 1.0</a>
|
href="http://www.w3.org/TR/2000/REC-xml-20001006">XML 1.0</a>
|
||||||
|
|||||||
@ -188,6 +188,15 @@
|
|||||||
(dom:map-node-list (lambda (,var) ,@body) ,nodelist)
|
(dom:map-node-list (lambda (,var) ,@body) ,nodelist)
|
||||||
,resultform))
|
,resultform))
|
||||||
|
|
||||||
|
(defun dom:map-node-map (fn node-map)
|
||||||
|
(with-slots (items) node-map
|
||||||
|
(mapc fn items)))
|
||||||
|
|
||||||
|
(defmacro dom:do-node-map ((var node-map &optional resultform) &body body)
|
||||||
|
`(block nil
|
||||||
|
(dom:map-node-map (lambda (,var) ,@body) ,node-map)
|
||||||
|
,resultform))
|
||||||
|
|
||||||
(defmacro dovector ((var vector &optional resultform) &body body)
|
(defmacro dovector ((var vector &optional resultform) &body body)
|
||||||
`(loop
|
`(loop
|
||||||
for ,var across ,vector do (progn ,@body)
|
for ,var across ,vector do (progn ,@body)
|
||||||
|
|||||||
@ -138,5 +138,7 @@
|
|||||||
|
|
||||||
#:map-node-list
|
#:map-node-list
|
||||||
#:do-node-list
|
#:do-node-list
|
||||||
|
#:map-node-map
|
||||||
|
#:do-node-map
|
||||||
#:create-document
|
#:create-document
|
||||||
#:map-document))
|
#:map-document))
|
||||||
|
|||||||
@ -43,6 +43,7 @@
|
|||||||
#:rod<
|
#:rod<
|
||||||
|
|
||||||
;; xstream.lisp
|
;; xstream.lisp
|
||||||
|
#:xstream
|
||||||
#:make-xstream
|
#:make-xstream
|
||||||
#:make-rod-xstream
|
#:make-rod-xstream
|
||||||
#:close-xstream
|
#:close-xstream
|
||||||
|
|||||||
@ -256,9 +256,7 @@
|
|||||||
|
|
||||||
;;; Underflow
|
;;; Underflow
|
||||||
|
|
||||||
;;(defun read-runes (sequence input))
|
(defmethod xstream-underflow ((input xstream))
|
||||||
|
|
||||||
(defun xstream-underflow (input)
|
|
||||||
(declare (type xstream input))
|
(declare (type xstream input))
|
||||||
;; we are about to fill new data into the buffer, so we need to
|
;; we are about to fill new data into the buffer, so we need to
|
||||||
;; adjust buffer-start.
|
;; adjust buffer-start.
|
||||||
|
|||||||
Reference in New Issue
Block a user