Microsoft KB Archive/239540

= PRB: XML Viewer Does not Perform Validation =

Article ID: 239540

Article Last Modified on 10/12/2001

-

APPLIES TO


 * Microsoft Internet Explorer 5.0
 * Microsoft XML Parser 2.0
 * Microsoft XML Parser 2.5
 * Microsoft XML Parser 2.6
 * Microsoft XML Core Services 4.0

-



This article was previously published under Q239540



SYMPTOMS
When you are navigating the Internet Explorer browser directly to an XML file, the XML viewer does not validate the document against its Document Type Definition (DTD) or Schema.



CAUSE
Internet Explorer disables validation when XML documents are viewed directly.



STATUS
This behavior is by design.



MORE INFORMATION
In parser terms, Internet Explorer sets the resolveExternal flag to True and the validateOnParse flag to False, when directly viewing XML documents. In this configuration, the parser will load and parse a schema or DTD attached to the XML document, but it will not validate whether the XML content follows the rules described by that DTD or schema. Only parsing errors in the XML document, schema, or DTD -- such as a violation of standard XML syntax -- will be reported.

It is assumed that when you request to see the XML document in the browser, you merely want to see the XML data as is rendered against a stylesheet. This requires that the XML content be parsed, but validation against the schema or DTD is unnecessary.

In all other default uses of the XML parser, validation is performed as expected. XML applications can test an XML document's validity by placing an XML data island in an HTML page or using the XML document object model (DOM) to load the document with validateOnParse property of the DOMDocument object set to True.

