Share via


How Office Locates XML Expansion Packs [Office 2003 SDK Documentation]

When the host application opens a document that contains customer-defined XML markup, the host application checks the locations listed below to determine if an associated XML expansion pack is available to load smart document components.

For more information about the process that the host application follows when attempting to locate an XML expansion pack, see Locating an XML Expansion Pack.

XML processing instruction

When any XML file is loaded by Microsoft Office 2003, it is checked for a processing instruction that tells Office where to locate the associated XML expansion pack. This processing instruction must use the following format:

<?mso-solutionextension URI="namespace" manifestPath="path">

For example:

<?mso-solutionextension URI="http://schemas.contoso.com/sales/contoso" manifestPath="http://contoso.com/XEP/salesXEP.xml">

The attributes in this processing instruction are as follows:

  • URI  The XML namespace used by the XML expansion pack. Must be identical to the uri element in the XML expansion pack manifest file.
  • context  The smart document namespace: http://schemas.microsoft.com/office/smartdocuments/2003.
  • manifestPath  The location of the XML expansion pack manifest file. This location can be expressed as a local, UNC, or HTTP path.
  • solutionID  The value of the solution ID custom document property, as shown in the Properties dialog box in the smart document.

Note  The XML processing instruction is currently supported only in Microsoft Office Word 2003.

Schema Library information

The Schema Library is a registry subkey that contains information about all known XML namespaces and tells applications the location of the components (for example, XML expansion packs, XML schemas, smart documents, and so on) that are associated with that namespace.

When an XML expansion pack is installed, Office writes registry entries under the Schema Library subkey that indicate the XML namespace of the XML expansion pack, and the location and version of all the files needed to run the smart document. This information could be deployed to users' computers, thus ensuring that any known XML namespace will automatically be associated with the appropriate components.

Information in the document

When an XML expansion pack is attached to a document, the host application writes information to the document that maintains a link between the document and the XML expansion pack manifest file. This information is stored in several places in the document, including as custom document properties named SolutionID (a unique link to a particular XML expansion pack) and SolutionURL (a link to the XML expansion pack manifest file from which the components were downloaded).

For information about what happens when you attach an XML expansion pack to a document, see Attaching an XML Expansion Pack. For information about how to attach an XML expansion pack, see the online Help for the host application.

XML expansion pack collections

An XML expansion pack collection is an XML file that contains references to all known namespace/XML expansion pack pairs. To easily update your smart document deployments, you can deploy a single registry entry that links Office 2003 to a central XML expansion pack collection file. You can then use this central collection file to update the XML expansion pack/namespace relationships that are used by all machines in your organization when Office applications encounter XML in any namespace referenced in the collection file.

For more information about how to set up and use XML expansion pack collections, see Understanding XML Expansion Pack Manifest Collections.