But when the attributes are present, they rule the existence of the element.For instance, an element can occur in an xml file, provided the value of the attribute min Occurs is 1 or more.It is intended to be mostly compatible with XML Schema 1.0 and to have approximately the same scope, but also to fix bugs and make whatever improvements we can, consistent with the constraints on scope and compatibility.XML Schema 1.1 Part 2: Datatypes and XML Schema 1.1 Part 1: Structures are available.
If the attribute is made global, as is seen in the earlier examples, then it can be accessed from zzz too.
I've been doing some validating of documents against an XSD lately.
Validation is pretty straight forward, you take any Xml Text Reader and wrap and run it through the Xml Validating Reader.
Use Reflector to determine what the ultimate fully qualified resource name is if you have trouble.
It's easy to pull the main schema out of it's resource and pass the Stream into Xml Schema. It's slightly less obvious how to get that schema to resolve its imports.
Remember that xsd:import's schema Location is also a hint, so we can't have just one big file that both imports and includes.