Update of /project/s-xml/cvsroot/s-xml/src In directory common-lisp.net:/tmp/cvs-serv26534/src
Modified Files: lxml-dom.lisp sxml-dom.lisp xml-struct-dom.lisp Log Message: minor fix to XML pretty printing
Date: Tue Sep 20 11:57:48 2005 Author: scaekenberghe
Index: s-xml/src/lxml-dom.lisp diff -u s-xml/src/lxml-dom.lisp:1.4 s-xml/src/lxml-dom.lisp:1.5 --- s-xml/src/lxml-dom.lisp:1.4 Mon Aug 29 17:01:47 2005 +++ s-xml/src/lxml-dom.lisp Tue Sep 20 11:57:44 2005 @@ -1,6 +1,6 @@ ;;;; -*- mode: lisp -*- ;;;; -;;;; $Id: lxml-dom.lisp,v 1.4 2005/08/29 15:01:47 scaekenberghe Exp $ +;;;; $Id: lxml-dom.lisp,v 1.5 2005/09/20 09:57:44 scaekenberghe Exp $ ;;;; ;;;; LXML implementation of the generic DOM parser and printer. ;;;; @@ -75,7 +75,7 @@ (if (stringp child) (print-string-xml child stream) (print-xml-dom child input-type stream pretty (1+ level)))) - (when pretty (print-spaces (* 2 level) stream)))) + (when pretty (print-spaces (* 2 (1- level)) stream)))) (print-closing-tag tag stream)) (write-string "/>" stream))))) (t (error "Input not recognized as LXML ~s" dom))))
Index: s-xml/src/sxml-dom.lisp diff -u s-xml/src/sxml-dom.lisp:1.3 s-xml/src/sxml-dom.lisp:1.4 --- s-xml/src/sxml-dom.lisp:1.3 Mon Aug 29 17:01:47 2005 +++ s-xml/src/sxml-dom.lisp Tue Sep 20 11:57:48 2005 @@ -1,6 +1,6 @@ ;;;; -*- mode: lisp -*- ;;;; -;;;; $Id: sxml-dom.lisp,v 1.3 2005/08/29 15:01:47 scaekenberghe Exp $ +;;;; $Id: sxml-dom.lisp,v 1.4 2005/09/20 09:57:48 scaekenberghe Exp $ ;;;; ;;;; LXML implementation of the generic DOM parser and printer. ;;;; @@ -68,7 +68,7 @@ (if (stringp child) (print-string-xml child stream) (print-xml-dom child input-type stream pretty (1+ level)))) - (when pretty (print-spaces (* 2 level) stream)))) + (when pretty (print-spaces (* 2 (1- level)) stream)))) (print-closing-tag tag stream)) (write-string "/>" stream))))) (t (error "Input not recognized as SXML ~s" dom))))
Index: s-xml/src/xml-struct-dom.lisp diff -u s-xml/src/xml-struct-dom.lisp:1.2 s-xml/src/xml-struct-dom.lisp:1.3 --- s-xml/src/xml-struct-dom.lisp:1.2 Mon Aug 29 17:01:47 2005 +++ s-xml/src/xml-struct-dom.lisp Tue Sep 20 11:57:48 2005 @@ -1,6 +1,6 @@ ;;;; -*- mode: lisp -*- ;;;; -;;;; $Id: xml-struct-dom.lisp,v 1.2 2005/08/29 15:01:47 scaekenberghe Exp $ +;;;; $Id: xml-struct-dom.lisp,v 1.3 2005/09/20 09:57:48 scaekenberghe Exp $ ;;;; ;;;; XML-STRUCT implementation of the generic DOM parser and printer. ;;;; @@ -94,7 +94,7 @@ (if (stringp child) (print-string-xml child stream) (print-xml-dom child input-type stream pretty (1+ level)))) - (when pretty (print-spaces (* 2 level) stream)))) + (when pretty (print-spaces (* 2 (1- level)) stream)))) (print-closing-tag (xml-element-name xml-element) stream)) (write-string "/>" stream)))))