How to modify a published infopath Template

Source: Internet
Author: User
Tags all definition

After designing an infopath template, You need to publish it to a public place (such as a public network). You can download the template content and generate an XML data file in a fixed format. A complex infopath template can contain a primary data source (schema file) or multiple secondary data sources, and may also include files generated by vsta (Visual Studio Tools for application ).Code. The source file of the infopath template is the same as that of the released template file (both. xsn), but for a published infopath template file, the correspondingSource code(Including the original schema file, auxiliary data source file, vsta source code, etc.), it is difficult for us to redesign it. Is there any good way to achieve this?

The answer is yes!

First, find the published infopath template xsn file on the public network and download it to your local device. Right-click the xsn file and select design. Then you can modify the infopath template interface again, but you cannot directly modify the schema of the primary data source. Exit the design mode and change the suffix of the xsn file to cab. Double-click it to open it. You can see that it contains many files you need, including manifest. xsf file (infopath form definition file), schema file of the primary data source, view1.xsl interface definition file, template. XML, sampledata. XML, and other auxiliary data source files and third-party controls, compiled by vbta. DLL files.

Almost all definition files can be manually modified. You can drag and drop the files to be modified in the cab file to another location to manually modify them, and then design the xsn file to re-specify these modified files. You can also drag and drop all files in the cab file to a new folder, modify the desired file, and right-click manifest. xsf file, select design, and save infopath as a new file. Note: If you have redefined the schema file of the primary data source, you need to check the control binding status in the infopath design to ensure that all controls are correctly bound. To modify the prefix of an XML node, you must modify the schema files of manifest. xsf, view1.xsl, template. XML, and the primary data source.

In the schema definition fileAttributeformdefaultSpecifies whether the prefix must be defined for the generated XML node attributes. The value is not required for unqualified and the value is required for qualified.ElementformdefaultSpecifies whether the prefix must be defined for the generated XML node. The value is not required for unqualified and the value is required for qualified. The following code:

< Xs: Schema Attributeformdefault = "Unqualified" Elementformdefault = "Qualified" targetnamespace= "Http://www.jaxu.com" Xmlns: J = "Http://www.jaxu.com" > </Xs: schema>

The targetnamespace attribute specifies the namespace corresponding to the generated XML node or the prefix of the attribute. The namespace must have the same URI as the namespace definition specified later. For the specified prefix, the manifest. xsf, view1.xsl, and template. xml files must have the same Uri. That is to say, if you want to modify the node or attribute prefix in the XML file generated by infopath, the prefixes in these four files must be modified to the same.

DLL files cannot be directly modified. However, you can decompile and recreate the vsta project.

After the modification, repackage and design the infopath file, and then republish the file to update the template. Note that you may need to specify a new signature for it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.