In case you were wondering if the error messages can be more specific in terms what element caused the problem:
The 'default' attribute of the 'database' element is not declared. The short answer is no. IBatis isn't generating that message, the underlying XmlValidatingReader is. There's no way to store information about the node before validating it. I suppose one could have two XmlReaders (XmlTextReader and XmlValidatingReader) and use the XmlTextReader to look ahead to the next element and record more information to the ErrorContext before advancing the XmlValidatingReader to that element. I think the way things are done now is fine. --- Morten Schmidt <[EMAIL PROTECTED]> wrote: > OK, I just upgraded to the new ALPHA's > > I get the following error: > > [snip] > Invalid SqlMap.config document. cause :The 'default' attribute is > not > declared. An error occurred at , (1, 386). > Description: An unhandled exception occurred during the execution of > the > current web request. Please review the stack trace for more > information > about the error and where it originated in the code. > > Exception Details: > IBatisNet.Common.Exceptions.ConfigurationException: > Invalid SqlMap.config document. cause :The 'default' attribute is not > declared. An error occurred at , (1, 386). > [snap] > > and the Stack trace: > > [snip] > [ConfigurationException: Invalid SqlMap.config document. cause :The > 'default' attribute is not declared. An error occurred at , (1, 386). > > ] > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ValidateSchema(XmlNode > section, String schemaFileName) +446 > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument > document, DataSource dataSource, Boolean useConfigFileWatcher, > Boolean > isCallFromDao) +99 > > [ConfigurationException: > - The error occurred while Validate SqlMap config. > - The error occurred in The 'default' attribute is not declared. An > error occurred at , (1, 386). > .] > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument > document, DataSource dataSource, Boolean useConfigFileWatcher, > Boolean > isCallFromDao) +164 > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String > resource, ConfigureHandler configureDelegate) +196 > IBatisNet.DataMapper.Mapper.InitMapper() +65 > IBatisNet.DataMapper.Mapper.Instance() +64 > BudgetModel.Model.Helper.UserDataHelper.UserLogin(String username, > String uPassword) +164 > BudgetModel.login.ok_Click(Object sender, EventArgs e) in > C:\Documents and > Settings\kel\VSWebCache\til.busieco.sdu.dk_1000\login.aspx.cs:103 > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 > > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String > eventArgument) +57 > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler > sourceControl, String eventArgument) +18 > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection > postData) > +33 > System.Web.UI.Page.ProcessRequestMain() +1292 > [snap] > > What wen't wrong? It worked with my own compile... but there I had to > leave out some code... > > /morten > >