[cxml-devel] Handling doctype declarations for system-ids?
Marco Antoniotti
marcoxa at cs.nyu.edu
Mon Mar 20 14:52:30 UTC 2006
On Mar 20, 2006, at 2:00 PM, David Lichteblau wrote:
> 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!)
Just to be nitpicking. Merging *d-p-d* (which I assume to be
*DEFAULT-PATHNAME-DEFAULTS*) isn't guaranteed to work. *d-p-d* can be
a relative pathname. Wouldn't that cause the same problem?
Cheers
Marco
>
>
> 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)
>
--
Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
715 Broadway 10th FL fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.
More information about the cxml-devel
mailing list