< Day Day Up > |
The .xml Template FileAll unpacked InfoPath form templates have a template.xml file. The template.xml file is, essentially , a sample XML instance document that provides an example of how a permitted XML document can look.
Let's look in more detail at the template.xml file extracted from SimpleControls.xsn , shown in Listing 15.1. I have broken the code into short lines for ease of printing.
Listing 15.1. The template.xml File Extracted from SimpleControls.xsn<?xml version="1.0" encoding="UTF-8"?> <?mso-infoPathSolution solutionVersion="1.0.0.2" href="manifest.xsf" productVersion="11.0.5531" PIVersion="1.0.0.0" ?> <?mso-application progid="InfoPath.Document"?> <my:myFields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2003-12-13T15:12:34"> <my:field1></my:field1> <my:field2></my:field2> </my:myFields> The file contains an XML declaration in its first line. Then there are two Microsoft-specific processing instructions: Notice the href pseudo-attribute in the mso-infoPathSolution processing instruction. The value of the href pseudo-attribute indicates the location of the .xsf file for the form template, which is manifest.xsf by default. The mso-application processing instruction indicates that the XML is an InfoPath form. This means, for example, that if there is a link to a form in Internet Explorer, the InfoPath client opens the form, overriding any association between another application and .xml files. Following the processing instructions, a nested hierarchy of XML elements corresponds to the hierarchy of the group (s) and field(s) in the InfoPath data source. |
< Day Day Up > |