[Top][All Lists]

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

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

From: Jeff Rafter
Subject: Re: [Classpathx-xml] AElfred and File Not Found
Date: Sun, 7 Apr 2002 13:20:35 -0500

> 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.)

Even if I turn the URI into a full fledged file URI I get the error:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE SEASON SYSTEM "file:///e/baseball.dtd" [

   <!ENTITY % players SYSTEM "file:///e/players.dtd">


So it doesn't seem like a not fully qualified / fully qualified problem. I
know that players.dtd doesn't exist. I am expecting an error. Whether or not
I use "file:///e/players.dtd" or "players.dtd" I should get an error because
the file does not exist (intentionally). If I create the file, either method
(fully qualified / not fully qualified) works.

This question pertains to how that error is being raised. Currently it is an
IOException that is re-thrown by AElfred. Should the parameter entity be
loaded by default if I do not have validating turned on? (This is controlled
by the feature flag I think). Even if the feature is turned on though,
should it be a fatal error to encounter a non-existing entity? I think maybe
it should be (as it is doing)-- but I am wondering if this error should be
handled as a wrapped SAXParseException. The IOException needs to be handled
separately outside of the call to parse. That feels odd... it is an IO
problem-- but not necessarily an XML fatal error. Also, no error handler
information is provided in this case.

I admit to not being fully sure how SAX and the XML Rec are playing wrt this
issue... : )

Jeff Rafter
Defined Systems
XML Development and Developer Web Hosting

reply via email to

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