[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-xml] AElfred and File Not Found

From: David Brownell
Subject: Re: [Classpathx-xml] AElfred and File Not Found
Date: Sun, 07 Apr 2002 10:33:45 -0700

This sounds like a classic mistake when calling SAX parsers:
you must provide an absolute URI for the document that you're
parsing.  If you don't do that, then the parser should report some
IOException ... in your case you're getting FNF.  (I've noticed
that sometimes reports FNF, which is annoying
but rather out of the hands of SAX.)

Filenames aren't absolute URIs, and if you provide an input
stream of some kind (char/byte) wrapped in an InputSource,
you need to provide the URI too, so that it can turn relative
URIs into absolute ones before using them.

Call it right, and every SAX parser should succeed (unless
something else, like the input text, is broken :).

- Dave

----- Original Message ----- 
From: "Jeff Rafter" <address@hidden>
To: <address@hidden>
Sent: Sunday, April 07, 2002 8:25 AM
Subject: [Classpathx-xml] AElfred and File Not Found

> I had a question about AElfred2's handling of files that cannot be found. It
> raises an unexpected error with the I have
> seen several SAX parsers that handle this in this way but it seems like it
> should have a better error condition.
> For example in this doc:
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE SEASON SYSTEM "baseball.dtd" [
>    <!ENTITY % players SYSTEM "players.dtd">
>    %players;
> ]>
> I get the error:
> Unexpected error :
> e:\players.dtd (The system cannot find the
> file specified)
> If I create players.dtd then I get the same error for baseball dtd.-- either
> way the parse does not complete correctly. Any ideas?
> Regards,
> Jeff Rafter
> Defined Systems
> XML Development and Developer Web Hosting

reply via email to

[Prev in Thread] Current Thread [Next in Thread]