Share via


Using XML Expansion Pack Collections [Office 2003 SDK Documentation]

XML expansion pack collections can greatly simplify the deployment of smart documents by allowing an organization to deploy an XML expansion pack without requiring users to explicitly attach the XML expansion pack to each of their existing documents.

This means that organizations can deploy documents with XML markup and easily link these documents to smart document components the next time a document in that XML namespace is opened.

Note  XML expansion pack collections are currently supported only in Microsoft Office Word 2003.

XML expansion pack collection files

To create an XML expansion pack collection file, you need to create a simple XML file in the XML expansion pack namespace. For more information, see the XML Expansion Pack Manifest Schema reference.

The following is an example of a simple XML expansion pack collection file:

<manifestCollection xmlns="http://schemas.microsoft.com/office/xmlexpansionpacks/2003">
    <manifest>
        <uri>http://www.contoso.com/contoso/2003/sales</uri>
        <path>\\contoso-server\xmlexpansionpacks\salesmanifest.xml</path>
    </manifest>
    <manifest>
        <uri>urn:schemas-fourthcoffee-com:marketing-schema</uri>
        <path>http://www.fourthcoffee.com/xepdownload/manifest.xml</path>
    </manifest>
</manifestCollection>

This collection file would automatically direct Microsoft Office to an XML expansion pack located at a UNC path when files containing XML markup that adheres to a schema in the "http://www.contoso.com/contoso/2003/sales" namespace are opened, and to an XML expansion pack on a Web server when files containing XML markup that adheres to a schema in the "urn:schemas-fourthcoffee-com:marketing-schema" namespace are opened, even if those files have no direct link to the XML expansion pack.

For example, if a proposal template was deployed by using XML markup in the "http://www.contoso.com/contoso/2003/sales" namespace above, and later an XML expansion pack is developed that assists users with filling out that proposal, if a link to an XML expansion pack collection was deployed to users' desktops, the next time they opened the template, Office would prompt them to install the XML expansion pack.

XML expansion pack collection registry keys

To enable an XML expansion pack collection on a user's computer, registry key entries must be written to the Schema Library registry subkey to allow Office to locate the XML expansion pack collection file. These registry modifications are as follows:

  1. Create the following registry subkey:

    HKEY_CURRENT_USER\Software\Microsoft\Schema Library\http://schemas.microsoft.com/office/xmlexpansionpacks/2003\0

    Note  This creates the following registry path:

  • Write the following entries under the 0 registry subkey:
    • Key = http://schemas.microsoft.com/office/xmlexpansionpacks/2003

      Note  Registry subkeys are case-insensitive but XML namespaces are case-sensitive, so Office checks this entry to get the exact spelling and case of the XML namespace.

    • manifestCollection = path to the manifest collection file

      This entry is where Office checks for the XML expansion pack collection file.