Using XSD schema for field validation when databinding to XML
I'd like to create an application, part of which involves the customer creating XML documents compliant with a government standard schema.
Much of the data will be filled in automatically, but parts will be manually entered by the customer.
For the customer data, I want to create a few simple forms for data input. I thought I could use data binding for this.
I would like each input field on the form to be validated against the schema definition of that element in the xml file, rather than just validating the finished file all in one go.
I know that InfoPath can do this sort of thing, but there does not appear to be a framework in Windows forms for attaching schema validation rules to specific input fields.
I'm considering creating a custom datasource or extender provider to hook up an input field with some logic to fetch the corresponding schema definition from the schema object model, discover the validation rules for that element and validate the input against them.
If anyone has any design tips or suggestions I would be very interested.
It seems to me like something a lot of people would like to do, so if anyone knows of any existing code, or third party controls that already have this functionality please let me know.

