PRB: XML Viewer Does not Perform Validation (239540)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5
  • Microsoft XML 2.0
  • Microsoft XML 2.5
  • Microsoft XML 2.6
  • Microsoft XML 3.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.

REFERENCES

For additional information about XML, please see the following:

Modification Type:MajorLast Reviewed:10/12/2001
Keywords:kbDSupport kbFAQ kbprb KB239540