Re: xmls 0.4 released
Damien Diederen <[email protected]> Fri, 11 Jul 2003 22:46:39 +0200
| Newsgroups | gmane.lisp.clump |
|---|---|
| Message-ID | <[email protected]> |
Hello Miles, On Fri, Jul 11, 2003 at 08:28:13AM -0700, Miles Egan wrote: > I've released yet another new version of xmls. The main change in this > version is that it should work in just about any standard lisp (not just > sbcl). Memory usage is down somewhat too. The curious can find it at > http://www.caddr.com/xmls/lisp. I suppose you meant http://www.caddr.com/lisp/xmls/ :) This is an excellent lightweight parser! I have a few comments, though: - xmls:toxml does not properly escape reserved chars with entities. - xmls:toxml's format glues key='value' attribute pairs (small patch attached). - xmls:parse won't parse entities in attribute values. - xmls:parse eats whitespace as mad; this make roundtripping XML documents impossible. I know you are aware of these limitations; I'm just nitpicking. Delightful code, btw :) > -- > Miles Egan <[email protected]> Cu, Dash. -- What we see depends on mainly what we look for. -- John Lubbock -- http://users.swing.be/diederen/ _______________________________________________ Clump mailing list [email protected] http://manly.caddr.com/mailman/listinfo/clump
xmls.patch
(text/plain, 649 B)
--- ../../tmp4/xmls-0.4/xmls.lisp Fri Jul 11 02:32:51 2003
+++ xmls.lisp Fri Jul 11 22:44:48 2003
@@ -486,12 +486,11 @@
(let ((s (make-string-output-stream)))
(typecase e
(list
- (format s "<~A~A~A~{~A~}>~{~A~}</~A>"
+ (format s "<~A~A~{ ~A~}>~{~A~}</~A>"
(node-name e)
(if (node-ns e)
(format nil " xmlns=\"~A\"" (node-ns e))
"")
- (if (node-attrs e) " " "")
(mapcar (lambda (x) (format nil "~A=\"~A\"" (first x) (second x)))
(node-attrs e))
(mapcar #'toxml (node-children e))