The xsf:xDocumentClass Element

 <  Day Day Up  >  

The <xsf:xDocumentClass> Element

The xsf:xDocumentClass element is the document element of the manifest.xsf file. All manifest files have an xsf:xDocumentClass element.

Its attributes and child elements are listed and described in the remainder of this section.

Attributes of the <xsf:xDocumentClass> Element

The xsf:xDocumentClass element has ten attributes, two of which are required, eight of which are optional.

Required Attributes of <xsf:xDocumentClass>

The required attributes of the xsf:xDocumentClass element are as follows :

  • solutionFormatVersion ” The attribute identifies the version of the InfoPath solution (a synonym for the term form template ). The format of the attribute's value is ####.####.####.####, where the pattern is major.minor.revision.build .

  • xmlns ” The namespace declaration for the namespace URI http://schemas.microsoft.com/office/infopath/2003/solutionDefinition .

Optional Attributes of <xsf:xDocumentClass>

The eight optional attributes of the xsf:xDocumentClass element are as follows:

  • author ” Specifies the name of the author of the form template.

  • dataFormSolution ” Identifies the form template as a database solution. Permitted values are yes or no . The default value is no .

  • description ” Provides a brief description of the form template and/or its purpose. The value of the description attribute is a string with a maximum of 255 characters .

  • name ” Provides a URN name for the form template. In the absence of the name attribute, the form template's name is defined in the URL contained in a processing instruction of the form template's XML instance document. A name attribute is present only when the form template is fully trusted.

  • productVersion ” Specifies the version of InfoPath used to create the form template. The format of the attribute's value is ####.####.####, where the pattern is major.minor.build . Form templates created using the initial commercial release version of InfoPath 2003 have a value of 11.0.5531 for the productVersion attribute.

  • publishUrl ” Specifies the URL to which a URL-based form template is published. The value of the publishUrl attribute is set automatically when a form template is published. If the URL from which a form template is loaded, as indicated by the processing instruction in template.xml , does not match the value of the publishUrl attribute, no forms can be created from the template until the value of the publishUrl attribute is changed to match the current location of the form template.

  • requireFullTrust ” Specifies whether the form template is fully trusted. Permitted values are yes and no . The default value is no . When the value is yes , the name attribute must be present and contain a URN as its value. This attribute's name is potentially misleading. It might have been better called givenFullTrust , because it indicates that the form template is treated as if it is fully trustworthy, including being able to use security level 3 components of the InfoPath object model.

  • solutionVersion ” Specifies the version of the form template. The format of the attribute's value is ####.####.####.####, where the pattern is major.minor.revision.build .

In addition to the required and optional attributes mentioned here, other namespace declarations may be present, depending on which namespace(s) the XML elements underlying the InfoPath data source belong to.

To learn more about security levels in InfoPath form templates, see "Object Model Security Levels," p. 221 (Chapter 12).


Child Elements of the <xsf:xDocumentClass> Element

The xsf:xDocumentClass element can have 18 child elements, 2 of which are required, and 16 of which are optional. This gives an indication of both the flexibility and potential complexity of the structure of the manifest file.

Required Child Elements of <xsf:xDocumentClass>

The xsf:xDocumentClass element has two required elements:

  • xsf:package ” The xsf:package element and its descendant elements specify the files that make up the form template.

  • xsf:views ” The xsf:views element and its descendant elements specify the views used in the form template.

Both of these elements are described in detail later in this chapter.

Optional Child Elements of <xsf:xDocumentClass>

There are 16 optional child elements of the xsf:xDocumentClass element. The elements are listed here in alphabetical order, not necessarily the order in which they will occur when a manifest is produced by the InfoPath application:

  • xsf:applicationParameters ” Has a required application attribute that identifies the application used to create the form template and whose only supported value is InfoPath Design Mode . The xsf:applicationParameters element may, optionally , have an xsf:solutionProperties element that contains design time information about the form template.

  • xsf:customValidation ” Defines rule-based custom validation in addition to W3C XML Schema validation constraints. The xsf:customValidation element may have a child xsf:errorCondition element, which is described later in this chapter.

  • xsf:dataObjects ” Specifies all secondary data sources used in an InfoPath form template.

  • xsf:documentSchemas ” Specifies the location(s) of W3C XML Schema document(s).

  • xsf:documentSignatures ” Defines the location of the node that contains a digital signature.

  • xsf:documentVersionUpgrade ” Specifies how forms created with an earlier version of a form template can be updated.

  • xsf:domEventHandlers ” Contains pointers to script-based event handlers for changes in the DOM.

  • xsf:extensions ” Reserved for Microsoft's use in future versions of InfoPath.

  • xsf:fileNew ” Specifies the location of an XML file containing sample data for a newly opened form.

  • xsf:importParameters ” Specifies the parameters used in a form merge (import).

  • xsf:listProperties ” Specifies properties to be promoted in a SharePoint form library.

  • xsf:query ” Specifies a data adapter associated with the form's underlying XML document.

  • xsf:schemaErrorMessages ” Specifies custom error messages to replace default validation error messages.

  • xsf:scripts ” Specifies the location(s) of any script files used in the form template.

  • xsf:submit ” Specifies the submission information for the form.

  • xsf:taskpane ” Defines a custom task pane.

Notice that many of these element names are plural, implying that they contain one or more child elements.

The <xsf:dataObjects> Element

The xsf:dataObjects element specifies secondary data sources used in an InfoPath form template. The xsf:dataObjects element has no attributes. It has, as children, zero or more xsf:dataObject elements.

Each xsf:dataObject element represents an XML DOM object corresponding to a secondary data source. The xsf:dataObject element has three attributes, one of which is required. The attributes are as follows:

  • initOnLoad ” An optional attribute that specifies whether the secondary data object is initialized on document load. Permitted values are yes and no . The default value is no .

  • name ” A required attribute that specifies the name of the secondary data object.

  • schema ” An optional attribute that specifies a W3C XML Schema document specifying constraints on the structure of the secondary data source object. The value of the schema attribute is a string that will typically be a relative URL.

The xsf:dataObject element has a single element child, xsf:query , which is required.

The <xsf:query> Element

The xsf:query element associates a data adapter with each secondary data source.

An xsf:query element has a single child element that represents the type of data adapter applicable to the secondary data source. The possible child elements of the xsf:query element are as follows:

  • xsf:adoAdapter ” Specifies an ActiveX Data Object (ADO) data adapter that retrieves data from an ADO data source.

  • xsf:webServiceAdapter ” Specifies an XML Web service adapter that retrieves data from an XML Web service.

  • xsf:xmlFileAdapter ” Specifies an XML file data adapter that retrieves data from an XML file to populate the secondary data object.

The <xsf:adoAdapter> Element

The xsf:adoAdapter element is an empty element and has two required attributes and two optional attributes. If you want to connect to a relational DBMS data source other than SQL Server or Access, you will need to edit the attributes of an xsf:adoAdapter element directly.

The required attributes of the xsf:adoAdapter element are as follows:

  • commandText ” A string value that specifies the ADO SQL command used to retrieve data from the ADO data source.

  • connectionString ” Specifies components of the ADO connection string used to connect to the data source including Provider, Data Source, User ID and Password.

The optional attributes of the xsf:adoAdapter element are as follows:

  • queryAllowed ” Specifies whether data can be retrieved through the query method of the data adapter object. The permitted values are yes and no . The default value is yes .

  • submitAllowed ” Specifies whether data can be submitted using the submit method of the data adapter object. The permitted values are yes and no . The default value is no .

The following code, which has all four attributes, shows the xsf:adoDataAdapter element for a form template that connects to an Access database:

 <xsf:adoAdapter  connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;User ID=Admin;Data Source=infnwind.mdb;Mode=Share Deny None;Extended Properties=&quot;&quot;;Jet OLEDB:System database=&quot;&quot;;Jet OLEDB:Registry Path=&quot;&quot;;Jet OLEDB:Database Password=&quot;&quot;;Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=&quot;&quot;;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"  commandText="shape&#xA;      {  select [EmployeeID],[LastName],[FirstName],[Title],[BirthDate],  [HireDate],[Address],[City],[Region],[PostalCode],[Country],[HomePhone],  [Extension] from [Employees] as [Employees]}  as [Employees]&#xA;  append&#xA;  ({select [OrderID],[CustomerID],[EmployeeID],[OrderDate],[RequiredDate],  [ShippedDate] from [Orders]}&#xA;  relate [EmployeeID] TO [EmployeeID])  as [Orders]"  queryAllowed="yes"  submitAllowed="yes"> </xsf:adoAdapter> 
The <xsf:webServiceAdapter> Element

The xsf:webServiceAdapter element has three attributes, two of which are required:

  • queryAllowed ” Specifies whether the XML Web service can be used to query a data source. Allowed values are yes and no . The default value is yes .

  • submitAllowed ” Specifies whether InfoPath can submit data. Allowed values are yes and no . The default value is no .

  • wsdlUrl ” Specifies the URL where the WSDL file for the XML Web service is located.

TWO USES FOR THE <xsf:webServiceAdapter> ELEMENT

The xsf:webServiceAdapter element can be a child element of either the xsf:query element (when the XML Web service is querying a data source) or the xsf:submit element (when the XML Web service is submitting data to a data source).


An xsf:webServiceAdapter element has a single child operation element. The operation element can have three attributes:

  • name ” Specifies a unique name for the operation.

  • soapAction ” Specifies the content of the SOAPAction attribute of the SOAP request message.

  • serviceUrl ” Specifies the URL to which the Web service request should be sent.

In turn , the xsf:operation element has zero or more child xsf:input elements. If present, the xsf:input element contains substitution information for part of the SOAP message.

The xsf:input element, if present, contains zero or more xsf:partFragment elements.

The <xsf:xmlFileAdapter> Element

The xsf:xmlFileAdapter element specifies a data adapter for retrieving a static XML file. The fileUrl attribute of the xsf:xmlFileAdapter element specifies the location of the XML file.

 <  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