Adding attributes to the manifest.xsf file

S

Simon vdB

Hi,

I'm afraid that being a relative newbie to InfoPath i have stumbled at
an early hurdle.

I attempting to 'Fully Trust' an existing InfoPath template file, i am
unsure how to actually register the following two attributes in the
manifest.xsf file :

requireFullTrust="yes"
name="urn:MyForm:MyCompany"

The xml in my manifest.xsf file is rather long, and i am not sure
where/how to add the "attributes"?

I am not entirely clear either if i have to replace the "MyForm" and
"MyCompany" text with anything else either?

Any pointers would be much appreciated,

Simon

ps. Below is the code in my .xsf file :

<xsf:xDocumentClass solutionVersion="1.0.0.9"
productVersion="11.0.6357" solutionFormatVersion="1.100.0.0"
trustSetting="automatic" publishUrl="C:\InfoPath Forms\manifest.xsf"
name="urn:schemas-microsoft-com:eek:ffice:infopath:InfoPath-Forms:-myXSD-2005-01-22T04-52-15"
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/2005-01-22T04:52:15"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xdUtil="http://schemas.microsoft.com/office/infopath/2003/xslt/Util"
xmlns:xdXDocument="http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument"
xmlns:xdMath="http://schemas.microsoft.com/office/infopath/2003/xslt/Math"
xmlns:xdDate="http://schemas.microsoft.com/office/infopath/2003/xslt/Date">
<xsf:package>
<xsf:files>
<xsf:file name="myschema.xsd">
<xsf:fileProperties>
<xsf:property name="namespace" type="string"
value="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-01-22T04:52:15"></xsf:property>
<xsf:property name="editability" type="string"
value="full"></xsf:property>
<xsf:property name="rootElement" type="string"
value="myFields"></xsf:property>
<xsf:property name="useOnDemandAlgorithm" type="string"
value="yes"></xsf:property>
</xsf:fileProperties>
</xsf:file>
<xsf:file name="template.xml"></xsf:file>
<xsf:file name="sampledata.xml">
<xsf:fileProperties>
<xsf:property name="fileType" type="string"
value="sampleData"></xsf:property>
</xsf:fileProperties>
</xsf:file>
<xsf:file name="view1.xsl">
<xsf:fileProperties>
<xsf:property name="lang" type="string"
value="3081"></xsf:property>
<xsf:property name="viewWidth" type="string"
value="542px"></xsf:property>
<xsf:property name="componentId" type="string"
value="58"></xsf:property>
<xsf:property name="xmlToEditName" type="string"
value="6"></xsf:property>
<xsf:property name="warning" type="string"
value="no"></xsf:property>
<xsf:property name="mode" type="string" value="1"></xsf:property>
</xsf:fileProperties>
</xsf:file>
<xsf:file name="upgrade.xsl"></xsf:file>
<xsf:file name="script.js">
<xsf:fileProperties>
<xsf:property name="scriptType" type="string"
value="userEvents"></xsf:property>
</xsf:fileProperties>
</xsf:file>
</xsf:files>
</xsf:package>
<xsf:importParameters enabled="yes"></xsf:importParameters>
<xsf:documentVersionUpgrade>
<xsf:useTransform transform="upgrade.xsl"
minVersionToUpgrade="0.0.0.0"
maxVersionToUpgrade="1.0.0.3"></xsf:useTransform>
</xsf:documentVersionUpgrade>
<xsf:views default="View 1">
<xsf:view name="View 1" caption="View 1">
<xsf:editing>
<xsf:xmlToEdit name="dateOrdered_1"
item="/my:myFields/my:dateOrdered">
<xsf:editWith proofing="no" autoComplete="no"
component="xField"></xsf:editWith>
</xsf:xmlToEdit>
<xsf:xmlToEdit name="dateRequired_2"
item="/my:myFields/my:dateRequired">
<xsf:editWith proofing="no" autoComplete="no"
component="xField"></xsf:editWith>
</xsf:xmlToEdit>
<xsf:xmlToEdit name="group6_6"
item="/my:myFields/my:group5/my:group6" container="/my:myFields">
<xsf:editWith caption="group6" xd:autogeneration="template"
component="xCollection">
<xsf:fragmentToInsert>
<xsf:chooseFragment innerFragment="my:group5/my:group6">
<my:group5>
<my:group6>
<my:field24></my:field24>
</my:group6>
</my:group5>
</xsf:chooseFragment>
</xsf:fragmentToInsert>
</xsf:editWith>
</xsf:xmlToEdit>
</xsf:editing>
<xsf:mainpane transform="view1.xsl"></xsf:mainpane>
<xsf:menuArea name="msoInsertMenu">
<xsf:menu caption="&amp;Section">
<xsf:button action="xCollection::insert" xmlToEdit="group6_6"
caption="group6"></xsf:button>
</xsf:menu>
</xsf:menuArea>
<xsf:menuArea name="msoStructuralEditingContextMenu">
<xsf:button action="xCollection::insertBefore" xmlToEdit="group6_6"
caption="Insert group6 above" showIf="immediate"></xsf:button>
<xsf:button action="xCollection::insertAfter" xmlToEdit="group6_6"
caption="Insert group6 below" showIf="immediate"></xsf:button>
<xsf:button action="xCollection::remove" xmlToEdit="group6_6"
caption="Remove group6" showIf="immediate"></xsf:button>
<xsf:button action="xCollection::insert" xmlToEdit="group6_6"
caption="Insert group6" showIf="immediate"></xsf:button>
</xsf:menuArea>
<xsf:unboundControls>
<xsf:button name="btnSubmit"></xsf:button>
</xsf:unboundControls>
</xsf:view>
</xsf:views>
<xsf:applicationParameters application="InfoPath Design Mode">
<xsf:solutionProperties lastOpenView="view1.xsl"
fullyEditableNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-01-22T04:52:15"
lastVersionNeedingTransform="1.0.0.3"
scriptLanguage="jscript"></xsf:solutionProperties>
</xsf:applicationParameters>
<xsf:documentSchemas>
<xsf:documentSchema rootSchema="yes"
location="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-01-22T04:52:15
myschema.xsd"></xsf:documentSchema>
</xsf:documentSchemas>
<xsf:fileNew>
<xsf:initialXmlDocument caption="InfoPath Forms"
href="template.xml"></xsf:initialXmlDocument>
</xsf:fileNew>
<xsf:scripts language="jscript">
<xsf:script src="script.js"></xsf:script>
</xsf:scripts>
</xsf:xDocumentClass>
 
S

Simon vdB

In fact... I have decided to use the RegForm.exe tool to create the
fully trusted state.

I am still unsure of whether or not i have to replace the "MyForm" and
"MyCompany" text with anything else in the following command line:

RegForm /U urn:MyForm:MyCompany /T Yes C:\InfoPath Forms\Capital
Expenditure Request.xsn

All contributions are welcomed!

Simon
 
A

Anjan Patel

It will work great without modification also but it is wise idea to
change that with you application name (MyForm) and your company name
(MyCompany). It will not impact anything for you as of now as you are
starting but after registerting check your registery with following
path:
Local
Machine\\SOFTWARE\\Microsoft\\Office\\11.0\\InfoPath\\SolutionsCatalog\\
You will see your forms' information. Infect it is wise idea to change
your urn.
 
M

Moon

Thanks for your input Anjan.

When i now run the RegForm command above, i get the following error:

"Error: Cannot overwrite existed file C:\InfoPath Forms\Capital
Expenditure Request.bak with the new file C:\InforPath Forms\Capital
Expenditure Request.xsn.
Competed with errors."

Any ideas?

Cheers,

Simon
 
M

Moon

Awesome Anjay... thanks a million.

The context of all this is that I am attempting to place a button on my
form (Capital Expenditure Request.xsn) and save the form throught the
button_onclick event.

I initially couldn't do this because the form was not fully trusted and
hence could not access the external script.

Now that the RegForm command has successfully run, it has created a
Capital Expenditure Request.js file and a Capital Expenditure
Request.bak file in the destination folder.
II now seem unable to open my form at all... do i need to run the code
somehow in the Capital Expenditure Request.js file?? If so... i'm not
sure how?

Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top