[cxml-devel] Handling doctype declarations for system-ids?

David Lichteblau david at lichteblau.com
Mon Mar 20 13:00:49 UTC 2006


Quoting Holger.Schauer at gmx.de (Holger.Schauer at gmx.de):
> I don't understand why the effective-extid is computed based on an
> absolute-extid -- I would have expected some test whether the path is
> absolute or relative. However, maybe I misinterpret something, and the
> comment below is related to the problem:

The bug is, I think, that a relative base URI made it into the zstream
at all.  CXML is meant to deal with absolute base URIs internally,
otherwise the merging of URIs isn't going to work out.

So I have just committed the following patch that merges *d-p-d* into
pathnames passed to CXML before turning them into URIs.  (Please test!)


Thanks for the report,
David

--- /project/cxml/cvsroot/cxml/xml/xml-parse.lisp	2006/01/23 21:45:48	1.59
+++ /project/cxml/cvsroot/cxml/xml/xml-parse.lisp	2006/03/20 12:42:26	1.60
@@ -2978,7 +2978,7 @@
       (make-stream-name
        :entity-name "main document"
        :entity-kind :main
-       :uri (pathname-to-uri filename)))
+       :uri (pathname-to-uri (merge-pathnames filename))))
     (apply #'parse-xstream input handler args)))
 
 (defun resolve-synonym-stream (stream)
@@ -2991,7 +2991,7 @@
 	   ;; ignore-errors, because sb-bsd-sockets creates instances of
 	   ;; FILE-STREAMs that aren't
            (ignore-errors (pathname stream)))
-      (pathname-to-uri (pathname stream))
+      (pathname-to-uri (merge-pathnames (pathname stream)))
       nil))
 
 (defun parse-stream (stream handler &rest args)



More information about the cxml-devel mailing list