Article ID: 826753 - View products that this article applies to.
You set an element or attribute value to empty or to null in an XML file. When you validate the contents of an XML string with an XML schema that specifies the minLength attribute as greater than zero, XML validation does not occur, and the parser error does not occur.
The World Wide Web Consortium (W3C) schema specification has a method to validate content that is set to empty or null. XML-Data Reduced (XDR) schema does not have this method. XDR does not validate elements or attribute values that are null or empty, and makes a choice about validation. Therefore, XDR does not validate the minLength attribute when the value of an element or attribute in an XML string is set to empty or to null.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Steps to reproduce the behavior
For more information about the minLength and maxLength attributes, visit the following Microsoft Developer Network (MSDN) Web site: For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/307379/ )HOW TO: Validate an XML Document by Using DTD, XDR, or XSD in Visual C# .NET
Article ID: 826753 - Last Review: January 17, 2007 - Revision: 2.1