To validate the original XML file against the schema that is generated during the import, you must modify the original XML file. You must remove all of the namespaces and any prefixes for all attributes and elements in the XML document.
To modify the original Excel XML document so that it can validate against the imported schema, follow these steps:
- Excel defines the following namespaces in the WorkBook root element:
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40"
Remove all of these namespaces except for the following namespace:
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
- Remove any references to any of these namespaces. If any of these namespaces prefix any attributes or elements, remove the prefixes. For example, remove the x: from the x:FullColumns attribute.
- Save your changes to the Excel XML file.
- From the Tools menu, click Validate Instance to validate the modified data instance against the newly imported schema.
NOTE: BizTalk may replace some of the prefixes with underscore characters (_). - When you try to validate in the BizTalk Editor, if you receive the following error message (or similar):
The XML document has failed validation for the following reason:
The attribute 'FullColumns' on this element is not defined in the
DTD/Schema. Line:34, Position:17
FullRows="1">
you must review the schema to determine the correct name for the attribute.
In this case, you must change FullColumns to x_FullColumns in the original Excel XML file.
If multiple, similar errors occur, use the same procedure for all of the attributes or elements that these error messages list.