< Day Day Up > |
Several elements are used in the manifest.xsf file to control how views are created and rendered. The relevant child element of the xsf:xDocumentClass element is the xsf:views element. Descendant elements of the xsf:views element contain all the information specifying the views used in the form template. The <xsf:views> Element and Its ContentThe xsf:views element is used to specify all the views present in an InfoPath 2003 form template. An xsf:views element must be present in all manifest files as a child element of the xsf:xDocumentClass element. The xsf:views element has an optional default attribute whose value is the name of the default view in the form template. The child elements of the xsf:views element consist of one or more xsf:view elements. Thus, in a form template that has a DataView view and a PrintView view, the content of the xsf:views element could look like this: <xsf:views default="DataView"> <xsf:view name=""DataView"" caption="Data"> <xsf:mainPane ... /> </xsf:view> <xsf:view name="PrintView" ...> <xsf:mainPane ... /> <!-- Content may include an <xsf:printSettings> element --> </xsf:view> </xsf:views> Next we will look at the xsf:view element. The <xsf:view> ElementAn xsf:view element is present for each view in a form template. It has three attributes:
The permitted child elements of the xsf:view element are as follows :
The xsf:mainpane and xsf:printSettings elements are described in the sections that follow. The xsf:menu and xsf:toolbar elements are used when custom menus or toolbars are included in a form template. The <xsf:printSettings> ElementThe xsf:printSettings element, when present, is used to specify the print settings for a particular view. It can have any of the following as attributes:
If present, the value of each of the bottomMargin , leftMargin , rightMargin , and topMargin attributes must be zero or greater. So, to print a view according to specified margins, the xsf:printSettings element might look like this: <xsf:view name=" viewName "> <xsf:printSettings marginunitsType = "in" header = "This is a test header" footer = "This is a test footer" bottomMargin = "1" leftMargin = "1" rightMargin = "1" topMargin = "1" /> ... </xsf:view> The <xsf:mainpane> ElementThe xsf:mainpane element specifies what is to be displayed in the form area. I assume that "main pane" was the term used internally for what, before product release, became known as the form area. The xsf:mainpane element has a single attribute, the transform attribute, which specifies a relative URL to the XSLT stylesheet used to create the view. |
< Day Day Up > |