14.1. The Structure of an InfoPath Form

InfoPath form templates are packaged in ZIP files with an .XSN extension. The ZIP format makes sense for a number of reasons. It is a universally recognized archival format that is supported by most operating systems. It also handles compressed binary formats easily, which enables the form template to include both XML content and precompiled assemblies. Figure 14-1 shows the XSN file for the sample expense report form.

Figure 14.1. Figure 14-1

14.1.1. The Form Definition File (XSF)

The manifest.xsf file contains XML code that describes all aspects of the form. It includes references to the other files in the archive as well as references to the various schemas used to describe different parts of the form. If you open this file in notepad and scroll through it, you can learn a lot about how InfoPath forms are organized. For instance, you can see many XML elements that describe how the form was last viewed in the InfoPath client application. There are other elements that contain information about the views, the controls used for editing data elements, the menus to display for various parts of the form, and the event handlers to associate with individual controls.

Toward the bottom of the file, there is an xsf:extensions element that warrants some attention. This element is used to bind the form to other platforms, like SharePoint. The following ...

Get Professional SharePoint® 2007 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.