Ideally ibatis would do the validation itself, but until then I suppose you could do the validation at some appropriate point in your code. For example, a web app could do it in the Global.Application_Start() method. The schemas are in <ibatis install dir>/souce/IBatisNet.Schemas.
-----Original Message----- From: Emmanuele De Andreis [mailto:[EMAIL PROTECTED] Sent: Monday, January 17, 2005 2:54 PM To: ibatis-user-cs@incubator.apache.org Subject: Re: A debug day with ibatis and netpetshop dao pattern Hi, thanks for reply... the idea of validate against schema is very good. Where is the best place to do such validation? Could make sense that ibatis performs a validation internally before loading the xml config? Manu On Mon, 17 Jan 2005 13:19:08 -0600, Kit Cragin <[EMAIL PROTECTED]> wrote: > I agree that exception handling/error verbosity could be improved. But don't > get me wrong though -- iBATIS.NET has a very solid 1.0 showing. > > Your idea of passing the original exception (instead of just its message) to > the wrapping ConfigurationException would help a lot. > > I wouldn't throw NullReferenceExceptions explicitly though - that's intended > to be thrown by the .NET runtime. Instead, throw a ConfigurationException() > with the message. Technically it's not a null reference until you attempt to > use it. > > Even better: make use of the provided iBATIS schemas by invoking schema > validation before configuration. The built-in schema validation will give > you the best context for errors in the XML config files and could greatly > simplify the configuration logic. > > - Kit