From dlichteblau at common-lisp.net Sun Aug 5 11:15:51 2007
From: dlichteblau at common-lisp.net (dlichteblau)
Date: Sun, 5 Aug 2007 07:15:51 -0400 (EDT)
Subject: [cxml-cvs] CVS cxml/xml
Message-ID: <20070805111551.3D9AB1703E@common-lisp.net>
Update of /project/cxml/cvsroot/cxml/xml
In directory clnet:/tmp/cvs-serv29116
Modified Files:
xml-parse.lisp
Log Message:
fixed the DTD/SAX fix
--- /project/cxml/cvsroot/cxml/xml/xml-parse.lisp 2007/07/22 19:43:27 1.71
+++ /project/cxml/cvsroot/cxml/xml/xml-parse.lisp 2007/08/05 11:15:48 1.72
@@ -1095,9 +1095,10 @@
(let ((e (find-element element-name dtd)))
(cond
((null e)
- (setf (gethash element-name (dtd-elements dtd))
- (make-elmdef :name element-name :content content-model))
- (sax:element-declaration (handler *ctx*) element-name content-model))
+ (prog1
+ (setf (gethash element-name (dtd-elements dtd))
+ (make-elmdef :name element-name :content content-model))
+ (sax:element-declaration (handler *ctx*) element-name content-model)))
((null content-model)
e)
(t
From dlichteblau at common-lisp.net Sun Aug 5 11:16:15 2007
From: dlichteblau at common-lisp.net (dlichteblau)
Date: Sun, 5 Aug 2007 07:16:15 -0400 (EDT)
Subject: [cxml-cvs] CVS cxml/xml
Message-ID: <20070805111615.728021E07C@common-lisp.net>
Update of /project/cxml/cvsroot/cxml/xml
In directory clnet:/tmp/cvs-serv29196
Modified Files:
unparse.lisp
Log Message:
fixed canonical output of processing instructions
--- /project/cxml/cvsroot/cxml/xml/unparse.lisp 2007/07/22 19:44:01 1.19
+++ /project/cxml/cvsroot/cxml/xml/unparse.lisp 2007/08/05 11:16:15 1.20
@@ -423,9 +423,12 @@
(unless (rod-equal target '#.(string-rod "xml"))
(%write-rod '#.(string-rod "") sink)
(%write-rod target sink)
- (unless (zerop (length data))
- (%write-rune #/space sink)
- (%write-rod data sink))
+ (cond
+ ((plusp (length data))
+ (%write-rune #/space sink)
+ (%write-rod data sink))
+ ((canonical sink)
+ (%write-rune #/space sink)))
(%write-rod '#.(string-rod "?>") sink)))
(defmethod sax:start-cdata ((sink sink))
From dlichteblau at common-lisp.net Sun Aug 5 12:01:28 2007
From: dlichteblau at common-lisp.net (dlichteblau)
Date: Sun, 5 Aug 2007 08:01:28 -0400 (EDT)
Subject: [cxml-cvs] CVS cxml/doc
Message-ID: <20070805120128.F17B7560A2@common-lisp.net>
Update of /project/cxml/cvsroot/cxml/doc
In directory clnet:/tmp/cvs-serv10048
Modified Files:
index.xml
Log Message:
new release
--- /project/cxml/cvsroot/cxml/doc/index.xml 2007/07/22 19:59:26 1.15
+++ /project/cxml/cvsroot/cxml/doc/index.xml 2007/08/05 12:01:23 1.16
@@ -51,7 +51,7 @@
Recent Changes
- rel-2007-xx-yy
+ rel-2007-08-05
- Various DTD serialization fixes
- UTF-8 fix, thanks to Francis Leboutte
From dlichteblau at common-lisp.net Thu Aug 23 23:16:00 2007
From: dlichteblau at common-lisp.net (dlichteblau)
Date: Thu, 23 Aug 2007 19:16:00 -0400 (EDT)
Subject: [cxml-cvs] CVS cxml/klacks
Message-ID: <20070823231600.5CEE6240C3@common-lisp.net>
Update of /project/cxml/cvsroot/cxml/klacks
In directory clnet:/tmp/cvs-serv11293
Modified Files:
klacks-impl.lisp
Log Message:
klacks octet array fix (thanks to emarsden for the bug report)
--- /project/cxml/cvsroot/cxml/klacks/klacks-impl.lisp 2007/06/16 09:41:22 1.11
+++ /project/cxml/cvsroot/cxml/klacks/klacks-impl.lisp 2007/08/23 23:16:00 1.12
@@ -137,8 +137,7 @@
(make-stream-name
:entity-name "main document"
:entity-kind :main
- :uri (pathname-to-uri
- (merge-pathnames (or pathname (pathname input))))))
+ :uri (safe-stream-sysid input)))
(apply #'make-source xstream args)))
(pathname
(let* ((xstream
From dlichteblau at common-lisp.net Wed Aug 29 12:11:17 2007
From: dlichteblau at common-lisp.net (dlichteblau)
Date: Wed, 29 Aug 2007 08:11:17 -0400 (EDT)
Subject: [cxml-cvs] CVS cxml/doc
Message-ID: <20070829121117.D124A7A001@common-lisp.net>
Update of /project/cxml/cvsroot/cxml/doc
In directory clnet:/tmp/cvs-serv13386/doc
Modified Files:
index.xml
Log Message:
fixed make-source :buffering nil, thanks to Magnus Henoch for the report
--- /project/cxml/cvsroot/cxml/doc/index.xml 2007/08/05 12:01:23 1.16
+++ /project/cxml/cvsroot/cxml/doc/index.xml 2007/08/29 12:11:17 1.17
@@ -51,6 +51,11 @@
Recent Changes
+ rel-2007-xx-yy
+
+ - fixed make-source :buffering nil, thanks to Magnus Henoch for
+ the report
+
rel-2007-08-05
- Various DTD serialization fixes
From dlichteblau at common-lisp.net Wed Aug 29 12:11:18 2007
From: dlichteblau at common-lisp.net (dlichteblau)
Date: Wed, 29 Aug 2007 08:11:18 -0400 (EDT)
Subject: [cxml-cvs] CVS cxml/runes
Message-ID: <20070829121118.16D9024004@common-lisp.net>
Update of /project/cxml/cvsroot/cxml/runes
In directory clnet:/tmp/cvs-serv13386/runes
Modified Files:
xstream.lisp
Log Message:
fixed make-source :buffering nil, thanks to Magnus Henoch for the report
--- /project/cxml/cvsroot/cxml/runes/xstream.lisp 2006/09/10 14:55:29 1.6
+++ /project/cxml/cvsroot/cxml/runes/xstream.lisp 2007/08/29 12:11:17 1.7
@@ -128,6 +128,7 @@
;; How much to read each time
(speed 0 :type buffer-index)
+ (full-speed 0 :type buffer-index)
;; Some stream object obeying to a certain protcol
os-stream
@@ -256,6 +257,8 @@
;;; Underflow
+(defconstant +default-buffer-size+ 100)
+
(defmethod xstream-underflow ((input xstream))
(declare (type xstream input))
;; we are about to fill new data into the buffer, so we need to
@@ -274,12 +277,11 @@
;; then we take care that the buffer is large enough to carry at
;; least 100 bytes (a random number)
;;
- ;; david: was heisst da random? ich nehme an, dass 100 einfach
- ;; ausreichend sein soll, um die laengste utf-8 bytesequenz oder die
- ;; beiden utf-16 surrogates zu halten? dann ist 100 ja wohl dicke
- ;; ausreichend und koennte in make-xstream ordentlich geprueft werden.
- ;; oder was geht hier vor?
- (unless (>= (length (xstream-os-buffer input)) 100)
+ ;; David: My understanding is that any number of octets large enough
+ ;; to record the longest UTF-8 sequence or UTF-16 sequence is okay,
+ ;; so 100 is plenty for this purpose.
+ (unless (>= (length (xstream-os-buffer input))
+ +default-buffer-size+)
(error "You lost")))
(setf n
(read-octets (xstream-os-buffer input) (xstream-os-stream input)
@@ -316,16 +318,18 @@
(if (eq initial-encoding :guess)
(figure-encoding os-stream)
(values initial-encoding nil))
- (let ((osbuf (make-array speed :element-type '(unsigned-byte 8))))
+ (let* ((bufsize (max speed +default-buffer-size+))
+ (osbuf (make-array bufsize :element-type '(unsigned-byte 8))))
(replace osbuf preread)
(make-xstream/low
- :buffer (let ((r (make-array speed :element-type 'buffer-byte)))
+ :buffer (let ((r (make-array bufsize :element-type 'buffer-byte)))
(setf (elt r 0) #xFFFF)
r)
:read-ptr 0
:fill-ptr 0
:os-buffer osbuf
:speed initial-speed
+ :full-speed speed
:os-stream os-stream
:os-left-start 0
:os-left-end (length preread)
@@ -375,7 +379,7 @@
(xstream/close (xstream-os-stream input)))
(defun set-to-full-speed (xstream)
- (setf (xstream-speed xstream) (length (xstream-os-buffer xstream))))
+ (setf (xstream-speed xstream) (xstream-full-speed xstream)))
;;; controller implementations