[cxml-cvs] CVS cxml/xml
dlichteblau
dlichteblau at common-lisp.net
Mon Jan 23 21:49:42 UTC 2006
Update of /project/cxml/cvsroot/cxml/xml
In directory common-lisp:/tmp/cvs-serv24317
Modified Files:
catalog.lisp
Log Message:
catalog fixes and workarounds
--- /project/cxml/cvsroot/cxml/xml/catalog.lisp 2005/12/17 22:30:19 1.3
+++ /project/cxml/cvsroot/cxml/xml/catalog.lisp 2006/01/23 21:49:42 1.4
@@ -222,8 +222,8 @@
(defun parse-catalog-file (uri)
(handler-case
(parse-catalog-file/strict uri)
- (file-error () nil)
- (xml-parse-error () nil)))
+ ((or file-error xml-parse-error) (c)
+ (warn "ignoring catalog error: ~A" c))))
(defparameter *catalog-dtd*
(let* ((cxml
@@ -248,9 +248,8 @@
:element-type '(unsigned-byte 8)
:direction :input))
(parse-stream s
- (make-recoder (make-instance 'catalog-parser :uri uri)
- #'rod-to-utf8-string)
- :validate t
+ (make-instance 'catalog-parser :uri uri)
+ :validate nil
:dtd (make-extid nil dtd-sysid)
:root #"catalog"
:entity-resolver #'entity-resolver)))))
@@ -284,7 +283,11 @@
(setf lname (or lname qname))
;; we can dispatch on lnames only because we validate against the DTD,
;; which disallows other namespaces.
- (push (string-or (get-attribute/lname "prefer" attrs) (prefer handler))
+ (push (let ((new (get-attribute/lname "prefer" attrs)))
+ (cond
+ ((equal new "public") :public)
+ ((equal new "system") :system)
+ ((null new) (prefer handler))))
(prefer-stack handler))
(push (string-or (get-attribute/lname "base" attrs) (base handler))
(base-stack handler))
More information about the Cxml-cvs
mailing list