Sandboxed InfoPath Form Templates

 <  Day Day Up  >  

When the design of an InfoPath form template is complete, it is often published using the Publishing Wizard. An InfoPath form template can be published to a Windows SharePoint Services Web site (or a SharePoint Portal Server 2003 site), to a standard Web site, or to a Windows file share.

Form Templates That Have Never Been Published

If a form template has never been published ”for example, if you are in the process of designing a new form template and have merely saved it to your hard disk ”there is no publishUrl attribute on the xsf:xDocumentClass element of the form definition ( .xsf ) file. The following code is from the form definition file of a form template that has never been published, and it shows the start tag of the xsf:xDocumentClass element:

 <xsf:xDocumentClass solutionVersion="1.0.0.2" productVersion="11.0.5531"  solutionFormatVersion="1.0.0.0"  xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"  xmlns:msxsl="urn:schemas-microsoft-com:xslt"  xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2003-10-23T20:23:38"> 

If the form had been published to a remote Web server, a publishUrl attribute would be present with an appropriate URL value for the attribute. Similarly, even if you publish to your local hard drive, a publishUrl attribute is added, but you are likely to publish either to a Web server or a Windows SharePoint Services site.

InfoPath uses the value of the publishUrl attribute in deciding the domain to which the form template belongs. It uses that URL despite the fact that a local copy of the form template is cached. In other words, you can change the URL of a form template only by republishing it to a new location or by hand-editing the manifest file.

Published Forms

In design mode, InfoPath has a Publishing Wizard that offers three options for publishing a form template:

  • To a file share

  • To a Web server

  • To a Windows SharePoint Services site (which can include a SharePoint Portal Server 2003 site)

To access the Publishing Wizard, enter design mode and select File, Publish or use the keyboard shortcut Alt+F, then U.

When using the Publishing Wizard, you can publish the form template once to a specified location. You cannot copy that form template to another location and expect it to work normally. If you want the .xsn file to function as a form template at a new location (including being downloadable by users), then you must republish the form template to the new desired location ( assuming you use the Publishing Wizard). That form template is then a different form template as far as the InfoPath client is concerned . (It may look exactly the same to the user , and from the designer's or developer's standpoint, nothing in the design apart from the published location has been changed.) For example, suppose that the first time it was published, the form template was published to http://www. myFirstDomain .com/MyTemplate.xsn , and the second time, it was published to http://www. mySecondDomain .com.MyTemplate.xsn . If those two URLs differ by even a single character, InfoPath will treat the form templates as different form templates.

If the two URLs are in different domains, there may be security implications depending on how those domains are characterized in the Internet Explorer security zones for the user's machine. For example, if a secondary data source for the form template is located on the server for www.myFirstDomain.com , cross-domain issues can be expected if the form template is republished to another domain.

 <  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