Update of /project/s-xml/cvsroot/s-xml/src
In directory common-lisp.net:/tmp/cvs-serv8028/src
Modified Files:
xml.lisp
Log Message:
further cleanup of examples and hook documentation
Date: Fri Jun 11 04:14:42 2004
Author: scaekenberghe
Index: s-xml/src/xml.lisp
diff -u s-xml/src/xml.lisp:1.2 s-xml/src/xml.lisp:1.3
--- s-xml/src/xml.lisp:1.2 Fri Jun 11 01:22:47 2004
+++ s-xml/src/xml.lisp Fri Jun 11 04:14:42 2004
@@ -1,6 +1,6 @@
;;;; -*- mode: lisp -*-
;;;;
-;;;; $Id: xml.lisp,v 1.2 2004/06/11 08:22:47 scaekenberghe Exp $
+;;;; $Id: xml.lisp,v 1.3 2004/06/11 11:14:42 scaekenberghe Exp $
;;;;
;;;; This is a Common Lisp implementation of a very basic XML parser.
;;;; The parser is non-validating and not at all complete (no CDATA).
@@ -151,9 +151,10 @@
:accessor get-mini-buffer
:initform (make-extendable-string))
(new-element-hook :documentation "Called when new element starts"
- ;; Handle a new xml element with name and attributes,
- ;; receiving seed from parent if any or top level
- ;; return seed to be used for children/contents"
+ ;; Handle the start of a new xml element with name and attributes,
+ ;; receiving seed from previous element (sibling or parent)
+ ;; return seed to be used for first child (content)
+ ;; or directly to finish-element-hook
:accessor get-new-element-hook
:initarg :new-element-hook
:initform #'(lambda (name attributes seed)
@@ -161,17 +162,20 @@
seed))
(finish-element-hook :documentation "Called when element ends"
;; Handle the end of an xml element with name and attributes,
- ;; receiving the seed that was passed by our parent,
- ;; receiving seed from last child/contents
- ;; return final seed for this element
+ ;; receiving parent-seed, the seed passed to us when this element started,
+ ;; i.e. passed to our corresponding new-element-hook
+ ;; and receiving seed from last child (content)
+ ;; or directly from new-element-hook
+ ;; return final seed for this element to next element (sibling or parent)
:accessor get-finish-element-hook
:initarg :finish-element-hook
:initform #'(lambda (name attributes parent-seed seed)
(declare (ignore name attributes parent-seed))
seed))
(text-hook :documentation "Called when text is found"
- ;; Handle text in string, found as child/contents,
- ;; receiving seed from parent element, return final seed for this element
+ ;; Handle text in string, found as contents,
+ ;; receiving seed from previous element (sibling or parent),
+ ;; return final seed for this element to next element (sibling or parent)
:accessor get-text-hook
:initarg :text-hook
:initform #'(lambda (string seed)