XML Schema: Nillable, null and minoccurs
xsi:nil = true if used would mean that the element can be present but containing no values and hence is null. minoccurs=0 means the element is optional and need not be present. Therefore to make it truly optional minoccurs= 0 should be used in the schema whereas with nil attribute the element should be present but can have a null value.Interestingly there is a bug in .NET Framework 1.1 XMLValidatingReader which ignores the nil attributes in the schema and hence any XML document validating against such a schema would throw an error.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home