BUG: The minLength attribute in an XML Schema is not validated when an attribute or element value is set to empty or null in a XML string (826753)
The information in this article applies to:
- Microsoft XML 4.0 SP2
- Microsoft XML 4.0 SP1
- Microsoft XML 4.0
- Microsoft XML 3.0 SP3
- Microsoft XML 3.0 SP2
- Microsoft XML 3.0 SP1
- Microsoft XML 3.0
- Microsoft XML 2.6
- Microsoft XML 2.5
- Microsoft XML 2.0
SYMPTOMSYou 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.CAUSEThe 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.STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
REFERENCESFor 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: 307379
HOW TO: Validate an XML Document by Using DTD, XDR, or XSD in Visual C# .NET
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbXML kbSchema kbbug KB826753 kbAudDeveloper |
---|
|