From dlichteblau at common-lisp.net Sun Dec 2 20:55:11 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sun, 2 Dec 2007 15:55:11 -0500 (EST) Subject: [cxml-cvs] CVS cxml Message-ID: <20071202205511.4AAAF2B1D4@common-lisp.net> Update of /project/cxml/cvsroot/cxml In directory clnet:/tmp/cvs-serv22350 Modified Files: cxml.asd Log Message: fixed the asdf-install workaround --- /project/cxml/cvsroot/cxml/cxml.asd 2007/10/07 14:45:07 1.21 +++ /project/cxml/cvsroot/cxml/cxml.asd 2007/12/02 20:55:11 1.22 @@ -2,11 +2,16 @@ (:use :asdf :cl)) (in-package :cxml-system) +(defclass dummy-cxml-component () ()) + +(defmethod asdf:component-name ((c dummy-cxml-component)) + :cxml) + ;; force loading of closure-common.asd, which installs *FEATURES* this ;; file depends on. Use MISSING-DEPENDENCY for asdf-install. (unless (find-system :closure-common nil) (error 'missing-dependency - :required-by :cxml + :required-by (make-instance 'dummy-cxml-component) :version nil :requires :closure-common)) From dlichteblau at common-lisp.net Sun Dec 2 20:56:23 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sun, 2 Dec 2007 15:56:23 -0500 (EST) Subject: [cxml-cvs] CVS cxml/klacks Message-ID: <20071202205623.ABA4B2B02B@common-lisp.net> Update of /project/cxml/cvsroot/cxml/klacks In directory clnet:/tmp/cvs-serv22718 Modified Files: klacks-impl.lisp Log Message: fixed variable name in with-source --- /project/cxml/cvsroot/cxml/klacks/klacks-impl.lisp 2007/10/14 17:50:11 1.13 +++ /project/cxml/cvsroot/cxml/klacks/klacks-impl.lisp 2007/12/02 20:56:23 1.14 @@ -51,12 +51,12 @@ `(let* ((,s ,source) (*ctx* (slot-value ,s 'context)) (*validate* (slot-value ,s 'validate)) - (*data-behaviour* (slot-value source 'data-behaviour)) - (*namespace-bindings* (car (slot-value source 'namespace-stack))) - (*scratch-pad* (slot-value source 'scratch-pad)) - (*scratch-pad-2* (slot-value source 'scratch-pad-2)) - (*scratch-pad-3* (slot-value source 'scratch-pad-3)) - (*scratch-pad-4* (slot-value source 'scratch-pad-4))) + (*data-behaviour* (slot-value ,s 'data-behaviour)) + (*namespace-bindings* (car (slot-value ,s 'namespace-stack))) + (*scratch-pad* (slot-value ,s 'scratch-pad)) + (*scratch-pad-2* (slot-value ,s 'scratch-pad-2)) + (*scratch-pad-3* (slot-value ,s 'scratch-pad-3)) + (*scratch-pad-4* (slot-value ,s 'scratch-pad-4))) (handler-case (with-slots (, at slots) ,s , at body) From dlichteblau at common-lisp.net Sun Dec 2 20:56:42 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sun, 2 Dec 2007 15:56:42 -0500 (EST) Subject: [cxml-cvs] CVS cxml/xml Message-ID: <20071202205642.EA2762B080@common-lisp.net> Update of /project/cxml/cvsroot/cxml/xml In directory clnet:/tmp/cvs-serv22776 Modified Files: package.lisp unparse.lisp Log Message: new slot omit-xml-declaration-p on sink --- /project/cxml/cvsroot/cxml/xml/package.lisp 2007/11/18 18:43:11 1.21 +++ /project/cxml/cvsroot/cxml/xml/package.lisp 2007/12/02 20:56:42 1.22 @@ -50,6 +50,8 @@ ;; #-rune-is-character #:make-character-stream-sink/utf8 + #:omit-xml-declaration-p + #:with-xml-output #:with-output-sink #:with-namespace --- /project/cxml/cvsroot/cxml/xml/unparse.lisp 2007/11/24 00:04:16 1.24 +++ /project/cxml/cvsroot/cxml/xml/unparse.lisp 2007/12/02 20:56:42 1.25 @@ -80,7 +80,10 @@ (previous-notation :initform nil :accessor previous-notation) (have-doctype :initform nil :accessor have-doctype) (have-internal-subset :initform nil :accessor have-internal-subset) - (stack :initform nil :accessor stack))) + (stack :initform nil :accessor stack) + (omit-xml-declaration-p :initform nil + :initarg :omit-xml-declaration-p + :accessor omit-xml-declaration-p))) #-rune-is-character (defmethod hax:%want-strings-p ((handler sink)) @@ -134,7 +137,8 @@ ;;;; doctype and notations (defmethod sax:start-document ((sink sink)) - (unless (canonical sink) + (unless (or (canonical sink) + (omit-xml-declaration-p sink)) (%write-rod #"" sink) (%write-rune #/U+000A sink))) From dlichteblau at common-lisp.net Sun Dec 2 20:57:04 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sun, 2 Dec 2007 15:57:04 -0500 (EST) Subject: [cxml-cvs] CVS cxml/test Message-ID: <20071202205704.D6E172B080@common-lisp.net> Update of /project/cxml/cvsroot/cxml/test In directory clnet:/tmp/cvs-serv22835 Modified Files: xmlconf.lisp Log Message: a serialization test --- /project/cxml/cvsroot/cxml/test/xmlconf.lisp 2007/07/01 17:26:12 1.16 +++ /project/cxml/cvsroot/cxml/test/xmlconf.lisp 2007/12/02 20:57:04 1.17 @@ -138,6 +138,12 @@ pathname (rune-dom:make-dom-builder) args))) + ;; If we got here, parsing worked. Let's try to serialize the same + ;; document. (We do the same thing in canonical mode below to check the + ;; content model of the output, but that doesn't even catch obvious + ;; errors in DTD serialization, so even a simple here is an + ;; improvement.) + (apply *parser-fn* pathname (cxml:make-rod-sink) args) (cond ((null output) (format t " input")) From dlichteblau at common-lisp.net Sat Dec 22 15:19:25 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sat, 22 Dec 2007 10:19:25 -0500 (EST) Subject: [cxml-cvs] CVS closure-common Message-ID: <20071222151925.58D455D162@common-lisp.net> Update of /project/cxml/cvsroot/closure-common In directory clnet:/tmp/cvs-serv1529 Modified Files: closure-common.asd encodings.lisp xstream.lisp ystream.lisp Log Message: Use 21 bit characters on Lisp offering them. --- /project/cxml/cvsroot/closure-common/closure-common.asd 2007/10/21 17:07:38 1.3 +++ /project/cxml/cvsroot/closure-common/closure-common.asd 2007/12/22 15:19:25 1.4 @@ -15,19 +15,31 @@ (let (#+sbcl (*compile-print* nil)) (call-next-method)))) -#-(or rune-is-character rune-is-integer) (progn (format t "~&;;; Checking for wide character support...") (force-output) - (pushnew (dotimes (x 65536 - (progn - (format t " ok, characters have at least 16 bits.~%") - :rune-is-character)) - (unless (or (<= #xD800 x #xDFFF) - (and (< x char-code-limit) (code-char x))) - (format t " no, reverting to octet strings.~%") - (return :rune-is-integer))) - *features*)) + (flet ((test (code) + (and (< code char-code-limit) (code-char code)))) + (cond + ((not (test 50000)) + (format t " no, reverting to octet strings.~%") + #+rune-is-character + (error "conflicting unicode configuration. Please recompile.") + (pushnew :rune-is-integer *features*)) + ((code-char 70000) + (when (test #xD800) + (format t " WARNING: Lisp implementation doesn't use UTF-16, ~ + but accepts surrogate code points.~%")) + (format t " yes, using code points.~%") + #+(or rune-is-integer rune-is-utf-16) + (error "conflicting unicode configuration. Please recompile.") + (pushnew :rune-is-character *features*)) + (t + (format t " yes, using UTF-16.~%") + #+(or rune-is-integer (and rune-is-character (not rune-is-utf-16))) + (error "conflicting unicode configuration. Please recompile.") + (pushnew :rune-is-utf-16 *features*) + (pushnew :rune-is-character *features*))))) #-rune-is-character (format t "~&;;; Building Closure with (UNSIGNED-BYTE 16) RUNES~%") --- /project/cxml/cvsroot/closure-common/encodings.lisp 2007/07/22 19:59:26 1.7 +++ /project/cxml/cvsroot/closure-common/encodings.lisp 2007/12/22 15:19:25 1.8 @@ -1,5 +1,10 @@ (in-package :runes-encoding) +(eval-when (:compile-toplevel :load-toplevel :execute) + (defparameter +buffer-byte+ + #+rune-is-utf-16 '(unsigned-byte 16) + #-rune-is-utf-16 '(unsigned-byte 32))) + (define-condition encoding-error (simple-error) ()) (defun xerror (fmt &rest args) @@ -82,7 +87,7 @@ (defun make-simple-8-bit-encoding (&key charset) (make-instance 'simple-8-bit-encoding - :table (coerce (to-unicode-table charset) '(simple-array (unsigned-byte 16) (256))))) + :table (coerce (to-unicode-table charset) '(simple-array #.+buffer-byte+ (256))))) ;;;;;;; @@ -150,16 +155,30 @@ (return)) (when (>= (%+ rptr 1) in-end) (return)) - (let ((hi (aref in rptr)) - (lo (aref in (%+ 1 rptr)))) + (let* ((hi (aref in rptr)) + (lo (aref in (%+ 1 rptr))) + (x (logior (ash hi 8) lo))) + (when (or (eql x #xFFFE) (eql x #xFFFF)) + (xerror "not a valid code point: #x~X" x)) + (when (<= #xDC00 x #xDFFF) + (xerror "unexpected high surrogate: #x~X" x)) + (when (<= #xD800 x #xDBFF) + ;; seen low surrogate, look for high surrogate now + (when (>= (%+ rptr 3) in-end) + (return)) + (let* ((hi2 (aref in (%+ 2 rptr))) + (lo2 (aref in (%+ 3 rptr))) + (y (logior (ash hi2 8) lo2))) + (unless (<= #xDC00 x #xDFFF) + (xerror "expected a high surrogate but found: #x~X" x)) + #-rune-is-utf-16 + (progn + (setf x (logior (ash (%- x #xd7c0) 10) (%and y #x3FF))) + (setf rptr (%+ 2 rptr)))) + ;; end of surrogate handling + ) + (setf (aref out wptr) x) (setf rptr (%+ 2 rptr)) - ;; FIXME: Wenn wir hier ein Surrogate sehen, muessen wir das naechste - ;; Zeichen abwarten und nachgucken, dass nicht etwa die andere - ;; Haelfte fehlt! - (let ((x (logior (ash hi 8) lo))) - (when (or (eql x #xFFFE) (eql x #xFFFF)) - (xerror "not a valid code point: #x~X" x)) - (setf (aref out wptr) x)) (setf wptr (%+ 1 wptr)))) (values wptr rptr))) @@ -173,16 +192,30 @@ (return)) (when (>= (%+ rptr 1) in-end) (return)) - (let ((lo (aref in (%+ 0 rptr))) - (hi (aref in (%+ 1 rptr)))) + (let* ((lo (aref in rptr)) + (hi (aref in (%+ 1 rptr))) + (x (logior (ash hi 8) lo))) + (when (or (eql x #xFFFE) (eql x #xFFFF)) + (xerror "not a valid code point: #x~X" x)) + (when (<= #xDC00 x #xDFFF) + (xerror "unexpected high surrogate: #x~X" x)) + (when (<= #xD800 x #xDBFF) + ;; seen low surrogate, look for high surrogate now + (when (>= (%+ rptr 3) in-end) + (return)) + (let* ((lo2 (aref in (%+ 2 rptr))) + (hi2 (aref in (%+ 3 rptr))) + (y (logior (ash hi2 8) lo2))) + (unless (<= #xDC00 x #xDFFF) + (xerror "expected a high surrogate but found: #x~X" x)) + #-rune-is-utf-16 + (progn + (setf x (logior (ash (%- x #xd7c0) 10) (%and y #x3FF))) + (setf rptr (%+ 2 rptr)))) + ;; end of surrogate handling + ) + (setf (aref out wptr) x) (setf rptr (%+ 2 rptr)) - ;; FIXME: Wenn wir hier ein Surrogate sehen, muessen wir das naechste - ;; Zeichen abwarten und nachgucken, dass nicht etwa die andere - ;; Haelfte fehlt! - (let ((x (logior (ash hi 8) lo))) - (when (or (eql x #xFFFE) (eql x #xFFFF)) - (xerror "not a valid code point: #x~X" x)) - (setf (aref out wptr) x)) (setf wptr (%+ 1 wptr)))) (values wptr rptr))) @@ -190,7 +223,8 @@ in in-start in-end out out-start out-end eof?) (declare (optimize (speed 3) (safety 0)) (type (simple-array (unsigned-byte 8) (*)) in) - (type (simple-array (unsigned-byte 16) (*)) out) + (type (simple-array #.+buffer-byte+ (*)) + out) (type fixnum in-start in-end out-start out-end)) (let ((wptr out-start) (rptr in-start) @@ -204,6 +238,7 @@ (eql x #xFFFE) (eql x #xFFFF)) (xerror "not a valid code point: #x~X" x)) + #+rune-is-utf-16 ((%> x #xFFFF) (setf (aref out (%+ 0 wptr)) (%+ #xD7C0 (ash x -10)) (aref out (%+ 1 wptr)) (%ior #xDC00 (%and x #x3FF))) @@ -325,7 +360,7 @@ eof?) (declare (optimize (speed 3) (safety 0)) (type (simple-array (unsigned-byte 8) (*)) in) - (type (simple-array (unsigned-byte 16) (*)) out) + (type (simple-array #.+buffer-byte+ (*)) out) (type fixnum in-start in-end out-start out-end)) (let ((wptr out-start) (rptr in-start) @@ -333,7 +368,7 @@ (table (slot-value encoding 'table))) (declare (type fixnum wptr rptr) (type (unsigned-byte 8) byte) - (type (simple-array (unsigned-byte 16) (*)) table)) + (type (simple-array #.+buffer-byte+ (*)) table)) (loop (when (%= wptr out-end) (return)) (when (%>= rptr in-end) (return)) @@ -387,7 +422,7 @@ :name ',name :to-unicode-table ',(make-array 256 - :element-type '(unsigned-byte 16) + :element-type '#.+buffer-byte+ :initial-contents codes))) ',name)) --- /project/cxml/cvsroot/closure-common/xstream.lisp 2007/10/14 21:14:08 1.8 +++ /project/cxml/cvsroot/closure-common/xstream.lisp 2007/12/22 15:19:25 1.9 @@ -83,7 +83,10 @@ `(unsigned-byte ,(integer-length array-total-size-limit))) (deftype buffer-byte () - `(unsigned-byte 16)) + #+rune-is-utf-16 + `(unsigned-byte 16) + #-rune-is-utf-16 + `(unsigned-byte 32)) (deftype octet () `(unsigned-byte 8)) --- /project/cxml/cvsroot/closure-common/ystream.lisp 2007/06/16 11:27:19 1.6 +++ /project/cxml/cvsroot/closure-common/ystream.lisp 2007/12/22 15:19:25 1.7 @@ -76,14 +76,17 @@ (when (plusp ptr) (let* ((in (ystream-in-buffer ystream)) (out (ystream-out-buffer ystream)) + #+rune-is-utf-16 (surrogatep (<= #xD800 (rune-code (elt in (1- ptr))) #xDBFF)) n) + #+rune-is-utf-16 (when surrogatep (decf ptr)) (when (plusp ptr) (setf n (runes-to-utf8 out in ptr)) (ystream-device-write ystream out n) (cond + #+rune-is-utf-16 (surrogatep (setf (elt in 0) (elt in (1- ptr))) (setf (ystream-in-ptr ystream) 1)) @@ -98,7 +101,7 @@ (macrolet ((define-utf8-writer (name (byte &rest aux) result &body body) `(defun ,name (out in n) - (let ((high-surrogate nil) + (let (#+rune-is-utf-16 (high-surrogate nil) , at aux) (labels ((write0 (,byte) @@ -134,13 +137,19 @@ (write0 (logior #b10000000 (ldb (byte 6 0) r)))))) (write2 (r) (cond + #+rune-is-utf-16 ((<= #xD800 r #xDBFF) (setf high-surrogate r)) + #+rune-is-utf-16 ((<= #xDC00 r #xDFFF) (let ((q (logior (ash (- high-surrogate #xD7C0) 10) (- r #xDC00)))) (write1 q)) (setf high-surrogate nil)) + #-rune-is-utf-16 + ((<= #xD800 r #xDFFF) + (error + "surrogates not allowed in this configuration")) (t (write1 r))))) (dotimes (j n) @@ -259,7 +268,7 @@ (defun utf8-string-to-rod (str) (let* ((bytes (map '(vector (unsigned-byte 8)) #'char-code str)) - (buffer (make-array (length bytes) :element-type '(unsigned-byte 16))) + (buffer (make-array (length bytes) :element-type 'buffer-byte)) (n (runes-encoding:decode-sequence :utf-8 bytes 0 (length bytes) buffer 0 0 nil)) (result (make-array n :element-type 'rune))) From dlichteblau at common-lisp.net Sat Dec 22 15:24:36 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sat, 22 Dec 2007 10:24:36 -0500 (EST) Subject: [cxml-cvs] CVS cxml/klacks Message-ID: <20071222152436.94FC2742A5@common-lisp.net> Update of /project/cxml/cvsroot/cxml/klacks In directory clnet:/tmp/cvs-serv4185 Modified Files: klacks.lisp Log Message: Fixed klacks-error export, thanks to Andreas Fuchs. --- /project/cxml/cvsroot/cxml/klacks/klacks.lisp 2007/10/14 17:50:11 1.10 +++ /project/cxml/cvsroot/cxml/klacks/klacks.lisp 2007/12/22 15:24:36 1.11 @@ -219,10 +219,10 @@ (return (values this a b c)))) (klacks:consume source)))) -(define-condition klacks-error (xml-parse-error) ()) +(define-condition klacks:klacks-error (xml-parse-error) ()) (defun klacks-error (fmt &rest args) - (%error 'klacks-error + (%error 'klacks:klacks-error nil (format nil "Klacks assertion failed: ~?" fmt args))) From dlichteblau at common-lisp.net Sat Dec 22 15:24:52 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sat, 22 Dec 2007 10:24:52 -0500 (EST) Subject: [cxml-cvs] CVS cxml Message-ID: <20071222152452.50234742A5@common-lisp.net> Update of /project/cxml/cvsroot/cxml In directory clnet:/tmp/cvs-serv4227 Modified Files: XMLCONF Log Message: Use 21 bit characters on Lisp offering them. --- /project/cxml/cvsroot/cxml/XMLCONF 2005/12/03 21:54:42 1.42 +++ /project/cxml/cvsroot/cxml/XMLCONF 2007/12/22 15:24:52 1.43 @@ -8,19 +8,19 @@ xmltest/not-wf/sa/008.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/009.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/010.xml [not validating:] not-wf [validating:] invalid -xmltest/not-wf/sa/011.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/012.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/013.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/014.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/015.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/016.xml [not validating:] not-wf [validating:] not-wf +xmltest/not-wf/sa/011.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/012.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/013.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/014.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/015.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/016.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/017.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/018.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/019.xml [not validating:] not-wf [validating:] invalid -xmltest/not-wf/sa/020.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/021.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/022.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/023.xml [not validating:] not-wf [validating:] not-wf +xmltest/not-wf/sa/020.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/021.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/022.xml [not validating:] not-wf [validating:] invalid +xmltest/not-wf/sa/023.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/024.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/025.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/026.xml [not validating:] not-wf [validating:] invalid @@ -31,11 +31,11 @@ xmltest/not-wf/sa/031.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/032.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/033.xml [not validating:] not-wf [validating:] invalid -xmltest/not-wf/sa/034.xml [not validating:] not-wf [validating:] not-wf +xmltest/not-wf/sa/034.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/035.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/036.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/037.xml [not validating:] not-wf [validating:] invalid -xmltest/not-wf/sa/038.xml [not validating:] not-wf [validating:] not-wf +xmltest/not-wf/sa/038.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/039.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/040.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/041.xml [not validating:] not-wf [validating:] invalid @@ -73,7 +73,7 @@ xmltest/not-wf/sa/073.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/074.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/075.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/076.xml [not validating:] not-wf [validating:] not-wf +xmltest/not-wf/sa/076.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/077.xml [not validating:] not-wf [validating:] not-wf xmltest/not-wf/sa/078.xml [not validating:] not-wf [validating:] not-wf xmltest/not-wf/sa/079.xml [not validating:] not-wf [validating:] not-wf @@ -170,7 +170,7 @@ xmltest/not-wf/sa/170.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/171.xml [not validating:] not-wf [validating:] not-wf xmltest/not-wf/sa/172.xml [not validating:] not-wf [validating:] not-wf -xmltest/not-wf/sa/173.xml [not validating:] not-wf [validating:] not-wf +xmltest/not-wf/sa/173.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/174.xml [not validating:] not-wf [validating:] invalid xmltest/not-wf/sa/175.xml [not validating:] not-wf [validating:] not-wf xmltest/not-wf/sa/176.xml [not validating:] not-wf [validating:] not-wf @@ -688,9 +688,9 @@ oasis/p03fail7.xml [not validating:] not-wf [validating:] not-wf oasis/p03fail8.xml [not validating:] not-wf [validating:] not-wf oasis/p03fail9.xml [not validating:] not-wf [validating:] not-wf -oasis/p04fail1.xml [not validating:] not-wf [validating:] not-wf -oasis/p04fail2.xml [not validating:] not-wf [validating:] not-wf -oasis/p04fail3.xml [not validating:] not-wf [validating:] not-wf +oasis/p04fail1.xml [not validating:] not-wf [validating:] invalid +oasis/p04fail2.xml [not validating:] not-wf [validating:] invalid +oasis/p04fail3.xml [not validating:] not-wf [validating:] invalid oasis/p05fail1.xml [not validating:] not-wf [validating:] not-wf oasis/p05fail2.xml [not validating:] not-wf [validating:] not-wf oasis/p05fail3.xml [not validating:] not-wf [validating:] not-wf @@ -701,9 +701,9 @@ oasis/p09fail3.xml [not validating:] not-wf [validating:] not-wf oasis/p09fail4.xml [not validating:] not-wf [validating:] not-wf oasis/p09fail5.xml [not validating:] not-wf [validating:] not-wf -oasis/p10fail1.xml [not validating:] not-wf [validating:] not-wf -oasis/p10fail2.xml [not validating:] not-wf [validating:] not-wf -oasis/p10fail3.xml [not validating:] not-wf [validating:] not-wf +oasis/p10fail1.xml [not validating:] not-wf [validating:] invalid +oasis/p10fail2.xml [not validating:] not-wf [validating:] invalid +oasis/p10fail3.xml [not validating:] not-wf [validating:] invalid oasis/p11fail1.xml [not validating:] not-wf [validating:] not-wf oasis/p11fail2.xml [not validating:] not-wf [validating:] not-wf oasis/p12fail1.xml [not validating:] not-wf [validating:] not-wf @@ -752,24 +752,24 @@ oasis/p39fail3.xml [not validating:] not-wf [validating:] invalid oasis/p39fail4.xml [not validating:] not-wf [validating:] not-wf oasis/p39fail5.xml [not validating:] not-wf [validating:] not-wf -oasis/p40fail1.xml [not validating:] not-wf [validating:] not-wf +oasis/p40fail1.xml [not validating:] not-wf [validating:] invalid oasis/p40fail2.xml [not validating:] not-wf [validating:] not-wf oasis/p40fail3.xml [not validating:] not-wf [validating:] not-wf oasis/p40fail4.xml [not validating:] not-wf [validating:] not-wf oasis/p41fail1.xml [not validating:] not-wf [validating:] not-wf oasis/p41fail2.xml [not validating:] not-wf [validating:] not-wf -oasis/p41fail3.xml [not validating:] not-wf [validating:] not-wf +oasis/p41fail3.xml [not validating:] not-wf [validating:] invalid oasis/p42fail1.xml [not validating:] not-wf [validating:] invalid oasis/p42fail2.xml [not validating:] not-wf [validating:] invalid -oasis/p42fail3.xml [not validating:] not-wf [validating:] not-wf +oasis/p42fail3.xml [not validating:] not-wf [validating:] invalid oasis/p43fail1.xml [not validating:] not-wf [validating:] not-wf oasis/p43fail2.xml [not validating:] not-wf [validating:] not-wf oasis/p43fail3.xml [not validating:] not-wf [validating:] not-wf oasis/p44fail1.xml [not validating:] not-wf [validating:] not-wf -oasis/p44fail2.xml [not validating:] not-wf [validating:] not-wf -oasis/p44fail3.xml [not validating:] not-wf [validating:] not-wf -oasis/p44fail4.xml [not validating:] not-wf [validating:] not-wf -oasis/p44fail5.xml [not validating:] not-wf [validating:] not-wf +oasis/p44fail2.xml [not validating:] not-wf [validating:] invalid +oasis/p44fail3.xml [not validating:] not-wf [validating:] invalid +oasis/p44fail4.xml [not validating:] not-wf [validating:] invalid +oasis/p44fail5.xml [not validating:] not-wf [validating:] invalid oasis/p45fail1.xml [not validating:] not-wf [validating:] not-wf oasis/p45fail2.xml [not validating:] not-wf [validating:] not-wf oasis/p45fail3.xml [not validating:] not-wf [validating:] not-wf From dlichteblau at common-lisp.net Sat Dec 22 15:24:52 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sat, 22 Dec 2007 10:24:52 -0500 (EST) Subject: [cxml-cvs] CVS cxml/doc Message-ID: <20071222152452.C87107616C@common-lisp.net> Update of /project/cxml/cvsroot/cxml/doc In directory clnet:/tmp/cvs-serv4227/doc Modified Files: index.xml installation.xml Log Message: Use 21 bit characters on Lisp offering them. --- /project/cxml/cvsroot/cxml/doc/index.xml 2007/10/21 18:39:40 1.21 +++ /project/cxml/cvsroot/cxml/doc/index.xml 2007/12/22 15:24:52 1.22 @@ -35,28 +35,53 @@

The following libraries are available as separate downloads:

-

- ⬗  - cxml-rng -    - Relax NG validation -

-

- ⬗  - cxml-stp -    - STP, an alternative to DOM -

-

- ⬗  - Closure - HTML: cxml can be used together with its sister project - Closure HTML to convert between HTML and XHTML. -

+

Recent Changes

+

rel-2007-10-21

+
trivial-gray-streams.

- +

+ On Lisps without Unicode support, cxml uses integers instead of + characters to represent code points internally. By default, + however, the parser will recode all data to strings containing + characters representing UTF-8 bytes before passing it to user + code. +

Compilation

From dlichteblau at common-lisp.net Sat Dec 22 15:24:53 2007 From: dlichteblau at common-lisp.net (dlichteblau) Date: Sat, 22 Dec 2007 10:24:53 -0500 (EST) Subject: [cxml-cvs] CVS cxml/xml Message-ID: <20071222152453.1437A761AC@common-lisp.net> Update of /project/cxml/cvsroot/cxml/xml In directory clnet:/tmp/cvs-serv4227/xml Modified Files: xml-parse.lisp Log Message: Use 21 bit characters on Lisp offering them. --- /project/cxml/cvsroot/cxml/xml/xml-parse.lisp 2007/11/24 00:04:16 1.75 +++ /project/cxml/cvsroot/cxml/xml/xml-parse.lisp 2007/12/22 15:24:52 1.76 @@ -458,7 +458,8 @@ (defmacro %put-unicode-char (code-var put) `(progn - (cond ((%> ,code-var #xFFFF) + (cond #+rune-is-utf-16 + ((%> ,code-var #xFFFF) (,put (the rune (code-rune (%+ #xD7C0 (%ash ,code-var -10))))) (,put (the rune (code-rune (%ior #xDC00 (%and ,code-var #x03FF)))))) (t @@ -1489,19 +1490,14 @@ value)))) (definline data-rune-p (rune) - ;; any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - ;; - ;; FIXME: das halte ich fuer verkehrt. Surrogates als Unicode-Zeichen - ;; sind verboten. Das liegt hier aber nicht vor, denn wir arbeiten - ;; ja tatsaechlich mit UTF-16. Verboten ist es nur, wenn wir ein - ;; solches Zeichen beim Dekodieren finden, das wird aber eben - ;; in encodings.lisp bereits geprueft. --david + ;; Any Unicode character, excluding FFFE, and FFFF. + ;; Allow surrogates if using UTF-16, else allow >= 0x10000. (let ((c (rune-code rune))) (or (= c #x9) (= c #xA) (= c #xD) (<= #x20 c #xD7FF) + #+rune-is-utf-16 (<= #xD800 c #xDFFF) (<= #xE000 c #xFFFD) - (<= #xD800 c #xDBFF) - (<= #xDC00 c #xDFFF)))) + #-rune-is-utf-16 (<= #x10000 c #x10FFFF)))) (defun read-att-value (zinput input mode &optional canon-space-p (delim nil)) (with-rune-collector-2 (collect) @@ -1761,11 +1757,13 @@ (rune= rune #/U+000D))) (defun code-data-char-p (c) - ;; any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + ;; Any Unicode character, excluding FFFE, and FFFF. + ;; Allow surrogates if using UTF-16, else allow >= 0x10000. (or (= c #x9) (= c #xA) (= c #xD) (<= #x20 c #xD7FF) + #+rune-is-utf-16 (<= #xD800 c #xDFFF) (<= #xE000 c #xFFFD) - (<= #x10000 c #x10FFFF))) + #-rune-is-utf-16 (<= #x10000 c #x10FFFF))) (defun pubid-char-p (c) (or (rune= c #/u+0020) (rune= c #/u+000D) (rune= c #/u+000A)