Bad things happen when .xsd gets out of date with code
Posted: Sat Jul 31, 2004 23:37
I don't know if there's much you can do about this, but this just chewed me for an hour so maybe it'll just help someone else out
As the title suggests, if you don't make sure that the .xsd your app is picking up is totally in sync with the CEGui code you're using, you can have problems. In my case, it was 'Unexpected error when parsing font..' - this was because the attribute 'AntiAlias' had been added, and my .xsd did not include it (neither did my font XML). It's my own fault, I should have kept everything in sync, but I can imagine people may also hit this.
If the .xsd is out of date, the validation does not happen, and when the code tries to access this attribute, it throws an exception, although I'm not sure what. It's not a SAX / XML exception, or a FileIOException which are the only types documented as being thrown by SAX and in the CEGui code. This made it a little hard to track down - I eventually just put breakpoints all over the XML handler code and stepped through it all.
The moral of the story is - if you update your CEGui DLLs from CVS, make sure you update the .xsd files too!
As the title suggests, if you don't make sure that the .xsd your app is picking up is totally in sync with the CEGui code you're using, you can have problems. In my case, it was 'Unexpected error when parsing font..' - this was because the attribute 'AntiAlias' had been added, and my .xsd did not include it (neither did my font XML). It's my own fault, I should have kept everything in sync, but I can imagine people may also hit this.
If the .xsd is out of date, the validation does not happen, and when the code tries to access this attribute, it throws an exception, although I'm not sure what. It's not a SAX / XML exception, or a FileIOException which are the only types documented as being thrown by SAX and in the CEGui code. This made it a little hard to track down - I eventually just put breakpoints all over the XML handler code and stepped through it all.
The moral of the story is - if you update your CEGui DLLs from CVS, make sure you update the .xsd files too!