[s-xml-cvs] CVS s-xml/src
scaekenberghe
scaekenberghe at common-lisp.net
Tue Jan 31 11:44:15 UTC 2006
Update of /project/s-xml/cvsroot/s-xml/src
In directory common-lisp:/tmp/cvs-serv7181/src
Modified Files:
package.lisp xml.lisp
Log Message:
finishing touches and doc updates to david tolpin's changes
--- /project/s-xml/cvsroot/s-xml/src/package.lisp 2006/01/19 20:00:06 1.7
+++ /project/s-xml/cvsroot/s-xml/src/package.lisp 2006/01/31 11:44:15 1.8
@@ -1,6 +1,6 @@
;;;; -*- mode: lisp -*-
;;;;
-;;;; $Id: package.lisp,v 1.7 2006/01/19 20:00:06 scaekenberghe Exp $
+;;;; $Id: package.lisp,v 1.8 2006/01/31 11:44:15 scaekenberghe Exp $
;;;;
;;;; This is a Common Lisp implementation of a very basic XML parser.
;;;; The parser is non-validating.
@@ -8,7 +8,7 @@
;;;; see also http://pobox.com/~oleg/ftp/Scheme/xml.html or http://ssax.sourceforge.net
;;;; Different DOM models are provided, an XSML, an LXML and a xml-element struct based one.
;;;;
-;;;; Copyright (C) 2002, 2003, 2004, 2005 Sven Van Caekenberghe, Beta Nine BVBA.
+;;;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Sven Van Caekenberghe, Beta Nine BVBA.
;;;;
;;;; You are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser General Public License
--- /project/s-xml/cvsroot/s-xml/src/xml.lisp 2006/01/19 20:00:06 1.15
+++ /project/s-xml/cvsroot/s-xml/src/xml.lisp 2006/01/31 11:44:15 1.16
@@ -1,15 +1,15 @@
;;;; -*- mode: lisp -*-
;;;;
-;;;; $Id: xml.lisp,v 1.15 2006/01/19 20:00:06 scaekenberghe Exp $
+;;;; $Id: xml.lisp,v 1.16 2006/01/31 11:44:15 scaekenberghe Exp $
;;;;
;;;; This is a Common Lisp implementation of a basic but usable XML parser.
-;;;; The parser is non-validating and not complete (no CDATA).
+;;;; The parser is non-validating and not complete (no PI).
;;;; Namespace and entities are handled.
;;;; The API into the parser is a pure functional parser hook model that comes from SSAX,
;;;; see also http://pobox.com/~oleg/ftp/Scheme/xml.html or http://ssax.sourceforge.net
;;;; Different DOM models are provided, an XSML, an LXML and a xml-element struct based one.
;;;;
-;;;; Copyright (C) 2002, 2003, 2004, 2005 Sven Van Caekenberghe, Beta Nine BVBA.
+;;;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Sven Van Caekenberghe, Beta Nine BVBA.
;;;;
;;;; You are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser General Public License
@@ -44,6 +44,9 @@
:message message
:args args
:stream stream))
+
+;; attribute parsing hooks
+;; this is a bit complicated, refer to the mailing lists for a more detailed explanation
(defun parse-attribute-name (string)
"Default parser for the attribute name"
@@ -59,10 +62,10 @@
string))
(defparameter *attribute-name-parser* #'parse-attribute-name
- "Called to compute interned attribute name")
+ "Called to compute interned attribute name from a buffer that will be reused")
(defparameter *attribute-value-parser* #'parse-attribute-value
- "Called to compute an element of attribute list")
+ "Called to compute an element of an attribute list from a buffer that will be reused")
;;; utilities
@@ -178,6 +181,13 @@
:initform nil))
(:documentation "Describes an XML namespace and how it is handled"))
+(setf (documentation 'get-uri 'function)
+ "The URI used to identify this namespace"
+ (documentation 'get-prefix 'function)
+ "The preferred prefix assigned to this namespace"
+ (documentation 'get-package 'function)
+ "The Common Lisp package where this namespace's symbols are interned")
+
(defmethod print-object ((object xml-namespace) stream)
(print-unreadable-object (object stream :type t :identity t)
(format stream "~A - ~A" (get-prefix object) (get-uri object))))
More information about the S-xml-cvs
mailing list