The Content and Purpose of the .xsn File

 <  Day Day Up  >  

The Content and Purpose of the .xsn File

Up to this point we have tacitly assumed that, as we manipulate parts of the InfoPath user interface, InfoPath "just works." In this chapter, we will look a little under the hood at the files the InfoPath program creates in a form template as, for example, you use the Data Source Setup Wizard, or design a new view. We will also briefly consider some aspects of how InfoPath uses these form files .

The States of a Form Template

An InfoPath form template can exist in two forms:

  • An .xsn file, which is a cabinet file that contains several form files, such as the manifest file, the XSLT files that create views, and one or more W3C XML Schema documents that specify the permitted structure of the data source for the form template.

  • Alternatively, in design mode the files that make up the form template can be extracted. After extraction, the form files exist as normal files in a folder that contains all the files that make up the .xsn file.

When developing forms using the InfoPath user interface, you will most likely choose to work with the .xsn file. However, if you need to hand-edit any of the files that make up the form template, it is essential to extract the .xsn file into a folder before you update the form files.

FORM FILES

The .xsn file is called the form template . The files that can be extracted from the form template are called the form files .


The Files That Make Up a Form Template

A typical InfoPath form template includes several of the following form files:

  • The XML template file

  • The .xsf manifest file

  • The .xsl XSLT files that create views

  • The .xsd W3C XML Schema documents that specify the permitted structure of the XML data the form template produces

  • Zero or more VBScript or JScript files

  • Executable files created outside InfoPath

  • Image files used in the views of the form template

  • XHTML files used in custom task panes

Each of these files will be considered in more detail later in this chapter.

Unpacking a Form Template

Unpacking a form template is straightforward. With the form template open in design mode, select the File menu, and then select the Extract Form Files option. The Browse for Folder window opens (see Figure 15.1).

Figure 15.1. The Browse for Folder window.

graphics/15fig01.gif

Browse to the desired location on your hard drive or on the network. Click the Make New Folder button in the Browse for Folder window to create a new folder into which to extract the files.

After the files have been extracted, individual files can be identified and, where appropriate, edited. For example, the file SimpleControls.xsn is included in the download. When the form files are extracted from the form template, you should see the same files as shown in Figure 15.2.

Figure 15.2. The folder containing the form files that make up SimpleControls.xsn .

graphics/15fig02.gif

 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net