Great news. I use XML catalogs for years and I love it. I even got a prototype implementation for .NET which works for some my stuff. But full-blown XML Catalogs implementation for .NET is still deep down my todo list, cause I don't see much user requests. And I really wonder why.
As a matter of interest XML Editor in Microsoft Visual Studio 2005 supports so-called "schema catalog files" which can be used to point to schema locations other than Visual Studio's own schema cache directory. Every other XML editor on this planet solves URI resolving problem with XML Catalogs, but obviously not Microsoft's one. What's worse - brand new XML Editor in Visual Studio 2005 provides no extensibility points for third-parties for resolving XML resources in a custom way. That sucks. (Hey, that's a third post in a row where I use this highly technical term "suck", hmmm :)
Anyway, if you personally need XML Catalogs for .NET platform - just drop me a line, I want to gather some user requests.
XmlReaderSettings settings = new XmlReaderSettings(); settings.ValidationType = ValidationType.DTD; XmlReader inner = XmlReader.Create("book.xml", settings); // DTD Validation settings.Schemas.Add("urn:book-schema", "book.xsd"); settings.ValidationType = ValidationType.Schema; XmlReader outer = XmlReader.Create(inner, settings); // XML Schema ValidationThat's so intuitive and clean, but I'm sure many won't figure it out the first time. Shame on me, but I didn't. So I write this to save somebody his time. You know, .NET used to suck on chaining XmlReaders, but not anymore.