Re: [Sax-devel] Re: SAX exception IDs
Brought to you by:
dmegginson
From: David B. <da...@pa...> - 2002-04-22 02:31:08
|
> I have two questions-- I am not sure if either will be useful but I will > bring them up anyway. Discussions are usually helpful! > 1) Should these exceptions be prefixed with > http://xml.org/sax/exception/xml/ ? Can we make a case for a URL that is > more generic such as http://xml.org/exception/xml/ or is that beyond the > scope of SAX to define. My thought is that these codes might be applicable > (and therefore useful) in a non SAX setting where the cross-over might be > good. They can be used in a non-SAX setting already, so long as that setting accomodates URIs as an ID scheme. The base URI ought never to be relevant except in terms of uniqueness. > 2) Within the Javadoc it mentioned that the parser should choose the most > applicable error-- as some complex errors violate many constraints. Overlapping constraints ... it an illegal character, or the fact that it was found where a name should be, or that the name was used for an attribute? (And so on.) Actually it said "most specific applicable rule", though I'm open to other ways to address such problems. > I am > wondering if it would be wise to offer java.lang.String[] getExceptionIds() > where all applicable violations could be reported. I don't know how many > parsers could expose this kind of information but it would be interesting... Wouldn't that be painful to work with, though? "Too much information". How would you test such a critter? When I've dealt with similar situations before, it's either been resolved strictly in terms of simplicity, or by having an error stack mechanism that more or less resembles the way a SAXException exposes a root cause (or JDK 1.4 now does for java.lang.Exception). - Dave |