There's a few gotchas with using advanced capabilities of the XML Schema specifications in the .Net world. Mostly this is because some of the features are not enabled by default. Here's the list I'ver personally run across
-
xs:key or xs:unique
If you are using either of these constructs you need to make sure that you enable the feature by supplying the XmlSchemaValidationFlags.ProcessIdentityConstraints flag to an XmlSettings class.
-
xpath statements are not totally compliant
Any reference or constraints using XPath only implement a subset AND do not follow the specification when it comes to namespaces. Basically if you have a qualified document (defined as prefix tns) then write your XPath along the lines of tns:parentelement/tns:childelement. This holds true for your attributes as well!
-
Smegged up schemas don't tell you that they're smegged up during validation
Just set XmlSchemaValidationFlags.ReportValidationWarnings flag ALWAYS. Seriously. DO IT.
The XMl boys have some further information that might be helpful on their blog. Worth a read...
|
|
Jimmy Zimms is currently currently in his underground lair, plotting the downfall of mankind...
|
|