This documentation is archived and is not being maintained.

About the Form Definition File

Office 2007

The Microsoft Office InfoPath 2007 form definition (.xsf) file, commonly referred to as the .xsf file, serves as the manifest of an InfoPath form. The .xsf file is automatically created by InfoPath when a new form template is created and saved in design mode. As form designers and developers change the form template or add new features to it, InfoPath updates the .xsf file to reflect those changes.

Bb250980.vs_note(en-us,office.12).gif  Note
The .xsf file can also be modified directly by using any text or XML editor, such as Microsoft Notepad. However, care should be taken when making modifications to the .xsf file: if an invalid entry is made, the form that the file is associated with may be left in an unusable state. However, some customizations can be made to the .xsf file that cannot be generated in design mode.

The .xsf file is the core file of an InfoPath form because it contains information about the form as a whole. Some of the data it contains includes processing metadata, user interface customizations, schema definitions, views, business logic declarations, event handlers, and deployment information.

The following are some of the items that the .xsf file contains:

  • A unique identifier for the form
  • Global metadata information about the form, including deployment and publishing information
  • The XML Schema definitions for the XML document that the form produces
  • Definition of views and their associated user interface components (menus, toolbars, and buttons)
  • Definition of editing actions that are made available using user interface components, and how their availability will be determined contextually
  • Workflow and routing information
  • Event handlers, data validation, and business logic that is associated with individual XML nodes of the form's underlying XML document, or with the XML document itself
  • Event handlers associated with the form as a whole
  • Packaging information about all of the files contained within the form template

The .xsf file is based on the xsf and xsf2 namespaces. Its root element is the xDocumentClass element.

Bb250980.vs_note(en-us,office.12).gif  Note
A complete reference for the schema of the .xsf file, including all of its elements, attributes, and other entities, can be found in the InfoPath 2007 XSF Schema Reference on MSDN.


Show: