Microsoft KB Archive/307422

From BetaArchive Wiki
Knowledge Base


Article ID: 307422

Article Last Modified on 3/7/2006



APPLIES TO

  • Microsoft Access 2002 Standard Edition
  • Microsoft Visual Studio .NET 2002 Professional Edition



This article was previously published under Q307422

SYMPTOMS

If you open a schema that is produced by using Access, you receive the following error message in the Visual Studio .NET designer:

The XML Designer encountered the following error while reading this file:

Document Element tag xsd:schema must identify the XSD schema namespace. Do this by adding an attribute xmlns="http://www.w3.org/2001/XMLSchema%22 to the Document Element tag

Please return to source view and correct these errors.


CAUSE

The Access schema identifies an earlier draft of the XSD namespace as follows:

However, Visual Studio .NET supports the most recent draft, which is as follows:

RESOLUTION

To work around this issue, replace the following line:

<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">

with the following line instead:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">

STATUS

This behavior is by design.

MORE INFORMATION

  1. In Access 2002, select a table that you want to export.
  2. Right-click the table, and then click Export on the shortcut menu.
  3. In the Save as Type list, select XML Documents.
  4. In the dialog box that appears, select Schema of Data.
  5. After you save this file where you want it, right-click the file, and then click Visual Studio .NET to open the file.

You receive the error message indicated in the "Symptoms" section.


REFERENCES

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

295215 Presentation is not applied to XML exported with embedded schema


291133 Supported data sources for importing, for exporting, and for linking in an Access 2002 database project


For additional information on the WC3 schema specifications, see: [1]


Additional query words: Namespace, SKD, XML, schema, Document Element tag, export

Keywords: kbprb kbideproject kbvs2005swept kbvs2005doesnotapply KB307422